# HG changeset patch # User paulo@hit-nxdomain.opendns.com # Date 1266729508 28800 # Node ID d39e1d0d75b6eb548301c9bd1b5b5eac8054e1a6 initial add diff -r 000000000000 -r d39e1d0d75b6 AUTHORS --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/AUTHORS Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,13 @@ +Maintainers: + + * Craig Barnes + +Contributors: + + * Peter 'Luna' Runestig + - Some important memory leak fixes + + * Tom Hargreaves + - First noticed file descriptor leak in 0.0.9 + +TODO: some other people have sent patches, should list them here diff -r 000000000000 -r d39e1d0d75b6 COPYING --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/COPYING Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,340 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. diff -r 000000000000 -r d39e1d0d75b6 ChangeLog --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ChangeLog Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,244 @@ +$Id: ChangeLog,v 1.33 2006/08/06 17:26:39 hexwab Exp $ + +Gnutella 0.0.11: + + * Made SHA1 implementation work correctly on 64 bit machines. + + * Create new client GUID on each startup to prevent stupid packagers + from hurting the network. + + * Disable the timebomb once and for all. + +Gnutella 0.0.10.1: + + * Added additional revision digit to version number so we can release + packages with updated GT_RELEASE_DATE if nothing else has changed. + + * Increased web cache disabling to 365 days after built and complete + shutdown to 1.5 years. + +Gnutella 0.0.10: + + * Disconnect idle nodes that don't reply to pings. + + * Support Vendor Messages. + + * Support ConnectBack vendor message for better firewalled status + detection. + + * Slightly improved the random number seed. + + * Send an empty error page when the remote side supports queueing. + + * All searches now timeout after at most 10 minutes. + + * Only use the full http:// URL in GWebcache requests when using a proxy + (see RFC 2616 (HTTP/1.1) for further information). + + * Support outgoing compression of message streams. + + * Drop "urn:" trailer from queries sent. + + * Send full filename in PUSH uploads; seems LimeWire requires it. + + * Support p->share_hide/show for hiding shares from other nodes with + a HopsFlow message, allowing them to be efficiently un/re-shared. + + * Basic support for sending GGEP blocks. + + * Change "really-old" auto-deactivation to silent failure to avoid + creating surprises for people who don't care. + + * Support push proxies: put a GGEP block containing the IP address of + some servers we're connected to in order to improve upload performance + of firewalled nodes. + + * Ban webcaches that resolve to local IP addresses. + +Gnutella 0.0.9.2: + + * Fix file descriptor leak in file_cache.c that's been around for a while + but was made worse by syncing the nodes files every so often. + + * Don't potentially poll the CPU if the remote zlib stream is called with + Z_FINISH. + +Gnutella 0.0.9.1: + + * Remove checking for -lresolv in configure. + +Gnutella 0.0.9: + + * Fix compile problem with 0.0.8 on big-endian platforms. + + * Deactivate the plugin if it's more than one year old. + + * Close all searches when plugin is unloaded. + +Gnutella 0.0.8: + + * Trim the node list every so often to prevent it from growing unbounded. + + * Fix leak of GtNode on incoming connects. + + * No longer reply to queries marked with the same GUID. + + * Fix bug in GWebCache code where replies got discarded, as well as + some miscellaneous bugs in GWebCache code, and ban caches that + fail DNS lookups. + + * Updated list of GWebCaches. + + * Fix metadata parsing bugs where the metadata was discarded. + + * Removed questionably-bad hosts from ban-list. + + * Support new Source URL format: Gnutella:?ip=..&port=... + + * Timeout push requests to monopolize Chunks less so that Chunks + will get trapped on inactive Sources less often. + + * Shorter connection timeout to monopolize Chunks less. + +Gnutella 0.0.7: + + * Fix a compile error caused by bad prototype in a header file. + + * Use a different method for calculating the number of files/total + bytes shared. Some samples around the median of many pongs are taken + instead of just using the average of many pongs. + + * Ban downloaders for IP addresses in hostiles.txt and incorporate + ban list from peer guardian. + +Gnutella 0.0.6: + + * Support receive-side decompression of node streams (transmit-side + compression still unimplemented). + + * Source searching re-enabled. + + * Preliminary support for parsing XML metadata from packets that + have them (usually from LimeWire or Shareaza) using libxml. Support + is disabled by default and needs --with-libxml passed to configure + to enable. + + * Keep track of file sizes/file count statistics from pongs, and + approximate the number on the network (very haphazardly, I + might add). + + * Fix a potential assert failure when shares are removed. + + * Fix bug where malformed incoming connection requests would + cause CPU polling. + + * Incrementally build a larger query-routing table until the fill + ratio is 1%. Reduces bandwidth used a bit. + + * Support active-queueing. + + * Fix parsing of bitprint urns. + +Gnutella 0.0.5: + + * Don't reply to our own search requests. + + * Fix display of the time to retry when the peer we + download from supplies Retry-After: + + * Fix severe mistake in request parsing that caused almost + all uploads to fail. + + * Remove access.log support, as it has a tendency to consume + too much disk space when small chunks get requested. + +Gnutella 0.0.4: + + * Download unpausing would crash giftd. Fix it. + + * Support requests by hpath (/audio/blah/) as well since its + not too much extra code to support and useful sometimes. + + * Compression was not enabled in configure script, enabled it. + + * Firewalled nodes that did searches would accept results from + nodes with private IPs. Fixed. + + * Maintain a banlist of gwebcaches and add any gwebcaches + that return anything but 200-series responses. + + * Fixed Retry-After. + +Gnutella 0.0.3: + + * Add a node cache to store nodes learned from pongs and X-Try-Ultrapeer: + With this, connecting to the network should be much less ad-hoc. Also, + returns such nodes in X-Try-Ultrapeer: header for other nodes. + + * Access the gwebcaches on demand, rather then when the + number of nodes is arbitrarily low. + + * Use 4-bit QRP patches. Still needs to do incremental updates, though. + + * Send "206 Partial Content" replies to partial requests instead of + "200 OK". + + * Support Retry-After: header. + + * Basic static stats that assumes the network has no cycles. + + * Only send requests by file index, rather than uri-res requests, + if the previous uri-res request failed or the connection closed + abruptly. Previously, they were sent randomly. Also, send these + requests without url encoding, as that is more compatible. + + * Update HTTP transfer size after we receive a GIV response, as + giFT could change the size of a download request while we wait + for a response from the firewalled servent. + +Gnutella 0.0.2: + + * 0.0.1 would access the gwebcaches excessively due to an oversight + that the nodes retrieved from them aren't stored because they + have a vitality of 0. So, this increase in the release number should + help identifying problem behaviour between releases. + + Unfortunately, this adds a new problem in that a completely stale nodes + file will keep us from connecting. This needs a redesign to access the + caches if we've exhausted all other options. + + * Much improved search timeout system that will detect when + no more results for a search are likely to come back. Still need to + check if any results are dropped, though. + + * Fix leak of TCPC objects for persistent connections. + + * Temporarily disabled locate requests because they need some kind + of global queue to limit the rate at which they are produced. + +Gnutella 0.0.1: + + * Persistent HTTP support. + + * Eliminated most races between download_stop and push downloads. + There is still the possiblity of the remote end aborting the connection + before we giFT reissues a download_start request, but that can't be + fixed without protocol-initiated downloads. + + * Submit query-routing table of local shares to ultrapeers. + + * Support for using an http proxy to access the gwebcaches (set + "http/proxy" key in ~/.giFT/Gnutella/Gnutella.conf). + + * Testable, but unstable Ultrapeer mode. + + * Forgot to report 'Connecting' status when initiating a download. + + * Added ChangeLog. + + * Use a trie for storing the local shares database to improve + lookup time. Memory usage still needs investigation. + +Gnutella 0.0.0: + + * Basic support for searching, downloading, and uploading. diff -r 000000000000 -r d39e1d0d75b6 INSTALL --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/INSTALL Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,229 @@ +Copyright (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. + diff -r 000000000000 -r d39e1d0d75b6 Make.msvc --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Make.msvc Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,191 @@ +# $Id: Make.msvc,v 1.11 2006/08/06 17:31:22 mkern Exp $ + +GT_MAJOR_VERSION = 0 +GT_MINOR_VERSION = 0 +GT_MICRO_VERSION = 11 +GT_EXTRA_VERSION = +VERSION = $(GT_MAJOR_VERSION).$(GT_MINOR_VERSION).$(GT_MICRO_VERSION) + + +O = .obj + + +# dynamic by default +!if !defined(static) && !defined(STATIC) +DYNAMIC=1 +!endif + + +########################## +# release / debug +########################## + + +!if defined(release) || defined(RELEASE) + + +D= +DEXT= + + +CFLAGS = $(CFLAGS) -Ox -G6 +LDFLAGS = $(LDFLAGS) -release -FORCE:UNRESOLVED + +#DEFS = $(DEFS) -DNDEBUG -UDEBUG -U_DEBUG +DEFS = $(DEFS) -D_DEBUG -DDEBUG -UNDEBUG -D_WALL + + +!else # !defined(release) && !defined(RELEASE) + + +D=d +DEXT=d + + +CFLAGS = $(CFLAGS) -Od -Gm -GZ -W3 -Zi +DEFS = $(DEFS) -D_DEBUG -DDEBUG -UNDEBUG -D_WALL +LDFLAGS = $(LDFLAGS) -debug + + +!endif # defined(release) || defined(RELEASE) + + +########################## +# static / dynamic linking +########################## + + +!if defined(dynamic) || defined(DYNAMIC) + +CFLAGS = $(CFLAGS) -MD$(D) -DUSE_LTDL + +!else # !(defined(dynamic) || defined(DYNAMIC)) + +CFLAGS = $(CFLAGS) -MT$(D) -UUSE_LTDL + +!endif # defined(dynamic) || defined(DYNAMIC) + + +########################## +# libxml2 support +########################## + +!if defined(libxml2) || defined(LIBXML2) || defined(xml) || defined(XML) + + +!if "$(LIBXML2_ROOT)" == "" + +LIBXML2_ROOT=$(BUILD_ROOT)\libxml2 + +!endif # "$(LIBXML2_ROOT)" == "" + +!if !exists($(LIBXML2_ROOT)) + +!error Directory $(LIBXML2_ROOT) not found! + +!endif # !exists($(LIBXML2_ROOT)) + + +INCLUDES = $(INCLUDES) -I$(LIBXML2_ROOT)\include +DEFS = $(DEFS) -DUSE_LIBXML2 +LDFLAGS = $(LDFLAGS) -libpath:"$(LIBXML2_ROOT)\win32\bin.msvc" +LIBS = $(LIBS) libxml2.lib + + +!if defined(dynamic) || defined(DYNAMIC) + +DIST_DLLS = $(DIST_DLLS) $(LIBXML2_ROOT)\win32\bin.msvc\libxml2.dll + +!endif # defined(dynamic) || defined(DYNAMIC) + + +!endif # defined(libxml2) || defined(LIBXML2) || defined(xml) || defined(XML) + + +########################## +# zlib support +########################## + + +!if defined(zlib) || defined(ZLIB) + + +!if "$(ZLIB_ROOT)" == "" + + +ZLIB_ROOT=$(BUILD_ROOT)\zlib + + +!endif # "$(ZLIB_ROOT)" == "" + + +!if !exists($(ZLIB_ROOT)) + + +!error Directory $(ZLIB_ROOT) not found! + + +!endif # !exists($(ZLIB_ROOT)) + + +INCLUDES = $(INCLUDES) -I$(ZLIB_ROOT) +DEFS = $(DEFS) -DUSE_ZLIB +LDFLAGS = $(LDFLAGS) -libpath:"$(ZLIB_ROOT)" +LIBS = $(LIBS) zlib.lib + + +!endif # defined(zlib) || defined(ZLIB) + + +########################## +# general +########################## + + +# temporary till Gnutella doesn't require giFT symbols anymore +GIFT_LIB = giFT$(DEXT).lib +GIFT_DLL = giFT$(DEXT).dll +GIFT_EXE = giFT$(DEXT).exe + + +LIBGIFT_LIB = libgiFT$(DEXT).lib +LIBGIFT_DLL = libgiFT$(DEXT).dll +LIBGIFT_STATIC = libgiFTstatic$(DEXT).lib +LIBGIFTPROTO_LIB = libgiFTproto$(DEXT).lib +LIBGIFTPROTO_DLL = libgiFTproto$(DEXT).dll +LIBGIFTPROTO_STATIC = libgiFTprotostatic$(DEXT).lib +GNUTELLA_LIB = Gnutella$(DEXT).lib +GNUTELLA_DLL = Gnutella.dll +GNUTELLA_STATIC = Gnutellastatic$(DEXT).lib + + +CFLAGS = $(CFLAGS) -nologo +DEFS = $(DEFS) -DHAVE_CONFIG_H -DWIN32 -DNO_STRICT +DEFS = $(DEFS) -DGT_MAJOR_VERSION=\"$(GT_MAJOR_VERSION)\" \ + -DGT_MINOR_VERSION=\"$(GT_MINOR_VERSION)\" \ + -DGT_MICRO_VERSION=\"$(GT_MICRO_VERSION)\" \ + -DGT_EXTRA_VERSION=\"$(GT_EXTRA_VERSION)\" + + +INCLUDES = -I$(BUILD_ROOT) -I$(BUILD_ROOT)\libgift\win32 $(INCLUDES) + + +LDFLAGS = $(LDFLAGS) -nologo -version:$(VERSION) +LDFLAGS = $(LDFLAGS) -libpath:"$(BUILD_ROOT)\libgift" -libpath:"$(BUILD_ROOT)\libgift\proto" + + +LIBS = $(LIBS) wsock32.lib + + +DEFS = $(DEFS) -D_WINDOWS -U_CONSOLE +LDFLAGS = $(LDFLAGS) /subsystem:windows + + +########################## +# tools +########################## + + +CC = cl +LD = link +LT = lib diff -r 000000000000 -r d39e1d0d75b6 Makefile.am --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Makefile.am Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,21 @@ +# $Id: Makefile.am,v 1.19 2005/01/04 14:35:11 mkern Exp $ +############################################################################### + +# Flags to pass to aclocal when it is run automatically by make +ACLOCAL_AMFLAGS = -I m4 + +SUBDIRS = \ + m4 \ + data \ + src + +EXTRA_DIST = \ + gnutella.spec \ + autogen.sh \ + Makefile.msvc \ + Make.msvc + +############################################################################### + +rpm: dist + rpmbuild -ta $(PACKAGE)-$(VERSION).tar.gz diff -r 000000000000 -r d39e1d0d75b6 Makefile.in --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Makefile.in Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,589 @@ +# Makefile.in generated by automake 1.7.9 from Makefile.am. +# @configure_input@ + +# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 +# 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@ + +# $Id: Makefile.am,v 1.19 2005/01/04 14:35:11 mkern Exp $ +############################################################################### + +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 = : +host_triplet = @host@ +ACLOCAL = @ACLOCAL@ +AMDEP_FALSE = @AMDEP_FALSE@ +AMDEP_TRUE = @AMDEP_TRUE@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +GNUTELLA_CFLAGS = @GNUTELLA_CFLAGS@ +GNUTELLA_LIBS = @GNUTELLA_LIBS@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIBXML2_CFLAGS = @LIBXML2_CFLAGS@ +LIBXML2_LIBS = @LIBXML2_LIBS@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ +MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ +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@ +PKG_CONFIG = @PKG_CONFIG@ +PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ +RANLIB = @RANLIB@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +USE_ZLIB = @USE_ZLIB@ +VERSION = @VERSION@ +XML2_CONFIG = @XML2_CONFIG@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +ac_ct_RANLIB = @ac_ct_RANLIB@ +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@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +datadir = @datadir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +oldincludedir = @oldincludedir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ + +# Flags to pass to aclocal when it is run automatically by make +ACLOCAL_AMFLAGS = -I m4 + +SUBDIRS = \ + m4 \ + data \ + src + + +EXTRA_DIST = \ + gnutella.spec \ + autogen.sh \ + Makefile.msvc \ + Make.msvc + +subdir = . +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = config.h +CONFIG_CLEAN_FILES = gnutella.spec +DIST_SOURCES = + +RECURSIVE_TARGETS = info-recursive dvi-recursive pdf-recursive \ + ps-recursive install-info-recursive uninstall-info-recursive \ + all-recursive install-data-recursive install-exec-recursive \ + installdirs-recursive install-recursive uninstall-recursive \ + check-recursive installcheck-recursive +DIST_COMMON = README $(srcdir)/Makefile.in $(srcdir)/configure AUTHORS \ + COPYING ChangeLog INSTALL Makefile.am NEWS TODO aclocal.m4 \ + config.guess config.h.in config.sub configure configure.ac \ + depcomp gnutella.spec.in install-sh ltmain.sh missing \ + mkinstalldirs +DIST_SUBDIRS = $(SUBDIRS) +all: config.h + $(MAKE) $(AM_MAKEFLAGS) all-recursive + +.SUFFIXES: + +am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ + configure.lineno +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4) + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu Makefile +Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in $(top_builddir)/config.status + cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe) + +$(top_builddir)/config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + $(SHELL) ./config.status --recheck +$(srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(srcdir)/configure.ac $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES) + cd $(srcdir) && $(AUTOCONF) + +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.ac m4/gift-pkgconfig.m4 m4/gift-prefix.m4 m4/libxml.m4 m4/openbsd.m4 m4/zlib.m4 + 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: @MAINTAINER_MODE_TRUE@ $(top_srcdir)/configure.ac $(ACLOCAL_M4) + cd $(top_srcdir) && $(AUTOHEADER) + touch $(srcdir)/config.h.in + +distclean-hdr: + -rm -f config.h stamp-h1 +gnutella.spec: $(top_builddir)/config.status gnutella.spec.in + cd $(top_builddir) && $(SHELL) ./config.status $@ + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +distclean-libtool: + -rm -f libtool +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): + @set fnord $$MAKEFLAGS; amf=$$2; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +mostlyclean-recursive clean-recursive distclean-recursive \ +maintainer-clean-recursive: + @set fnord $$MAKEFLAGS; amf=$$2; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ + done; \ + rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done + +ETAGS = etags +ETAGSFLAGS = + +CTAGS = ctags +CTAGSFLAGS = + +tags: TAGS + +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-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; \ + else \ + include_option=--include; \ + 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; }'`; \ + test -z "$(ETAGS_ARGS)$$tags$$unique" \ + || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique + +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 +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) + +top_distdir = . +distdir = $(PACKAGE)-$(VERSION) + +am__remove_distdir = \ + { test ! -d $(distdir) \ + || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ + && rm -fr $(distdir); }; } + +GZIP_ENV = --best +distuninstallcheck_listfiles = find . -type f -print +distcleancheck_listfiles = find . -type f -print + +distdir: $(DISTFILES) + $(am__remove_distdir) + mkdir $(distdir) + $(mkinstalldirs) $(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"; \ + $(mkinstalldirs) "$(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='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -d $(distdir)/$$subdir \ + || mkdir $(distdir)/$$subdir \ + || exit 1; \ + (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 + $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + $(am__remove_distdir) + +dist-bzip2: distdir + $(AMTAR) chof - $(distdir) | bzip2 -9 -c >$(distdir).tar.bz2 + $(am__remove_distdir) + +dist dist-all: distdir + $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + $(AMTAR) chof - $(distdir) | bzip2 -9 -c >$(distdir).tar.bz2 + $(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 + $(am__remove_distdir) + GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(AMTAR) xf - + 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 ../.. && $(mkinstalldirs) "$$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-gzip \ + && rm -f $(distdir).tar.gz \ + && $(MAKE) $(AM_MAKEFLAGS) distcleancheck + $(am__remove_distdir) + @echo "$(distdir).tar.gz is ready for distribution" | \ + sed 'h;s/./=/g;p;x;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 config.h +installdirs: installdirs-recursive +installdirs-am: + +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: + -rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-recursive + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-recursive + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-hdr distclean-libtool \ + distclean-tags + +dvi: dvi-recursive + +dvi-am: + +info: info-recursive + +info-am: + +install-data-am: + +install-exec-am: + +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 -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: uninstall-info-am + +uninstall-info: uninstall-info-recursive + +.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am clean \ + clean-generic clean-libtool clean-recursive ctags \ + ctags-recursive dist dist-all dist-bzip2 dist-gzip distcheck \ + distclean distclean-generic distclean-hdr distclean-libtool \ + distclean-recursive distclean-tags distcleancheck distdir \ + distuninstallcheck dvi dvi-am dvi-recursive info info-am \ + info-recursive install install-am install-data install-data-am \ + install-data-recursive install-exec install-exec-am \ + install-exec-recursive install-info install-info-am \ + install-info-recursive install-man install-recursive \ + install-strip installcheck installcheck-am installdirs \ + installdirs-am installdirs-recursive maintainer-clean \ + maintainer-clean-generic maintainer-clean-recursive mostlyclean \ + mostlyclean-generic mostlyclean-libtool mostlyclean-recursive \ + pdf pdf-am pdf-recursive ps ps-am ps-recursive tags \ + tags-recursive uninstall uninstall-am uninstall-info-am \ + uninstall-info-recursive uninstall-recursive + + +############################################################################### + +rpm: dist + rpmbuild -ta $(PACKAGE)-$(VERSION).tar.gz +# 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: diff -r 000000000000 -r d39e1d0d75b6 Makefile.msvc --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Makefile.msvc Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,40 @@ +# $Id: Makefile.msvc,v 1.12 2004/11/11 17:56:04 mkern Exp $ +# Microsoft Visual C++ 6.0 makefile +# see README.msvc for usage + +!if !defined(BUILD_ROOT) +BUILD_ROOT=$(MAKEDIR)\.. +!endif + +!include Make.msvc + +MAKEOPTS=-nologo -C BUILD_ROOT=$(BUILD_ROOT) + + +all: + cd src + @$(MAKE) $(MAKEOPTS) -f Makefile.msvc + cd .. + + +clean: + cd src + @$(MAKE) $(MAKEOPTS) -f Makefile.msvc clean + cd .. + + +win32-dist: all + @-md $(BUILD_ROOT)\win32-dist\data\Gnutella + @for %f in ($(DIST_DLLS)) DO copy %f $(BUILD_ROOT)\win32-dist + @copy data\Gnutella.conf $(BUILD_ROOT)\win32-dist\data\Gnutella\Gnutella.conf + @copy data\gwebcaches $(BUILD_ROOT)\win32-dist\data\Gnutella\gwebcaches + @copy data\hostiles.txt $(BUILD_ROOT)\win32-dist\data\Gnutella\hostiles.txt +!if defined(dynamic) || defined(DYNAMIC) +# remove traling 'd' for debug builds in distro + @copy src\$(GNUTELLA_DLL) $(BUILD_ROOT)\win32-dist\Gnutella.dll +!endif + + +clean-dist: + @-rmdir /S $(BUILD_ROOT)\win32-dist\Gnutella + @-rmdir /S $(BUILD_ROOT)\win32-dist\data\Gnutella diff -r 000000000000 -r d39e1d0d75b6 NEWS --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NEWS Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,1 @@ +See ChangeLog. diff -r 000000000000 -r d39e1d0d75b6 README --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/README Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,85 @@ +$Id: README,v 1.13 2004/02/06 02:49:09 hipnod Exp $ + +Compilation & Installation +-------------------------- + +You must install giFT before installing this plugin. + +The configure script uses pkg-config to search for giFT. If you have +installed giFT somewhere besides the default pkg-config lookup path, you +need to change the PKG_CONFIG_PATH environment variable so configure can +find libgift.pc. + +After installing, you should run the gift-setup script. If you want, you can +setup the plugin manually by adding "Gnutella" to the /main/plugins line in +~/.giFT/giftd.conf, like so: + + [main] + plugins = OpenFT:Gnutella + +You may also use a fully qualified path to the plugin filename: + + [main] + plugins = OpenFT:/usr/local/lib/giFT/libGnutella.la + +You can also specify the plugin on the command line: + + $ giftd -d -p Gnutella -p OpenFT + + +Bootstrapping +------------- + +On initial startup, the plugin has to find some Gnutella nodes to connect to. +No default nodes are hardcoded. Instead, there is a list of websites called +"GWebCaches", and a GWebCache is randomly selected and contacted to retrieve a +list of currently active nodes. If these nodes are busy, they can still +bootstrap the plugin by informing it of more nodes to connect to, so this +process continues until the plugin finds some available nodes. + +This process tends to be somewhat fragile, because a GWebCache is usually only +contacted once for this purpose, so the GWebCache handling code in the plugin +runs infrequently and tends to have bugs. If you experience problems +connecting, it would help to view the log file when reporting problems. + +If you're interested in running a GWebCache, see "More GWebCache Info" below +for more information. + + +Configuration +------------- + +The configuration file is in $HOME/.giFT/Gnutella/Gnutella.conf, and is created +if it doesn't exist. The syntax of the config file is the same as other giFT +files. + +gift-setup will set the default port to something random. You can change it by +editing the plugin's config file. If this port isn't reachable, you will +receive less search results because you cannot download from firewalled users. +You may have to do some other configuration (forward the port on your firewall, +etc) to make the port reachable. + + + +More GWebCache info +------------------- + +If you're interested in running a GWebCache, more information can be found at +http://www.gnucleus.com/gwebcache/. Note that while running one doesn't +require a lot of bandwidth for each request, there are quite a lot of nodes +making many requests to a dwindling number of GWebCaches (there used to be +200+, not there are only about 60 left due to abusive nodes hammering them). + +It helps to put the cache on a separate domain (for example, gwc.foo.com) so +that the name can be removed from the DNS if the load on it becomes too high. +Note that this name probably shouldn't contain the word "cache" in it, because +that may be treated specially by HTTP proxies. + + +Contact +------- + +Email: hipnod@bellsouth.net [Original author] + +IRC: #giFT-gnutella on irc.freenode.net + diff -r 000000000000 -r d39e1d0d75b6 TODO --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/TODO Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,138 @@ +$Id: TODO,v 1.11 2004/06/04 16:31:08 hipnod Exp $ + +0.0.11 +------ + o test short-writing of packets and make sure it works + o rename gt_conn_ -> gt_node_list_ + o limit outgoing push upload rate + o use GtTransfer by splitting up gt_transfer_new instead of + http_incoming thing + o insert incoming HTTP server connections into server connection list, + to ensure the connection will get closed if there are too many + o optimize away extra packet allocations + o support basic packet routing + o implement simple flow-control + o make QRP implementation more complete + o support QRP for reducing queries to nodes + o implement GGEP properly + o make generic 3-way handshake for features that have a version + number (Vendor-Message, X-Query-Routing, GGEP) + o make sure all global symbols are prefixed with gt_, GT_, or gnutella_ + o move handshake code into handshake/ + o rename gnutella_* handshake functions to gt_handshake_* + o maybe rewrite the handshaking code completely + o fix packet parsing when string is at the end; need to fix + io_buf_resize to terminate + o merge dev-intset-search branch + o make web cache index requests once in a while + o keep queue of outgoing pushed connects, retry + o rename gt_search_exec gt_share_db + o implement an abstract GtHttpHeader type + o eliminate extra list len calc in gt_node_list_foreach() + o test and possibly incorporate SHA1 code from Linux + o do tests on new searching code in dev-intset-search branch + o fix node->share_state being NULL if handshaking hasn't completed + o use callback system for running code when connection has completed + o fix gt_share_state.c for ultrapeer mode + +0.0.12 +------ + o support downloading from push proxies + o refactor HTTP code and merge gt_http_client.c and http_request.c + o maybe do browsing + o break transfer code into transfer/ + o break http code into http/ + o break sharing code into share/ + o break searching code into search/ + o chop off gt_ prefixes in move + +0.0.13 +------ + o implement basic download mesh + o limit outgoing push uploads + +0.1.0 +----- + o support dynamic querying + o send out XML metadata + +{******************************************************************************} + +HTTP +---- + + o probably rename GtTransfer to GtHttpTransfer + o use a new type GtHttpHeader instead of Dataset for xfer->header + o generalize http handling and separate transfer code into callbacks + o make GtHttpConnection type to cleanup gt_transfer_cancel() + o make GtHttpConnectionCache for unifying pushed and non-pushed caches + o maybe separate GtHttpTransfer into GtHttpRequest/Response + + +TRANSFER +-------- + + o slap push proxies in source url; have to remove them too + +{******************************************************************************} + +THINGS NEEDED FROM THE DAEMON +----------------------------- + + * make search object persistent in front-end space, and require + explicit free from front-end, or front-end disconnect + + Would be better if searches were a handle existing in front-end + space, that stuck around after search completion, and had to be + explicitly cleaned up by a front-end. This way we could still send + results that come in after a search has timed out to the front-end, + and let it decide what to do with them after a search has + entered the "completed" (but still allocated) state. + + Haven't seen those post-completion results actually happen in a + while, though..I would like to think this means the search timeout + logic is good, but since there is no tracking I've no precise idea + how often it happens, except i don't usually see them on the debug + console. Should really add something to check for them... + + * interactive searches need hash-type + + Interactive locate searches always assume sha1, because hash-type is + null. The interface protocol should support a way to enumerate the + supported hashes and pass a hash-type parameter from the user to + locate. + + * protocol callback for adding new sources, that doesn't cancel + existing transfers + + This is needed for download mesh support. download_add_source will + cancel existing transfers, which is not good because one source may + end up cancelling an ongoing transfer if it sends another source in + the alternate location that is currently actively transfering. So, a + new function is needed for use in the callback to skip ongoing + transfers. + + * queueing w/ MAX_DOWNLOADS_PERUSER == 1 doesn't always work + + Because transfer_length() operates on chunks rather than sources, + sometimes more than one download per source gets started if the + Chunk isn't active. Need to assess the impact of changing + transfer_length() to use Sources instead of Chunks. + + * need some way to enforce MAX_DOWNLOADS_PERUSER on per-source basis + + Active-queueing depends on MAX_DOWNLOADS_PERUSER == 1. If + MAX_DOWNLOADS_PERUSER changes, active-queueing breaks and downloads + will fail all the time. Should enforce MAX_DOWNLOADS_PERUSER on + a per-source basis at runtime. + + Hmm, this may require a User abstraction. There was something else I + was thinking would require that too, perhaps related to upload + queueing and how doing p->user_cmp there is bad... + + * push downloads need a way to initiate transfer when no Chunk is + allocated + + * some way to enforce a minimum retry wait on sources + + * configurable source timeouts to protect push downloads diff -r 000000000000 -r d39e1d0d75b6 aclocal.m4 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/aclocal.m4 Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,7624 @@ +# generated automatically by aclocal 1.7.9 -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002 +# 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. + +# Do all the work for Automake. -*- Autoconf -*- + +# This macro actually does too much some checks are only needed if +# your package does certain things. But this isn't really a big deal. + +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 +# Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +# serial 10 + +AC_PREREQ([2.54]) + +# Autoconf 2.50 wants to disallow AM_ names. We explicitly allow +# the ones we care about. +m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl + +# 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_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_MISSING_PROG(AMTAR, tar) +AM_PROG_INSTALL_SH +AM_PROG_INSTALL_STRIP +# 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([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 2002 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 + +# 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.7"]) + +# 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.7.9])]) + +# Helper functions for option handling. -*- Autoconf -*- + +# Copyright 2001, 2002 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +# serial 2 + +# _AM_MANGLE_OPTION(NAME) +# ----------------------- +AC_DEFUN([_AM_MANGLE_OPTION], +[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) + +# _AM_SET_OPTION(NAME) +# ------------------------------ +# Set option NAME. Presently that only means defining a flag for this option. +AC_DEFUN([_AM_SET_OPTION], +[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) + +# _AM_SET_OPTIONS(OPTIONS) +# ---------------------------------- +# OPTIONS is a space-separated list of Automake options. +AC_DEFUN([_AM_SET_OPTIONS], +[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) + +# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) +# ------------------------------------------- +# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. +AC_DEFUN([_AM_IF_OPTION], +[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) + +# +# Check to make sure that the build environment is sane. +# + +# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +# serial 3 + +# AM_SANITY_CHECK +# --------------- +AC_DEFUN([AM_SANITY_CHECK], +[AC_MSG_CHECKING([whether build environment is sane]) +# Just in case +sleep 1 +echo timestamp > conftest.file +# Do `set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` + if test "$[*]" = "X"; then + # -L didn't work. + set X `ls -t $srcdir/configure conftest.file` + fi + rm -f conftest.file + if test "$[*]" != "X $srcdir/configure conftest.file" \ + && test "$[*]" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken +alias in your environment]) + fi + + test "$[2]" = conftest.file + ) +then + # Ok. + : +else + AC_MSG_ERROR([newly created file is older than distributed files! +Check your system clock]) +fi +AC_MSG_RESULT(yes)]) + +# -*- Autoconf -*- + + +# Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +# serial 3 + +# AM_MISSING_PROG(NAME, PROGRAM) +# ------------------------------ +AC_DEFUN([AM_MISSING_PROG], +[AC_REQUIRE([AM_MISSING_HAS_RUN]) +$1=${$1-"${am_missing_run}$2"} +AC_SUBST($1)]) + + +# AM_MISSING_HAS_RUN +# ------------------ +# Define MISSING if not defined so far and test if it supports --run. +# If it does, set am_missing_run to use it, otherwise, to nothing. +AC_DEFUN([AM_MISSING_HAS_RUN], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" +# Use eval to expand $SHELL +if eval "$MISSING --run true"; then + am_missing_run="$MISSING --run " +else + am_missing_run= + AC_MSG_WARN([`missing' script is too old or missing]) +fi +]) + +# AM_AUX_DIR_EXPAND + +# Copyright 2001 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets +# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to +# `$srcdir', `$srcdir/..', or `$srcdir/../..'. +# +# Of course, Automake must honor this variable whenever it calls a +# tool from the auxiliary directory. The problem is that $srcdir (and +# therefore $ac_aux_dir as well) can be either absolute or relative, +# depending on how configure is run. This is pretty annoying, since +# it makes $ac_aux_dir quite unusable in subdirectories: in the top +# source directory, any form will work fine, but in subdirectories a +# relative path needs to be adjusted first. +# +# $ac_aux_dir/missing +# fails when called from a subdirectory if $ac_aux_dir is relative +# $top_srcdir/$ac_aux_dir/missing +# fails if $ac_aux_dir is absolute, +# fails when called from a subdirectory in a VPATH build with +# a relative $ac_aux_dir +# +# The reason of the latter failure is that $top_srcdir and $ac_aux_dir +# are both prefixed by $srcdir. In an in-source build this is usually +# harmless because $srcdir is `.', but things will broke when you +# start a VPATH build or use an absolute $srcdir. +# +# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, +# iff we strip the leading $srcdir from $ac_aux_dir. That would be: +# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` +# and then we would define $MISSING as +# MISSING="\${SHELL} $am_aux_dir/missing" +# This will work as long as MISSING is not called from configure, because +# unfortunately $(top_srcdir) has no meaning in configure. +# However there are other variables, like CC, which are often used in +# configure, and could therefore not use this "fixed" $ac_aux_dir. +# +# Another solution, used here, is to always expand $ac_aux_dir to an +# absolute PATH. The drawback is that using absolute paths prevent a +# configured tree to be moved without reconfiguration. + +# Rely on autoconf to set up CDPATH properly. +AC_PREREQ([2.50]) + +AC_DEFUN([AM_AUX_DIR_EXPAND], [ +# expand $ac_aux_dir to an absolute path +am_aux_dir=`cd $ac_aux_dir && pwd` +]) + +# AM_PROG_INSTALL_SH +# ------------------ +# Define $install_sh. + +# Copyright 2001 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +AC_DEFUN([AM_PROG_INSTALL_SH], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +install_sh=${install_sh-"$am_aux_dir/install-sh"} +AC_SUBST(install_sh)]) + +# AM_PROG_INSTALL_STRIP + +# Copyright 2001 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +# One issue with vendor `install' (even GNU) is that you can't +# specify the program used to strip binaries. This is especially +# annoying in cross-compiling environments, where the build's strip +# is unlikely to handle the host's binaries. +# Fortunately install-sh will honor a STRIPPROG variable, so we +# always use install-sh in `make install-strip', and initialize +# STRIPPROG with the value of the STRIP variable (set by the user). +AC_DEFUN([AM_PROG_INSTALL_STRIP], +[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl +# Installed binaries are usually stripped using `strip' when the user +# run `make install-strip'. However `strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the `STRIP' environment variable to overrule this program. +dnl Don't test for $cross_compiling = yes, because it might be `maybe'. +if test "$cross_compiling" != no; then + AC_CHECK_TOOL([STRIP], [strip], :) +fi +INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" +AC_SUBST([INSTALL_STRIP_PROGRAM])]) + +# -*- Autoconf -*- +# Copyright (C) 2003 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +# serial 1 + +# Check whether the underlying file-system supports filenames +# with a leading dot. For instance MS-DOS doesn't. +AC_DEFUN([AM_SET_LEADING_DOT], +[rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null +AC_SUBST([am__leading_dot])]) + +# serial 5 -*- Autoconf -*- + +# Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + + +# 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 + : > 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_$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 builds + --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 1999, 2000, 2001, 2002 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +#serial 2 + +# _AM_OUTPUT_DEPENDENCY_COMMANDS +# ------------------------------ +AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], +[for mf in $CONFIG_FILES; do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named `Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # So let's grep whole file. + if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then + dirpart=`AS_DIRNAME("$mf")` + else + continue + fi + 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=`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"]) +]) + +# Check to see how 'make' treats includes. -*- Autoconf -*- + +# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +# serial 2 + +# AM_MAKE_INCLUDE() +# ----------------- +# Check to see how make treats includes. +AC_DEFUN([AM_MAKE_INCLUDE], +[am_make=${MAKE-make} +cat > confinc << 'END' +am__doit: + @echo done +.PHONY: am__doit +END +# If we don't find an include directive, just comment out the code. +AC_MSG_CHECKING([for style of include used by $am_make]) +am__include="#" +am__quote= +_am_result=none +# First try GNU make style include. +echo "include confinc" > confmf +# We grep out `Entering directory' and `Leaving directory' +# messages which can occur if `w' ends up in MAKEFLAGS. +# In particular we don't look at `^make:' because GNU make might +# be invoked under some other name (usually "gmake"), in which +# case it prints its new name instead of `make'. +if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then + am__include=include + am__quote= + _am_result=GNU +fi +# Now try BSD make style include. +if test "$am__include" = "#"; then + echo '.include "confinc"' > confmf + if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then + am__include=.include + am__quote="\"" + _am_result=BSD + fi +fi +AC_SUBST([am__include]) +AC_SUBST([am__quote]) +AC_MSG_RESULT([$_am_result]) +rm -f confinc confmf +]) + +# AM_CONDITIONAL -*- Autoconf -*- + +# Copyright 1997, 2000, 2001 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +# serial 5 + +AC_PREREQ(2.52) + +# AM_CONDITIONAL(NAME, SHELL-CONDITION) +# ------------------------------------- +# Define a conditional. +AC_DEFUN([AM_CONDITIONAL], +[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])]) + +# Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*- + +# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +AC_PREREQ([2.52]) + +# serial 6 + +# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. +AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) + +# Add --enable-maintainer-mode option to configure. +# From Jim Meyering + +# Copyright 1996, 1998, 2000, 2001, 2002 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +# serial 2 + +AC_DEFUN([AM_MAINTAINER_MODE], +[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) + dnl maintainer-mode is disabled by default + AC_ARG_ENABLE(maintainer-mode, +[ --enable-maintainer-mode enable make rules and dependencies not useful + (and sometimes confusing) to the casual installer], + USE_MAINTAINER_MODE=$enableval, + USE_MAINTAINER_MODE=no) + AC_MSG_RESULT([$USE_MAINTAINER_MODE]) + AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes]) + MAINT=$MAINTAINER_MODE_TRUE + AC_SUBST(MAINT)dnl +] +) + +AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) + + +# Copyright 1996, 1997, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +# serial 2 + +# @defmac AC_PROG_CC_STDC +# @maindex PROG_CC_STDC +# @ovindex CC +# If the C compiler in not in ANSI C mode by default, try to add an option +# to output variable @code{CC} to make it so. This macro tries various +# options that select ANSI C on some system or another. It considers the +# compiler to be in ANSI C mode if it handles function prototypes correctly. +# +# If you use this macro, you should check after calling it whether the C +# compiler has been set to accept ANSI C; if not, the shell variable +# @code{am_cv_prog_cc_stdc} is set to @samp{no}. If you wrote your source +# code in ANSI C, you can make an un-ANSIfied copy of it by using the +# program @code{ansi2knr}, which comes with Ghostscript. +# @end defmac + +AC_DEFUN([AM_PROG_CC_STDC], +[AC_REQUIRE([AC_PROG_CC]) +AC_BEFORE([$0], [AC_C_INLINE]) +AC_BEFORE([$0], [AC_C_CONST]) +dnl Force this before AC_PROG_CPP. Some cpp's, eg on HPUX, require +dnl a magic option to avoid problems with ANSI preprocessor commands +dnl like #elif. +dnl FIXME: can't do this because then AC_AIX won't work due to a +dnl circular dependency. +dnl AC_BEFORE([$0], [AC_PROG_CPP]) +AC_MSG_CHECKING([for ${CC-cc} option to accept ANSI C]) +AC_CACHE_VAL(am_cv_prog_cc_stdc, +[am_cv_prog_cc_stdc=no +ac_save_CC="$CC" +# 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" + AC_TRY_COMPILE( +[#include +#include +#include +#include +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +], [ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; +], +[am_cv_prog_cc_stdc="$ac_arg"; break]) +done +CC="$ac_save_CC" +]) +if test -z "$am_cv_prog_cc_stdc"; then + AC_MSG_RESULT([none needed]) +else + AC_MSG_RESULT([$am_cv_prog_cc_stdc]) +fi +case "x$am_cv_prog_cc_stdc" in + x|xno) ;; + *) CC="$CC $am_cv_prog_cc_stdc" ;; +esac +]) + +AU_DEFUN([fp_PROG_CC_STDC], [AM_PROG_CC_STDC]) + +# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- + +# serial 48 Debian 1.5.22-2 AC_PROG_LIBTOOL + + +# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) +# ----------------------------------------------------------- +# If this macro is not defined by Autoconf, define it here. +m4_ifdef([AC_PROVIDE_IFELSE], + [], + [m4_define([AC_PROVIDE_IFELSE], + [m4_ifdef([AC_PROVIDE_$1], + [$2], [$3])])]) + + +# AC_PROG_LIBTOOL +# --------------- +AC_DEFUN([AC_PROG_LIBTOOL], +[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl +dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX +dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX. + AC_PROVIDE_IFELSE([AC_PROG_CXX], + [AC_LIBTOOL_CXX], + [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX + ])]) +dnl And a similar setup for Fortran 77 support + AC_PROVIDE_IFELSE([AC_PROG_F77], + [AC_LIBTOOL_F77], + [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77 +])]) + +dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly. +dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run +dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both. + AC_PROVIDE_IFELSE([AC_PROG_GCJ], + [AC_LIBTOOL_GCJ], + [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], + [AC_LIBTOOL_GCJ], + [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ], + [AC_LIBTOOL_GCJ], + [ifdef([AC_PROG_GCJ], + [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])]) + ifdef([A][M_PROG_GCJ], + [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])]) + ifdef([LT_AC_PROG_GCJ], + [define([LT_AC_PROG_GCJ], + defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])]) +])])# AC_PROG_LIBTOOL + + +# _AC_PROG_LIBTOOL +# ---------------- +AC_DEFUN([_AC_PROG_LIBTOOL], +[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl +AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl +AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl +AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl + +# This can be used to rebuild libtool when needed +LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" + +# Always use our own libtool. +LIBTOOL='$(SHELL) $(top_builddir)/libtool' +AC_SUBST(LIBTOOL)dnl + +# Prevent multiple expansion +define([AC_PROG_LIBTOOL], []) +])# _AC_PROG_LIBTOOL + + +# AC_LIBTOOL_SETUP +# ---------------- +AC_DEFUN([AC_LIBTOOL_SETUP], +[AC_PREREQ(2.50)dnl +AC_REQUIRE([AC_ENABLE_SHARED])dnl +AC_REQUIRE([AC_ENABLE_STATIC])dnl +AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl +AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_CANONICAL_BUILD])dnl +AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([AC_PROG_LD])dnl +AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl +AC_REQUIRE([AC_PROG_NM])dnl + +AC_REQUIRE([AC_PROG_LN_S])dnl +AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl +# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! +AC_REQUIRE([AC_OBJEXT])dnl +AC_REQUIRE([AC_EXEEXT])dnl +dnl + +AC_LIBTOOL_SYS_MAX_CMD_LEN +AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE +AC_LIBTOOL_OBJDIR + +AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl +_LT_AC_PROG_ECHO_BACKSLASH + +case $host_os in +aix3*) + # AIX sometimes has problems with the GCC collect2 program. For some + # reason, if we set the COLLECT_NAMES environment variable, the problems + # vanish in a puff of smoke. + if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES + fi + ;; +esac + +# 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='s/\([\\"\\`$\\\\]\)/\\\1/g'] + +# Same as above, but do not quote variable references. +[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'] + +# Sed substitution to delay expansion of an escaped shell variable in a +# double_quote_subst'ed string. +delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' + +# Sed substitution to avoid accidental globbing in evaled expressions +no_glob_subst='s/\*/\\\*/g' + +# Constants: +rm="rm -f" + +# Global variables: +default_ofile=libtool +can_build_shared=yes + +# All known linkers require a `.a' archive for static linking (except MSVC, +# which needs '.lib'). +libext=a +ltmain="$ac_aux_dir/ltmain.sh" +ofile="$default_ofile" +with_gnu_ld="$lt_cv_prog_gnu_ld" + +AC_CHECK_TOOL(AR, ar, false) +AC_CHECK_TOOL(RANLIB, ranlib, :) +AC_CHECK_TOOL(STRIP, strip, :) + +old_CC="$CC" +old_CFLAGS="$CFLAGS" + +# Set sane defaults for various variables +test -z "$AR" && AR=ar +test -z "$AR_FLAGS" && AR_FLAGS=cru +test -z "$AS" && AS=as +test -z "$CC" && CC=cc +test -z "$LTCC" && LTCC=$CC +test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS +test -z "$DLLTOOL" && DLLTOOL=dlltool +test -z "$LD" && LD=ld +test -z "$LN_S" && LN_S="ln -s" +test -z "$MAGIC_CMD" && MAGIC_CMD=file +test -z "$NM" && NM=nm +test -z "$SED" && SED=sed +test -z "$OBJDUMP" && OBJDUMP=objdump +test -z "$RANLIB" && RANLIB=: +test -z "$STRIP" && STRIP=: +test -z "$ac_objext" && ac_objext=o + +# Determine commands to create old-style static archives. +old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs' +old_postinstall_cmds='chmod 644 $oldlib' +old_postuninstall_cmds= + +if test -n "$RANLIB"; then + case $host_os in + openbsd*) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" + ;; + *) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" + ;; + esac + old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" +fi + +_LT_CC_BASENAME([$compiler]) + +# Only perform the check for file, if the check method requires it +case $deplibs_check_method in +file_magic*) + if test "$file_magic_cmd" = '$MAGIC_CMD'; then + AC_PATH_MAGIC + fi + ;; +esac + +AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) +AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], +enable_win32_dll=yes, enable_win32_dll=no) + +AC_ARG_ENABLE([libtool-lock], + [AC_HELP_STRING([--disable-libtool-lock], + [avoid locking (might break parallel builds)])]) +test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes + +AC_ARG_WITH([pic], + [AC_HELP_STRING([--with-pic], + [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], + [pic_mode="$withval"], + [pic_mode=default]) +test -z "$pic_mode" && pic_mode=default + +# Use C for the default configuration in the libtool script +tagname= +AC_LIBTOOL_LANG_C_CONFIG +_LT_AC_TAGCONFIG +])# AC_LIBTOOL_SETUP + + +# _LT_AC_SYS_COMPILER +# ------------------- +AC_DEFUN([_LT_AC_SYS_COMPILER], +[AC_REQUIRE([AC_PROG_CC])dnl + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC +])# _LT_AC_SYS_COMPILER + + +# _LT_CC_BASENAME(CC) +# ------------------- +# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. +AC_DEFUN([_LT_CC_BASENAME], +[for cc_temp in $1""; do + case $cc_temp in + compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; + distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` +]) + + +# _LT_COMPILER_BOILERPLATE +# ------------------------ +# Check for compiler boilerplate output or warnings with +# the simple compiler test code. +AC_DEFUN([_LT_COMPILER_BOILERPLATE], +[ac_outfile=conftest.$ac_objext +printf "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$rm conftest* +])# _LT_COMPILER_BOILERPLATE + + +# _LT_LINKER_BOILERPLATE +# ---------------------- +# Check for linker boilerplate output or warnings with +# the simple link test code. +AC_DEFUN([_LT_LINKER_BOILERPLATE], +[ac_outfile=conftest.$ac_objext +printf "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$rm conftest* +])# _LT_LINKER_BOILERPLATE + + +# _LT_AC_SYS_LIBPATH_AIX +# ---------------------- +# Links a minimal program and checks the executable +# for the system default hardcoded library path. In most cases, +# this is /usr/lib:/lib, but when the MPI compilers are used +# the location of the communication and MPI libs are included too. +# If we don't find anything, use the default library path according +# to the aix ld manual. +AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX], +[AC_LINK_IFELSE(AC_LANG_PROGRAM,[ +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'`; fi],[]) +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi +])# _LT_AC_SYS_LIBPATH_AIX + + +# _LT_AC_SHELL_INIT(ARG) +# ---------------------- +AC_DEFUN([_LT_AC_SHELL_INIT], +[ifdef([AC_DIVERSION_NOTICE], + [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], + [AC_DIVERT_PUSH(NOTICE)]) +$1 +AC_DIVERT_POP +])# _LT_AC_SHELL_INIT + + +# _LT_AC_PROG_ECHO_BACKSLASH +# -------------------------- +# Add some code to the start of the generated configure script which +# will find an echo command which doesn't interpret backslashes. +AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH], +[_LT_AC_SHELL_INIT([ +# Check that we are running under the correct shell. +SHELL=${CONFIG_SHELL-/bin/sh} + +case X$ECHO in +X*--fallback-echo) + # Remove one level of quotation (which was required for Make). + ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` + ;; +esac + +echo=${ECHO-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. + exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} +fi + +if test "X[$]1" = X--fallback-echo; then + # used as fallback echo + shift + cat </dev/null 2>&1 && unset CDPATH + +if test -z "$ECHO"; then +if test "X${echo_test_string+set}" != Xset; then +# find a string as large as possible, as long as the shell can cope with it + for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do + # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... + if (echo_test_string=`eval $cmd`) 2>/dev/null && + echo_test_string=`eval $cmd` && + (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null + then + break + fi + done +fi + +if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + : +else + # The Solaris, AIX, and Digital Unix default echo programs unquote + # backslashes. This makes it impossible to quote backslashes using + # echo "$something" | sed 's/\\/\\\\/g' + # + # So, first we look for a working echo in the user's PATH. + + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for dir in $PATH /usr/ucb; do + IFS="$lt_save_ifs" + if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && + test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + echo="$dir/echo" + break + fi + done + IFS="$lt_save_ifs" + + if test "X$echo" = Xecho; then + # We didn't find a better echo, so look for alternatives. + if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + # This shell has a builtin print -r that does the trick. + echo='print -r' + elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && + test "X$CONFIG_SHELL" != X/bin/ksh; then + # If we have ksh, try running configure again with it. + ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} + export ORIGINAL_CONFIG_SHELL + CONFIG_SHELL=/bin/ksh + export CONFIG_SHELL + exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} + else + # Try using printf. + echo='printf %s\n' + if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + # Cool, printf works + : + elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && + test "X$echo_testing_string" = 'X\t' && + echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL + export CONFIG_SHELL + SHELL="$CONFIG_SHELL" + export SHELL + echo="$CONFIG_SHELL [$]0 --fallback-echo" + elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && + test "X$echo_testing_string" = 'X\t' && + echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + echo="$CONFIG_SHELL [$]0 --fallback-echo" + else + # maybe with a smaller string... + prev=: + + for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do + if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null + then + break + fi + prev="$cmd" + done + + if test "$prev" != 'sed 50q "[$]0"'; then + echo_test_string=`eval $prev` + export echo_test_string + exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} + else + # Oops. We lost completely, so just stick with echo. + echo=echo + fi + fi + fi + fi +fi +fi + +# Copy echo and quote the copy suitably for passing to libtool from +# the Makefile, instead of quoting the original, which is used later. +ECHO=$echo +if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then + ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" +fi + +AC_SUBST(ECHO) +])])# _LT_AC_PROG_ECHO_BACKSLASH + + +# _LT_AC_LOCK +# ----------- +AC_DEFUN([_LT_AC_LOCK], +[AC_ARG_ENABLE([libtool-lock], + [AC_HELP_STRING([--disable-libtool-lock], + [avoid locking (might break parallel builds)])]) +test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes + +# Some flags need to be propagated to the compiler or linker for good +# libtool support. +case $host in +ia64-*-hpux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + case `/usr/bin/file conftest.$ac_objext` in + *ELF-32*) + HPUX_IA64_MODE="32" + ;; + *ELF-64*) + HPUX_IA64_MODE="64" + ;; + esac + fi + rm -rf conftest* + ;; +*-*-irix6*) + # Find out which ABI we are using. + echo '[#]line __oline__ "configure"' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + if test "$lt_cv_prog_gnu_ld" = yes; then + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -melf32bsmip" + ;; + *N32*) + LD="${LD-ld} -melf32bmipn32" + ;; + *64-bit*) + LD="${LD-ld} -melf64bmip" + ;; + esac + else + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -32" + ;; + *N32*) + LD="${LD-ld} -n32" + ;; + *64-bit*) + LD="${LD-ld} -64" + ;; + esac + fi + fi + rm -rf conftest* + ;; + +x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + case `/usr/bin/file conftest.o` in + *32-bit*) + case $host in + x86_64-*linux*) + LD="${LD-ld} -m elf_i386" + ;; + ppc64-*linux*|powerpc64-*linux*) + LD="${LD-ld} -m elf32ppclinux" + ;; + s390x-*linux*) + LD="${LD-ld} -m elf_s390" + ;; + sparc64-*linux*) + LD="${LD-ld} -m elf32_sparc" + ;; + esac + ;; + *64-bit*) + case $host in + x86_64-*linux*) + LD="${LD-ld} -m elf_x86_64" + ;; + ppc*-*linux*|powerpc*-*linux*) + LD="${LD-ld} -m elf64ppc" + ;; + s390*-*linux*) + LD="${LD-ld} -m elf64_s390" + ;; + sparc*-*linux*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; + +*-*-sco3.2v5*) + # On SCO OpenServer 5, we need -belf to get full-featured binaries. + SAVE_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -belf" + AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, + [AC_LANG_PUSH(C) + AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) + AC_LANG_POP]) + if test x"$lt_cv_cc_needs_belf" != x"yes"; then + # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf + CFLAGS="$SAVE_CFLAGS" + fi + ;; +sparc*-*solaris*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + case `/usr/bin/file conftest.o` in + *64-bit*) + case $lt_cv_prog_gnu_ld in + yes*) LD="${LD-ld} -m elf64_sparc" ;; + *) LD="${LD-ld} -64" ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; + +AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], +[*-*-cygwin* | *-*-mingw* | *-*-pw32*) + AC_CHECK_TOOL(DLLTOOL, dlltool, false) + AC_CHECK_TOOL(AS, as, false) + AC_CHECK_TOOL(OBJDUMP, objdump, false) + ;; + ]) +esac + +need_locks="$enable_libtool_lock" + +])# _LT_AC_LOCK + + +# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, +# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) +# ---------------------------------------------------------------- +# Check whether the given compiler option works +AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], +[AC_REQUIRE([LT_AC_PROG_SED]) +AC_CACHE_CHECK([$1], [$2], + [$2=no + ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$3" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&AS_MESSAGE_LOG_FD + echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + $2=yes + fi + fi + $rm conftest* +]) + +if test x"[$]$2" = xyes; then + ifelse([$5], , :, [$5]) +else + ifelse([$6], , :, [$6]) +fi +])# AC_LIBTOOL_COMPILER_OPTION + + +# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, +# [ACTION-SUCCESS], [ACTION-FAILURE]) +# ------------------------------------------------------------ +# Check whether the given compiler option works +AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], +[AC_CACHE_CHECK([$1], [$2], + [$2=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $3" + printf "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&AS_MESSAGE_LOG_FD + $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + $2=yes + fi + else + $2=yes + fi + fi + $rm conftest* + LDFLAGS="$save_LDFLAGS" +]) + +if test x"[$]$2" = xyes; then + ifelse([$4], , :, [$4]) +else + ifelse([$5], , :, [$5]) +fi +])# AC_LIBTOOL_LINKER_OPTION + + +# AC_LIBTOOL_SYS_MAX_CMD_LEN +# -------------------------- +AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], +[# find the maximum length of command line arguments +AC_MSG_CHECKING([the maximum length of command line arguments]) +AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl + i=0 + teststring="ABCD" + + case $build_os in + msdosdjgpp*) + # On DJGPP, this test can blow up pretty badly due to problems in libc + # (any single argument exceeding 2000 bytes causes a buffer overrun + # during glob expansion). Even if it were fixed, the result of this + # check would be larger than it should be. + lt_cv_sys_max_cmd_len=12288; # 12K is about right + ;; + + gnu*) + # Under GNU Hurd, this test is not required because there is + # no limit to the length of command line arguments. + # Libtool will interpret -1 as no limit whatsoever + lt_cv_sys_max_cmd_len=-1; + ;; + + cygwin* | mingw*) + # On Win9x/ME, this test blows up -- it succeeds, but takes + # about 5 minutes as the teststring grows exponentially. + # Worse, since 9x/ME are not pre-emptively multitasking, + # you end up with a "frozen" computer, even though with patience + # the test eventually succeeds (with a max line length of 256k). + # Instead, let's just punt: use the minimum linelength reported by + # all of the supported platforms: 8192 (on NT/2K/XP). + lt_cv_sys_max_cmd_len=8192; + ;; + + amigaos*) + # On AmigaOS with pdksh, this test takes hours, literally. + # So we just punt and use a minimum line length of 8192. + lt_cv_sys_max_cmd_len=8192; + ;; + + netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) + # This has been around since 386BSD, at least. Likely further. + if test -x /sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` + elif test -x /usr/sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` + else + lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs + fi + # And add a safety zone + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + ;; + + interix*) + # We know the value 262144 and hardcode it with a safety zone (like BSD) + lt_cv_sys_max_cmd_len=196608 + ;; + + osf*) + # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure + # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not + # nice to cause kernel panics so lets avoid the loop below. + # First set a reasonable default. + lt_cv_sys_max_cmd_len=16384 + # + if test -x /sbin/sysconfig; then + case `/sbin/sysconfig -q proc exec_disable_arg_limit` in + *1*) lt_cv_sys_max_cmd_len=-1 ;; + esac + fi + ;; + sco3.2v5*) + lt_cv_sys_max_cmd_len=102400 + ;; + sysv5* | sco5v6* | sysv4.2uw2*) + kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` + if test -n "$kargmax"; then + lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` + else + lt_cv_sys_max_cmd_len=32768 + fi + ;; + *) + # If test is not a shell built-in, we'll probably end up computing a + # maximum length that is only half of the actual maximum length, but + # we can't tell. + SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} + while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \ + = "XX$teststring") >/dev/null 2>&1 && + new_result=`expr "X$teststring" : ".*" 2>&1` && + lt_cv_sys_max_cmd_len=$new_result && + test $i != 17 # 1/2 MB should be enough + do + i=`expr $i + 1` + teststring=$teststring$teststring + done + teststring= + # Add a significant safety factor because C++ compilers can tack on massive + # amounts of additional arguments before passing them to the linker. + # It appears as though 1/2 is a usable value. + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` + ;; + esac +]) +if test -n $lt_cv_sys_max_cmd_len ; then + AC_MSG_RESULT($lt_cv_sys_max_cmd_len) +else + AC_MSG_RESULT(none) +fi +])# AC_LIBTOOL_SYS_MAX_CMD_LEN + + +# _LT_AC_CHECK_DLFCN +# ------------------ +AC_DEFUN([_LT_AC_CHECK_DLFCN], +[AC_CHECK_HEADERS(dlfcn.h)dnl +])# _LT_AC_CHECK_DLFCN + + +# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, +# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) +# --------------------------------------------------------------------- +AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], +[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl +if test "$cross_compiling" = yes; then : + [$4] +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext < +#endif + +#include + +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif + +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +#ifdef __cplusplus +extern "C" void exit (int); +#endif + +void fnord() { int i=42;} +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + /* dlclose (self); */ + } + else + puts (dlerror ()); + + exit (status); +}] +EOF + if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) $1 ;; + x$lt_dlneed_uscore) $2 ;; + x$lt_dlunknown|x*) $3 ;; + esac + else : + # compilation failed + $3 + fi +fi +rm -fr conftest* +])# _LT_AC_TRY_DLOPEN_SELF + + +# AC_LIBTOOL_DLOPEN_SELF +# ---------------------- +AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], +[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl +if test "x$enable_dlopen" != xyes; then + enable_dlopen=unknown + enable_dlopen_self=unknown + enable_dlopen_self_static=unknown +else + lt_cv_dlopen=no + lt_cv_dlopen_libs= + + case $host_os in + beos*) + lt_cv_dlopen="load_add_on" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ;; + + mingw* | pw32*) + lt_cv_dlopen="LoadLibrary" + lt_cv_dlopen_libs= + ;; + + cygwin*) + lt_cv_dlopen="dlopen" + lt_cv_dlopen_libs= + ;; + + darwin*) + # if libdl is installed we need to link against it + AC_CHECK_LIB([dl], [dlopen], + [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ + lt_cv_dlopen="dyld" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ]) + ;; + + *) + AC_CHECK_FUNC([shl_load], + [lt_cv_dlopen="shl_load"], + [AC_CHECK_LIB([dld], [shl_load], + [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"], + [AC_CHECK_FUNC([dlopen], + [lt_cv_dlopen="dlopen"], + [AC_CHECK_LIB([dl], [dlopen], + [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], + [AC_CHECK_LIB([svld], [dlopen], + [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], + [AC_CHECK_LIB([dld], [dld_link], + [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"]) + ]) + ]) + ]) + ]) + ]) + ;; + esac + + if test "x$lt_cv_dlopen" != xno; then + enable_dlopen=yes + else + enable_dlopen=no + fi + + case $lt_cv_dlopen in + dlopen) + save_CPPFLAGS="$CPPFLAGS" + test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" + + save_LDFLAGS="$LDFLAGS" + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" + + save_LIBS="$LIBS" + LIBS="$lt_cv_dlopen_libs $LIBS" + + AC_CACHE_CHECK([whether a program can dlopen itself], + lt_cv_dlopen_self, [dnl + _LT_AC_TRY_DLOPEN_SELF( + lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, + lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) + ]) + + if test "x$lt_cv_dlopen_self" = xyes; then + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" + AC_CACHE_CHECK([whether a statically linked program can dlopen itself], + lt_cv_dlopen_self_static, [dnl + _LT_AC_TRY_DLOPEN_SELF( + lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, + lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) + ]) + fi + + CPPFLAGS="$save_CPPFLAGS" + LDFLAGS="$save_LDFLAGS" + LIBS="$save_LIBS" + ;; + esac + + case $lt_cv_dlopen_self in + yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; + *) enable_dlopen_self=unknown ;; + esac + + case $lt_cv_dlopen_self_static in + yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; + *) enable_dlopen_self_static=unknown ;; + esac +fi +])# AC_LIBTOOL_DLOPEN_SELF + + +# AC_LIBTOOL_PROG_CC_C_O([TAGNAME]) +# --------------------------------- +# Check to see if options -c and -o are simultaneously supported by compiler +AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O], +[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl +AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], + [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)], + [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no + $rm -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&AS_MESSAGE_LOG_FD + echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes + fi + fi + chmod u+w . 2>&AS_MESSAGE_LOG_FD + $rm conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files + $rm out/* && rmdir out + cd .. + rmdir conftest + $rm conftest* +]) +])# AC_LIBTOOL_PROG_CC_C_O + + +# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME]) +# ----------------------------------------- +# Check to see if we can do hard links to lock some files if needed +AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], +[AC_REQUIRE([_LT_AC_LOCK])dnl + +hard_links="nottested" +if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + AC_MSG_CHECKING([if we can lock with hard links]) + hard_links=yes + $rm conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + AC_MSG_RESULT([$hard_links]) + if test "$hard_links" = no; then + AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) + need_locks=warn + fi +else + need_locks=no +fi +])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS + + +# AC_LIBTOOL_OBJDIR +# ----------------- +AC_DEFUN([AC_LIBTOOL_OBJDIR], +[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], +[rm -f .libs 2>/dev/null +mkdir .libs 2>/dev/null +if test -d .libs; then + lt_cv_objdir=.libs +else + # MS-DOS does not allow filenames that begin with a dot. + lt_cv_objdir=_libs +fi +rmdir .libs 2>/dev/null]) +objdir=$lt_cv_objdir +])# AC_LIBTOOL_OBJDIR + + +# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME]) +# ---------------------------------------------- +# Check hardcoding attributes. +AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], +[AC_MSG_CHECKING([how to hardcode library paths into programs]) +_LT_AC_TAGVAR(hardcode_action, $1)= +if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \ + test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \ + test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then + + # We can hardcode non-existant directories. + if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no && + # If the only mechanism to avoid hardcoding is shlibpath_var, we + # have to relink, otherwise we might link with an installed library + # when we should be linking with a yet-to-be-installed one + ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no && + test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then + # Linking always hardcodes the temporary library directory. + _LT_AC_TAGVAR(hardcode_action, $1)=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + _LT_AC_TAGVAR(hardcode_action, $1)=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + _LT_AC_TAGVAR(hardcode_action, $1)=unsupported +fi +AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)]) + +if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then + # Fast installation is not supported + enable_fast_install=no +elif test "$shlibpath_overrides_runpath" = yes || + test "$enable_shared" = no; then + # Fast installation is not necessary + enable_fast_install=needless +fi +])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH + + +# AC_LIBTOOL_SYS_LIB_STRIP +# ------------------------ +AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP], +[striplib= +old_striplib= +AC_MSG_CHECKING([whether stripping libraries is possible]) +if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then + test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" + test -z "$striplib" && striplib="$STRIP --strip-unneeded" + AC_MSG_RESULT([yes]) +else +# FIXME - insert some real tests, host_os isn't really good enough + case $host_os in + darwin*) + if test -n "$STRIP" ; then + striplib="$STRIP -x" + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) +fi + ;; + *) + AC_MSG_RESULT([no]) + ;; + esac +fi +])# AC_LIBTOOL_SYS_LIB_STRIP + + +# AC_LIBTOOL_SYS_DYNAMIC_LINKER +# ----------------------------- +# PORTME Fill in your ld.so characteristics +AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER], +[AC_MSG_CHECKING([dynamic linker characteristics]) +library_names_spec= +libname_spec='lib$name' +soname_spec= +shrext_cmds=".so" +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" +if test "$GCC" = yes; then + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then + # if the path contains ";" then we assume it to be the separator + # otherwise default to the standard path separator (i.e. ":") - it is + # assumed that no part of a normal pathname contains ";" but that should + # okay in the real world where ";" in dirpaths is itself problematic. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi +else + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" +fi +need_lib_prefix=unknown +hardcode_into_libs=no + +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown + +case $host_os in +aix3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + shlibpath_var=LIBPATH + + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='${libname}${release}${shared_ext}$major' + ;; + +aix4* | aix5*) + version_type=linux + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test "$host_cpu" = ia64; then + # AIX 5 supports IA64 + library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + else + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line `#! .'. This would cause the generated library to + # depend on `.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[[01]] | aix4.[[01]].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + if test "$aix_use_runtimelinking" = yes; then + # If using run time linking (on AIX 4.2 or later) use lib.so + # instead of lib.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + else + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='${libname}${release}.a $libname.a' + soname_spec='${libname}${release}${shared_ext}$major' + fi + shlibpath_var=LIBPATH + fi + ;; + +amigaos*) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; + +beos*) + library_names_spec='${libname}${shared_ext}' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; + +bsdi[[45]]*) + version_type=linux + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; + +cygwin* | mingw* | pw32*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$host_os in + yes,cygwin* | yes,mingw* | yes,pw32*) + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $rm \$dlpath' + shlibpath_overrides_runpath=yes + + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" + ;; + mingw*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then + # It is most probably a Windows format PATH printed by + # mingw gcc, but we are running on Cygwin. Gcc prints its search + # path with ; separators, and with drive letters. We can handle the + # drive letters (cygwin fileutils understands them), so leave them, + # especially as we might pass files found there to a mingw objdump, + # which wouldn't understand a cygwinified path. Ahh. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' + ;; + esac + ;; + + *) + library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' + ;; + esac + dynamic_linker='Win32 ld.exe' + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; + +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' + # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. + if test "$GCC" = yes; then + sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` + else + sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' + fi + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +dgux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +freebsd1*) + dynamic_linker=no + ;; + +kfreebsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='GNU ld.so' + ;; + +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[[123]]*) objformat=aout ;; + *) objformat=elf ;; + esac + fi + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.[[01]]* | freebsdelf3.[[01]]*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ + freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + freebsd*) # from 4.6 on + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + esac + ;; + +gnu*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + ;; + +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case $host_cpu in + ia64*) + shrext_cmds='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + if test "X$HPUX_IA64_MODE" = X32; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + hppa*64*) + shrext_cmds='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext_cmds='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555. + postinstall_cmds='chmod 555 $lib' + ;; + +interix3*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test "$lt_cv_prog_gnu_ld" = yes; then + version_type=linux + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + hardcode_into_libs=yes + ;; + +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; + +# This must be Linux ELF. +linux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + fi + + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; + +netbsdelf*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='NetBSD ld.elf_so' + ;; + +knetbsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='GNU ld.so' + ;; + +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + +newsos6) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +nto-qnx*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +openbsd*) + version_type=sunos + sys_lib_dlsearch_path_spec="/usr/lib" + need_lib_prefix=no + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. + case $host_os in + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; + esac + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + case $host_os in + openbsd2.[[89]] | openbsd2.[[89]].*) + shlibpath_overrides_runpath=no + ;; + *) + shlibpath_overrides_runpath=yes + ;; + esac + else + shlibpath_overrides_runpath=yes + fi + ;; + +os2*) + libname_spec='$name' + shrext_cmds=".dll" + need_lib_prefix=no + library_names_spec='$libname${shared_ext} $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; + +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; + +solaris*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; + +sunos4*) + version_type=sunos + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test "$with_gnu_ld" = yes; then + need_lib_prefix=no + fi + need_version=yes + ;; + +sysv4 | sysv4.3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + export_dynamic_flag_spec='${wl}-Blargedynsym' + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; + esac + ;; + +sysv4*MP*) + if test -d /usr/nec ;then + version_type=linux + library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' + soname_spec='$libname${shared_ext}.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + version_type=freebsd-elf + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + if test "$with_gnu_ld" = yes; then + sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' + shlibpath_overrides_runpath=no + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + shlibpath_overrides_runpath=yes + case $host_os in + sco3.2v5*) + sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" + ;; + esac + fi + sys_lib_dlsearch_path_spec='/usr/lib' + ;; + +uts4*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +*) + dynamic_linker=no + ;; +esac +AC_MSG_RESULT([$dynamic_linker]) +test "$dynamic_linker" = no && can_build_shared=no + +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi +])# AC_LIBTOOL_SYS_DYNAMIC_LINKER + + +# _LT_AC_TAGCONFIG +# ---------------- +AC_DEFUN([_LT_AC_TAGCONFIG], +[AC_ARG_WITH([tags], + [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@], + [include additional configurations @<:@automatic@:>@])], + [tagnames="$withval"]) + +if test -f "$ltmain" && test -n "$tagnames"; then + if test ! -f "${ofile}"; then + AC_MSG_WARN([output file `$ofile' does not exist]) + fi + + if test -z "$LTCC"; then + eval "`$SHELL ${ofile} --config | grep '^LTCC='`" + if test -z "$LTCC"; then + AC_MSG_WARN([output file `$ofile' does not look like a libtool script]) + else + AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile']) + fi + fi + if test -z "$LTCFLAGS"; then + eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" + fi + + # Extract list of available tagged configurations in $ofile. + # Note that this assumes the entire list is on one line. + available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` + + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for tagname in $tagnames; do + IFS="$lt_save_ifs" + # Check whether tagname contains only valid characters + case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in + "") ;; + *) AC_MSG_ERROR([invalid tag name: $tagname]) + ;; + esac + + if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null + then + AC_MSG_ERROR([tag name \"$tagname\" already exists]) + fi + + # Update the list of available tags. + if test -n "$tagname"; then + echo appending configuration tag \"$tagname\" to $ofile + + case $tagname in + CXX) + if test -n "$CXX" && ( test "X$CXX" != "Xno" && + ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || + (test "X$CXX" != "Xg++"))) ; then + AC_LIBTOOL_LANG_CXX_CONFIG + else + tagname="" + fi + ;; + + F77) + if test -n "$F77" && test "X$F77" != "Xno"; then + AC_LIBTOOL_LANG_F77_CONFIG + else + tagname="" + fi + ;; + + GCJ) + if test -n "$GCJ" && test "X$GCJ" != "Xno"; then + AC_LIBTOOL_LANG_GCJ_CONFIG + else + tagname="" + fi + ;; + + RC) + AC_LIBTOOL_LANG_RC_CONFIG + ;; + + *) + AC_MSG_ERROR([Unsupported tag name: $tagname]) + ;; + esac + + # Append the new tag name to the list of available tags. + if test -n "$tagname" ; then + available_tags="$available_tags $tagname" + fi + fi + done + IFS="$lt_save_ifs" + + # Now substitute the updated list of available tags. + if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then + mv "${ofile}T" "$ofile" + chmod +x "$ofile" + else + rm -f "${ofile}T" + AC_MSG_ERROR([unable to update list of available tagged configurations.]) + fi +fi +])# _LT_AC_TAGCONFIG + + +# AC_LIBTOOL_DLOPEN +# ----------------- +# enable checks for dlopen support +AC_DEFUN([AC_LIBTOOL_DLOPEN], + [AC_BEFORE([$0],[AC_LIBTOOL_SETUP]) +])# AC_LIBTOOL_DLOPEN + + +# AC_LIBTOOL_WIN32_DLL +# -------------------- +# declare package support for building win32 DLLs +AC_DEFUN([AC_LIBTOOL_WIN32_DLL], +[AC_BEFORE([$0], [AC_LIBTOOL_SETUP]) +])# AC_LIBTOOL_WIN32_DLL + + +# AC_ENABLE_SHARED([DEFAULT]) +# --------------------------- +# implement the --enable-shared flag +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +AC_DEFUN([AC_ENABLE_SHARED], +[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl +AC_ARG_ENABLE([shared], + [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@], + [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])], + [p=${PACKAGE-default} + case $enableval in + yes) enable_shared=yes ;; + no) enable_shared=no ;; + *) + enable_shared=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_shared=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac], + [enable_shared=]AC_ENABLE_SHARED_DEFAULT) +])# AC_ENABLE_SHARED + + +# AC_DISABLE_SHARED +# ----------------- +# set the default shared flag to --disable-shared +AC_DEFUN([AC_DISABLE_SHARED], +[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl +AC_ENABLE_SHARED(no) +])# AC_DISABLE_SHARED + + +# AC_ENABLE_STATIC([DEFAULT]) +# --------------------------- +# implement the --enable-static flag +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +AC_DEFUN([AC_ENABLE_STATIC], +[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl +AC_ARG_ENABLE([static], + [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@], + [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])], + [p=${PACKAGE-default} + case $enableval in + yes) enable_static=yes ;; + no) enable_static=no ;; + *) + enable_static=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_static=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac], + [enable_static=]AC_ENABLE_STATIC_DEFAULT) +])# AC_ENABLE_STATIC + + +# AC_DISABLE_STATIC +# ----------------- +# set the default static flag to --disable-static +AC_DEFUN([AC_DISABLE_STATIC], +[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl +AC_ENABLE_STATIC(no) +])# AC_DISABLE_STATIC + + +# AC_ENABLE_FAST_INSTALL([DEFAULT]) +# --------------------------------- +# implement the --enable-fast-install flag +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +AC_DEFUN([AC_ENABLE_FAST_INSTALL], +[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl +AC_ARG_ENABLE([fast-install], + [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], + [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], + [p=${PACKAGE-default} + case $enableval in + yes) enable_fast_install=yes ;; + no) enable_fast_install=no ;; + *) + enable_fast_install=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_fast_install=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac], + [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT) +])# AC_ENABLE_FAST_INSTALL + + +# AC_DISABLE_FAST_INSTALL +# ----------------------- +# set the default to --disable-fast-install +AC_DEFUN([AC_DISABLE_FAST_INSTALL], +[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl +AC_ENABLE_FAST_INSTALL(no) +])# AC_DISABLE_FAST_INSTALL + + +# AC_LIBTOOL_PICMODE([MODE]) +# -------------------------- +# implement the --with-pic flag +# MODE is either `yes' or `no'. If omitted, it defaults to `both'. +AC_DEFUN([AC_LIBTOOL_PICMODE], +[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl +pic_mode=ifelse($#,1,$1,default) +])# AC_LIBTOOL_PICMODE + + +# AC_PROG_EGREP +# ------------- +# This is predefined starting with Autoconf 2.54, so this conditional +# definition can be removed once we require Autoconf 2.54 or later. +m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP], +[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep], + [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]) + EGREP=$ac_cv_prog_egrep + AC_SUBST([EGREP]) +])]) + + +# AC_PATH_TOOL_PREFIX +# ------------------- +# find a file program which can recognise shared library +AC_DEFUN([AC_PATH_TOOL_PREFIX], +[AC_REQUIRE([AC_PROG_EGREP])dnl +AC_MSG_CHECKING([for $1]) +AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, +[case $MAGIC_CMD in +[[\\/*] | ?:[\\/]*]) + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + ;; +*) + lt_save_MAGIC_CMD="$MAGIC_CMD" + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR +dnl $ac_dummy forces splitting on constant user-supplied paths. +dnl POSIX.2 word splitting is done only on the output of word expansions, +dnl not every word. This closes a longstanding sh security hole. + ac_dummy="ifelse([$2], , $PATH, [$2])" + for ac_dir in $ac_dummy; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$1; then + lt_cv_path_MAGIC_CMD="$ac_dir/$1" + if test -n "$file_magic_test_file"; then + case $deplibs_check_method in + "file_magic "*) + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` + MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + $EGREP "$file_magic_regex" > /dev/null; then + : + else + cat <&2 + +*** Warning: the command libtool uses to detect shared libraries, +*** $file_magic_cmd, produces output that libtool cannot recognize. +*** The result is that libtool may fail to recognize shared libraries +*** as such. This will affect the creation of libtool libraries that +*** depend on shared libraries, but programs linked with such libtool +*** libraries will work regardless of this problem. Nevertheless, you +*** may want to report the problem to your system manager and/or to +*** bug-libtool@gnu.org + +EOF + fi ;; + esac + fi + break + fi + done + IFS="$lt_save_ifs" + MAGIC_CMD="$lt_save_MAGIC_CMD" + ;; +esac]) +MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +if test -n "$MAGIC_CMD"; then + AC_MSG_RESULT($MAGIC_CMD) +else + AC_MSG_RESULT(no) +fi +])# AC_PATH_TOOL_PREFIX + + +# AC_PATH_MAGIC +# ------------- +# find a file program which can recognise a shared library +AC_DEFUN([AC_PATH_MAGIC], +[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) +if test -z "$lt_cv_path_MAGIC_CMD"; then + if test -n "$ac_tool_prefix"; then + AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) + else + MAGIC_CMD=: + fi +fi +])# AC_PATH_MAGIC + + +# AC_PROG_LD +# ---------- +# find the pathname to the GNU or non-GNU linker +AC_DEFUN([AC_PROG_LD], +[AC_ARG_WITH([gnu-ld], + [AC_HELP_STRING([--with-gnu-ld], + [assume the C compiler uses GNU ld @<:@default=no@:>@])], + [test "$withval" = no || with_gnu_ld=yes], + [with_gnu_ld=no]) +AC_REQUIRE([LT_AC_PROG_SED])dnl +AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_CANONICAL_BUILD])dnl +ac_prog=ld +if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + AC_MSG_CHECKING([for ld used by $CC]) + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [[\\/]]* | ?:[[\\/]]*) + re_direlt='/[[^/]][[^/]]*/\.\./' + # Canonicalize the pathname of ld + ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` + while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do + ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + AC_MSG_CHECKING([for GNU ld]) +else + AC_MSG_CHECKING([for non-GNU ld]) +fi +AC_CACHE_VAL(lt_cv_path_LD, +[if test -z "$LD"; then + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + lt_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some variants of GNU ld only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$lt_cv_path_LD" -v 2>&1 &1 /dev/null; then + case $host_cpu in + i*86 ) + # Not sure whether the presence of OpenBSD here was a mistake. + # Let's accept both of them until this is cleared up. + lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` + ;; + esac + else + lt_cv_deplibs_check_method=pass_all + fi + ;; + +gnu*) + lt_cv_deplibs_check_method=pass_all + ;; + +hpux10.20* | hpux11*) + lt_cv_file_magic_cmd=/usr/bin/file + case $host_cpu in + ia64*) + lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' + lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so + ;; + hppa*64*) + [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'] + lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl + ;; + *) + lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' + lt_cv_file_magic_test_file=/usr/lib/libc.sl + ;; + esac + ;; + +interix3*) + # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' + ;; + +irix5* | irix6* | nonstopux*) + case $LD in + *-32|*"-32 ") libmagic=32-bit;; + *-n32|*"-n32 ") libmagic=N32;; + *-64|*"-64 ") libmagic=64-bit;; + *) libmagic=never-match;; + esac + lt_cv_deplibs_check_method=pass_all + ;; + +# This must be Linux ELF. +linux*) + lt_cv_deplibs_check_method=pass_all + ;; + +netbsd* | netbsdelf*-gnu | knetbsd*-gnu) + if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' + fi + ;; + +newos6*) + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=/usr/lib/libnls.so + ;; + +nto-qnx*) + lt_cv_deplibs_check_method=unknown + ;; + +openbsd*) + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' + fi + ;; + +osf3* | osf4* | osf5*) + lt_cv_deplibs_check_method=pass_all + ;; + +solaris*) + lt_cv_deplibs_check_method=pass_all + ;; + +sysv4 | sysv4.3*) + case $host_vendor in + motorola) + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` + ;; + ncr) + lt_cv_deplibs_check_method=pass_all + ;; + sequent) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' + ;; + sni) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" + lt_cv_file_magic_test_file=/lib/libc.so + ;; + siemens) + lt_cv_deplibs_check_method=pass_all + ;; + pc) + lt_cv_deplibs_check_method=pass_all + ;; + esac + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + lt_cv_deplibs_check_method=pass_all + ;; +esac +]) +file_magic_cmd=$lt_cv_file_magic_cmd +deplibs_check_method=$lt_cv_deplibs_check_method +test -z "$deplibs_check_method" && deplibs_check_method=unknown +])# AC_DEPLIBS_CHECK_METHOD + + +# AC_PROG_NM +# ---------- +# find the pathname to a BSD-compatible name lister +AC_DEFUN([AC_PROG_NM], +[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM, +[if test -n "$NM"; then + # Let the user override the test. + lt_cv_path_NM="$NM" +else + lt_nm_to_check="${ac_tool_prefix}nm" + if test -n "$ac_tool_prefix" && test "$build" = "$host"; then + lt_nm_to_check="$lt_nm_to_check nm" + fi + for lt_tmp_nm in $lt_nm_to_check; do + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + tmp_nm="$ac_dir/$lt_tmp_nm" + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then + # Check to see if the nm accepts a BSD-compat flag. + # Adding the `sed 1q' prevents false positives on HP-UX, which says: + # nm: unknown option "B" ignored + # Tru64's nm complains that /dev/null is an invalid object file + case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in + */dev/null* | *'Invalid file or object type'*) + lt_cv_path_NM="$tmp_nm -B" + break + ;; + *) + case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in + */dev/null*) + lt_cv_path_NM="$tmp_nm -p" + break + ;; + *) + lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but + continue # so that we can try to find one that supports BSD flags + ;; + esac + ;; + esac + fi + done + IFS="$lt_save_ifs" + done + test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm +fi]) +NM="$lt_cv_path_NM" +])# AC_PROG_NM + + +# AC_CHECK_LIBM +# ------------- +# check for math library +AC_DEFUN([AC_CHECK_LIBM], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +LIBM= +case $host in +*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) + # These system don't have libm, or don't need it + ;; +*-ncr-sysv4.3*) + AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") + AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") + ;; +*) + AC_CHECK_LIB(m, cos, LIBM="-lm") + ;; +esac +])# AC_CHECK_LIBM + + +# AC_LIBLTDL_CONVENIENCE([DIRECTORY]) +# ----------------------------------- +# sets LIBLTDL to the link flags for the libltdl convenience library and +# LTDLINCL to the include flags for the libltdl header and adds +# --enable-ltdl-convenience to the configure arguments. Note that +# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, +# it is assumed to be `libltdl'. LIBLTDL will be prefixed with +# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/' +# (note the single quotes!). If your package is not flat and you're not +# using automake, define top_builddir and top_srcdir appropriately in +# the Makefiles. +AC_DEFUN([AC_LIBLTDL_CONVENIENCE], +[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl + case $enable_ltdl_convenience in + no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; + "") enable_ltdl_convenience=yes + ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; + esac + LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la + LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) + # For backwards non-gettext consistent compatibility... + INCLTDL="$LTDLINCL" +])# AC_LIBLTDL_CONVENIENCE + + +# AC_LIBLTDL_INSTALLABLE([DIRECTORY]) +# ----------------------------------- +# sets LIBLTDL to the link flags for the libltdl installable library and +# LTDLINCL to the include flags for the libltdl header and adds +# --enable-ltdl-install to the configure arguments. Note that +# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, +# and an installed libltdl is not found, it is assumed to be `libltdl'. +# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with +# '${top_srcdir}/' (note the single quotes!). If your package is not +# flat and you're not using automake, define top_builddir and top_srcdir +# appropriately in the Makefiles. +# In the future, this macro may have to be called after AC_PROG_LIBTOOL. +AC_DEFUN([AC_LIBLTDL_INSTALLABLE], +[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl + AC_CHECK_LIB(ltdl, lt_dlinit, + [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], + [if test x"$enable_ltdl_install" = xno; then + AC_MSG_WARN([libltdl not installed, but installation disabled]) + else + enable_ltdl_install=yes + fi + ]) + if test x"$enable_ltdl_install" = x"yes"; then + ac_configure_args="$ac_configure_args --enable-ltdl-install" + LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la + LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) + else + ac_configure_args="$ac_configure_args --enable-ltdl-install=no" + LIBLTDL="-lltdl" + LTDLINCL= + fi + # For backwards non-gettext consistent compatibility... + INCLTDL="$LTDLINCL" +])# AC_LIBLTDL_INSTALLABLE + + +# AC_LIBTOOL_CXX +# -------------- +# enable support for C++ libraries +AC_DEFUN([AC_LIBTOOL_CXX], +[AC_REQUIRE([_LT_AC_LANG_CXX]) +])# AC_LIBTOOL_CXX + + +# _LT_AC_LANG_CXX +# --------------- +AC_DEFUN([_LT_AC_LANG_CXX], +[AC_REQUIRE([AC_PROG_CXX]) +AC_REQUIRE([_LT_AC_PROG_CXXCPP]) +_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX]) +])# _LT_AC_LANG_CXX + +# _LT_AC_PROG_CXXCPP +# ------------------ +AC_DEFUN([_LT_AC_PROG_CXXCPP], +[ +AC_REQUIRE([AC_PROG_CXX]) +if test -n "$CXX" && ( test "X$CXX" != "Xno" && + ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || + (test "X$CXX" != "Xg++"))) ; then + AC_PROG_CXXCPP +fi +])# _LT_AC_PROG_CXXCPP + +# AC_LIBTOOL_F77 +# -------------- +# enable support for Fortran 77 libraries +AC_DEFUN([AC_LIBTOOL_F77], +[AC_REQUIRE([_LT_AC_LANG_F77]) +])# AC_LIBTOOL_F77 + + +# _LT_AC_LANG_F77 +# --------------- +AC_DEFUN([_LT_AC_LANG_F77], +[AC_REQUIRE([AC_PROG_F77]) +_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77]) +])# _LT_AC_LANG_F77 + + +# AC_LIBTOOL_GCJ +# -------------- +# enable support for GCJ libraries +AC_DEFUN([AC_LIBTOOL_GCJ], +[AC_REQUIRE([_LT_AC_LANG_GCJ]) +])# AC_LIBTOOL_GCJ + + +# _LT_AC_LANG_GCJ +# --------------- +AC_DEFUN([_LT_AC_LANG_GCJ], +[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[], + [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[], + [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[], + [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])], + [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])], + [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])]) +_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ]) +])# _LT_AC_LANG_GCJ + + +# AC_LIBTOOL_RC +# ------------- +# enable support for Windows resource files +AC_DEFUN([AC_LIBTOOL_RC], +[AC_REQUIRE([LT_AC_PROG_RC]) +_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC]) +])# AC_LIBTOOL_RC + + +# AC_LIBTOOL_LANG_C_CONFIG +# ------------------------ +# Ensure that the configuration vars for the C compiler are +# suitably defined. Those variables are subsequently used by +# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. +AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG]) +AC_DEFUN([_LT_AC_LANG_C_CONFIG], +[lt_save_CC="$CC" +AC_LANG_PUSH(C) + +# Source file extension for C test sources. +ac_ext=c + +# Object file extension for compiled C test sources. +objext=o +_LT_AC_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="int some_variable = 0;\n" + +# Code to be used in simple link tests +lt_simple_link_test_code='int main(){return(0);}\n' + +_LT_AC_SYS_COMPILER + +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + +AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) +AC_LIBTOOL_PROG_COMPILER_PIC($1) +AC_LIBTOOL_PROG_CC_C_O($1) +AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) +AC_LIBTOOL_PROG_LD_SHLIBS($1) +AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) +AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) +AC_LIBTOOL_SYS_LIB_STRIP +AC_LIBTOOL_DLOPEN_SELF + +# Report which library types will actually be built +AC_MSG_CHECKING([if libtool supports shared libraries]) +AC_MSG_RESULT([$can_build_shared]) + +AC_MSG_CHECKING([whether to build shared libraries]) +test "$can_build_shared" = "no" && enable_shared=no + +# On AIX, shared libraries and static libraries use the same namespace, and +# are all built from PIC. +case $host_os in +aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + +aix4* | aix5*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; +esac +AC_MSG_RESULT([$enable_shared]) + +AC_MSG_CHECKING([whether to build static libraries]) +# Make sure either enable_shared or enable_static is yes. +test "$enable_shared" = yes || enable_static=yes +AC_MSG_RESULT([$enable_static]) + +AC_LIBTOOL_CONFIG($1) + +AC_LANG_POP +CC="$lt_save_CC" +])# AC_LIBTOOL_LANG_C_CONFIG + + +# AC_LIBTOOL_LANG_CXX_CONFIG +# -------------------------- +# Ensure that the configuration vars for the C compiler are +# suitably defined. Those variables are subsequently used by +# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. +AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)]) +AC_DEFUN([_LT_AC_LANG_CXX_CONFIG], +[AC_LANG_PUSH(C++) +AC_REQUIRE([AC_PROG_CXX]) +AC_REQUIRE([_LT_AC_PROG_CXXCPP]) + +_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no +_LT_AC_TAGVAR(allow_undefined_flag, $1)= +_LT_AC_TAGVAR(always_export_symbols, $1)=no +_LT_AC_TAGVAR(archive_expsym_cmds, $1)= +_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= +_LT_AC_TAGVAR(hardcode_direct, $1)=no +_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= +_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= +_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= +_LT_AC_TAGVAR(hardcode_minus_L, $1)=no +_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported +_LT_AC_TAGVAR(hardcode_automatic, $1)=no +_LT_AC_TAGVAR(module_cmds, $1)= +_LT_AC_TAGVAR(module_expsym_cmds, $1)= +_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown +_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_AC_TAGVAR(no_undefined_flag, $1)= +_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= +_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no + +# Dependencies to place before and after the object being linked: +_LT_AC_TAGVAR(predep_objects, $1)= +_LT_AC_TAGVAR(postdep_objects, $1)= +_LT_AC_TAGVAR(predeps, $1)= +_LT_AC_TAGVAR(postdeps, $1)= +_LT_AC_TAGVAR(compiler_lib_search_path, $1)= + +# Source file extension for C++ test sources. +ac_ext=cpp + +# Object file extension for compiled C++ test sources. +objext=o +_LT_AC_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="int some_variable = 0;\n" + +# Code to be used in simple link tests +lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }\n' + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. +_LT_AC_SYS_COMPILER + +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + +# Allow CC to be a program name with arguments. +lt_save_CC=$CC +lt_save_LD=$LD +lt_save_GCC=$GCC +GCC=$GXX +lt_save_with_gnu_ld=$with_gnu_ld +lt_save_path_LD=$lt_cv_path_LD +if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then + lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx +else + $as_unset lt_cv_prog_gnu_ld +fi +if test -n "${lt_cv_path_LDCXX+set}"; then + lt_cv_path_LD=$lt_cv_path_LDCXX +else + $as_unset lt_cv_path_LD +fi +test -z "${LDCXX+set}" || LD=$LDCXX +CC=${CXX-"c++"} +compiler=$CC +_LT_AC_TAGVAR(compiler, $1)=$CC +_LT_CC_BASENAME([$compiler]) + +# We don't want -fno-exception wen compiling C++ code, so set the +# no_builtin_flag separately +if test "$GXX" = yes; then + _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' +else + _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= +fi + +if test "$GXX" = yes; then + # Set up default GNU C++ configuration + + AC_PROG_LD + + # Check if GNU C++ uses GNU ld as the underlying linker, since the + # archiving commands below assume that GNU ld is being used. + if test "$with_gnu_ld" = yes; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + + # If archive_cmds runs LD, not CC, wlarc should be empty + # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to + # investigate it a little bit more. (MM) + wlarc='${wl}' + + # ancient GNU ld didn't support --whole-archive et. al. + if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ + grep 'no-whole-archive' > /dev/null; then + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= + fi + else + with_gnu_ld=no + wlarc= + + # A generic and very simple default shared library creation + # command for GNU C++ for the case where it uses the native + # linker, instead of GNU ld. If possible, this setting should + # overridden to take advantage of the native linker features on + # the platform it is being used on. + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + fi + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' + +else + GXX=no + with_gnu_ld=no + wlarc= +fi + +# PORTME: fill in a description of your system's C++ link characteristics +AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) +_LT_AC_TAGVAR(ld_shlibs, $1)=yes +case $host_os in + aix3*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + aix4* | aix5*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) + for ld_flag in $LDFLAGS; do + case $ld_flag in + *-brtl*) + aix_use_runtimelinking=yes + break + ;; + esac + done + ;; + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + _LT_AC_TAGVAR(archive_cmds, $1)='' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + + if test "$GXX" = yes; then + case $host_os in aix4.[[012]]|aix4.[[012]].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && \ + strings "$collect2name" | grep resolve_lib_name >/dev/null + then + # We have reworked collect2 + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + else + # We have old collect2 + _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= + fi + ;; + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + _LT_AC_TAGVAR(always_export_symbols, $1)=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' + # Determine the default libpath from the value encoded in an empty executable. + _LT_AC_SYS_LIBPATH_AIX + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + + _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' + _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" + _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an empty executable. + _LT_AC_SYS_LIBPATH_AIX + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' + # Exported symbols can be pulled into shared objects from archives + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes + # This is similar to how AIX traditionally builds its shared libraries. + _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + + beos*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + chorus*) + case $cc_basename in + *) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + cygwin* | mingw* | pw32*) + # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, + # as there is no search path for DLLs. + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_AC_TAGVAR(always_export_symbols, $1)=no + _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + + if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + darwin* | rhapsody*) + case $host_os in + rhapsody* | darwin1.[[012]]) + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[[012]]) + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + ;; + 10.*) + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' + ;; + esac + fi + ;; + esac + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_automatic, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + + if test "$GXX" = yes ; then + lt_int_apple_cc_single_mod=no + output_verbose_link_cmd='echo' + if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then + lt_int_apple_cc_single_mod=yes + fi + if test "X$lt_int_apple_cc_single_mod" = Xyes ; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + else + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + fi + _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + if test "X$lt_int_apple_cc_single_mod" = Xyes ; then + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + fi + _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + case $cc_basename in + xlc*) + output_verbose_link_cmd='echo' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' + _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + ;; + *) + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + fi + ;; + + dgux*) + case $cc_basename in + ec++*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + ghcx*) + # Green Hills C++ Compiler + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + freebsd[[12]]*) + # C++ shared libraries reported to be fairly broken before switch to ELF + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + freebsd-elf*) + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + ;; + freebsd* | kfreebsd*-gnu | dragonfly*) + # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF + # conventions + _LT_AC_TAGVAR(ld_shlibs, $1)=yes + ;; + gnu*) + ;; + hpux9*) + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, + # but as the default + # location of the library. + + case $cc_basename in + CC*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + aCC*) + _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[[-]]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + *) + if test "$GXX" = yes; then + _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + hpux10*|hpux11*) + if test $with_gnu_ld = no; then + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + case $host_cpu in + hppa*64*|ia64*) + _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' + ;; + *) + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + ;; + esac + fi + case $host_cpu in + hppa*64*|ia64*) + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + *) + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, + # but as the default + # location of the library. + ;; + esac + + case $cc_basename in + CC*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + aCC*) + case $host_cpu in + hppa*64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + *) + if test "$GXX" = yes; then + if test $with_gnu_ld = no; then + case $host_cpu in + hppa*64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + fi + else + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + interix3*) + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + irix5* | irix6*) + case $cc_basename in + CC*) + # SGI C++ + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + + # Archives containing C++ object files must be created using + # "CC -ar", where "CC" is the IRIX C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' + ;; + *) + if test "$GXX" = yes; then + if test "$with_gnu_ld" = no; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' + fi + fi + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + ;; + esac + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + ;; + linux*) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + + # Archives containing C++ object files must be created using + # "CC -Bstatic", where "CC" is the KAI C++ compiler. + _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' + ;; + icpc*) + # Intel C++ + with_gnu_ld=yes + # version 8.0 and above of icpc choke on multiply defined symbols + # if we add $predep_objects and $postdep_objects, however 7.1 and + # earlier do not add the objects themselves. + case `$CC -V 2>&1` in + *"Version 7."*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + ;; + *) # Version 8.0 or newer + tmp_idyn= + case $host_cpu in + ia64*) tmp_idyn=' -i_dynamic';; + esac + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + ;; + esac + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + ;; + pgCC*) + # Portland Group C++ compiler + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + ;; + cxx*) + # Compaq C++ + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' + + runpath_var=LD_RUN_PATH + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + esac + ;; + lynxos*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + m88k*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + mvs*) + case $cc_basename in + cxx*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + netbsd* | netbsdelf*-gnu | knetbsd*-gnu) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' + wlarc= + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + fi + # Workaround some broken pre-1.5 toolchains + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' + ;; + openbsd2*) + # C++ shared libraries are fairly broken + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + openbsd*) + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + fi + output_verbose_link_cmd='echo' + ;; + osf3*) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + # Archives containing C++ object files must be created using + # "CC -Bstatic", where "CC" is the KAI C++ compiler. + _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' + + ;; + RCC*) + # Rational C++ 2.4.1 + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + cxx*) + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + *) + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' + + else + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + osf4* | osf5*) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + # Archives containing C++ object files must be created using + # the KAI C++ compiler. + _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' + ;; + RCC*) + # Rational C++ 2.4.1 + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + cxx*) + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ + echo "-hidden">> $lib.exp~ + $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~ + $rm $lib.exp' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + *) + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' + + else + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + psos*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + lcc*) + # Lucid + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + solaris*) + case $cc_basename in + CC*) + # Sun C++ 4.2, 5.x and Centerline C++ + _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes + _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + case $host_os in + solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; + *) + # The C++ compiler is used as linker so we must use $wl + # flag to pass the commands to the underlying system + # linker. We must also pass each convience library through + # to the system linker between allextract/defaultextract. + # The C++ compiler will combine linker options so we + # cannot just pass the convience library names through + # without $wl. + # Supported since Solaris 2.6 (maybe 2.5.1?) + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' + ;; + esac + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + + output_verbose_link_cmd='echo' + + # Archives containing C++ object files must be created using + # "CC -xar", where "CC" is the Sun C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' + ;; + gcx*) + # Green Hills C++ Compiler + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + + # The C++ compiler must be used to create the archive. + _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' + ;; + *) + # GNU C++ compiler with Solaris linker + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' + if $CC --version | grep -v '^2\.7' > /dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$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' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" + else + # g++ 2.7 appears to require `-G' NOT `-shared' on this + # platform. + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" + fi + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' + fi + ;; + esac + ;; + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) + _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + # For security reasons, it is highly recommended that you always + # use absolute paths for naming shared libraries, and exclude the + # DT_RUNPATH tag from executables and libraries. But doing so + # requires that you compile everything twice, which is a pain. + # So that behaviour is only enabled if SCOABSPATH is set to a + # non-empty value in the environment. Most likely only useful for + # creating official distributions of packages. + # This is a hack until libtool officially supports absolute path + # names for shared libraries. + _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + tandem*) + case $cc_basename in + NCC*) + # NonStop-UX NCC 3.20 + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + vxworks*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; +esac +AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) +test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no + +_LT_AC_TAGVAR(GCC, $1)="$GXX" +_LT_AC_TAGVAR(LD, $1)="$LD" + +AC_LIBTOOL_POSTDEP_PREDEP($1) +AC_LIBTOOL_PROG_COMPILER_PIC($1) +AC_LIBTOOL_PROG_CC_C_O($1) +AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) +AC_LIBTOOL_PROG_LD_SHLIBS($1) +AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) +AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) + +AC_LIBTOOL_CONFIG($1) + +AC_LANG_POP +CC=$lt_save_CC +LDCXX=$LD +LD=$lt_save_LD +GCC=$lt_save_GCC +with_gnu_ldcxx=$with_gnu_ld +with_gnu_ld=$lt_save_with_gnu_ld +lt_cv_path_LDCXX=$lt_cv_path_LD +lt_cv_path_LD=$lt_save_path_LD +lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld +lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld +])# AC_LIBTOOL_LANG_CXX_CONFIG + +# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME]) +# ------------------------------------ +# Figure out "hidden" library dependencies from verbose +# compiler output when linking a shared library. +# Parse the compiler output and extract the necessary +# objects, libraries and library flags. +AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[ +dnl we can't use the lt_simple_compile_test_code here, +dnl because it contains code intended for an executable, +dnl not a library. It's possible we should let each +dnl tag define a new lt_????_link_test_code variable, +dnl but it's only used here... +ifelse([$1],[],[cat > conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext <> "$cfgfile" +ifelse([$1], [], +[#! $SHELL + +# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. +# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) +# 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 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=$lt_SED + +# Sed that helps us avoid accidentally triggering echo(1) options like -n. +Xsed="$SED -e 1s/^X//" + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +# The names of the tagged configurations supported by this script. +available_tags= + +# ### BEGIN LIBTOOL CONFIG], +[# ### BEGIN LIBTOOL TAG CONFIG: $tagname]) + +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: + +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + +# Whether or not to build static libraries. +build_old_libs=$enable_static + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1) + +# Whether or not to disallow shared libs when runtime libs are static +allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) + +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install + +# The host system. +host_alias=$host_alias +host=$host +host_os=$host_os + +# The build system. +build_alias=$build_alias +build=$build +build_os=$build_os + +# An echo program that does not interpret backslashes. +echo=$lt_echo + +# The archiver. +AR=$lt_AR +AR_FLAGS=$lt_AR_FLAGS + +# A C compiler. +LTCC=$lt_LTCC + +# LTCC compiler flags. +LTCFLAGS=$lt_LTCFLAGS + +# A language-specific compiler. +CC=$lt_[]_LT_AC_TAGVAR(compiler, $1) + +# Is the compiler the GNU C compiler? +with_gcc=$_LT_AC_TAGVAR(GCC, $1) + +# An ERE matcher. +EGREP=$lt_EGREP + +# The linker used to build libraries. +LD=$lt_[]_LT_AC_TAGVAR(LD, $1) + +# Whether we need hard or soft links. +LN_S=$lt_LN_S + +# A BSD-compatible nm program. +NM=$lt_NM + +# A symbol stripping program +STRIP=$lt_STRIP + +# Used to examine libraries when file_magic_cmd begins "file" +MAGIC_CMD=$MAGIC_CMD + +# 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=$objdir + +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds + +# How to pass a linker flag through the compiler. +wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) + +# Object file suffix (normally "o"). +objext="$ac_objext" + +# Old archive suffix (normally "a"). +libext="$libext" + +# Shared library suffix (normally ".so"). +shrext_cmds='$shrext_cmds' + +# Executable file suffix (normally ""). +exeext="$exeext" + +# Additional compiler flags for building library objects. +pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) +pic_mode=$pic_mode + +# What is the maximum length of a command? +max_cmd_len=$lt_cv_sys_max_cmd_len + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) + +# Must we lock files when doing compilation? +need_locks=$lt_need_locks + +# Do we need the lib prefix for modules? +need_lib_prefix=$need_lib_prefix + +# Do we need a version for libraries? +need_version=$need_version + +# Whether dlopen is supported. +dlopen_support=$enable_dlopen + +# Whether dlopen of programs is supported. +dlopen_self=$enable_dlopen_self + +# Whether dlopen of statically linked programs is supported. +dlopen_self_static=$enable_dlopen_self_static + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1) + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1) + +# Compiler flag to generate thread-safe objects. +thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1) + +# Library versioning type. +version_type=$version_type + +# Format of library name prefix. +libname_spec=$lt_libname_spec + +# 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=$lt_library_names_spec + +# The coded name of the library, if different from the real name. +soname_spec=$lt_soname_spec + +# Commands used to build and install an old-style archive. +RANLIB=$lt_RANLIB +old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1) +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) + +# Commands used to build and install a shared archive. +archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1) +archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1) +postinstall_cmds=$lt_postinstall_cmds +postuninstall_cmds=$lt_postuninstall_cmds + +# Commands used to build a loadable module (assumed same as above if empty) +module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1) +module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1) + +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib + +# Dependencies to place before the objects being linked to create a +# shared library. +predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1) + +# Dependencies to place after the objects being linked to create a +# shared library. +postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1) + +# Dependencies to place before the objects being linked to create a +# shared library. +predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1) + +# Dependencies to place after the objects being linked to create a +# shared library. +postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1) + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) + +# Method to check whether dependent libraries are shared objects. +deplibs_check_method=$lt_deplibs_check_method + +# Command to use when deplibs_check_method == file_magic. +file_magic_cmd=$lt_file_magic_cmd + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1) + +# Flag that forces no undefined symbols. +no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1) + +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds + +# Same as above, but a single script fragment to be evaled but not shown. +finish_eval=$lt_finish_eval + +# Take the output of nm and produce a listing of raw symbols and C names. +global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe + +# Transform the output of nm in a proper C declaration +global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl + +# Transform the output of nm in a C name address pair +global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address + +# This is the shared library runtime path variable. +runpath_var=$runpath_var + +# This is the shared library path variable. +shlibpath_var=$shlibpath_var + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath + +# How to hardcode a shared library path into an executable. +hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1) + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs + +# Flag to hardcode \$libdir into a binary during linking. +# This must work even if \$libdir does not exist. +hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) + +# 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=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) + +# Whether we need a single -rpath flag with a separated argument. +hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1) + +# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the +# resulting binary. +hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1) + +# Set to yes if using the -LDIR flag during linking hardcodes DIR into the +# resulting binary. +hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1) + +# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into +# the resulting binary. +hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1) + +# 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=$_LT_AC_TAGVAR(hardcode_automatic, $1) + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at relink time. +variables_saved_for_relink="$variables_saved_for_relink" + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1) + +# Compile-time system search path for libraries +sys_lib_search_path_spec=$lt_sys_lib_search_path_spec + +# Run-time system search path for libraries +sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec + +# Fix the shell variable \$srcfile for the compiler. +fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)" + +# Set to yes if exported symbols are required. +always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1) + +# The commands to list exported symbols. +export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1) + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_cmds + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1) + +# Symbols that must always be exported. +include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1) + +ifelse([$1],[], +[# ### END LIBTOOL CONFIG], +[# ### END LIBTOOL TAG CONFIG: $tagname]) + +__EOF__ + +ifelse([$1],[], [ + case $host_os in + aix3*) + cat <<\EOF >> "$cfgfile" + +# AIX sometimes has problems with the GCC collect2 program. For some +# reason, if we set the COLLECT_NAMES environment variable, the problems +# vanish in a puff of smoke. +if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES +fi +EOF + ;; + esac + + # We use sed instead of cat because bash on DJGPP gets confused if + # if finds mixed CR/LF and LF-only lines. Since sed operates in + # text mode, it properly converts lines to CR/LF. This bash problem + # is reportedly fixed, but why not run on old versions too? + sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) + + mv -f "$cfgfile" "$ofile" || \ + (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") + chmod +x "$ofile" +]) +else + # If there is no Makefile yet, we rely on a make rule to execute + # `config.status --recheck' to rerun these tests and create the + # libtool script then. + ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` + if test -f "$ltmain_in"; then + test -f Makefile && make "$ltmain" + fi +fi +])# AC_LIBTOOL_CONFIG + + +# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME]) +# ------------------------------------------- +AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], +[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl + +_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= + +if test "$GCC" = yes; then + _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' + + AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], + lt_cv_prog_compiler_rtti_exceptions, + [-fno-rtti -fno-exceptions], [], + [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) +fi +])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI + + +# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE +# --------------------------------- +AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], +[AC_REQUIRE([AC_CANONICAL_HOST]) +AC_REQUIRE([AC_PROG_NM]) +AC_REQUIRE([AC_OBJEXT]) +# Check for command to grab the raw symbol name followed by C symbol from nm. +AC_MSG_CHECKING([command to parse $NM output from $compiler object]) +AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], +[ +# These are sane defaults that work on at least a few old systems. +# [They come from Ultrix. What could be older than Ultrix?!! ;)] + +# Character class describing NM global symbol codes. +symcode='[[BCDEGRST]]' + +# Regexp to match symbols that can be accessed directly from C. +sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' + +# Transform an extracted symbol line into a proper C declaration +lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" + +# Transform an extracted symbol line into symbol name and symbol address +lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" + +# Define system-specific variables. +case $host_os in +aix*) + symcode='[[BCDT]]' + ;; +cygwin* | mingw* | pw32*) + symcode='[[ABCDGISTW]]' + ;; +hpux*) # Its linker distinguishes data from code symbols + if test "$host_cpu" = ia64; then + symcode='[[ABCDEGRST]]' + fi + lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" + ;; +linux*) + if test "$host_cpu" = ia64; then + symcode='[[ABCDGIRSTW]]' + lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" + fi + ;; +irix* | nonstopux*) + symcode='[[BCDEGRST]]' + ;; +osf*) + symcode='[[BCDEGQRST]]' + ;; +solaris*) + symcode='[[BDRT]]' + ;; +sco3.2v5*) + symcode='[[DT]]' + ;; +sysv4.2uw2*) + symcode='[[DT]]' + ;; +sysv5* | sco5v6* | unixware* | OpenUNIX*) + symcode='[[ABDT]]' + ;; +sysv4) + symcode='[[DFNSTU]]' + ;; +esac + +# Handle CRLF in mingw tool chain +opt_cr= +case $build_os in +mingw*) + opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp + ;; +esac + +# If we're using GNU nm, then use its standard symbol codes. +case `$NM -V 2>&1` in +*GNU* | *'with BFD'*) + symcode='[[ABCDGIRSTW]]' ;; +esac + +# Try without a prefix undercore, then with it. +for ac_symprfx in "" "_"; do + + # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. + symxfrm="\\1 $ac_symprfx\\2 \\2" + + # Write the raw and C identifiers. + lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" + + # Check to see that the pipe works correctly. + pipe_works=no + + rm -f conftest* + cat > conftest.$ac_ext < $nlist) && test -s "$nlist"; then + # Try sorting and uniquifying the output. + if sort "$nlist" | uniq > "$nlist"T; then + mv -f "$nlist"T "$nlist" + else + rm -f "$nlist"T + fi + + # Make sure that we snagged all the symbols we need. + if grep ' nm_test_var$' "$nlist" >/dev/null; then + if grep ' nm_test_func$' "$nlist" >/dev/null; then + cat < conftest.$ac_ext +#ifdef __cplusplus +extern "C" { +#endif + +EOF + # Now generate the symbol file. + eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' + + cat <> conftest.$ac_ext +#if defined (__STDC__) && __STDC__ +# define lt_ptr_t void * +#else +# define lt_ptr_t char * +# define const +#endif + +/* The mapping between symbol names and symbols. */ +const struct { + const char *name; + lt_ptr_t address; +} +lt_preloaded_symbols[[]] = +{ +EOF + $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext + cat <<\EOF >> conftest.$ac_ext + {0, (lt_ptr_t) 0} +}; + +#ifdef __cplusplus +} +#endif +EOF + # Now try linking the two files. + mv conftest.$ac_objext conftstm.$ac_objext + lt_save_LIBS="$LIBS" + lt_save_CFLAGS="$CFLAGS" + LIBS="conftstm.$ac_objext" + CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" + if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then + pipe_works=yes + fi + LIBS="$lt_save_LIBS" + CFLAGS="$lt_save_CFLAGS" + else + echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD + fi + else + echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD + fi + else + echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD + fi + else + echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD + cat conftest.$ac_ext >&5 + fi + rm -f conftest* conftst* + + # Do not use the global_symbol_pipe unless it works. + if test "$pipe_works" = yes; then + break + else + lt_cv_sys_global_symbol_pipe= + fi +done +]) +if test -z "$lt_cv_sys_global_symbol_pipe"; then + lt_cv_sys_global_symbol_to_cdecl= +fi +if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then + AC_MSG_RESULT(failed) +else + AC_MSG_RESULT(ok) +fi +]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE + + +# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME]) +# --------------------------------------- +AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC], +[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)= +_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= +_LT_AC_TAGVAR(lt_prog_compiler_static, $1)= + +AC_MSG_CHECKING([for $compiler option to produce PIC]) + ifelse([$1],[CXX],[ + # C++ specific cases for pic, static, wl, etc. + if test "$GXX" = yes; then + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + ;; + amigaos*) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' + ;; + beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + mingw* | os2* | pw32*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' + ;; + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' + ;; + *djgpp*) + # DJGPP does not support shared libraries at all + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= + ;; + interix3*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + sysv4*MP*) + if test -d /usr/nec; then + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic + fi + ;; + hpux*) + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + ;; + *) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + ;; + *) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + else + case $host_os in + aix4* | aix5*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + else + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' + fi + ;; + chorus*) + case $cc_basename in + cxch68*) + # Green Hills C++ Compiler + # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" + ;; + esac + ;; + darwin*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + case $cc_basename in + xlc*) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + ;; + esac + ;; + dgux*) + case $cc_basename in + ec++*) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + ;; + ghcx*) + # Green Hills C++ Compiler + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + *) + ;; + esac + ;; + freebsd* | kfreebsd*-gnu | dragonfly*) + # FreeBSD uses GNU C++ + ;; + hpux9* | hpux10* | hpux11*) + case $cc_basename in + CC*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + if test "$host_cpu" != ia64; then + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' + fi + ;; + aCC*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' + ;; + esac + ;; + *) + ;; + esac + ;; + interix*) + # This is c89, which is MS Visual C++ (no shared libs) + # Anyone wants to do a port? + ;; + irix5* | irix6* | nonstopux*) + case $cc_basename in + CC*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + # CC pic flag -KPIC is the default. + ;; + *) + ;; + esac + ;; + linux*) + case $cc_basename in + KCC*) + # KAI C++ Compiler + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + icpc* | ecpc*) + # Intel C++ + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + pgCC*) + # Portland Group C++ compiler. + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + cxx*) + # Compaq C++ + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + *) + ;; + esac + ;; + lynxos*) + ;; + m88k*) + ;; + mvs*) + case $cc_basename in + cxx*) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' + ;; + *) + ;; + esac + ;; + netbsd* | netbsdelf*-gnu | knetbsd*-gnu) + ;; + osf3* | osf4* | osf5*) + case $cc_basename in + KCC*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' + ;; + RCC*) + # Rational C++ 2.4.1 + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + cxx*) + # Digital/Compaq C++ + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + *) + ;; + esac + ;; + psos*) + ;; + solaris*) + case $cc_basename in + CC*) + # Sun C++ 4.2, 5.x and Centerline C++ + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + ;; + gcx*) + # Green Hills C++ Compiler + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' + ;; + *) + ;; + esac + ;; + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + lcc*) + # Lucid + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + *) + ;; + esac + ;; + tandem*) + case $cc_basename in + NCC*) + # NonStop-UX NCC 3.20 + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + ;; + *) + ;; + esac + ;; + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + case $cc_basename in + CC*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + esac + ;; + vxworks*) + ;; + *) + _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + esac + fi +], +[ + if test "$GCC" = yes; then + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + ;; + + amigaos*) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' + ;; + + beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + + mingw* | pw32* | os2*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' + ;; + + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' + ;; + + interix3*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + + msdosdjgpp*) + # Just because we use GCC doesn't mean we suddenly get shared libraries + # on systems that don't support them. + _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + enable_shared=no + ;; + + sysv4*MP*) + if test -d /usr/nec; then + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic + fi + ;; + + hpux*) + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + ;; + + *) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + else + # PORTME Check for flag to pass linker flags through the system compiler. + case $host_os in + aix*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + else + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' + fi + ;; + darwin*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + case $cc_basename in + xlc*) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + ;; + esac + ;; + + mingw* | pw32* | os2*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' + ;; + + hpux9* | hpux10* | hpux11*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' + ;; + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + ;; + + irix5* | irix6* | nonstopux*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # PIC (with -KPIC) is the default. + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + + newsos6) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + linux*) + case $cc_basename in + icc* | ecc*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + pgcc* | pgf77* | pgf90* | pgf95*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + ccc*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # All Alpha code is PIC. + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + esac + ;; + + osf3* | osf4* | osf5*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # All OSF/1 code is PIC. + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + + solaris*) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + case $cc_basename in + f77* | f90* | f95*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; + *) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; + esac + ;; + + sunos4*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + sysv4 | sysv4.2uw2* | sysv4.3*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + sysv4*MP*) + if test -d /usr/nec ;then + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + ;; + + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + unicos*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + + uts4*) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + *) + _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + esac + fi +]) +AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)]) + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then + AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works], + _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1), + [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [], + [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in + "" | " "*) ;; + *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;; + esac], + [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) +fi +case $host_os in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= + ;; + *) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])" + ;; +esac + +# +# Check to make sure the static flag actually works. +# +wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\" +AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], + _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1), + $lt_tmp_static_flag, + [], + [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=]) +]) + + +# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME]) +# ------------------------------------ +# See if the linker supports building shared libraries. +AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS], +[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) +ifelse([$1],[CXX],[ + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + case $host_os in + aix4* | aix5*) + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + if $NM -V 2>&1 | grep 'GNU' > /dev/null; then + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' + else + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' + fi + ;; + pw32*) + _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" + ;; + cygwin* | mingw*) + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([[^ ]]*\) [[^ ]]*/\1 DATA/;/^I /d;/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols' + ;; + kfreebsd*-gnu) + _LT_AC_TAGVAR(link_all_deplibs, $1)=no + ;; + linux*) + _LT_AC_TAGVAR(link_all_deplibs, $1)=no + ;; + *) + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + ;; + esac +],[ + runpath_var= + _LT_AC_TAGVAR(allow_undefined_flag, $1)= + _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no + _LT_AC_TAGVAR(archive_cmds, $1)= + _LT_AC_TAGVAR(archive_expsym_cmds, $1)= + _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)= + _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)= + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= + _LT_AC_TAGVAR(thread_safe_flag_spec, $1)= + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= + _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_minus_L, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported + _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown + _LT_AC_TAGVAR(hardcode_automatic, $1)=no + _LT_AC_TAGVAR(module_cmds, $1)= + _LT_AC_TAGVAR(module_expsym_cmds, $1)= + _LT_AC_TAGVAR(always_export_symbols, $1)=no + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + # include_expsyms should be a list of space-separated symbols to be *always* + # included in the symbol list + _LT_AC_TAGVAR(include_expsyms, $1)= + # exclude_expsyms can be an extended regexp of symbols to exclude + # it will be wrapped by ` (' and `)$', so one must not match beginning or + # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', + # as well as any symbol that contains `d'. + _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_" + # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out + # platforms (ab)use it in PIC code, but their linkers get confused if + # the symbol is explicitly referenced. Since portable code cannot + # rely on this symbol name, it's probably fine to never include it in + # preloaded symbol tables. + extract_expsyms_cmds= + # Just being paranoid about ensuring that cc_basename is set. + _LT_CC_BASENAME([$compiler]) + case $host_os in + cygwin* | mingw* | pw32*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + if test "$GCC" != yes; then + with_gnu_ld=no + fi + ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++) + with_gnu_ld=yes + ;; + openbsd*) + with_gnu_ld=no + ;; + esac + + _LT_AC_TAGVAR(ld_shlibs, $1)=yes + if test "$with_gnu_ld" = yes; then + # If archive_cmds runs LD, not CC, wlarc should be empty + wlarc='${wl}' + + # Set some defaults for GNU ld with shared library support. These + # are reset later if shared libraries are not supported. Putting them + # here allows them to be overridden if necessary. + runpath_var=LD_RUN_PATH + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + # ancient GNU ld didn't support --whole-archive et. al. + if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= + fi + supports_anon_versioning=no + case `$LD -v 2>/dev/null` in + *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 + *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... + *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... + *\ 2.11.*) ;; # other 2.11 versions + *) supports_anon_versioning=yes ;; + esac + + # See if GNU ld supports shared libraries. + case $host_os in + aix3* | aix4* | aix5*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + _LT_AC_TAGVAR(ld_shlibs, $1)=no + cat <&2 + +*** Warning: the GNU linker, at least up to release 2.9.1, is reported +*** to be unable to reliably create shared libraries on AIX. +*** Therefore, libtool is disabling shared libraries support. If you +*** really care for shared libraries, you may want to modify your PATH +*** so that a non-GNU linker is found, and then restart. + +EOF + fi + ;; + + amigaos*) + _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + + # Samuel A. Falvo II reports + # that the semantics of dynamic libraries on AmigaOS, at least up + # to version 4, is to share data among multiple programs linked + # with the same dynamic library. Since this doesn't match the + # behavior of shared libraries on other platforms, we can't use + # them. + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + + beos*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + cygwin* | mingw* | pw32*) + # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, + # as there is no search path for DLLs. + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_AC_TAGVAR(always_export_symbols, $1)=no + _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols' + + if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + interix3*) + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + + linux*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + tmp_addflag= + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag' + ;; + pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag -Mnomain' ;; + ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 + tmp_addflag=' -i_dynamic' ;; + efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 + tmp_addflag=' -i_dynamic -nofor_main' ;; + ifc* | ifort*) # Intel Fortran compiler + tmp_addflag=' -nofor_main' ;; + esac + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + + if test $supports_anon_versioning = yes; then + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + $echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi + _LT_AC_TAGVAR(link_all_deplibs, $1)=no + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + netbsd* | netbsdelf*-gnu | knetbsd*-gnu) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + fi + ;; + + solaris*) + if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then + _LT_AC_TAGVAR(ld_shlibs, $1)=no + cat <&2 + +*** Warning: The releases 2.8.* of the GNU linker cannot reliably +*** create shared libraries on Solaris systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.9.1 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +EOF + elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) + _LT_AC_TAGVAR(ld_shlibs, $1)=no + cat <<_LT_EOF 1>&2 + +*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not +*** reliably create shared libraries on SCO systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.16.91.0.3 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + ;; + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + + sunos4*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' + wlarc= + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + + if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then + runpath_var= + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= + fi + else + # PORTME fill in a description of your system's linker (not GNU ld) + case $host_os in + aix3*) + _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_AC_TAGVAR(always_export_symbols, $1)=yes + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' + # Note: this linker hardcodes the directories in LIBPATH if there + # are no directories specified by -L. + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then + # Neither direct hardcoding nor static linking is supported with a + # broken collect2. + _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported + fi + ;; + + aix4* | aix5*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + if $NM -V 2>&1 | grep 'GNU' > /dev/null; then + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' + else + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' + fi + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) + for ld_flag in $LDFLAGS; do + if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then + aix_use_runtimelinking=yes + break + fi + done + ;; + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + _LT_AC_TAGVAR(archive_cmds, $1)='' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + + if test "$GCC" = yes; then + case $host_os in aix4.[[012]]|aix4.[[012]].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && \ + strings "$collect2name" | grep resolve_lib_name >/dev/null + then + # We have reworked collect2 + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + else + # We have old collect2 + _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= + fi + ;; + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + _LT_AC_TAGVAR(always_export_symbols, $1)=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' + # Determine the default libpath from the value encoded in an empty executable. + _LT_AC_SYS_LIBPATH_AIX + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' + _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" + _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an empty executable. + _LT_AC_SYS_LIBPATH_AIX + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' + # Exported symbols can be pulled into shared objects from archives + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes + # This is similar to how AIX traditionally builds its shared libraries. + _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + + amigaos*) + _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + # see comment about different semantics on the GNU ld section + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + + bsdi[[45]]*) + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic + ;; + + cygwin* | mingw* | pw32*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' + _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true' + # FIXME: Should let the user specify the lib program. + _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs' + _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' + _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + ;; + + darwin* | rhapsody*) + case $host_os in + rhapsody* | darwin1.[[012]]) + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[[012]]) + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + ;; + 10.*) + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' + ;; + esac + fi + ;; + esac + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_automatic, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + if test "$GCC" = yes ; then + output_verbose_link_cmd='echo' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + case $cc_basename in + xlc*) + output_verbose_link_cmd='echo' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' + _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + ;; + *) + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + fi + ;; + + dgux*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + freebsd1*) + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + + # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor + # support. Future versions do this automatically, but an explicit c++rt0.o + # does not break anything, and helps significantly (at the cost of a little + # extra space). + freebsd2.2*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + freebsd2*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | dragonfly*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + # GNU/kFreeBSD uses gcc -shared to do shared libraries. + kfreebsd*-gnu) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_AC_TAGVAR(link_all_deplibs, $1)=no + ;; + + hpux9*) + if test "$GCC" = yes; then + _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + fi + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + ;; + + hpux10*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + fi + if test "$with_gnu_ld" = no; then + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + fi + ;; + + hpux11*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + case $host_cpu in + hppa*64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + else + case $host_cpu in + hppa*64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + fi + if test "$with_gnu_ld" = no; then + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + case $host_cpu in + hppa*64*|ia64*) + _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + *) + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + ;; + esac + fi + ;; + + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' + fi + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + ;; + + netbsd* | netbsdelf*-gnu | knetbsd*-gnu) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + newsos6) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + openbsd*) + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + else + case $host_os in + openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + ;; + *) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + ;; + esac + fi + ;; + + os2*) + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_AC_TAGVAR(archive_cmds, $1)='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' + _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + ;; + + osf3*) + if test "$GCC" = yes; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + fi + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + ;; + + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + else + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ + $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' + + # Both c and cxx compiler support -rpath directly + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + fi + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + ;; + + solaris*) + _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' + if test "$GCC" = yes; then + wlarc='${wl}' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$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' + else + wlarc='' + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' + fi + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + case $host_os in + solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; + *) + # The compiler driver will combine linker options so we + # cannot just pass the convience library names through + # without $wl, iff we do not link with $LD. + # Luckily, gcc supports the same syntax we need for Sun Studio. + # Supported since Solaris 2.6 (maybe 2.5.1?) + case $wlarc in + '') + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; + *) + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; + esac ;; + esac + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + ;; + + sunos4*) + if test "x$host_vendor" = xsequent; then + # Use $CC to link under sequent, because it throws in some extra .o + # files that make .init and .fini sections work. + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' + fi + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + sysv4) + case $host_vendor in + sni) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true??? + ;; + siemens) + ## LD is ld it makes a PLAMLIB + ## CC just makes a GrossModule. + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' + _LT_AC_TAGVAR(hardcode_direct, $1)=no + ;; + motorola) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie + ;; + esac + runpath_var='LD_RUN_PATH' + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + sysv4.3*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + _LT_AC_TAGVAR(ld_shlibs, $1)=yes + fi + ;; + + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7*) + _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + uts4*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + *) + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + fi +]) +AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) +test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no + +# +# Do we need to explicitly link libc? +# +case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in +x|xyes) + # Assume -lc should be added + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes + + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $_LT_AC_TAGVAR(archive_cmds, $1) in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + AC_MSG_CHECKING([whether -lc should be explicitly linked in]) + $rm conftest* + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + + if AC_TRY_EVAL(ac_compile) 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) + pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1) + _LT_AC_TAGVAR(allow_undefined_flag, $1)= + if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) + then + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + else + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes + fi + _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $rm conftest* + AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)]) + ;; + esac + fi + ;; +esac +])# AC_LIBTOOL_PROG_LD_SHLIBS + + +# _LT_AC_FILE_LTDLL_C +# ------------------- +# Be careful that the start marker always follows a newline. +AC_DEFUN([_LT_AC_FILE_LTDLL_C], [ +# /* ltdll.c starts here */ +# #define WIN32_LEAN_AND_MEAN +# #include +# #undef WIN32_LEAN_AND_MEAN +# #include +# +# #ifndef __CYGWIN__ +# # ifdef __CYGWIN32__ +# # define __CYGWIN__ __CYGWIN32__ +# # endif +# #endif +# +# #ifdef __cplusplus +# extern "C" { +# #endif +# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); +# #ifdef __cplusplus +# } +# #endif +# +# #ifdef __CYGWIN__ +# #include +# DECLARE_CYGWIN_DLL( DllMain ); +# #endif +# HINSTANCE __hDllInstance_base; +# +# BOOL APIENTRY +# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) +# { +# __hDllInstance_base = hInst; +# return TRUE; +# } +# /* ltdll.c ends here */ +])# _LT_AC_FILE_LTDLL_C + + +# _LT_AC_TAGVAR(VARNAME, [TAGNAME]) +# --------------------------------- +AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])]) + + +# old names +AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL]) +AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) +AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) +AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) +AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) +AC_DEFUN([AM_PROG_LD], [AC_PROG_LD]) +AC_DEFUN([AM_PROG_NM], [AC_PROG_NM]) + +# This is just to silence aclocal about the macro not being used +ifelse([AC_DISABLE_FAST_INSTALL]) + +AC_DEFUN([LT_AC_PROG_GCJ], +[AC_CHECK_TOOL(GCJ, gcj, no) + test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" + AC_SUBST(GCJFLAGS) +]) + +AC_DEFUN([LT_AC_PROG_RC], +[AC_CHECK_TOOL(RC, windres, no) +]) + +# NOTE: This macro has been submitted for inclusion into # +# GNU Autoconf as AC_PROG_SED. When it is available in # +# a released version of Autoconf we should remove this # +# macro and use it instead. # +# LT_AC_PROG_SED +# -------------- +# Check for a fully-functional sed program, that truncates +# as few characters as possible. Prefer GNU sed if found. +AC_DEFUN([LT_AC_PROG_SED], +[AC_MSG_CHECKING([for a sed that does not truncate output]) +AC_CACHE_VAL(lt_cv_path_SED, +[# Loop through the user's path and test for sed and gsed. +# Then use that list of sed's as ones to test for truncation. +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for lt_ac_prog in sed gsed; do + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then + lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" + fi + done + done +done +lt_ac_max=0 +lt_ac_count=0 +# Add /usr/xpg4/bin/sed as it is typically found on Solaris +# along with /bin/sed that truncates output. +for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do + test ! -f $lt_ac_sed && continue + cat /dev/null > conftest.in + lt_ac_count=0 + echo $ECHO_N "0123456789$ECHO_C" >conftest.in + # Check for GNU sed and select it if it is found. + if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then + lt_cv_path_SED=$lt_ac_sed + break + fi + while true; do + cat conftest.in conftest.in >conftest.tmp + mv conftest.tmp conftest.in + cp conftest.in conftest.nl + echo >>conftest.nl + $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break + cmp -s conftest.out conftest.nl || break + # 10000 chars as input seems more than enough + test $lt_ac_count -gt 10 && break + lt_ac_count=`expr $lt_ac_count + 1` + if test $lt_ac_count -gt $lt_ac_max; then + lt_ac_max=$lt_ac_count + lt_cv_path_SED=$lt_ac_sed + fi + done +done +]) +SED=$lt_cv_path_SED +AC_MSG_RESULT([$SED]) +]) + + +dnl +dnl OPENBSD_LIBTOOL_WORKAROUND +dnl +dnl Work-around a problem caused by the -avoid-version libtool option. Can +dnl anyone come up with a better way? +dnl + +AC_DEFUN([OPENBSD_LIBTOOL_WORKAROUND], + [case "${host_os}" in + openbsd*) + sed 's/^need_version=no$/need_version=yes/' < libtool > libtool.tmp && mv -f libtool.tmp libtool + ;; + esac + ]) + + +AC_DEFUN([GIFT_PLUGIN_PKGCONFIG], + [AC_PATH_PROG(PKG_CONFIG, pkg-config) + + if test x$prefix != xNONE; then + PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$prefix/lib/pkgconfig" + fi + + PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig" + export PKG_CONFIG_PATH + + PKG_CHECK_MODULES([$1], libgift >= $2 libgift < $3) + + # fudge libgiftproto in there which doesnt have any pkg-config entry + AS_VAR_SET($1_LIBS, "AS_VAR_GET($1_LIBS) -lgiftproto") + + # hack to set libgift_version + libgift_version=`pkg-config libgift --modversion` + + AC_SUBST($1_CFLAGS) + AC_SUBST($1_LIBS) + ]) + + +dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not) +dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page +dnl also defines GSTUFF_PKG_ERRORS on error +AC_DEFUN(PKG_CHECK_MODULES, [ + succeeded=no + + if test -z "$PKG_CONFIG"; then + AC_PATH_PROG(PKG_CONFIG, pkg-config, no) + fi + + if test "$PKG_CONFIG" = "no" ; then + echo "*** The pkg-config script could not be found. Make sure it is" + echo "*** in your path, or set the PKG_CONFIG environment variable" + echo "*** to the full path to pkg-config." + echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." + else + PKG_CONFIG_MIN_VERSION=0.9.0 + if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then + AC_MSG_CHECKING(for $2) + + if $PKG_CONFIG --exists "$2" ; then + AC_MSG_RESULT(yes) + succeeded=yes + + AC_MSG_CHECKING($1_CFLAGS) + $1_CFLAGS=`$PKG_CONFIG --cflags "$2"` + AC_MSG_RESULT($$1_CFLAGS) + + AC_MSG_CHECKING($1_LIBS) + $1_LIBS=`$PKG_CONFIG --libs "$2"` + AC_MSG_RESULT($$1_LIBS) + else + $1_CFLAGS="" + $1_LIBS="" + ## If we have a custom action on failure, don't print errors, but + ## do set a variable so people can do so. + $1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` + ifelse([$4], ,echo $$1_PKG_ERRORS,) + fi + + AC_SUBST($1_CFLAGS) + AC_SUBST($1_LIBS) + else + echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." + echo "*** See http://www.freedesktop.org/software/pkgconfig" + fi + fi + + if test $succeeded = yes; then + ifelse([$3], , :, [$3]) + else + ifelse([$4], , AC_MSG_ERROR([Library requirements ($2) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.]), [$4]) + fi +]) + + + + +dnl +dnl Check for zlib in some bizarre locations... +dnl +AC_DEFUN([GIFT_PLUGIN_CHECK_ZLIB], +[ + # set the minimum ZLIB_VER we're willing to link against... + ZLIB_VER=1.1.4 + + # for some reason Darwin has a 1.1.3 version with the 1.1.4 security fix + # applied backwards... + case "${host}" in + *-*-darwin* ) + ZLIB_VER=1.1.3 + ;; + esac + + if test x"$OPT_ZLIB" = xno; then + zlib_ok=no + else + ZLIB_DIRS="$OPT_ZLIB /usr /usr/local /sw" + for ZLIB_DIR in $ZLIB_DIRS; + do + LIBS_SAVE="$LIBS" + CPPFLAGS_SAVE="$CPPFLAGS" + LIBS="$LIBS -L${ZLIB_DIR}/lib" + CPPFLAGS="$CPPFLAGS -I${ZLIB_DIR}/include" + AC_CACHE_CHECK( + [for zlib version ${ZLIB_VER}+ in ${ZLIB_DIR}], + zlib_ok, + AC_TRY_RUN( + [#include + #include + void main() { + exit(strcmp(ZLIB_VERSION, "${ZLIB_VER}") < 0); + } + ], + [zlib_ok=yes], + [zlib_ok=no], + [zlib_ok=yes])) + + if test "$zlib_ok" != "no"; then + AC_CHECK_FUNC(gzread, , AC_CHECK_LIB(z, gzread)) + AC_DEFINE(USE_ZLIB) + AC_SUBST(USE_ZLIB) + break + fi + LIBS="$LIBS_SAVE" + CPPFLAGS="$CPPFLAGS_SAVE" + done + + if test "$zlib_ok" = "no"; then + AC_MSG_ERROR([ +NOTE: The zlib compression library version ${ZLIB_VER} or greater was not found + on your system. + + If zlib ${ZLIB_VER}+ is not installed, install it. + ]) + fi + fi +]) + + +AC_DEFUN([GIFT_GNUTELLA_CHECK_LIBXML],[ + # + # Check on the user's PATH if no path was specified in OPT_LIBXML, + # when the user has passed --with-libxml without a directory, + # or check the directory if one was supplied. + # + if test x"$OPT_LIBXML" = xyes; then + AC_PATH_PROG(XML2_CONFIG, xml2-config, [no]) + else + XMLPATH="$OPT_LIBXML/bin" + AC_PATH_PROG(XML2_CONFIG, xml2-config, [no], [$XMLPATH]) + fi + + if test x"$XML2_CONFIG" != xno; then + LIBXML2_CFLAGS=`$XML2_CONFIG --cflags` + LIBXML2_LIBS=`$XML2_CONFIG --libs` + + AC_SUBST(LIBXML2_CFLAGS) + AC_SUBST(LIBXML2_LIBS) + AC_DEFINE(USE_LIBXML2) + else + AC_MSG_ERROR([ +Couldn't run ${OPT_LIBXML}/bin/xml2-config + +]) + fi +]) + + +AC_DEFUN([GIFT_PLUGIN_CHECK_PREFIX],[ + libgift_prefix=`pkg-config --variable=prefix libgift` + + gift_plugin_prefix=$prefix + if test x"$prefix" = xNONE; then + gift_plugin_prefix=/usr/local + fi + + if test x"$libgift_prefix" != x"$gift_plugin_prefix"; then + AC_MSG_WARN([ + You are trying to install in $gift_plugin_prefix, but I only + detected a giFT installation in $libgift_prefix. + You may be installing in the wrong place. + + You should probably supply --prefix=$libgift_prefix + to configure. Or, if you have a giFT installation in + $gift_plugin_prefix, you could add ${gift_plugin_prefix}/lib/pkgconfig + to the PKG_CONFIG_PATH environment variable, so I can detect it. +]) + fi +]) + diff -r 000000000000 -r d39e1d0d75b6 autogen.sh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/autogen.sh Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,62 @@ +#! /bin/sh +# Run this to generate all the initial makefiles, etc. + +# Stolen from the GNU Midnight Commander. Customized for giFTcurs. Stolen from +# giFTcurs. Customized for giFT. Stolen from giFT. Customized for OpenFT. +# Stolen from OpenFT. + +# Make it possible to specify path in the environment +: ${AUTOCONF=autoconf} +: ${AUTOHEADER=autoheader} +: ${AUTOMAKE=automake} +: ${ACLOCAL=aclocal} +: ${LIBTOOLIZE=libtoolize} + +srcdir=`dirname $0` +test -z "$srcdir" && srcdir=. + +( +cd $srcdir + +# The autoconf cache (version after 2.52) is not reliable yet. +rm -rf autom4te.cache + +rm -f aclocal.m4 +ACLOCAL_INCLUDES="-I m4" + +# Some old version of GNU build tools fail to set error codes. +# Check that they generate some of the files they should. + +echo "Running $ACLOCAL..." +$ACLOCAL $ACLOCAL_INCLUDES $ACLOCAL_FLAGS || exit 1 +test -f aclocal.m4 || \ + { echo "aclocal failed to generate aclocal.m4" 2>&1; exit 1; } + +echo "Running $AUTOHEADER..." +$AUTOHEADER || exit 1 +test -f config.h.in || \ + { echo "autoheader failed to generate config.h.in" 2>&1; exit 1; } + +echo "Running $AUTOCONF..." +$AUTOCONF || exit 1 +test -f configure || \ + { echo "autoconf failed to generate configure" 2>&1; exit 1; } + +# hack hack hack...i hate autotools. +echo "Running $LIBTOOLIZE --automake..." +$LIBTOOLIZE --automake || exit 1 +test -f ltmain.sh || \ + { echo "libtoolize failed to generate ltmain.sh" 2>&1; exit 1; } + +# Workaround for Automake 1.5 to ensure that depcomp is distributed. +echo "Running $AUTOMAKE..." +$AUTOMAKE -a src/Makefile || exit 1 +$AUTOMAKE -a || exit 1 +test -f Makefile.in || \ + { echo "automake failed to generate Makefile.in" 2>&1; exit 1; } + +) || exit 1 + +#conf_flags="--enable-maintainer-mode --enable-compile-warnings" +echo Running $srcdir/configure $conf_flags "$@" ... +$srcdir/configure --cache-file=config.cache $conf_flags "$@" diff -r 000000000000 -r d39e1d0d75b6 config.guess --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/config.guess Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,1400 @@ +#! /bin/sh +# Attempt to guess a canonical system name. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +# 2000, 2001, 2002 Free Software Foundation, Inc. + +timestamp='2002-11-30' + +# 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. + +# This shell variable is my proudest work .. or something. --bje + +set_cc_for_build='tmpdir=${TMPDIR-/tmp}/config-guess-$$ ; +(old=`umask` && umask 077 && mkdir $tmpdir && umask $old && unset old) + || (echo "$me: cannot create $tmpdir" >&2 && exit 1) ; +dummy=$tmpdir/dummy ; +files="$dummy.c $dummy.o $dummy.rel $dummy" ; +trap '"'"'rm -f $files; rmdir $tmpdir; exit 1'"'"' 1 2 15 ; +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 ; + rm -f $files ; + 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 ; +unset files' + +# 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 + # 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. + eval $set_cc_for_build + cat <$dummy.s + .data +\$Lformat: + .byte 37,100,45,37,120,10,0 # "%d-%x\n" + + .text + .globl main + .align 4 + .ent main +main: + .frame \$30,16,\$26,0 + ldgp \$29,0(\$27) + .prologue 1 + .long 0x47e03d80 # implver \$0 + lda \$2,-1 + .long 0x47e20c21 # amask \$2,\$1 + lda \$16,\$Lformat + mov \$0,\$17 + not \$1,\$18 + jsr \$26,printf + ldgp \$29,0(\$26) + mov 0,\$16 + jsr \$26,exit + .end main +EOF + $CC_FOR_BUILD -o $dummy $dummy.s 2>/dev/null + if test "$?" = 0 ; then + case `$dummy` in + 0-0) + UNAME_MACHINE="alpha" + ;; + 1-0) + UNAME_MACHINE="alphaev5" + ;; + 1-1) + UNAME_MACHINE="alphaev56" + ;; + 1-101) + UNAME_MACHINE="alphapca56" + ;; + 2-303) + UNAME_MACHINE="alphaev6" + ;; + 2-307) + UNAME_MACHINE="alphaev67" + ;; + 2-1307) + UNAME_MACHINE="alphaev68" + ;; + 3-1307) + UNAME_MACHINE="alphaev7" + ;; + esac + fi + rm -f $dummy.s $dummy && rmdir $tmpdir + echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + 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_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'` \ + && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0 + rm -f $dummy.c $dummy && rmdir $tmpdir + 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 && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0 + rm -f $dummy.c $dummy && rmdir $tmpdir + 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` + if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi + rm -f $dummy.c $dummy && rmdir $tmpdir + fi ;; + esac + 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 && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0 + rm -f $dummy.c $dummy && rmdir $tmpdir + 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*T3D:*:*:*) + echo alpha-cray-unicosmk${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 ;; + 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:*:*) + # 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=` + rm -f $dummy.c && rmdir $tmpdir + echo ${UNAME_MACHINE}-unknown-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*:3*) + echo i586-pc-interix3 + 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 ;; + 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=` + rm -f $dummy.c && rmdir $tmpdir + 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=` + rm -f $dummy.c && rmdir $tmpdir + 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 ;; + 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 +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` + rm -f $dummy.c && rmdir $tmpdir + 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) + 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:*:*) + echo `uname -p`-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-[DGKLNPTVW]: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 ;; +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 && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0 +rm -f $dummy.c $dummy && rmdir $tmpdir + +# 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: diff -r 000000000000 -r d39e1d0d75b6 config.h.in --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/config.h.in Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,83 @@ +/* config.h.in. Generated from configure.ac by autoheader. */ + +/* Extra */ +#undef GT_EXTRA_VERSION + +/* Major */ +#undef GT_MAJOR_VERSION + +/* Micro */ +#undef GT_MICRO_VERSION + +/* Minor */ +#undef GT_MINOR_VERSION + +/* Define to 1 if you have the header file. */ +#undef HAVE_DLFCN_H + +/* Define to 1 if you have the `getpid' function. */ +#undef HAVE_GETPID + +/* Define to 1 if you have the `getppid' function. */ +#undef HAVE_GETPPID + +/* Define to 1 if you have the `hstrerror' function. */ +#undef HAVE_HSTRERROR + +/* Define to 1 if you have the header file. */ +#undef HAVE_INTTYPES_H + +/* Define to 1 if you have the `z' library (-lz). */ +#undef HAVE_LIBZ + +/* Define to 1 if you have the header file. */ +#undef HAVE_MEMORY_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 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_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 + +/* 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 + +#undef USE_LIBXML2 + +#undef USE_ZLIB + +/* Version number of package */ +#undef VERSION diff -r 000000000000 -r d39e1d0d75b6 config.sub --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/config.sub Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,1469 @@ +#! /bin/sh +# Configuration validation subroutine script. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +# 2000, 2001, 2002 Free Software Foundation, Inc. + +timestamp='2002-11-30' + +# 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* | freebsd*-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] \ + | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ + | clipper \ + | d10v | d30v | dlx | dsp16xx \ + | fr30 | frv \ + | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ + | i370 | i860 | i960 | ia64 \ + | ip2k \ + | 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 \ + | mipsisa64 | mipsisa64el \ + | mipsisa64sb1 | mipsisa64sb1el \ + | mipsisa64sr71k | mipsisa64sr71kel \ + | mipstx39 | mipstx39el \ + | mn10200 | mn10300 \ + | ns16k | ns32k \ + | openrisc | or32 \ + | pdp10 | pdp11 | pj | pjl \ + | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ + | pyramid \ + | sh | sh[1234] | sh3e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ + | sh64 | sh64le \ + | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \ + | strongarm \ + | tahoe | thumb | 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-* \ + | 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-* \ + | 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-* \ + | mipsisa64-* | mipsisa64el-* \ + | mipsisa64sb1-* | mipsisa64sb1el-* \ + | mipsisa64sr71k-* | mipsisa64sr71kel-* \ + | mipstx39 | mipstx39el \ + | none-* | np1-* | ns16k-* | ns32k-* \ + | orion-* \ + | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ + | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ + | pyramid-* \ + | romp-* | rs6000-* \ + | sh-* | sh[1234]-* | sh3e-* | 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-* | 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 + ;; + 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 + ;; + 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) + basic_machine=i686-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-*) + basic_machine=i686-`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 + ;; + sequent) + basic_machine=i386-sequent + ;; + sh) + basic_machine=sh-hitachi + os=-hms + ;; + 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 + ;; + t3d) + basic_machine=alpha-cray + os=-unicos + ;; + t3e) + basic_machine=alphaev5-cray + os=-unicos + ;; + t90) + basic_machine=t90-cray + os=-unicos + ;; + tic4x | c4x*) + basic_machine=tic4x-unknown + os=-coff + ;; + tic54x | c54x*) + basic_machine=tic54x-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 | sh3eb | sh4eb | sh[1234]le | sh3ele) + 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* | -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*) + # 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*) + 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 + ;; + -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 + ;; + # 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: diff -r 000000000000 -r d39e1d0d75b6 configure --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/configure Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,21094 @@ +#! /bin/sh +# Guess values for system-dependent variables and create Makefiles. +# Generated by GNU Autoconf 2.59 for gift-gnutella 0.0.11. +# +# 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 + + + +# Check that we are running under the correct shell. +SHELL=${CONFIG_SHELL-/bin/sh} + +case X$ECHO in +X*--fallback-echo) + # Remove one level of quotation (which was required for Make). + ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','` + ;; +esac + +echo=${ECHO-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. + exec $SHELL "$0" --no-reexec ${1+"$@"} +fi + +if test "X$1" = X--fallback-echo; then + # used as fallback echo + shift + cat </dev/null 2>&1 && unset CDPATH + +if test -z "$ECHO"; then +if test "X${echo_test_string+set}" != Xset; then +# find a string as large as possible, as long as the shell can cope with it + for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do + # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... + if (echo_test_string=`eval $cmd`) 2>/dev/null && + echo_test_string=`eval $cmd` && + (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null + then + break + fi + done +fi + +if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + : +else + # The Solaris, AIX, and Digital Unix default echo programs unquote + # backslashes. This makes it impossible to quote backslashes using + # echo "$something" | sed 's/\\/\\\\/g' + # + # So, first we look for a working echo in the user's PATH. + + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for dir in $PATH /usr/ucb; do + IFS="$lt_save_ifs" + if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && + test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + echo="$dir/echo" + break + fi + done + IFS="$lt_save_ifs" + + if test "X$echo" = Xecho; then + # We didn't find a better echo, so look for alternatives. + if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + # This shell has a builtin print -r that does the trick. + echo='print -r' + elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && + test "X$CONFIG_SHELL" != X/bin/ksh; then + # If we have ksh, try running configure again with it. + ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} + export ORIGINAL_CONFIG_SHELL + CONFIG_SHELL=/bin/ksh + export CONFIG_SHELL + exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"} + else + # Try using printf. + echo='printf %s\n' + if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + # Cool, printf works + : + elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && + test "X$echo_testing_string" = 'X\t' && + echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL + export CONFIG_SHELL + SHELL="$CONFIG_SHELL" + export SHELL + echo="$CONFIG_SHELL $0 --fallback-echo" + elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && + test "X$echo_testing_string" = 'X\t' && + echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + echo="$CONFIG_SHELL $0 --fallback-echo" + else + # maybe with a smaller string... + prev=: + + for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do + if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null + then + break + fi + prev="$cmd" + done + + if test "$prev" != 'sed 50q "$0"'; then + echo_test_string=`eval $prev` + export echo_test_string + exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"} + else + # Oops. We lost completely, so just stick with echo. + echo=echo + fi + fi + fi + fi +fi +fi + +# Copy echo and quote the copy suitably for passing to libtool from +# the Makefile, instead of quoting the original, which is used later. +ECHO=$echo +if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then + ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo" +fi + + + + +tagnames=${tagnames+${tagnames},}CXX + +tagnames=${tagnames+${tagnames},}F77 + +# 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='gift-gnutella' +PACKAGE_TARNAME='gift-gnutella' +PACKAGE_VERSION='0.0.11' +PACKAGE_STRING='gift-gnutella 0.0.11' +PACKAGE_BUGREPORT='' + +ac_unique_file="src/gt_gnutella.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 MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CPP EGREP build build_cpu build_vendor build_os host host_cpu host_vendor host_os LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL PLUGIN_LDFLAGS PKG_CONFIG GNUTELLA_CFLAGS GNUTELLA_LIBS USE_ZLIB XML2_CONFIG LIBXML2_CFLAGS LIBXML2_LIBS LIBOBJS LTLIBOBJS' +ac_subst_files='' + +# Initialize some variables set by options. +ac_init_help= +ac_init_version=false +# The variables have the same names as the options, with +# dashes changed to underlines. +cache_file=/dev/null +exec_prefix=NONE +no_create= +no_recursion= +prefix=NONE +program_prefix=NONE +program_suffix=NONE +program_transform_name=s,x,x, +silent= +site= +srcdir= +verbose= +x_includes=NONE +x_libraries=NONE + +# Installation directory options. +# These are left unexpanded so users can "make install exec_prefix=/foo" +# and all the variables that are supposed to be based on exec_prefix +# by default will actually change. +# Use braces instead of parens because sh, perl, etc. also accept them. +bindir='${exec_prefix}/bin' +sbindir='${exec_prefix}/sbin' +libexecdir='${exec_prefix}/libexec' +datadir='${prefix}/share' +sysconfdir='${prefix}/etc' +sharedstatedir='${prefix}/com' +localstatedir='${prefix}/var' +libdir='${exec_prefix}/lib' +includedir='${prefix}/include' +oldincludedir='/usr/include' +infodir='${prefix}/info' +mandir='${prefix}/man' + +ac_prev= +for ac_option +do + # If the previous option needs an argument, assign it. + if test -n "$ac_prev"; then + eval "$ac_prev=\$ac_option" + ac_prev= + continue + fi + + ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` + + # Accept the important Cygnus configure options, so we can diagnose typos. + + case $ac_option in + + -bindir | --bindir | --bindi | --bind | --bin | --bi) + ac_prev=bindir ;; + -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) + bindir=$ac_optarg ;; + + -build | --build | --buil | --bui | --bu) + ac_prev=build_alias ;; + -build=* | --build=* | --buil=* | --bui=* | --bu=*) + build_alias=$ac_optarg ;; + + -cache-file | --cache-file | --cache-fil | --cache-fi \ + | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) + ac_prev=cache_file ;; + -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ + | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) + cache_file=$ac_optarg ;; + + --config-cache | -C) + cache_file=config.cache ;; + + -datadir | --datadir | --datadi | --datad | --data | --dat | --da) + ac_prev=datadir ;; + -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ + | --da=*) + datadir=$ac_optarg ;; + + -disable-* | --disable-*) + ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid feature name: $ac_feature" >&2 + { (exit 1); exit 1; }; } + ac_feature=`echo $ac_feature | sed 's/-/_/g'` + eval "enable_$ac_feature=no" ;; + + -enable-* | --enable-*) + ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid feature name: $ac_feature" >&2 + { (exit 1); exit 1; }; } + ac_feature=`echo $ac_feature | sed 's/-/_/g'` + case $ac_option in + *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; + *) ac_optarg=yes ;; + esac + eval "enable_$ac_feature='$ac_optarg'" ;; + + -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ + | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ + | --exec | --exe | --ex) + ac_prev=exec_prefix ;; + -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ + | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ + | --exec=* | --exe=* | --ex=*) + exec_prefix=$ac_optarg ;; + + -gas | --gas | --ga | --g) + # Obsolete; use --with-gas. + with_gas=yes ;; + + -help | --help | --hel | --he | -h) + ac_init_help=long ;; + -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) + ac_init_help=recursive ;; + -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) + ac_init_help=short ;; + + -host | --host | --hos | --ho) + ac_prev=host_alias ;; + -host=* | --host=* | --hos=* | --ho=*) + host_alias=$ac_optarg ;; + + -includedir | --includedir | --includedi | --included | --include \ + | --includ | --inclu | --incl | --inc) + ac_prev=includedir ;; + -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ + | --includ=* | --inclu=* | --incl=* | --inc=*) + includedir=$ac_optarg ;; + + -infodir | --infodir | --infodi | --infod | --info | --inf) + ac_prev=infodir ;; + -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) + infodir=$ac_optarg ;; + + -libdir | --libdir | --libdi | --libd) + ac_prev=libdir ;; + -libdir=* | --libdir=* | --libdi=* | --libd=*) + libdir=$ac_optarg ;; + + -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ + | --libexe | --libex | --libe) + ac_prev=libexecdir ;; + -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ + | --libexe=* | --libex=* | --libe=*) + libexecdir=$ac_optarg ;; + + -localstatedir | --localstatedir | --localstatedi | --localstated \ + | --localstate | --localstat | --localsta | --localst \ + | --locals | --local | --loca | --loc | --lo) + ac_prev=localstatedir ;; + -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ + | --localstate=* | --localstat=* | --localsta=* | --localst=* \ + | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) + localstatedir=$ac_optarg ;; + + -mandir | --mandir | --mandi | --mand | --man | --ma | --m) + ac_prev=mandir ;; + -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) + mandir=$ac_optarg ;; + + -nfp | --nfp | --nf) + # Obsolete; use --without-fp. + with_fp=no ;; + + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c | -n) + no_create=yes ;; + + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) + no_recursion=yes ;; + + -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ + | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ + | --oldin | --oldi | --old | --ol | --o) + ac_prev=oldincludedir ;; + -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ + | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ + | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) + oldincludedir=$ac_optarg ;; + + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) + ac_prev=prefix ;; + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) + prefix=$ac_optarg ;; + + -program-prefix | --program-prefix | --program-prefi | --program-pref \ + | --program-pre | --program-pr | --program-p) + ac_prev=program_prefix ;; + -program-prefix=* | --program-prefix=* | --program-prefi=* \ + | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) + program_prefix=$ac_optarg ;; + + -program-suffix | --program-suffix | --program-suffi | --program-suff \ + | --program-suf | --program-su | --program-s) + ac_prev=program_suffix ;; + -program-suffix=* | --program-suffix=* | --program-suffi=* \ + | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) + program_suffix=$ac_optarg ;; + + -program-transform-name | --program-transform-name \ + | --program-transform-nam | --program-transform-na \ + | --program-transform-n | --program-transform- \ + | --program-transform | --program-transfor \ + | --program-transfo | --program-transf \ + | --program-trans | --program-tran \ + | --progr-tra | --program-tr | --program-t) + ac_prev=program_transform_name ;; + -program-transform-name=* | --program-transform-name=* \ + | --program-transform-nam=* | --program-transform-na=* \ + | --program-transform-n=* | --program-transform-=* \ + | --program-transform=* | --program-transfor=* \ + | --program-transfo=* | --program-transf=* \ + | --program-trans=* | --program-tran=* \ + | --progr-tra=* | --program-tr=* | --program-t=*) + program_transform_name=$ac_optarg ;; + + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + silent=yes ;; + + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) + ac_prev=sbindir ;; + -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ + | --sbi=* | --sb=*) + sbindir=$ac_optarg ;; + + -sharedstatedir | --sharedstatedir | --sharedstatedi \ + | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ + | --sharedst | --shareds | --shared | --share | --shar \ + | --sha | --sh) + ac_prev=sharedstatedir ;; + -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ + | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ + | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ + | --sha=* | --sh=*) + sharedstatedir=$ac_optarg ;; + + -site | --site | --sit) + ac_prev=site ;; + -site=* | --site=* | --sit=*) + site=$ac_optarg ;; + + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) + ac_prev=srcdir ;; + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) + srcdir=$ac_optarg ;; + + -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ + | --syscon | --sysco | --sysc | --sys | --sy) + ac_prev=sysconfdir ;; + -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ + | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) + sysconfdir=$ac_optarg ;; + + -target | --target | --targe | --targ | --tar | --ta | --t) + ac_prev=target_alias ;; + -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) + target_alias=$ac_optarg ;; + + -v | -verbose | --verbose | --verbos | --verbo | --verb) + verbose=yes ;; + + -version | --version | --versio | --versi | --vers | -V) + ac_init_version=: ;; + + -with-* | --with-*) + ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid package name: $ac_package" >&2 + { (exit 1); exit 1; }; } + ac_package=`echo $ac_package| sed 's/-/_/g'` + case $ac_option in + *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; + *) ac_optarg=yes ;; + esac + eval "with_$ac_package='$ac_optarg'" ;; + + -without-* | --without-*) + ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid package name: $ac_package" >&2 + { (exit 1); exit 1; }; } + ac_package=`echo $ac_package | sed 's/-/_/g'` + eval "with_$ac_package=no" ;; + + --x) + # Obsolete; use --with-x. + with_x=yes ;; + + -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ + | --x-incl | --x-inc | --x-in | --x-i) + ac_prev=x_includes ;; + -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ + | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) + x_includes=$ac_optarg ;; + + -x-libraries | --x-libraries | --x-librarie | --x-librari \ + | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) + ac_prev=x_libraries ;; + -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ + | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) + x_libraries=$ac_optarg ;; + + -*) { echo "$as_me: error: unrecognized option: $ac_option +Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; } + ;; + + *=*) + ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` + # Reject names that are not valid shell variable names. + expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 + { (exit 1); exit 1; }; } + ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` + eval "$ac_envvar='$ac_optarg'" + export $ac_envvar ;; + + *) + # FIXME: should be removed in autoconf 3.0. + echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && + echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} + ;; + + esac +done + +if test -n "$ac_prev"; then + ac_option=--`echo $ac_prev | sed 's/_/-/g'` + { echo "$as_me: error: missing argument to $ac_option" >&2 + { (exit 1); exit 1; }; } +fi + +# Be sure to have absolute paths. +for ac_var in exec_prefix prefix +do + eval ac_val=$`echo $ac_var` + case $ac_val in + [\\/$]* | ?:[\\/]* | NONE | '' ) ;; + *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; };; + esac +done + +# Be sure to have absolute paths. +for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ + localstatedir libdir includedir oldincludedir infodir mandir +do + eval ac_val=$`echo $ac_var` + case $ac_val in + [\\/$]* | ?:[\\/]* ) ;; + *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; };; + esac +done + +# There might be people who depend on the old broken behavior: `$host' +# used to hold the argument of --host etc. +# FIXME: To remove some day. +build=$build_alias +host=$host_alias +target=$target_alias + +# FIXME: To remove some day. +if test "x$host_alias" != x; then + if test "x$build_alias" = x; then + cross_compiling=maybe + echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. + If a cross compiler is detected then cross compile mode will be used." >&2 + elif test "x$build_alias" != "x$host_alias"; then + cross_compiling=yes + fi +fi + +ac_tool_prefix= +test -n "$host_alias" && ac_tool_prefix=$host_alias- + +test "$silent" = yes && exec 6>/dev/null + + +# Find the source files, if location was not specified. +if test -z "$srcdir"; then + ac_srcdir_defaulted=yes + # Try the directory containing this script, then its parent. + ac_confdir=`(dirname "$0") 2>/dev/null || +$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$0" : 'X\(//\)[^/]' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$0" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + srcdir=$ac_confdir + if test ! -r $srcdir/$ac_unique_file; then + srcdir=.. + fi +else + ac_srcdir_defaulted=no +fi +if test ! -r $srcdir/$ac_unique_file; then + if test "$ac_srcdir_defaulted" = yes; then + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 + { (exit 1); exit 1; }; } + else + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 + { (exit 1); exit 1; }; } + fi +fi +(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || + { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 + { (exit 1); exit 1; }; } +srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` +ac_env_build_alias_set=${build_alias+set} +ac_env_build_alias_value=$build_alias +ac_cv_env_build_alias_set=${build_alias+set} +ac_cv_env_build_alias_value=$build_alias +ac_env_host_alias_set=${host_alias+set} +ac_env_host_alias_value=$host_alias +ac_cv_env_host_alias_set=${host_alias+set} +ac_cv_env_host_alias_value=$host_alias +ac_env_target_alias_set=${target_alias+set} +ac_env_target_alias_value=$target_alias +ac_cv_env_target_alias_set=${target_alias+set} +ac_cv_env_target_alias_value=$target_alias +ac_env_CC_set=${CC+set} +ac_env_CC_value=$CC +ac_cv_env_CC_set=${CC+set} +ac_cv_env_CC_value=$CC +ac_env_CFLAGS_set=${CFLAGS+set} +ac_env_CFLAGS_value=$CFLAGS +ac_cv_env_CFLAGS_set=${CFLAGS+set} +ac_cv_env_CFLAGS_value=$CFLAGS +ac_env_LDFLAGS_set=${LDFLAGS+set} +ac_env_LDFLAGS_value=$LDFLAGS +ac_cv_env_LDFLAGS_set=${LDFLAGS+set} +ac_cv_env_LDFLAGS_value=$LDFLAGS +ac_env_CPPFLAGS_set=${CPPFLAGS+set} +ac_env_CPPFLAGS_value=$CPPFLAGS +ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} +ac_cv_env_CPPFLAGS_value=$CPPFLAGS +ac_env_CPP_set=${CPP+set} +ac_env_CPP_value=$CPP +ac_cv_env_CPP_set=${CPP+set} +ac_cv_env_CPP_value=$CPP +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_CXXCPP_set=${CXXCPP+set} +ac_env_CXXCPP_value=$CXXCPP +ac_cv_env_CXXCPP_set=${CXXCPP+set} +ac_cv_env_CXXCPP_value=$CXXCPP +ac_env_F77_set=${F77+set} +ac_env_F77_value=$F77 +ac_cv_env_F77_set=${F77+set} +ac_cv_env_F77_value=$F77 +ac_env_FFLAGS_set=${FFLAGS+set} +ac_env_FFLAGS_value=$FFLAGS +ac_cv_env_FFLAGS_set=${FFLAGS+set} +ac_cv_env_FFLAGS_value=$FFLAGS + +# +# 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 gift-gnutella 0.0.11 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 + +System types: + --build=BUILD configure for building on BUILD [guessed] + --host=HOST cross-compile to build programs to run on HOST [BUILD] +_ACEOF +fi + +if test -n "$ac_init_help"; then + case $ac_init_help in + short | recursive ) echo "Configuration of gift-gnutella 0.0.11:";; + esac + cat <<\_ACEOF + +Optional Features: + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --enable-maintainer-mode enable make rules and dependencies not useful + (and sometimes confusing) to the casual installer + --disable-dependency-tracking Speeds up one-time builds + --enable-dependency-tracking Do not reject slow dependency extractors + --enable-static[=PKGS] + build static libraries [default=no] + --enable-shared[=PKGS] + build shared libraries [default=yes] + --enable-fast-install[=PKGS] + optimize for fast installation [default=yes] + --disable-libtool-lock avoid locking (might break parallel builds) + +Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --with-gnu-ld assume the C compiler uses GNU ld [default=no] + --with-pic try to use only PIC/non-PIC objects [default=use + both] + --with-tags[=TAGS] + include additional configurations [automatic] + --with-zlib=DIR where to look for ZLIB compiler/linker default paths + DIR points to the ZLIB installation prefix /usr/local + --with-libxml=DIR where to look for libxml compiler/linker default paths + DIR points to the libxml installation prefix /usr/local + +Some influential environment variables: + CC C compiler command + CFLAGS C compiler flags + LDFLAGS linker flags, e.g. -L if you have libraries in a + nonstandard directory + CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have + headers in a nonstandard directory + CPP C preprocessor + CXX C++ compiler command + CXXFLAGS C++ compiler flags + CXXCPP C++ preprocessor + F77 Fortran 77 compiler command + FFLAGS Fortran 77 compiler flags + +Use these variables to override the choices made by `configure' or to help +it to find libraries and programs with nonstandard names/locations. + +_ACEOF +fi + +if test "$ac_init_help" = "recursive"; then + # If there are subdirs, report their specific --help. + ac_popdir=`pwd` + for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue + test -d $ac_dir || continue + ac_builddir=. + +if test "$ac_dir" != .; then + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A "../" for each directory in $ac_dir_suffix. + ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` +else + ac_dir_suffix= ac_top_builddir= +fi + +case $srcdir in + .) # No --srcdir option. We are building in place. + ac_srcdir=. + if test -z "$ac_top_builddir"; then + ac_top_srcdir=. + else + ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` + fi ;; + [\\/]* | ?:[\\/]* ) # Absolute path. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir ;; + *) # Relative path. + ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_builddir$srcdir ;; +esac + +# Do not use `cd foo && pwd` to compute absolute paths, because +# the directories may not exist. +case `pwd` in +.) ac_abs_builddir="$ac_dir";; +*) + case "$ac_dir" in + .) ac_abs_builddir=`pwd`;; + [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; + *) ac_abs_builddir=`pwd`/"$ac_dir";; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_builddir=${ac_top_builddir}.;; +*) + case ${ac_top_builddir}. in + .) ac_abs_top_builddir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; + *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_srcdir=$ac_srcdir;; +*) + case $ac_srcdir in + .) ac_abs_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; + *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_srcdir=$ac_top_srcdir;; +*) + case $ac_top_srcdir in + .) ac_abs_top_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; + *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; + esac;; +esac + + cd $ac_dir + # Check for guested configure; otherwise get Cygnus style configure. + if test -f $ac_srcdir/configure.gnu; then + echo + $SHELL $ac_srcdir/configure.gnu --help=recursive + elif test -f $ac_srcdir/configure; then + echo + $SHELL $ac_srcdir/configure --help=recursive + elif test -f $ac_srcdir/configure.ac || + test -f $ac_srcdir/configure.in; then + echo + $ac_configure --help + else + echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + fi + cd "$ac_popdir" + done +fi + +test -n "$ac_init_help" && exit 0 +if $ac_init_version; then + cat <<\_ACEOF +gift-gnutella configure 0.0.11 +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 gift-gnutella $as_me 0.0.11, 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 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +cat >>confdefs.h <<\_ACEOF +#define GT_MAJOR_VERSION "0" +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define GT_MINOR_VERSION "0" +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define GT_MICRO_VERSION "10" +_ACEOF + + +if test -e "$srcdir/CVS"; then + +cat >>confdefs.h <<\_ACEOF +#define GT_EXTRA_VERSION "-cvs" +_ACEOF + +else + +cat >>confdefs.h <<\_ACEOF +#define GT_EXTRA_VERSION "" +_ACEOF + +fi + + +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='gift-gnutella' + VERSION='0.0.11' + + +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. + + + + ac_config_headers="$ac_config_headers config.h" + + +echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5 +echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6 + # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. +if test "${enable_maintainer_mode+set}" = set; then + enableval="$enable_maintainer_mode" + USE_MAINTAINER_MODE=$enableval +else + USE_MAINTAINER_MODE=no +fi; + echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5 +echo "${ECHO_T}$USE_MAINTAINER_MODE" >&6 + + +if test $USE_MAINTAINER_MODE = yes; then + MAINTAINER_MODE_TRUE= + MAINTAINER_MODE_FALSE='#' +else + MAINTAINER_MODE_TRUE='#' + MAINTAINER_MODE_FALSE= +fi + + MAINT=$MAINTAINER_MODE_TRUE + + + + + + + + + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. +set dummy ${ac_tool_prefix}gcc; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}gcc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="gcc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + CC=$ac_ct_CC +else + CC="$ac_cv_prog_CC" +fi + +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. +set dummy ${ac_tool_prefix}cc; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + CC=$ac_ct_CC +else + CC="$ac_cv_prog_CC" +fi + +fi +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + ac_prog_rejected=no +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $# != 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" + fi +fi +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + for ac_prog in cl + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="$ac_tool_prefix$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$CC" && break + done +fi +if test -z "$CC"; then + ac_ct_CC=$CC + for ac_prog in cl +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$ac_ct_CC" && break +done + + CC=$ac_ct_CC +fi + +fi + + +test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&5 +echo "$as_me: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } + +# Provide some information about the compiler. +echo "$as_me:$LINENO:" \ + "checking for C compiler version" >&5 +ac_compiler=`set X $ac_compile; echo $2` +{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 + (eval $ac_compiler --version &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 + (eval $ac_compiler -v &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 + (eval $ac_compiler -V &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files a.out a.exe b.out" +# Try to create an executable without -o first, disregard a.out. +# It will help us diagnose broken compilers, and finding out an intuition +# of exeext. +echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 +echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6 +ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` +if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 + (eval $ac_link_default) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # Find the output, starting from the most likely. This scheme is +# not robust to junk in `.', hence go to wildcards (a.*) only as a last +# resort. + +# Be careful to initialize this variable, since it used to be cached. +# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. +ac_cv_exeext= +# b.out is created by i960 compilers. +for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out +do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) + ;; + conftest.$ac_ext ) + # This is the source file. + ;; + [ab].out ) + # We found the default executable, but exeext='' is most + # certainly right. + break;; + *.* ) + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + # FIXME: I believe we export ac_cv_exeext for Libtool, + # but it would be cool to find out if it's true. Does anybody + # maintain Libtool? --akim. + export ac_cv_exeext + break;; + * ) + break;; + esac +done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { echo "$as_me:$LINENO: error: C compiler cannot create executables +See \`config.log' for more details." >&5 +echo "$as_me: error: C compiler cannot create executables +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; } +fi + +ac_exeext=$ac_cv_exeext +echo "$as_me:$LINENO: result: $ac_file" >&5 +echo "${ECHO_T}$ac_file" >&6 + +# Check the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +echo "$as_me:$LINENO: checking whether the C compiler works" >&5 +echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 +# FIXME: These cross compiler hacks should be removed for Autoconf 3.0 +# If not cross compiling, check that we can run a simple program. +if test "$cross_compiling" != yes; then + if { ac_try='./$ac_file' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + cross_compiling=no + else + if test "$cross_compiling" = maybe; then + cross_compiling=yes + else + { { echo "$as_me:$LINENO: error: cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } + fi + fi +fi +echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +rm -f a.out a.exe conftest$ac_cv_exeext b.out +ac_clean_files=$ac_clean_files_save +# Check the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 +echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 +echo "$as_me:$LINENO: result: $cross_compiling" >&5 +echo "${ECHO_T}$cross_compiling" >&6 + +echo "$as_me:$LINENO: checking for suffix of executables" >&5 +echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # If both `conftest.exe' and `conftest' are `present' (well, observable) +# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will +# work properly (i.e., refer to `conftest.exe'), while it won't with +# `rm'. +for ac_file in conftest.exe conftest conftest.*; do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; + *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + export ac_cv_exeext + break;; + * ) break;; + esac +done +else + { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi + +rm -f conftest$ac_cv_exeext +echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 +echo "${ECHO_T}$ac_cv_exeext" >&6 + +rm -f conftest.$ac_ext +EXEEXT=$ac_cv_exeext +ac_exeext=$EXEEXT +echo "$as_me:$LINENO: checking for suffix of object files" >&5 +echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 +if test "${ac_cv_objext+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.o conftest.obj +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; + *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` + break;; + esac +done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute suffix of object files: cannot compile +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi + +rm -f conftest.$ac_cv_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 +echo "${ECHO_T}$ac_cv_objext" >&6 +OBJEXT=$ac_cv_objext +ac_objext=$OBJEXT +echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 +if test "${ac_cv_c_compiler_gnu+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_compiler_gnu=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_compiler_gnu=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_c_compiler_gnu=$ac_compiler_gnu + +fi +echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 +GCC=`test $ac_compiler_gnu = yes && echo yes` +ac_test_CFLAGS=${CFLAGS+set} +ac_save_CFLAGS=$CFLAGS +CFLAGS="-g" +echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 +if test "${ac_cv_prog_cc_g+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_prog_cc_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_prog_cc_g=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 +if test "$ac_test_CFLAGS" = set; then + CFLAGS=$ac_save_CFLAGS +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi +echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 +echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 +if test "${ac_cv_prog_cc_stdc+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_prog_cc_stdc=no +ac_save_CC=$CC +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#include +#include +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} + +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not '\xHH' hex character constants. + These don't provoke an error unfortunately, instead are silently treated + as 'x'. The following induces an error, until -std1 is added to get + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an + array size at least. It's necessary to write '\x00'==0 to get something + that's true only with -std1. */ +int osf4_cc_array ['\x00' == 0 ? 1 : -1]; + +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} +_ACEOF +# Don't try gcc -ansi; that turns off useful extensions and +# breaks some systems' header files. +# AIX -qlanglvl=ansi +# Ultrix and OSF/1 -std1 +# HP-UX 10.20 and later -Ae +# HP-UX older versions -Aa -D_HPUX_SOURCE +# SVR4 -Xc -D__EXTENSIONS__ +for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" + rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_prog_cc_stdc=$ac_arg +break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext +done +rm -f conftest.$ac_ext conftest.$ac_objext +CC=$ac_save_CC + +fi + +case "x$ac_cv_prog_cc_stdc" in + x|xno) + echo "$as_me:$LINENO: result: none needed" >&5 +echo "${ECHO_T}none needed" >&6 ;; + *) + echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 + CC="$CC $ac_cv_prog_cc_stdc" ;; +esac + +# Some people use a C++ compiler to compile C. Since we use `exit', +# in C++ we need to declare it. In case someone uses the same compiler +# for both compiling C and C++ we need to have the C++ compiler decide +# the declaration of exit, since it's the most demanding environment. +cat >conftest.$ac_ext <<_ACEOF +#ifndef __cplusplus + choke me +#endif +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + for ac_declaration in \ + '' \ + 'extern "C" void std::exit (int) throw (); using std::exit;' \ + 'extern "C" void std::exit (int); using std::exit;' \ + 'extern "C" void exit (int) throw ();' \ + 'extern "C" void exit (int);' \ + 'void exit (int);' +do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_declaration +#include +int +main () +{ +exit (42); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +continue +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_declaration +int +main () +{ +exit (42); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +done +rm -f conftest* +if test -n "$ac_declaration"; then + echo '#ifdef __cplusplus' >>confdefs.h + echo $ac_declaration >>confdefs.h + echo '#endif' >>confdefs.h +fi + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +DEPDIR="${am__leading_dot}deps" + + ac_config_commands="$ac_config_commands depfiles" + + +am_make=${MAKE-make} +cat > confinc << 'END' +am__doit: + @echo done +.PHONY: am__doit +END +# If we don't find an include directive, just comment out the code. +echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 +echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6 +am__include="#" +am__quote= +_am_result=none +# First try GNU make style include. +echo "include confinc" > confmf +# We grep out `Entering directory' and `Leaving directory' +# messages which can occur if `w' ends up in MAKEFLAGS. +# In particular we don't look at `^make:' because GNU make might +# be invoked under some other name (usually "gmake"), in which +# case it prints its new name instead of `make'. +if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then + am__include=include + am__quote= + _am_result=GNU +fi +# Now try BSD make style include. +if test "$am__include" = "#"; then + echo '.include "confinc"' > confmf + if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then + am__include=.include + am__quote="\"" + _am_result=BSD + fi +fi + + +echo "$as_me:$LINENO: result: $_am_result" >&5 +echo "${ECHO_T}$_am_result" >&6 +rm -f confinc confmf + +# Check whether --enable-dependency-tracking or --disable-dependency-tracking was given. +if test "${enable_dependency_tracking+set}" = set; then + enableval="$enable_dependency_tracking" + +fi; +if test "x$enable_dependency_tracking" != xno; then + am_depcomp="$ac_aux_dir/depcomp" + AMDEPBACKSLASH='\' +fi + + +if test "x$enable_dependency_tracking" != xno; then + AMDEP_TRUE= + AMDEP_FALSE='#' +else + AMDEP_TRUE='#' + AMDEP_FALSE= +fi + + + + +depcc="$CC" am_compiler_list= + +echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 +echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6 +if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CC_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + : > 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 + + + + + + +echo "$as_me:$LINENO: checking for ${CC-cc} option to accept ANSI C" >&5 +echo $ECHO_N "checking for ${CC-cc} option to accept ANSI C... $ECHO_C" >&6 +if test "${am_cv_prog_cc_stdc+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + am_cv_prog_cc_stdc=no +ac_save_CC="$CC" +# 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" + 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; +} +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 +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 + am_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 conftest.$ac_ext +done +CC="$ac_save_CC" + +fi + +if test -z "$am_cv_prog_cc_stdc"; then + echo "$as_me:$LINENO: result: none needed" >&5 +echo "${ECHO_T}none needed" >&6 +else + echo "$as_me:$LINENO: result: $am_cv_prog_cc_stdc" >&5 +echo "${ECHO_T}$am_cv_prog_cc_stdc" >&6 +fi +case "x$am_cv_prog_cc_stdc" in + x|xno) ;; + *) CC="$CC $am_cv_prog_cc_stdc" ;; +esac + +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 + +# 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' + + +# Check whether --enable-static or --disable-static was given. +if test "${enable_static+set}" = set; then + enableval="$enable_static" + p=${PACKAGE-default} + case $enableval in + yes) enable_static=yes ;; + no) enable_static=no ;; + *) + enable_static=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_static=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac +else + enable_static=no +fi; + + +# Check whether --enable-shared or --disable-shared was given. +if test "${enable_shared+set}" = set; then + enableval="$enable_shared" + p=${PACKAGE-default} + case $enableval in + yes) enable_shared=yes ;; + no) enable_shared=no ;; + *) + enable_shared=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_shared=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac +else + enable_shared=yes +fi; + +# Check whether --enable-fast-install or --disable-fast-install was given. +if test "${enable_fast_install+set}" = set; then + enableval="$enable_fast_install" + p=${PACKAGE-default} + case $enableval in + yes) enable_fast_install=yes ;; + no) enable_fast_install=no ;; + *) + enable_fast_install=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_fast_install=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac +else + enable_fast_install=yes +fi; + +# Make sure we can run config.sub. +$ac_config_sub sun4 >/dev/null 2>&1 || + { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5 +echo "$as_me: error: cannot run $ac_config_sub" >&2;} + { (exit 1); exit 1; }; } + +echo "$as_me:$LINENO: checking build system type" >&5 +echo $ECHO_N "checking build system type... $ECHO_C" >&6 +if test "${ac_cv_build+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_build_alias=$build_alias +test -z "$ac_cv_build_alias" && + ac_cv_build_alias=`$ac_config_guess` +test -z "$ac_cv_build_alias" && + { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 +echo "$as_me: error: cannot guess build type; you must specify one" >&2;} + { (exit 1); exit 1; }; } +ac_cv_build=`$ac_config_sub $ac_cv_build_alias` || + { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5 +echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;} + { (exit 1); exit 1; }; } + +fi +echo "$as_me:$LINENO: result: $ac_cv_build" >&5 +echo "${ECHO_T}$ac_cv_build" >&6 +build=$ac_cv_build +build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` + + +echo "$as_me:$LINENO: checking host system type" >&5 +echo $ECHO_N "checking host system type... $ECHO_C" >&6 +if test "${ac_cv_host+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_host_alias=$host_alias +test -z "$ac_cv_host_alias" && + ac_cv_host_alias=$ac_cv_build_alias +ac_cv_host=`$ac_config_sub $ac_cv_host_alias` || + { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5 +echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;} + { (exit 1); exit 1; }; } + +fi +echo "$as_me:$LINENO: result: $ac_cv_host" >&5 +echo "${ECHO_T}$ac_cv_host" >&6 +host=$ac_cv_host +host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` + + +echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5 +echo $ECHO_N "checking for a sed that does not truncate output... $ECHO_C" >&6 +if test "${lt_cv_path_SED+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # Loop through the user's path and test for sed and gsed. +# Then use that list of sed's as ones to test for truncation. +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for lt_ac_prog in sed gsed; do + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then + lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" + fi + done + done +done +lt_ac_max=0 +lt_ac_count=0 +# Add /usr/xpg4/bin/sed as it is typically found on Solaris +# along with /bin/sed that truncates output. +for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do + test ! -f $lt_ac_sed && continue + cat /dev/null > conftest.in + lt_ac_count=0 + echo $ECHO_N "0123456789$ECHO_C" >conftest.in + # Check for GNU sed and select it if it is found. + if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then + lt_cv_path_SED=$lt_ac_sed + break + fi + while true; do + cat conftest.in conftest.in >conftest.tmp + mv conftest.tmp conftest.in + cp conftest.in conftest.nl + echo >>conftest.nl + $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break + cmp -s conftest.out conftest.nl || break + # 10000 chars as input seems more than enough + test $lt_ac_count -gt 10 && break + lt_ac_count=`expr $lt_ac_count + 1` + if test $lt_ac_count -gt $lt_ac_max; then + lt_ac_max=$lt_ac_count + lt_cv_path_SED=$lt_ac_sed + fi + done +done + +fi + +SED=$lt_cv_path_SED +echo "$as_me:$LINENO: result: $SED" >&5 +echo "${ECHO_T}$SED" >&6 + + +# Check whether --with-gnu-ld or --without-gnu-ld was given. +if test "${with_gnu_ld+set}" = set; then + withval="$with_gnu_ld" + test "$withval" = no || with_gnu_ld=yes +else + with_gnu_ld=no +fi; +ac_prog=ld +if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + echo "$as_me:$LINENO: checking for ld used by $CC" >&5 +echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6 + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [\\/]* | ?:[\\/]*) + re_direlt='/[^/][^/]*/\.\./' + # Canonicalize the pathname of ld + ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` + while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do + ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + echo "$as_me:$LINENO: checking for GNU ld" >&5 +echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6 +else + echo "$as_me:$LINENO: checking for non-GNU ld" >&5 +echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6 +fi +if test "${lt_cv_path_LD+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -z "$LD"; then + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + lt_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some variants of GNU ld only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$lt_cv_path_LD" -v 2>&1 &5 +echo "${ECHO_T}$LD" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi +test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 +echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} + { (exit 1); exit 1; }; } +echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 +echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6 +if test "${lt_cv_prog_gnu_ld+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # I'd rather use --version here, but apparently some GNU lds only accept -v. +case `$LD -v 2>&1 &5 +echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6 +with_gnu_ld=$lt_cv_prog_gnu_ld + + +echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5 +echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6 +if test "${lt_cv_ld_reload_flag+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_ld_reload_flag='-r' +fi +echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5 +echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6 +reload_flag=$lt_cv_ld_reload_flag +case $reload_flag in +"" | " "*) ;; +*) reload_flag=" $reload_flag" ;; +esac +reload_cmds='$LD$reload_flag -o $output$reload_objs' +case $host_os in + darwin*) + if test "$GCC" = yes; then + reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' + else + reload_cmds='$LD$reload_flag -o $output$reload_objs' + fi + ;; +esac + +echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5 +echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6 +if test "${lt_cv_path_NM+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$NM"; then + # Let the user override the test. + lt_cv_path_NM="$NM" +else + lt_nm_to_check="${ac_tool_prefix}nm" + if test -n "$ac_tool_prefix" && test "$build" = "$host"; then + lt_nm_to_check="$lt_nm_to_check nm" + fi + for lt_tmp_nm in $lt_nm_to_check; do + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + tmp_nm="$ac_dir/$lt_tmp_nm" + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then + # Check to see if the nm accepts a BSD-compat flag. + # Adding the `sed 1q' prevents false positives on HP-UX, which says: + # nm: unknown option "B" ignored + # Tru64's nm complains that /dev/null is an invalid object file + case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in + */dev/null* | *'Invalid file or object type'*) + lt_cv_path_NM="$tmp_nm -B" + break + ;; + *) + case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in + */dev/null*) + lt_cv_path_NM="$tmp_nm -p" + break + ;; + *) + lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but + continue # so that we can try to find one that supports BSD flags + ;; + esac + ;; + esac + fi + done + IFS="$lt_save_ifs" + done + test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm +fi +fi +echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5 +echo "${ECHO_T}$lt_cv_path_NM" >&6 +NM="$lt_cv_path_NM" + +echo "$as_me:$LINENO: checking whether ln -s works" >&5 +echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6 +LN_S=$as_ln_s +if test "$LN_S" = "ln -s"; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 +else + echo "$as_me:$LINENO: result: no, using $LN_S" >&5 +echo "${ECHO_T}no, using $LN_S" >&6 +fi + +echo "$as_me:$LINENO: checking how to recognise dependent libraries" >&5 +echo $ECHO_N "checking how to recognise dependent libraries... $ECHO_C" >&6 +if test "${lt_cv_deplibs_check_method+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_file_magic_cmd='$MAGIC_CMD' +lt_cv_file_magic_test_file= +lt_cv_deplibs_check_method='unknown' +# Need to set the preceding variable on all platforms that support +# interlibrary dependencies. +# 'none' -- dependencies not supported. +# `unknown' -- same as none, but documents that we really don't know. +# 'pass_all' -- all dependencies passed with no checks. +# 'test_compile' -- check by making test program. +# 'file_magic [[regex]]' -- check by looking for files in library path +# which responds to the $file_magic_cmd with a given extended regex. +# If you have `file' or equivalent on your system and you're not sure +# whether `pass_all' will *always* work, you probably want this one. + +case $host_os in +aix4* | aix5*) + lt_cv_deplibs_check_method=pass_all + ;; + +beos*) + lt_cv_deplibs_check_method=pass_all + ;; + +bsdi[45]*) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' + lt_cv_file_magic_cmd='/usr/bin/file -L' + lt_cv_file_magic_test_file=/shlib/libc.so + ;; + +cygwin*) + # func_win32_libid is a shell function defined in ltmain.sh + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + ;; + +mingw* | pw32*) + # Base MSYS/MinGW do not provide the 'file' command needed by + # func_win32_libid shell function, so use a weaker test based on 'objdump'. + lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' + lt_cv_file_magic_cmd='$OBJDUMP -f' + ;; + +darwin* | rhapsody*) + lt_cv_deplibs_check_method=pass_all + ;; + +freebsd* | kfreebsd*-gnu | dragonfly*) + if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then + case $host_cpu in + i*86 ) + # Not sure whether the presence of OpenBSD here was a mistake. + # Let's accept both of them until this is cleared up. + lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` + ;; + esac + else + lt_cv_deplibs_check_method=pass_all + fi + ;; + +gnu*) + lt_cv_deplibs_check_method=pass_all + ;; + +hpux10.20* | hpux11*) + lt_cv_file_magic_cmd=/usr/bin/file + case $host_cpu in + ia64*) + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' + lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so + ;; + hppa*64*) + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]' + lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl + ;; + *) + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library' + lt_cv_file_magic_test_file=/usr/lib/libc.sl + ;; + esac + ;; + +interix3*) + # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' + ;; + +irix5* | irix6* | nonstopux*) + case $LD in + *-32|*"-32 ") libmagic=32-bit;; + *-n32|*"-n32 ") libmagic=N32;; + *-64|*"-64 ") libmagic=64-bit;; + *) libmagic=never-match;; + esac + lt_cv_deplibs_check_method=pass_all + ;; + +# This must be Linux ELF. +linux*) + lt_cv_deplibs_check_method=pass_all + ;; + +netbsd* | netbsdelf*-gnu | knetbsd*-gnu) + if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' + fi + ;; + +newos6*) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=/usr/lib/libnls.so + ;; + +nto-qnx*) + lt_cv_deplibs_check_method=unknown + ;; + +openbsd*) + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' + fi + ;; + +osf3* | osf4* | osf5*) + lt_cv_deplibs_check_method=pass_all + ;; + +solaris*) + lt_cv_deplibs_check_method=pass_all + ;; + +sysv4 | sysv4.3*) + case $host_vendor in + motorola) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` + ;; + ncr) + lt_cv_deplibs_check_method=pass_all + ;; + sequent) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' + ;; + sni) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" + lt_cv_file_magic_test_file=/lib/libc.so + ;; + siemens) + lt_cv_deplibs_check_method=pass_all + ;; + pc) + lt_cv_deplibs_check_method=pass_all + ;; + esac + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + lt_cv_deplibs_check_method=pass_all + ;; +esac + +fi +echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5 +echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6 +file_magic_cmd=$lt_cv_file_magic_cmd +deplibs_check_method=$lt_cv_deplibs_check_method +test -z "$deplibs_check_method" && deplibs_check_method=unknown + + + + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC + +# Check whether --enable-libtool-lock or --disable-libtool-lock was given. +if test "${enable_libtool_lock+set}" = set; then + enableval="$enable_libtool_lock" + +fi; +test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes + +# Some flags need to be propagated to the compiler or linker for good +# libtool support. +case $host in +ia64-*-hpux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + 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 + case `/usr/bin/file conftest.$ac_objext` in + *ELF-32*) + HPUX_IA64_MODE="32" + ;; + *ELF-64*) + HPUX_IA64_MODE="64" + ;; + esac + fi + rm -rf conftest* + ;; +*-*-irix6*) + # Find out which ABI we are using. + echo '#line 4286 "configure"' > conftest.$ac_ext + 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 + if test "$lt_cv_prog_gnu_ld" = yes; then + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -melf32bsmip" + ;; + *N32*) + LD="${LD-ld} -melf32bmipn32" + ;; + *64-bit*) + LD="${LD-ld} -melf64bmip" + ;; + esac + else + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -32" + ;; + *N32*) + LD="${LD-ld} -n32" + ;; + *64-bit*) + LD="${LD-ld} -64" + ;; + esac + fi + fi + rm -rf conftest* + ;; + +x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + 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 + case `/usr/bin/file conftest.o` in + *32-bit*) + case $host in + x86_64-*linux*) + LD="${LD-ld} -m elf_i386" + ;; + ppc64-*linux*|powerpc64-*linux*) + LD="${LD-ld} -m elf32ppclinux" + ;; + s390x-*linux*) + LD="${LD-ld} -m elf_s390" + ;; + sparc64-*linux*) + LD="${LD-ld} -m elf32_sparc" + ;; + esac + ;; + *64-bit*) + case $host in + x86_64-*linux*) + LD="${LD-ld} -m elf_x86_64" + ;; + ppc*-*linux*|powerpc*-*linux*) + LD="${LD-ld} -m elf64ppc" + ;; + s390*-*linux*) + LD="${LD-ld} -m elf64_s390" + ;; + sparc*-*linux*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; + +*-*-sco3.2v5*) + # On SCO OpenServer 5, we need -belf to get full-featured binaries. + SAVE_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -belf" + echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5 +echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6 +if test "${lt_cv_cc_needs_belf+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + 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 + + 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 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 + lt_cv_cc_needs_belf=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +lt_cv_cc_needs_belf=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext 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 + +fi +echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5 +echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6 + if test x"$lt_cv_cc_needs_belf" != x"yes"; then + # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf + CFLAGS="$SAVE_CFLAGS" + fi + ;; +sparc*-*solaris*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + 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 + case `/usr/bin/file conftest.o` in + *64-bit*) + case $lt_cv_prog_gnu_ld in + yes*) LD="${LD-ld} -m elf64_sparc" ;; + *) LD="${LD-ld} -64" ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; + + +esac + +need_locks="$enable_libtool_lock" + + +# 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 dlfcn.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_header_compiler=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ---------------------------------------- ## +## Report this to the gift-gnutella lists. ## +## ---------------------------------------- ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + +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); } + +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=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 + +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 + + + + +if test -n "$CXX" && ( test "X$CXX" != "Xno" && + ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || + (test "X$CXX" != "Xg++"))) ; then + 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 +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 +if test -z "$CXXCPP"; then + if test "${ac_cv_prog_CXXCPP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # Double quotes because CXXCPP needs to be expanded + for CXXCPP in "$CXX -E" "/lib/cpp" + do + ac_preproc_ok=false +for ac_cxx_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_cxx_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_cxx_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_cxx_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_cxx_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_CXXCPP=$CXXCPP + +fi + CXXCPP=$ac_cv_prog_CXXCPP +else + ac_cv_prog_CXXCPP=$CXXCPP +fi +echo "$as_me:$LINENO: result: $CXXCPP" >&5 +echo "${ECHO_T}$CXXCPP" >&6 +ac_preproc_ok=false +for ac_cxx_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_cxx_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_cxx_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_cxx_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_cxx_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 \"$CXXCPP\" fails sanity check +See \`config.log' for more details." >&5 +echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi + +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 + +fi + + +ac_ext=f +ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' +ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f77_compiler_gnu +if test -n "$ac_tool_prefix"; then + for ac_prog in g77 f77 xlf frt pgf77 fort77 fl32 af77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 ifc efc pgf95 lf95 gfortran + 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_F77+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$F77"; then + ac_cv_prog_F77="$F77" # 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_F77="$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 +F77=$ac_cv_prog_F77 +if test -n "$F77"; then + echo "$as_me:$LINENO: result: $F77" >&5 +echo "${ECHO_T}$F77" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$F77" && break + done +fi +if test -z "$F77"; then + ac_ct_F77=$F77 + for ac_prog in g77 f77 xlf frt pgf77 fort77 fl32 af77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 ifc efc pgf95 lf95 gfortran +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_F77+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_F77"; then + ac_cv_prog_ac_ct_F77="$ac_ct_F77" # 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_F77="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +ac_ct_F77=$ac_cv_prog_ac_ct_F77 +if test -n "$ac_ct_F77"; then + echo "$as_me:$LINENO: result: $ac_ct_F77" >&5 +echo "${ECHO_T}$ac_ct_F77" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$ac_ct_F77" && break +done + + F77=$ac_ct_F77 +fi + + +# Provide some information about the compiler. +echo "$as_me:5470:" \ + "checking for Fortran 77 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); } +rm -f a.out + +# If we don't use `.F' as extension, the preprocessor is not run on the +# input file. (Note that this only needs to work for GNU compilers.) +ac_save_ext=$ac_ext +ac_ext=F +echo "$as_me:$LINENO: checking whether we are using the GNU Fortran 77 compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU Fortran 77 compiler... $ECHO_C" >&6 +if test "${ac_cv_f77_compiler_gnu+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF + program main +#ifndef __GNUC__ + choke me +#endif + + end +_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_f77_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_f77_compiler_gnu=$ac_compiler_gnu + +fi +echo "$as_me:$LINENO: result: $ac_cv_f77_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_f77_compiler_gnu" >&6 +ac_ext=$ac_save_ext +ac_test_FFLAGS=${FFLAGS+set} +ac_save_FFLAGS=$FFLAGS +FFLAGS= +echo "$as_me:$LINENO: checking whether $F77 accepts -g" >&5 +echo $ECHO_N "checking whether $F77 accepts -g... $ECHO_C" >&6 +if test "${ac_cv_prog_f77_g+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + FFLAGS=-g +cat >conftest.$ac_ext <<_ACEOF + program main + + end +_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_f77_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_f77_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_prog_f77_g=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +echo "$as_me:$LINENO: result: $ac_cv_prog_f77_g" >&5 +echo "${ECHO_T}$ac_cv_prog_f77_g" >&6 +if test "$ac_test_FFLAGS" = set; then + FFLAGS=$ac_save_FFLAGS +elif test $ac_cv_prog_f77_g = yes; then + if test "x$ac_cv_f77_compiler_gnu" = xyes; then + FFLAGS="-g -O2" + else + FFLAGS="-g" + fi +else + if test "x$ac_cv_f77_compiler_gnu" = xyes; then + FFLAGS="-O2" + else + FFLAGS= + fi +fi + +G77=`test $ac_compiler_gnu = yes && echo yes` +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 + + + +# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! + +# find the maximum length of command line arguments +echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5 +echo $ECHO_N "checking the maximum length of command line arguments... $ECHO_C" >&6 +if test "${lt_cv_sys_max_cmd_len+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + i=0 + teststring="ABCD" + + case $build_os in + msdosdjgpp*) + # On DJGPP, this test can blow up pretty badly due to problems in libc + # (any single argument exceeding 2000 bytes causes a buffer overrun + # during glob expansion). Even if it were fixed, the result of this + # check would be larger than it should be. + lt_cv_sys_max_cmd_len=12288; # 12K is about right + ;; + + gnu*) + # Under GNU Hurd, this test is not required because there is + # no limit to the length of command line arguments. + # Libtool will interpret -1 as no limit whatsoever + lt_cv_sys_max_cmd_len=-1; + ;; + + cygwin* | mingw*) + # On Win9x/ME, this test blows up -- it succeeds, but takes + # about 5 minutes as the teststring grows exponentially. + # Worse, since 9x/ME are not pre-emptively multitasking, + # you end up with a "frozen" computer, even though with patience + # the test eventually succeeds (with a max line length of 256k). + # Instead, let's just punt: use the minimum linelength reported by + # all of the supported platforms: 8192 (on NT/2K/XP). + lt_cv_sys_max_cmd_len=8192; + ;; + + amigaos*) + # On AmigaOS with pdksh, this test takes hours, literally. + # So we just punt and use a minimum line length of 8192. + lt_cv_sys_max_cmd_len=8192; + ;; + + netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) + # This has been around since 386BSD, at least. Likely further. + if test -x /sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` + elif test -x /usr/sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` + else + lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs + fi + # And add a safety zone + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + ;; + + interix*) + # We know the value 262144 and hardcode it with a safety zone (like BSD) + lt_cv_sys_max_cmd_len=196608 + ;; + + osf*) + # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure + # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not + # nice to cause kernel panics so lets avoid the loop below. + # First set a reasonable default. + lt_cv_sys_max_cmd_len=16384 + # + if test -x /sbin/sysconfig; then + case `/sbin/sysconfig -q proc exec_disable_arg_limit` in + *1*) lt_cv_sys_max_cmd_len=-1 ;; + esac + fi + ;; + sco3.2v5*) + lt_cv_sys_max_cmd_len=102400 + ;; + sysv5* | sco5v6* | sysv4.2uw2*) + kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` + if test -n "$kargmax"; then + lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` + else + lt_cv_sys_max_cmd_len=32768 + fi + ;; + *) + # If test is not a shell built-in, we'll probably end up computing a + # maximum length that is only half of the actual maximum length, but + # we can't tell. + SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} + while (test "X"`$SHELL $0 --fallback-echo "X$teststring" 2>/dev/null` \ + = "XX$teststring") >/dev/null 2>&1 && + new_result=`expr "X$teststring" : ".*" 2>&1` && + lt_cv_sys_max_cmd_len=$new_result && + test $i != 17 # 1/2 MB should be enough + do + i=`expr $i + 1` + teststring=$teststring$teststring + done + teststring= + # Add a significant safety factor because C++ compilers can tack on massive + # amounts of additional arguments before passing them to the linker. + # It appears as though 1/2 is a usable value. + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` + ;; + esac + +fi + +if test -n $lt_cv_sys_max_cmd_len ; then + echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5 +echo "${ECHO_T}$lt_cv_sys_max_cmd_len" >&6 +else + echo "$as_me:$LINENO: result: none" >&5 +echo "${ECHO_T}none" >&6 +fi + + + + +# Check for command to grab the raw symbol name followed by C symbol from nm. +echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5 +echo $ECHO_N "checking command to parse $NM output from $compiler object... $ECHO_C" >&6 +if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + +# These are sane defaults that work on at least a few old systems. +# [They come from Ultrix. What could be older than Ultrix?!! ;)] + +# Character class describing NM global symbol codes. +symcode='[BCDEGRST]' + +# Regexp to match symbols that can be accessed directly from C. +sympat='\([_A-Za-z][_A-Za-z0-9]*\)' + +# Transform an extracted symbol line into a proper C declaration +lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" + +# Transform an extracted symbol line into symbol name and symbol address +lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" + +# Define system-specific variables. +case $host_os in +aix*) + symcode='[BCDT]' + ;; +cygwin* | mingw* | pw32*) + symcode='[ABCDGISTW]' + ;; +hpux*) # Its linker distinguishes data from code symbols + if test "$host_cpu" = ia64; then + symcode='[ABCDEGRST]' + fi + lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" + ;; +linux*) + if test "$host_cpu" = ia64; then + symcode='[ABCDGIRSTW]' + lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" + fi + ;; +irix* | nonstopux*) + symcode='[BCDEGRST]' + ;; +osf*) + symcode='[BCDEGQRST]' + ;; +solaris*) + symcode='[BDRT]' + ;; +sco3.2v5*) + symcode='[DT]' + ;; +sysv4.2uw2*) + symcode='[DT]' + ;; +sysv5* | sco5v6* | unixware* | OpenUNIX*) + symcode='[ABDT]' + ;; +sysv4) + symcode='[DFNSTU]' + ;; +esac + +# Handle CRLF in mingw tool chain +opt_cr= +case $build_os in +mingw*) + opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp + ;; +esac + +# If we're using GNU nm, then use its standard symbol codes. +case `$NM -V 2>&1` in +*GNU* | *'with BFD'*) + symcode='[ABCDGIRSTW]' ;; +esac + +# Try without a prefix undercore, then with it. +for ac_symprfx in "" "_"; do + + # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. + symxfrm="\\1 $ac_symprfx\\2 \\2" + + # Write the raw and C identifiers. + lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" + + # Check to see that the pipe works correctly. + pipe_works=no + + rm -f conftest* + cat > conftest.$ac_ext <&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # Now try to grab the symbols. + nlist=conftest.nm + if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5 + (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s "$nlist"; then + # Try sorting and uniquifying the output. + if sort "$nlist" | uniq > "$nlist"T; then + mv -f "$nlist"T "$nlist" + else + rm -f "$nlist"T + fi + + # Make sure that we snagged all the symbols we need. + if grep ' nm_test_var$' "$nlist" >/dev/null; then + if grep ' nm_test_func$' "$nlist" >/dev/null; then + cat < conftest.$ac_ext +#ifdef __cplusplus +extern "C" { +#endif + +EOF + # Now generate the symbol file. + eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' + + cat <> conftest.$ac_ext +#if defined (__STDC__) && __STDC__ +# define lt_ptr_t void * +#else +# define lt_ptr_t char * +# define const +#endif + +/* The mapping between symbol names and symbols. */ +const struct { + const char *name; + lt_ptr_t address; +} +lt_preloaded_symbols[] = +{ +EOF + $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext + cat <<\EOF >> conftest.$ac_ext + {0, (lt_ptr_t) 0} +}; + +#ifdef __cplusplus +} +#endif +EOF + # Now try linking the two files. + mv conftest.$ac_objext conftstm.$ac_objext + lt_save_LIBS="$LIBS" + lt_save_CFLAGS="$CFLAGS" + LIBS="conftstm.$ac_objext" + CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" + 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); } && test -s conftest${ac_exeext}; then + pipe_works=yes + fi + LIBS="$lt_save_LIBS" + CFLAGS="$lt_save_CFLAGS" + else + echo "cannot find nm_test_func in $nlist" >&5 + fi + else + echo "cannot find nm_test_var in $nlist" >&5 + fi + else + echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 + fi + else + echo "$progname: failed program was:" >&5 + cat conftest.$ac_ext >&5 + fi + rm -f conftest* conftst* + + # Do not use the global_symbol_pipe unless it works. + if test "$pipe_works" = yes; then + break + else + lt_cv_sys_global_symbol_pipe= + fi +done + +fi + +if test -z "$lt_cv_sys_global_symbol_pipe"; then + lt_cv_sys_global_symbol_to_cdecl= +fi +if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then + echo "$as_me:$LINENO: result: failed" >&5 +echo "${ECHO_T}failed" >&6 +else + echo "$as_me:$LINENO: result: ok" >&5 +echo "${ECHO_T}ok" >&6 +fi + +echo "$as_me:$LINENO: checking for objdir" >&5 +echo $ECHO_N "checking for objdir... $ECHO_C" >&6 +if test "${lt_cv_objdir+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + rm -f .libs 2>/dev/null +mkdir .libs 2>/dev/null +if test -d .libs; then + lt_cv_objdir=.libs +else + # MS-DOS does not allow filenames that begin with a dot. + lt_cv_objdir=_libs +fi +rmdir .libs 2>/dev/null +fi +echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5 +echo "${ECHO_T}$lt_cv_objdir" >&6 +objdir=$lt_cv_objdir + + + + + +case $host_os in +aix3*) + # AIX sometimes has problems with the GCC collect2 program. For some + # reason, if we set the COLLECT_NAMES environment variable, the problems + # vanish in a puff of smoke. + if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES + fi + ;; +esac + +# 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='s/\([\\"\\`$\\\\]\)/\\\1/g' + +# Same as above, but do not quote variable references. +double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g' + +# Sed substitution to delay expansion of an escaped shell variable in a +# double_quote_subst'ed string. +delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' + +# Sed substitution to avoid accidental globbing in evaled expressions +no_glob_subst='s/\*/\\\*/g' + +# Constants: +rm="rm -f" + +# Global variables: +default_ofile=libtool +can_build_shared=yes + +# All known linkers require a `.a' archive for static linking (except MSVC, +# which needs '.lib'). +libext=a +ltmain="$ac_aux_dir/ltmain.sh" +ofile="$default_ofile" +with_gnu_ld="$lt_cv_prog_gnu_ld" + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. +set dummy ${ac_tool_prefix}ar; 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_AR+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$AR"; then + ac_cv_prog_AR="$AR" # 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_AR="${ac_tool_prefix}ar" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +AR=$ac_cv_prog_AR +if test -n "$AR"; then + echo "$as_me:$LINENO: result: $AR" >&5 +echo "${ECHO_T}$AR" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +fi +if test -z "$ac_cv_prog_AR"; then + ac_ct_AR=$AR + # Extract the first word of "ar", so it can be a program name with args. +set dummy ar; 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_AR+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_AR"; then + ac_cv_prog_ac_ct_AR="$ac_ct_AR" # 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_AR="ar" + 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_AR" && ac_cv_prog_ac_ct_AR="false" +fi +fi +ac_ct_AR=$ac_cv_prog_ac_ct_AR +if test -n "$ac_ct_AR"; then + echo "$as_me:$LINENO: result: $ac_ct_AR" >&5 +echo "${ECHO_T}$ac_ct_AR" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + AR=$ac_ct_AR +else + AR="$ac_cv_prog_AR" +fi + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. +set dummy ${ac_tool_prefix}ranlib; 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_RANLIB+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # 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_RANLIB="${ac_tool_prefix}ranlib" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +RANLIB=$ac_cv_prog_RANLIB +if test -n "$RANLIB"; then + echo "$as_me:$LINENO: result: $RANLIB" >&5 +echo "${ECHO_T}$RANLIB" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +fi +if test -z "$ac_cv_prog_RANLIB"; then + ac_ct_RANLIB=$RANLIB + # Extract the first word of "ranlib", so it can be a program name with args. +set dummy ranlib; 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_RANLIB+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_RANLIB"; then + ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # 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_RANLIB="ranlib" + 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_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":" +fi +fi +ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB +if test -n "$ac_ct_RANLIB"; then + echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 +echo "${ECHO_T}$ac_ct_RANLIB" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + RANLIB=$ac_ct_RANLIB +else + RANLIB="$ac_cv_prog_RANLIB" +fi + +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 + + +old_CC="$CC" +old_CFLAGS="$CFLAGS" + +# Set sane defaults for various variables +test -z "$AR" && AR=ar +test -z "$AR_FLAGS" && AR_FLAGS=cru +test -z "$AS" && AS=as +test -z "$CC" && CC=cc +test -z "$LTCC" && LTCC=$CC +test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS +test -z "$DLLTOOL" && DLLTOOL=dlltool +test -z "$LD" && LD=ld +test -z "$LN_S" && LN_S="ln -s" +test -z "$MAGIC_CMD" && MAGIC_CMD=file +test -z "$NM" && NM=nm +test -z "$SED" && SED=sed +test -z "$OBJDUMP" && OBJDUMP=objdump +test -z "$RANLIB" && RANLIB=: +test -z "$STRIP" && STRIP=: +test -z "$ac_objext" && ac_objext=o + +# Determine commands to create old-style static archives. +old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs' +old_postinstall_cmds='chmod 644 $oldlib' +old_postuninstall_cmds= + +if test -n "$RANLIB"; then + case $host_os in + openbsd*) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" + ;; + *) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" + ;; + esac + old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" +fi + +for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + + +# Only perform the check for file, if the check method requires it +case $deplibs_check_method in +file_magic*) + if test "$file_magic_cmd" = '$MAGIC_CMD'; then + echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5 +echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6 +if test "${lt_cv_path_MAGIC_CMD+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $MAGIC_CMD in +[\\/*] | ?:[\\/]*) + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + ;; +*) + lt_save_MAGIC_CMD="$MAGIC_CMD" + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" + for ac_dir in $ac_dummy; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/${ac_tool_prefix}file; then + lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" + if test -n "$file_magic_test_file"; then + case $deplibs_check_method in + "file_magic "*) + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` + MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + $EGREP "$file_magic_regex" > /dev/null; then + : + else + cat <&2 + +*** Warning: the command libtool uses to detect shared libraries, +*** $file_magic_cmd, produces output that libtool cannot recognize. +*** The result is that libtool may fail to recognize shared libraries +*** as such. This will affect the creation of libtool libraries that +*** depend on shared libraries, but programs linked with such libtool +*** libraries will work regardless of this problem. Nevertheless, you +*** may want to report the problem to your system manager and/or to +*** bug-libtool@gnu.org + +EOF + fi ;; + esac + fi + break + fi + done + IFS="$lt_save_ifs" + MAGIC_CMD="$lt_save_MAGIC_CMD" + ;; +esac +fi + +MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +if test -n "$MAGIC_CMD"; then + echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 +echo "${ECHO_T}$MAGIC_CMD" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +if test -z "$lt_cv_path_MAGIC_CMD"; then + if test -n "$ac_tool_prefix"; then + echo "$as_me:$LINENO: checking for file" >&5 +echo $ECHO_N "checking for file... $ECHO_C" >&6 +if test "${lt_cv_path_MAGIC_CMD+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $MAGIC_CMD in +[\\/*] | ?:[\\/]*) + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + ;; +*) + lt_save_MAGIC_CMD="$MAGIC_CMD" + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" + for ac_dir in $ac_dummy; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/file; then + lt_cv_path_MAGIC_CMD="$ac_dir/file" + if test -n "$file_magic_test_file"; then + case $deplibs_check_method in + "file_magic "*) + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` + MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + $EGREP "$file_magic_regex" > /dev/null; then + : + else + cat <&2 + +*** Warning: the command libtool uses to detect shared libraries, +*** $file_magic_cmd, produces output that libtool cannot recognize. +*** The result is that libtool may fail to recognize shared libraries +*** as such. This will affect the creation of libtool libraries that +*** depend on shared libraries, but programs linked with such libtool +*** libraries will work regardless of this problem. Nevertheless, you +*** may want to report the problem to your system manager and/or to +*** bug-libtool@gnu.org + +EOF + fi ;; + esac + fi + break + fi + done + IFS="$lt_save_ifs" + MAGIC_CMD="$lt_save_MAGIC_CMD" + ;; +esac +fi + +MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +if test -n "$MAGIC_CMD"; then + echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 +echo "${ECHO_T}$MAGIC_CMD" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + else + MAGIC_CMD=: + fi +fi + + fi + ;; +esac + +enable_dlopen=no +enable_win32_dll=no + +# Check whether --enable-libtool-lock or --disable-libtool-lock was given. +if test "${enable_libtool_lock+set}" = set; then + enableval="$enable_libtool_lock" + +fi; +test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes + + +# Check whether --with-pic or --without-pic was given. +if test "${with_pic+set}" = set; then + withval="$with_pic" + pic_mode="$withval" +else + pic_mode=default +fi; +test -z "$pic_mode" && pic_mode=default + +# Use C for the default configuration in the libtool script +tagname= +lt_save_CC="$CC" +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 + + +# Source file extension for C test sources. +ac_ext=c + +# Object file extension for compiled C test sources. +objext=o +objext=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="int some_variable = 0;\n" + +# Code to be used in simple link tests +lt_simple_link_test_code='int main(){return(0);}\n' + + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC + + +# save warnings/boilerplate of simple test code +ac_outfile=conftest.$ac_objext +printf "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$rm conftest* + +ac_outfile=conftest.$ac_objext +printf "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$rm conftest* + + + +lt_prog_compiler_no_builtin_flag= + +if test "$GCC" = yes; then + lt_prog_compiler_no_builtin_flag=' -fno-builtin' + + +echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 +echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6 +if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_prog_compiler_rtti_exceptions=no + ac_outfile=conftest.$ac_objext + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="-fno-rtti -fno-exceptions" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:6531: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:6535: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_rtti_exceptions=yes + fi + fi + $rm conftest* + +fi +echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6 + +if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then + lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" +else + : +fi + +fi + +lt_prog_compiler_wl= +lt_prog_compiler_pic= +lt_prog_compiler_static= + +echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 +echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 + + if test "$GCC" = yes; then + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_static='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static='-Bstatic' + fi + ;; + + amigaos*) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' + ;; + + beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + + mingw* | pw32* | os2*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic='-DDLL_EXPORT' + ;; + + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic='-fno-common' + ;; + + interix3*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + + msdosdjgpp*) + # Just because we use GCC doesn't mean we suddenly get shared libraries + # on systems that don't support them. + lt_prog_compiler_can_build_shared=no + enable_shared=no + ;; + + sysv4*MP*) + if test -d /usr/nec; then + lt_prog_compiler_pic=-Kconform_pic + fi + ;; + + hpux*) + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic='-fPIC' + ;; + esac + ;; + + *) + lt_prog_compiler_pic='-fPIC' + ;; + esac + else + # PORTME Check for flag to pass linker flags through the system compiler. + case $host_os in + aix*) + lt_prog_compiler_wl='-Wl,' + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static='-Bstatic' + else + lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' + fi + ;; + darwin*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + case $cc_basename in + xlc*) + lt_prog_compiler_pic='-qnocommon' + lt_prog_compiler_wl='-Wl,' + ;; + esac + ;; + + mingw* | pw32* | os2*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic='-DDLL_EXPORT' + ;; + + hpux9* | hpux10* | hpux11*) + lt_prog_compiler_wl='-Wl,' + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic='+Z' + ;; + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? + lt_prog_compiler_static='${wl}-a ${wl}archive' + ;; + + irix5* | irix6* | nonstopux*) + lt_prog_compiler_wl='-Wl,' + # PIC (with -KPIC) is the default. + lt_prog_compiler_static='-non_shared' + ;; + + newsos6) + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; + + linux*) + case $cc_basename in + icc* | ecc*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-static' + ;; + pgcc* | pgf77* | pgf90* | pgf95*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fpic' + lt_prog_compiler_static='-Bstatic' + ;; + ccc*) + lt_prog_compiler_wl='-Wl,' + # All Alpha code is PIC. + lt_prog_compiler_static='-non_shared' + ;; + esac + ;; + + osf3* | osf4* | osf5*) + lt_prog_compiler_wl='-Wl,' + # All OSF/1 code is PIC. + lt_prog_compiler_static='-non_shared' + ;; + + solaris*) + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + case $cc_basename in + f77* | f90* | f95*) + lt_prog_compiler_wl='-Qoption ld ';; + *) + lt_prog_compiler_wl='-Wl,';; + esac + ;; + + sunos4*) + lt_prog_compiler_wl='-Qoption ld ' + lt_prog_compiler_pic='-PIC' + lt_prog_compiler_static='-Bstatic' + ;; + + sysv4 | sysv4.2uw2* | sysv4.3*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; + + sysv4*MP*) + if test -d /usr/nec ;then + lt_prog_compiler_pic='-Kconform_pic' + lt_prog_compiler_static='-Bstatic' + fi + ;; + + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; + + unicos*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_can_build_shared=no + ;; + + uts4*) + lt_prog_compiler_pic='-pic' + lt_prog_compiler_static='-Bstatic' + ;; + + *) + lt_prog_compiler_can_build_shared=no + ;; + esac + fi + +echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic" >&6 + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$lt_prog_compiler_pic"; then + +echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 +echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic works... $ECHO_C" >&6 +if test "${lt_prog_compiler_pic_works+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_prog_compiler_pic_works=no + ac_outfile=conftest.$ac_objext + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$lt_prog_compiler_pic -DPIC" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:6799: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:6803: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_prog_compiler_pic_works=yes + fi + fi + $rm conftest* + +fi +echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_works" >&6 + +if test x"$lt_prog_compiler_pic_works" = xyes; then + case $lt_prog_compiler_pic in + "" | " "*) ;; + *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; + esac +else + lt_prog_compiler_pic= + lt_prog_compiler_can_build_shared=no +fi + +fi +case $host_os in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + lt_prog_compiler_pic= + ;; + *) + lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" + ;; +esac + +# +# Check to make sure the static flag actually works. +# +wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" +echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6 +if test "${lt_prog_compiler_static_works+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_prog_compiler_static_works=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $lt_tmp_static_flag" + printf "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&5 + $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_prog_compiler_static_works=yes + fi + else + lt_prog_compiler_static_works=yes + fi + fi + $rm conftest* + LDFLAGS="$save_LDFLAGS" + +fi +echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works" >&5 +echo "${ECHO_T}$lt_prog_compiler_static_works" >&6 + +if test x"$lt_prog_compiler_static_works" = xyes; then + : +else + lt_prog_compiler_static= +fi + + +echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 +echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 +if test "${lt_cv_prog_compiler_c_o+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_prog_compiler_c_o=no + $rm -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:6903: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:6907: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + lt_cv_prog_compiler_c_o=yes + fi + fi + chmod u+w . 2>&5 + $rm conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files + $rm out/* && rmdir out + cd .. + rmdir conftest + $rm conftest* + +fi +echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_c_o" >&6 + + +hard_links="nottested" +if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 +echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6 + hard_links=yes + $rm conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + echo "$as_me:$LINENO: result: $hard_links" >&5 +echo "${ECHO_T}$hard_links" >&6 + if test "$hard_links" = no; then + { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 +echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} + need_locks=warn + fi +else + need_locks=no +fi + +echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 + + runpath_var= + allow_undefined_flag= + enable_shared_with_static_runtimes=no + archive_cmds= + archive_expsym_cmds= + old_archive_From_new_cmds= + old_archive_from_expsyms_cmds= + export_dynamic_flag_spec= + whole_archive_flag_spec= + thread_safe_flag_spec= + hardcode_libdir_flag_spec= + hardcode_libdir_flag_spec_ld= + hardcode_libdir_separator= + hardcode_direct=no + hardcode_minus_L=no + hardcode_shlibpath_var=unsupported + link_all_deplibs=unknown + hardcode_automatic=no + module_cmds= + module_expsym_cmds= + always_export_symbols=no + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + # include_expsyms should be a list of space-separated symbols to be *always* + # included in the symbol list + include_expsyms= + # exclude_expsyms can be an extended regexp of symbols to exclude + # it will be wrapped by ` (' and `)$', so one must not match beginning or + # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', + # as well as any symbol that contains `d'. + exclude_expsyms="_GLOBAL_OFFSET_TABLE_" + # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out + # platforms (ab)use it in PIC code, but their linkers get confused if + # the symbol is explicitly referenced. Since portable code cannot + # rely on this symbol name, it's probably fine to never include it in + # preloaded symbol tables. + extract_expsyms_cmds= + # Just being paranoid about ensuring that cc_basename is set. + for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + + case $host_os in + cygwin* | mingw* | pw32*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + if test "$GCC" != yes; then + with_gnu_ld=no + fi + ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++) + with_gnu_ld=yes + ;; + openbsd*) + with_gnu_ld=no + ;; + esac + + ld_shlibs=yes + if test "$with_gnu_ld" = yes; then + # If archive_cmds runs LD, not CC, wlarc should be empty + wlarc='${wl}' + + # Set some defaults for GNU ld with shared library support. These + # are reset later if shared libraries are not supported. Putting them + # here allows them to be overridden if necessary. + runpath_var=LD_RUN_PATH + hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir' + export_dynamic_flag_spec='${wl}--export-dynamic' + # ancient GNU ld didn't support --whole-archive et. al. + if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then + whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + whole_archive_flag_spec= + fi + supports_anon_versioning=no + case `$LD -v 2>/dev/null` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 + *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... + *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... + *\ 2.11.*) ;; # other 2.11 versions + *) supports_anon_versioning=yes ;; + esac + + # See if GNU ld supports shared libraries. + case $host_os in + aix3* | aix4* | aix5*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + ld_shlibs=no + cat <&2 + +*** Warning: the GNU linker, at least up to release 2.9.1, is reported +*** to be unable to reliably create shared libraries on AIX. +*** Therefore, libtool is disabling shared libraries support. If you +*** really care for shared libraries, you may want to modify your PATH +*** so that a non-GNU linker is found, and then restart. + +EOF + fi + ;; + + amigaos*) + archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + + # Samuel A. Falvo II reports + # that the semantics of dynamic libraries on AmigaOS, at least up + # to version 4, is to share data among multiple programs linked + # with the same dynamic library. Since this doesn't match the + # behavior of shared libraries on other platforms, we can't use + # them. + ld_shlibs=no + ;; + + beos*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + allow_undefined_flag=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + ld_shlibs=no + fi + ;; + + cygwin* | mingw* | pw32*) + # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec='-L$libdir' + allow_undefined_flag=unsupported + always_export_symbols=no + enable_shared_with_static_runtimes=yes + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' + + if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + ld_shlibs=no + fi + ;; + + interix3*) + hardcode_direct=no + hardcode_shlibpath_var=no + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + export_dynamic_flag_spec='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + + linux*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + tmp_addflag= + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler + whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag' + ;; + pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers + whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag -Mnomain' ;; + ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 + tmp_addflag=' -i_dynamic' ;; + efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 + tmp_addflag=' -i_dynamic -nofor_main' ;; + ifc* | ifort*) # Intel Fortran compiler + tmp_addflag=' -nofor_main' ;; + esac + archive_cmds='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + + if test $supports_anon_versioning = yes; then + archive_expsym_cmds='$echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + $echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi + link_all_deplibs=no + else + ld_shlibs=no + fi + ;; + + netbsd* | netbsdelf*-gnu | knetbsd*-gnu) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + fi + ;; + + solaris*) + if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then + ld_shlibs=no + cat <&2 + +*** Warning: The releases 2.8.* of the GNU linker cannot reliably +*** create shared libraries on Solaris systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.9.1 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +EOF + elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi + ;; + + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) + ld_shlibs=no + cat <<_LT_EOF 1>&2 + +*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not +*** reliably create shared libraries on SCO systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.16.91.0.3 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + ;; + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' + else + ld_shlibs=no + fi + ;; + esac + ;; + + sunos4*) + archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' + wlarc= + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi + ;; + esac + + if test "$ld_shlibs" = no; then + runpath_var= + hardcode_libdir_flag_spec= + export_dynamic_flag_spec= + whole_archive_flag_spec= + fi + else + # PORTME fill in a description of your system's linker (not GNU ld) + case $host_os in + aix3*) + allow_undefined_flag=unsupported + always_export_symbols=yes + archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' + # Note: this linker hardcodes the directories in LIBPATH if there + # are no directories specified by -L. + hardcode_minus_L=yes + if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then + # Neither direct hardcoding nor static linking is supported with a + # broken collect2. + hardcode_direct=unsupported + fi + ;; + + aix4* | aix5*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + if $NM -V 2>&1 | grep 'GNU' > /dev/null; then + export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' + else + export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' + fi + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[23]|aix4.[23].*|aix5*) + for ld_flag in $LDFLAGS; do + if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then + aix_use_runtimelinking=yes + break + fi + done + ;; + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + archive_cmds='' + hardcode_direct=yes + hardcode_libdir_separator=':' + link_all_deplibs=yes + + if test "$GCC" = yes; then + case $host_os in aix4.[012]|aix4.[012].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && \ + strings "$collect2name" | grep resolve_lib_name >/dev/null + then + # We have reworked collect2 + hardcode_direct=yes + else + # We have old collect2 + hardcode_direct=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + hardcode_minus_L=yes + hardcode_libdir_flag_spec='-L$libdir' + hardcode_libdir_separator= + fi + ;; + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + always_export_symbols=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + allow_undefined_flag='-berok' + # Determine the default libpath from the value encoded in an empty executable. + 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 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 + +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'`; 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_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' + allow_undefined_flag="-z nodefs" + archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an empty executable. + 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 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 + +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'`; 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_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + no_undefined_flag=' ${wl}-bernotok' + allow_undefined_flag=' ${wl}-berok' + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec='$convenience' + archive_cmds_need_lc=yes + # This is similar to how AIX traditionally builds its shared libraries. + archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + + amigaos*) + archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + # see comment about different semantics on the GNU ld section + ld_shlibs=no + ;; + + bsdi[45]*) + export_dynamic_flag_spec=-rdynamic + ;; + + cygwin* | mingw* | pw32*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + hardcode_libdir_flag_spec=' ' + allow_undefined_flag=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + old_archive_From_new_cmds='true' + # FIXME: Should let the user specify the lib program. + old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs' + fix_srcfile_path='`cygpath -w "$srcfile"`' + enable_shared_with_static_runtimes=yes + ;; + + darwin* | rhapsody*) + case $host_os in + rhapsody* | darwin1.[012]) + allow_undefined_flag='${wl}-undefined ${wl}suppress' + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[012]) + allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + ;; + 10.*) + allow_undefined_flag='${wl}-undefined ${wl}dynamic_lookup' + ;; + esac + fi + ;; + esac + archive_cmds_need_lc=no + hardcode_direct=no + hardcode_automatic=yes + hardcode_shlibpath_var=unsupported + whole_archive_flag_spec='' + link_all_deplibs=yes + if test "$GCC" = yes ; then + output_verbose_link_cmd='echo' + archive_cmds='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + case $cc_basename in + xlc*) + output_verbose_link_cmd='echo' + archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' + module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + ;; + *) + ld_shlibs=no + ;; + esac + fi + ;; + + dgux*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_shlibpath_var=no + ;; + + freebsd1*) + ld_shlibs=no + ;; + + # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor + # support. Future versions do this automatically, but an explicit c++rt0.o + # does not break anything, and helps significantly (at the cost of a little + # extra space). + freebsd2.2*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + freebsd2*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=yes + hardcode_minus_L=yes + hardcode_shlibpath_var=no + ;; + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | dragonfly*) + archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + # GNU/kFreeBSD uses gcc -shared to do shared libraries. + kfreebsd*-gnu) + archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + link_all_deplibs=no + ;; + + hpux9*) + if test "$GCC" = yes; then + archive_cmds='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + fi + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + hardcode_direct=yes + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + export_dynamic_flag_spec='${wl}-E' + ;; + + hpux10*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + fi + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + + hardcode_direct=yes + export_dynamic_flag_spec='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + fi + ;; + + hpux11*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + case $host_cpu in + hppa*64*) + archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + else + case $host_cpu in + hppa*64*) + archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + fi + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + + case $host_cpu in + hppa*64*|ia64*) + hardcode_libdir_flag_spec_ld='+b $libdir' + hardcode_direct=no + hardcode_shlibpath_var=no + ;; + *) + hardcode_direct=yes + export_dynamic_flag_spec='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + ;; + esac + fi + ;; + + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec_ld='-rpath $libdir' + fi + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + link_all_deplibs=yes + ;; + + netbsd* | netbsdelf*-gnu | knetbsd*-gnu) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else + archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + newsos6) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=yes + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + hardcode_shlibpath_var=no + ;; + + openbsd*) + hardcode_direct=yes + hardcode_shlibpath_var=no + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + export_dynamic_flag_spec='${wl}-E' + else + case $host_os in + openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-R$libdir' + ;; + *) + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + ;; + esac + fi + ;; + + os2*) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + allow_undefined_flag=unsupported + archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' + old_archive_From_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + ;; + + osf3*) + if test "$GCC" = yes; then + allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + allow_undefined_flag=' -expect_unresolved \*' + archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + fi + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + ;; + + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + else + allow_undefined_flag=' -expect_unresolved \*' + archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ + $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' + + # Both c and cxx compiler support -rpath directly + hardcode_libdir_flag_spec='-rpath $libdir' + fi + hardcode_libdir_separator=: + ;; + + solaris*) + no_undefined_flag=' -z text' + if test "$GCC" = yes; then + wlarc='${wl}' + 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' + else + wlarc='' + archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' + fi + hardcode_libdir_flag_spec='-R$libdir' + hardcode_shlibpath_var=no + case $host_os in + solaris2.[0-5] | solaris2.[0-5].*) ;; + *) + # The compiler driver will combine linker options so we + # cannot just pass the convience library names through + # without $wl, iff we do not link with $LD. + # Luckily, gcc supports the same syntax we need for Sun Studio. + # Supported since Solaris 2.6 (maybe 2.5.1?) + case $wlarc in + '') + whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;; + *) + whole_archive_flag_spec='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; + esac ;; + esac + link_all_deplibs=yes + ;; + + sunos4*) + if test "x$host_vendor" = xsequent; then + # Use $CC to link under sequent, because it throws in some extra .o + # files that make .init and .fini sections work. + archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' + fi + hardcode_libdir_flag_spec='-L$libdir' + hardcode_direct=yes + hardcode_minus_L=yes + hardcode_shlibpath_var=no + ;; + + sysv4) + case $host_vendor in + sni) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=yes # is this really true??? + ;; + siemens) + ## LD is ld it makes a PLAMLIB + ## CC just makes a GrossModule. + archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' + reload_cmds='$CC -r -o $output$reload_objs' + hardcode_direct=no + ;; + motorola) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=no #Motorola manual says yes, but my tests say they lie + ;; + esac + runpath_var='LD_RUN_PATH' + hardcode_shlibpath_var=no + ;; + + sysv4.3*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var=no + export_dynamic_flag_spec='-Bexport' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + ld_shlibs=yes + fi + ;; + + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*) + no_undefined_flag='${wl}-z,text' + archive_cmds_need_lc=no + hardcode_shlibpath_var=no + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + no_undefined_flag='${wl}-z,text' + allow_undefined_flag='${wl}-z,nodefs' + archive_cmds_need_lc=no + hardcode_shlibpath_var=no + hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' + hardcode_libdir_separator=':' + link_all_deplibs=yes + export_dynamic_flag_spec='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + archive_cmds='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + uts4*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_shlibpath_var=no + ;; + + *) + ld_shlibs=no + ;; + esac + fi + +echo "$as_me:$LINENO: result: $ld_shlibs" >&5 +echo "${ECHO_T}$ld_shlibs" >&6 +test "$ld_shlibs" = no && can_build_shared=no + +# +# Do we need to explicitly link libc? +# +case "x$archive_cmds_need_lc" in +x|xyes) + # Assume -lc should be added + archive_cmds_need_lc=yes + + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $archive_cmds in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 +echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6 + $rm conftest* + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + + 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); } 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_prog_compiler_wl + pic_flag=$lt_prog_compiler_pic + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag + allow_undefined_flag= + if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 + (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + then + archive_cmds_need_lc=no + else + archive_cmds_need_lc=yes + fi + allow_undefined_flag=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $rm conftest* + echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5 +echo "${ECHO_T}$archive_cmds_need_lc" >&6 + ;; + esac + fi + ;; +esac + +echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 +echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6 +library_names_spec= +libname_spec='lib$name' +soname_spec= +shrext_cmds=".so" +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" +if test "$GCC" = yes; then + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then + # if the path contains ";" then we assume it to be the separator + # otherwise default to the standard path separator (i.e. ":") - it is + # assumed that no part of a normal pathname contains ";" but that should + # okay in the real world where ";" in dirpaths is itself problematic. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi +else + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" +fi +need_lib_prefix=unknown +hardcode_into_libs=no + +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown + +case $host_os in +aix3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + shlibpath_var=LIBPATH + + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='${libname}${release}${shared_ext}$major' + ;; + +aix4* | aix5*) + version_type=linux + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test "$host_cpu" = ia64; then + # AIX 5 supports IA64 + library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + else + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line `#! .'. This would cause the generated library to + # depend on `.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[01] | aix4.[01].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + if test "$aix_use_runtimelinking" = yes; then + # If using run time linking (on AIX 4.2 or later) use lib.so + # instead of lib.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + else + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='${libname}${release}.a $libname.a' + soname_spec='${libname}${release}${shared_ext}$major' + fi + shlibpath_var=LIBPATH + fi + ;; + +amigaos*) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; + +beos*) + library_names_spec='${libname}${shared_ext}' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; + +bsdi[45]*) + version_type=linux + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; + +cygwin* | mingw* | pw32*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$host_os in + yes,cygwin* | yes,mingw* | yes,pw32*) + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $rm \$dlpath' + shlibpath_overrides_runpath=yes + + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" + ;; + mingw*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH printed by + # mingw gcc, but we are running on Cygwin. Gcc prints its search + # path with ; separators, and with drive letters. We can handle the + # drive letters (cygwin fileutils understands them), so leave them, + # especially as we might pass files found there to a mingw objdump, + # which wouldn't understand a cygwinified path. Ahh. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + ;; + esac + ;; + + *) + library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + ;; + esac + dynamic_linker='Win32 ld.exe' + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; + +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' + # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. + if test "$GCC" = yes; then + sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` + else + sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' + fi + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +dgux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +freebsd1*) + dynamic_linker=no + ;; + +kfreebsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='GNU ld.so' + ;; + +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[123]*) objformat=aout ;; + *) objformat=elf ;; + esac + fi + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.[01]* | freebsdelf3.[01]*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ + freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + freebsd*) # from 4.6 on + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + esac + ;; + +gnu*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + ;; + +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case $host_cpu in + ia64*) + shrext_cmds='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + if test "X$HPUX_IA64_MODE" = X32; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + hppa*64*) + shrext_cmds='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext_cmds='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555. + postinstall_cmds='chmod 555 $lib' + ;; + +interix3*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test "$lt_cv_prog_gnu_ld" = yes; then + version_type=linux + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + hardcode_into_libs=yes + ;; + +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; + +# This must be Linux ELF. +linux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + fi + + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; + +netbsdelf*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='NetBSD ld.elf_so' + ;; + +knetbsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='GNU ld.so' + ;; + +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + +newsos6) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +nto-qnx*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +openbsd*) + version_type=sunos + sys_lib_dlsearch_path_spec="/usr/lib" + need_lib_prefix=no + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. + case $host_os in + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; + esac + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + case $host_os in + openbsd2.[89] | openbsd2.[89].*) + shlibpath_overrides_runpath=no + ;; + *) + shlibpath_overrides_runpath=yes + ;; + esac + else + shlibpath_overrides_runpath=yes + fi + ;; + +os2*) + libname_spec='$name' + shrext_cmds=".dll" + need_lib_prefix=no + library_names_spec='$libname${shared_ext} $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; + +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; + +solaris*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; + +sunos4*) + version_type=sunos + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test "$with_gnu_ld" = yes; then + need_lib_prefix=no + fi + need_version=yes + ;; + +sysv4 | sysv4.3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + export_dynamic_flag_spec='${wl}-Blargedynsym' + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; + esac + ;; + +sysv4*MP*) + if test -d /usr/nec ;then + version_type=linux + library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' + soname_spec='$libname${shared_ext}.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + version_type=freebsd-elf + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + if test "$with_gnu_ld" = yes; then + sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' + shlibpath_overrides_runpath=no + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + shlibpath_overrides_runpath=yes + case $host_os in + sco3.2v5*) + sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" + ;; + esac + fi + sys_lib_dlsearch_path_spec='/usr/lib' + ;; + +uts4*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +*) + dynamic_linker=no + ;; +esac +echo "$as_me:$LINENO: result: $dynamic_linker" >&5 +echo "${ECHO_T}$dynamic_linker" >&6 +test "$dynamic_linker" = no && can_build_shared=no + +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi + +echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 +echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 +hardcode_action= +if test -n "$hardcode_libdir_flag_spec" || \ + test -n "$runpath_var" || \ + test "X$hardcode_automatic" = "Xyes" ; then + + # We can hardcode non-existant directories. + if test "$hardcode_direct" != no && + # If the only mechanism to avoid hardcoding is shlibpath_var, we + # have to relink, otherwise we might link with an installed library + # when we should be linking with a yet-to-be-installed one + ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, )" != no && + test "$hardcode_minus_L" != no; then + # Linking always hardcodes the temporary library directory. + hardcode_action=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + hardcode_action=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + hardcode_action=unsupported +fi +echo "$as_me:$LINENO: result: $hardcode_action" >&5 +echo "${ECHO_T}$hardcode_action" >&6 + +if test "$hardcode_action" = relink; then + # Fast installation is not supported + enable_fast_install=no +elif test "$shlibpath_overrides_runpath" = yes || + test "$enable_shared" = no; then + # Fast installation is not necessary + enable_fast_install=needless +fi + +striplib= +old_striplib= +echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 +echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6 +if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then + test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" + test -z "$striplib" && striplib="$STRIP --strip-unneeded" + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 +else +# FIXME - insert some real tests, host_os isn't really good enough + case $host_os in + darwin*) + if test -n "$STRIP" ; then + striplib="$STRIP -x" + 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: result: no" >&5 +echo "${ECHO_T}no" >&6 + ;; + esac +fi + +if test "x$enable_dlopen" != xyes; then + enable_dlopen=unknown + enable_dlopen_self=unknown + enable_dlopen_self_static=unknown +else + lt_cv_dlopen=no + lt_cv_dlopen_libs= + + case $host_os in + beos*) + lt_cv_dlopen="load_add_on" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ;; + + mingw* | pw32*) + lt_cv_dlopen="LoadLibrary" + lt_cv_dlopen_libs= + ;; + + cygwin*) + lt_cv_dlopen="dlopen" + lt_cv_dlopen_libs= + ;; + + darwin*) + # if libdl is installed we need to link against it + echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 +echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 +if test "${ac_cv_lib_dl_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $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 dlopen (); +int +main () +{ +dlopen (); + ; + 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_dl_dlopen=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_dl_dlopen=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_dl_dlopen" >&5 +echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 +if test $ac_cv_lib_dl_dlopen = yes; then + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" +else + + lt_cv_dlopen="dyld" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + +fi + + ;; + + *) + echo "$as_me:$LINENO: checking for shl_load" >&5 +echo $ECHO_N "checking for shl_load... $ECHO_C" >&6 +if test "${ac_cv_func_shl_load+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 shl_load to an innocuous variant, in case declares shl_load. + For example, HP-UX 11i declares gettimeofday. */ +#define shl_load innocuous_shl_load + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char shl_load (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef shl_load + +/* 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 shl_load (); +/* 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_shl_load) || defined (__stub___shl_load) +choke me +#else +char (*f) () = shl_load; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != shl_load; + ; + 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_shl_load=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_func_shl_load=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 +echo "${ECHO_T}$ac_cv_func_shl_load" >&6 +if test $ac_cv_func_shl_load = yes; then + lt_cv_dlopen="shl_load" +else + echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 +echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6 +if test "${ac_cv_lib_dld_shl_load+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldld $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 shl_load (); +int +main () +{ +shl_load (); + ; + 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_dld_shl_load=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_dld_shl_load=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_dld_shl_load" >&5 +echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6 +if test $ac_cv_lib_dld_shl_load = yes; then + lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld" +else + echo "$as_me:$LINENO: checking for dlopen" >&5 +echo $ECHO_N "checking for dlopen... $ECHO_C" >&6 +if test "${ac_cv_func_dlopen+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 dlopen to an innocuous variant, in case declares dlopen. + For example, HP-UX 11i declares gettimeofday. */ +#define dlopen innocuous_dlopen + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char dlopen (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef dlopen + +/* 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 dlopen (); +/* 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_dlopen) || defined (__stub___dlopen) +choke me +#else +char (*f) () = dlopen; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != dlopen; + ; + 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_dlopen=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_func_dlopen=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 +echo "${ECHO_T}$ac_cv_func_dlopen" >&6 +if test $ac_cv_func_dlopen = yes; then + lt_cv_dlopen="dlopen" +else + echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 +echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 +if test "${ac_cv_lib_dl_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $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 dlopen (); +int +main () +{ +dlopen (); + ; + 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_dl_dlopen=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_dl_dlopen=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_dl_dlopen" >&5 +echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 +if test $ac_cv_lib_dl_dlopen = yes; then + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" +else + echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 +echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6 +if test "${ac_cv_lib_svld_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lsvld $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 dlopen (); +int +main () +{ +dlopen (); + ; + 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_svld_dlopen=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_svld_dlopen=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_svld_dlopen" >&5 +echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6 +if test $ac_cv_lib_svld_dlopen = yes; then + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" +else + echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 +echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6 +if test "${ac_cv_lib_dld_dld_link+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldld $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 dld_link (); +int +main () +{ +dld_link (); + ; + 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_dld_dld_link=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_dld_dld_link=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_dld_dld_link" >&5 +echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6 +if test $ac_cv_lib_dld_dld_link = yes; then + lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld" +fi + + +fi + + +fi + + +fi + + +fi + + +fi + + ;; + esac + + if test "x$lt_cv_dlopen" != xno; then + enable_dlopen=yes + else + enable_dlopen=no + fi + + case $lt_cv_dlopen in + dlopen) + save_CPPFLAGS="$CPPFLAGS" + test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" + + save_LDFLAGS="$LDFLAGS" + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" + + save_LIBS="$LIBS" + LIBS="$lt_cv_dlopen_libs $LIBS" + + echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 +echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6 +if test "${lt_cv_dlopen_self+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then : + lt_cv_dlopen_self=cross +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext < +#endif + +#include + +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif + +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +#ifdef __cplusplus +extern "C" void exit (int); +#endif + +void fnord() { int i=42;} +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + /* dlclose (self); */ + } + else + puts (dlerror ()); + + exit (status); +} +EOF + 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); } && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) >&5 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; + x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; + x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; + esac + else : + # compilation failed + lt_cv_dlopen_self=no + fi +fi +rm -fr conftest* + + +fi +echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 +echo "${ECHO_T}$lt_cv_dlopen_self" >&6 + + if test "x$lt_cv_dlopen_self" = xyes; then + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" + echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 +echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6 +if test "${lt_cv_dlopen_self_static+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then : + lt_cv_dlopen_self_static=cross +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext < +#endif + +#include + +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif + +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +#ifdef __cplusplus +extern "C" void exit (int); +#endif + +void fnord() { int i=42;} +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + /* dlclose (self); */ + } + else + puts (dlerror ()); + + exit (status); +} +EOF + 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); } && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) >&5 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; + x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; + x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; + esac + else : + # compilation failed + lt_cv_dlopen_self_static=no + fi +fi +rm -fr conftest* + + +fi +echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 +echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6 + fi + + CPPFLAGS="$save_CPPFLAGS" + LDFLAGS="$save_LDFLAGS" + LIBS="$save_LIBS" + ;; + esac + + case $lt_cv_dlopen_self in + yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; + *) enable_dlopen_self=unknown ;; + esac + + case $lt_cv_dlopen_self_static in + yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; + *) enable_dlopen_self_static=unknown ;; + esac +fi + + +# Report which library types will actually be built +echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 +echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6 +echo "$as_me:$LINENO: result: $can_build_shared" >&5 +echo "${ECHO_T}$can_build_shared" >&6 + +echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 +echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6 +test "$can_build_shared" = "no" && enable_shared=no + +# On AIX, shared libraries and static libraries use the same namespace, and +# are all built from PIC. +case $host_os in +aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + +aix4* | aix5*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; +esac +echo "$as_me:$LINENO: result: $enable_shared" >&5 +echo "${ECHO_T}$enable_shared" >&6 + +echo "$as_me:$LINENO: checking whether to build static libraries" >&5 +echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6 +# Make sure either enable_shared or enable_static is yes. +test "$enable_shared" = yes || enable_static=yes +echo "$as_me:$LINENO: result: $enable_static" >&5 +echo "${ECHO_T}$enable_static" >&6 + +# The else clause should only fire when bootstrapping the +# libtool distribution, otherwise you forgot to ship ltmain.sh +# with your package, and you will get complaints that there are +# no rules to generate ltmain.sh. +if test -f "$ltmain"; then + # See if we are running on zsh, and set the options which allow our commands through + # without removal of \ escapes. + if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST + fi + # Now quote all the things that may contain metacharacters while being + # careful not to overquote the AC_SUBSTed values. We take copies of the + # variables and quote the copies for generation of the libtool script. + for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ + SED SHELL STRIP \ + libname_spec library_names_spec soname_spec extract_expsyms_cmds \ + old_striplib striplib file_magic_cmd finish_cmds finish_eval \ + deplibs_check_method reload_flag reload_cmds need_locks \ + lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ + lt_cv_sys_global_symbol_to_c_name_address \ + sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ + old_postinstall_cmds old_postuninstall_cmds \ + compiler \ + CC \ + LD \ + lt_prog_compiler_wl \ + lt_prog_compiler_pic \ + lt_prog_compiler_static \ + lt_prog_compiler_no_builtin_flag \ + export_dynamic_flag_spec \ + thread_safe_flag_spec \ + whole_archive_flag_spec \ + enable_shared_with_static_runtimes \ + old_archive_cmds \ + old_archive_from_new_cmds \ + predep_objects \ + postdep_objects \ + predeps \ + postdeps \ + compiler_lib_search_path \ + archive_cmds \ + archive_expsym_cmds \ + postinstall_cmds \ + postuninstall_cmds \ + old_archive_from_expsyms_cmds \ + allow_undefined_flag \ + no_undefined_flag \ + export_symbols_cmds \ + hardcode_libdir_flag_spec \ + hardcode_libdir_flag_spec_ld \ + hardcode_libdir_separator \ + hardcode_automatic \ + module_cmds \ + module_expsym_cmds \ + lt_cv_prog_compiler_c_o \ + exclude_expsyms \ + include_expsyms; do + + case $var in + old_archive_cmds | \ + old_archive_from_new_cmds | \ + archive_cmds | \ + archive_expsym_cmds | \ + module_cmds | \ + module_expsym_cmds | \ + old_archive_from_expsyms_cmds | \ + export_symbols_cmds | \ + extract_expsyms_cmds | reload_cmds | finish_cmds | \ + postinstall_cmds | postuninstall_cmds | \ + old_postinstall_cmds | old_postuninstall_cmds | \ + sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) + # Double-quote double-evaled strings. + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" + ;; + *) + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" + ;; + esac + done + + case $lt_echo in + *'\$0 --fallback-echo"') + lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` + ;; + esac + +cfgfile="${ofile}T" + trap "$rm \"$cfgfile\"; exit 1" 1 2 15 + $rm -f "$cfgfile" + { echo "$as_me:$LINENO: creating $ofile" >&5 +echo "$as_me: creating $ofile" >&6;} + + cat <<__EOF__ >> "$cfgfile" +#! $SHELL + +# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. +# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) +# 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 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=$lt_SED + +# Sed that helps us avoid accidentally triggering echo(1) options like -n. +Xsed="$SED -e 1s/^X//" + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +# The names of the tagged configurations supported by this script. +available_tags= + +# ### BEGIN LIBTOOL CONFIG + +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: + +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + +# Whether or not to build static libraries. +build_old_libs=$enable_static + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$archive_cmds_need_lc + +# Whether or not to disallow shared libs when runtime libs are static +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes + +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install + +# The host system. +host_alias=$host_alias +host=$host +host_os=$host_os + +# The build system. +build_alias=$build_alias +build=$build +build_os=$build_os + +# An echo program that does not interpret backslashes. +echo=$lt_echo + +# The archiver. +AR=$lt_AR +AR_FLAGS=$lt_AR_FLAGS + +# A C compiler. +LTCC=$lt_LTCC + +# LTCC compiler flags. +LTCFLAGS=$lt_LTCFLAGS + +# A language-specific compiler. +CC=$lt_compiler + +# Is the compiler the GNU C compiler? +with_gcc=$GCC + +# An ERE matcher. +EGREP=$lt_EGREP + +# The linker used to build libraries. +LD=$lt_LD + +# Whether we need hard or soft links. +LN_S=$lt_LN_S + +# A BSD-compatible nm program. +NM=$lt_NM + +# A symbol stripping program +STRIP=$lt_STRIP + +# Used to examine libraries when file_magic_cmd begins "file" +MAGIC_CMD=$MAGIC_CMD + +# 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=$objdir + +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds + +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl + +# Object file suffix (normally "o"). +objext="$ac_objext" + +# Old archive suffix (normally "a"). +libext="$libext" + +# Shared library suffix (normally ".so"). +shrext_cmds='$shrext_cmds' + +# Executable file suffix (normally ""). +exeext="$exeext" + +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic +pic_mode=$pic_mode + +# What is the maximum length of a command? +max_cmd_len=$lt_cv_sys_max_cmd_len + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o + +# Must we lock files when doing compilation? +need_locks=$lt_need_locks + +# Do we need the lib prefix for modules? +need_lib_prefix=$need_lib_prefix + +# Do we need a version for libraries? +need_version=$need_version + +# Whether dlopen is supported. +dlopen_support=$enable_dlopen + +# Whether dlopen of programs is supported. +dlopen_self=$enable_dlopen_self + +# Whether dlopen of statically linked programs is supported. +dlopen_self_static=$enable_dlopen_self_static + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_lt_prog_compiler_static + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_whole_archive_flag_spec + +# Compiler flag to generate thread-safe objects. +thread_safe_flag_spec=$lt_thread_safe_flag_spec + +# Library versioning type. +version_type=$version_type + +# Format of library name prefix. +libname_spec=$lt_libname_spec + +# 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=$lt_library_names_spec + +# The coded name of the library, if different from the real name. +soname_spec=$lt_soname_spec + +# Commands used to build and install an old-style archive. +RANLIB=$lt_RANLIB +old_archive_cmds=$lt_old_archive_cmds +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds + +# Commands used to build and install a shared archive. +archive_cmds=$lt_archive_cmds +archive_expsym_cmds=$lt_archive_expsym_cmds +postinstall_cmds=$lt_postinstall_cmds +postuninstall_cmds=$lt_postuninstall_cmds + +# Commands used to build a loadable module (assumed same as above if empty) +module_cmds=$lt_module_cmds +module_expsym_cmds=$lt_module_expsym_cmds + +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib + +# Dependencies to place before the objects being linked to create a +# shared library. +predep_objects=$lt_predep_objects + +# Dependencies to place after the objects being linked to create a +# shared library. +postdep_objects=$lt_postdep_objects + +# Dependencies to place before the objects being linked to create a +# shared library. +predeps=$lt_predeps + +# Dependencies to place after the objects being linked to create a +# shared library. +postdeps=$lt_postdeps + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=$lt_compiler_lib_search_path + +# Method to check whether dependent libraries are shared objects. +deplibs_check_method=$lt_deplibs_check_method + +# Command to use when deplibs_check_method == file_magic. +file_magic_cmd=$lt_file_magic_cmd + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag + +# Flag that forces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag + +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds + +# Same as above, but a single script fragment to be evaled but not shown. +finish_eval=$lt_finish_eval + +# Take the output of nm and produce a listing of raw symbols and C names. +global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe + +# Transform the output of nm in a proper C declaration +global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl + +# Transform the output of nm in a C name address pair +global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address + +# This is the shared library runtime path variable. +runpath_var=$runpath_var + +# This is the shared library path variable. +shlibpath_var=$shlibpath_var + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath + +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs + +# Flag to hardcode \$libdir into a binary during linking. +# This must work even if \$libdir does not exist. +hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec + +# 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=$lt_hardcode_libdir_flag_spec_ld + +# Whether we need a single -rpath flag with a separated argument. +hardcode_libdir_separator=$lt_hardcode_libdir_separator + +# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the +# resulting binary. +hardcode_direct=$hardcode_direct + +# Set to yes if using the -LDIR flag during linking hardcodes DIR into the +# resulting binary. +hardcode_minus_L=$hardcode_minus_L + +# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into +# the resulting binary. +hardcode_shlibpath_var=$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=$hardcode_automatic + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at relink time. +variables_saved_for_relink="$variables_saved_for_relink" + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs + +# Compile-time system search path for libraries +sys_lib_search_path_spec=$lt_sys_lib_search_path_spec + +# Run-time system search path for libraries +sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec + +# Fix the shell variable \$srcfile for the compiler. +fix_srcfile_path="$fix_srcfile_path" + +# Set to yes if exported symbols are required. +always_export_symbols=$always_export_symbols + +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_cmds + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_exclude_expsyms + +# Symbols that must always be exported. +include_expsyms=$lt_include_expsyms + +# ### END LIBTOOL CONFIG + +__EOF__ + + + case $host_os in + aix3*) + cat <<\EOF >> "$cfgfile" + +# AIX sometimes has problems with the GCC collect2 program. For some +# reason, if we set the COLLECT_NAMES environment variable, the problems +# vanish in a puff of smoke. +if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES +fi +EOF + ;; + esac + + # We use sed instead of cat because bash on DJGPP gets confused if + # if finds mixed CR/LF and LF-only lines. Since sed operates in + # text mode, it properly converts lines to CR/LF. This bash problem + # is reportedly fixed, but why not run on old versions too? + sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) + + mv -f "$cfgfile" "$ofile" || \ + (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") + chmod +x "$ofile" + +else + # If there is no Makefile yet, we rely on a make rule to execute + # `config.status --recheck' to rerun these tests and create the + # libtool script then. + ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` + if test -f "$ltmain_in"; then + test -f Makefile && make "$ltmain" + fi +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 + +CC="$lt_save_CC" + + +# Check whether --with-tags or --without-tags was given. +if test "${with_tags+set}" = set; then + withval="$with_tags" + tagnames="$withval" +fi; + +if test -f "$ltmain" && test -n "$tagnames"; then + if test ! -f "${ofile}"; then + { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not exist" >&5 +echo "$as_me: WARNING: output file \`$ofile' does not exist" >&2;} + fi + + if test -z "$LTCC"; then + eval "`$SHELL ${ofile} --config | grep '^LTCC='`" + if test -z "$LTCC"; then + { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not look like a libtool script" >&5 +echo "$as_me: WARNING: output file \`$ofile' does not look like a libtool script" >&2;} + else + { echo "$as_me:$LINENO: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&5 +echo "$as_me: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&2;} + fi + fi + if test -z "$LTCFLAGS"; then + eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" + fi + + # Extract list of available tagged configurations in $ofile. + # Note that this assumes the entire list is on one line. + available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` + + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for tagname in $tagnames; do + IFS="$lt_save_ifs" + # Check whether tagname contains only valid characters + case `$echo "X$tagname" | $Xsed -e 's:[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]::g'` in + "") ;; + *) { { echo "$as_me:$LINENO: error: invalid tag name: $tagname" >&5 +echo "$as_me: error: invalid tag name: $tagname" >&2;} + { (exit 1); exit 1; }; } + ;; + esac + + if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null + then + { { echo "$as_me:$LINENO: error: tag name \"$tagname\" already exists" >&5 +echo "$as_me: error: tag name \"$tagname\" already exists" >&2;} + { (exit 1); exit 1; }; } + fi + + # Update the list of available tags. + if test -n "$tagname"; then + echo appending configuration tag \"$tagname\" to $ofile + + case $tagname in + CXX) + if test -n "$CXX" && ( test "X$CXX" != "Xno" && + ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || + (test "X$CXX" != "Xg++"))) ; then + 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 + + + + +archive_cmds_need_lc_CXX=no +allow_undefined_flag_CXX= +always_export_symbols_CXX=no +archive_expsym_cmds_CXX= +export_dynamic_flag_spec_CXX= +hardcode_direct_CXX=no +hardcode_libdir_flag_spec_CXX= +hardcode_libdir_flag_spec_ld_CXX= +hardcode_libdir_separator_CXX= +hardcode_minus_L_CXX=no +hardcode_shlibpath_var_CXX=unsupported +hardcode_automatic_CXX=no +module_cmds_CXX= +module_expsym_cmds_CXX= +link_all_deplibs_CXX=unknown +old_archive_cmds_CXX=$old_archive_cmds +no_undefined_flag_CXX= +whole_archive_flag_spec_CXX= +enable_shared_with_static_runtimes_CXX=no + +# Dependencies to place before and after the object being linked: +predep_objects_CXX= +postdep_objects_CXX= +predeps_CXX= +postdeps_CXX= +compiler_lib_search_path_CXX= + +# Source file extension for C++ test sources. +ac_ext=cpp + +# Object file extension for compiled C++ test sources. +objext=o +objext_CXX=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="int some_variable = 0;\n" + +# Code to be used in simple link tests +lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n' + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC + + +# save warnings/boilerplate of simple test code +ac_outfile=conftest.$ac_objext +printf "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$rm conftest* + +ac_outfile=conftest.$ac_objext +printf "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$rm conftest* + + +# Allow CC to be a program name with arguments. +lt_save_CC=$CC +lt_save_LD=$LD +lt_save_GCC=$GCC +GCC=$GXX +lt_save_with_gnu_ld=$with_gnu_ld +lt_save_path_LD=$lt_cv_path_LD +if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then + lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx +else + $as_unset lt_cv_prog_gnu_ld +fi +if test -n "${lt_cv_path_LDCXX+set}"; then + lt_cv_path_LD=$lt_cv_path_LDCXX +else + $as_unset lt_cv_path_LD +fi +test -z "${LDCXX+set}" || LD=$LDCXX +CC=${CXX-"c++"} +compiler=$CC +compiler_CXX=$CC +for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + + +# We don't want -fno-exception wen compiling C++ code, so set the +# no_builtin_flag separately +if test "$GXX" = yes; then + lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin' +else + lt_prog_compiler_no_builtin_flag_CXX= +fi + +if test "$GXX" = yes; then + # Set up default GNU C++ configuration + + +# Check whether --with-gnu-ld or --without-gnu-ld was given. +if test "${with_gnu_ld+set}" = set; then + withval="$with_gnu_ld" + test "$withval" = no || with_gnu_ld=yes +else + with_gnu_ld=no +fi; +ac_prog=ld +if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + echo "$as_me:$LINENO: checking for ld used by $CC" >&5 +echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6 + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [\\/]* | ?:[\\/]*) + re_direlt='/[^/][^/]*/\.\./' + # Canonicalize the pathname of ld + ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` + while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do + ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + echo "$as_me:$LINENO: checking for GNU ld" >&5 +echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6 +else + echo "$as_me:$LINENO: checking for non-GNU ld" >&5 +echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6 +fi +if test "${lt_cv_path_LD+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -z "$LD"; then + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + lt_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some variants of GNU ld only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$lt_cv_path_LD" -v 2>&1 &5 +echo "${ECHO_T}$LD" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi +test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 +echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} + { (exit 1); exit 1; }; } +echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 +echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6 +if test "${lt_cv_prog_gnu_ld+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # I'd rather use --version here, but apparently some GNU lds only accept -v. +case `$LD -v 2>&1 &5 +echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6 +with_gnu_ld=$lt_cv_prog_gnu_ld + + + + # Check if GNU C++ uses GNU ld as the underlying linker, since the + # archiving commands below assume that GNU ld is being used. + if test "$with_gnu_ld" = yes; then + archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + + hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-dynamic' + + # If archive_cmds runs LD, not CC, wlarc should be empty + # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to + # investigate it a little bit more. (MM) + wlarc='${wl}' + + # ancient GNU ld didn't support --whole-archive et. al. + if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ + grep 'no-whole-archive' > /dev/null; then + whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + whole_archive_flag_spec_CXX= + fi + else + with_gnu_ld=no + wlarc= + + # A generic and very simple default shared library creation + # command for GNU C++ for the case where it uses the native + # linker, instead of GNU ld. If possible, this setting should + # overridden to take advantage of the native linker features on + # the platform it is being used on. + archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + fi + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' + +else + GXX=no + with_gnu_ld=no + wlarc= +fi + +# PORTME: fill in a description of your system's C++ link characteristics +echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 +ld_shlibs_CXX=yes +case $host_os in + aix3*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + aix4* | aix5*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[23]|aix4.[23].*|aix5*) + for ld_flag in $LDFLAGS; do + case $ld_flag in + *-brtl*) + aix_use_runtimelinking=yes + break + ;; + esac + done + ;; + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + archive_cmds_CXX='' + hardcode_direct_CXX=yes + hardcode_libdir_separator_CXX=':' + link_all_deplibs_CXX=yes + + if test "$GXX" = yes; then + case $host_os in aix4.[012]|aix4.[012].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && \ + strings "$collect2name" | grep resolve_lib_name >/dev/null + then + # We have reworked collect2 + hardcode_direct_CXX=yes + else + # We have old collect2 + hardcode_direct_CXX=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + hardcode_minus_L_CXX=yes + hardcode_libdir_flag_spec_CXX='-L$libdir' + hardcode_libdir_separator_CXX= + fi + ;; + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + always_export_symbols_CXX=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + allow_undefined_flag_CXX='-berok' + # Determine the default libpath from the value encoded in an empty executable. + 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 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_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_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 + +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'`; 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_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" + + archive_expsym_cmds_CXX="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib' + allow_undefined_flag_CXX="-z nodefs" + archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an empty executable. + 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 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_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_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 + +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'`; 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_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + no_undefined_flag_CXX=' ${wl}-bernotok' + allow_undefined_flag_CXX=' ${wl}-berok' + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec_CXX='$convenience' + archive_cmds_need_lc_CXX=yes + # This is similar to how AIX traditionally builds its shared libraries. + archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + + beos*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + allow_undefined_flag_CXX=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + ld_shlibs_CXX=no + fi + ;; + + chorus*) + case $cc_basename in + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + + cygwin* | mingw* | pw32*) + # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec_CXX='-L$libdir' + allow_undefined_flag_CXX=unsupported + always_export_symbols_CXX=no + enable_shared_with_static_runtimes_CXX=yes + + if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then + archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + ld_shlibs_CXX=no + fi + ;; + darwin* | rhapsody*) + case $host_os in + rhapsody* | darwin1.[012]) + allow_undefined_flag_CXX='${wl}-undefined ${wl}suppress' + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[012]) + allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + ;; + 10.*) + allow_undefined_flag_CXX='${wl}-undefined ${wl}dynamic_lookup' + ;; + esac + fi + ;; + esac + archive_cmds_need_lc_CXX=no + hardcode_direct_CXX=no + hardcode_automatic_CXX=yes + hardcode_shlibpath_var_CXX=unsupported + whole_archive_flag_spec_CXX='' + link_all_deplibs_CXX=yes + + if test "$GXX" = yes ; then + lt_int_apple_cc_single_mod=no + output_verbose_link_cmd='echo' + if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then + lt_int_apple_cc_single_mod=yes + fi + if test "X$lt_int_apple_cc_single_mod" = Xyes ; then + archive_cmds_CXX='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + else + archive_cmds_CXX='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + fi + module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + if test "X$lt_int_apple_cc_single_mod" = Xyes ; then + archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + fi + module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + case $cc_basename in + xlc*) + output_verbose_link_cmd='echo' + archive_cmds_CXX='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' + module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + ;; + *) + ld_shlibs_CXX=no + ;; + esac + fi + ;; + + dgux*) + case $cc_basename in + ec++*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + ghcx*) + # Green Hills C++ Compiler + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + freebsd[12]*) + # C++ shared libraries reported to be fairly broken before switch to ELF + ld_shlibs_CXX=no + ;; + freebsd-elf*) + archive_cmds_need_lc_CXX=no + ;; + freebsd* | kfreebsd*-gnu | dragonfly*) + # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF + # conventions + ld_shlibs_CXX=yes + ;; + gnu*) + ;; + hpux9*) + hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_CXX=: + export_dynamic_flag_spec_CXX='${wl}-E' + hardcode_direct_CXX=yes + hardcode_minus_L_CXX=yes # Not in the search PATH, + # but as the default + # location of the library. + + case $cc_basename in + CC*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + aCC*) + archive_cmds_CXX='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[-]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + *) + if test "$GXX" = yes; then + archive_cmds_CXX='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + fi + ;; + esac + ;; + hpux10*|hpux11*) + if test $with_gnu_ld = no; then + hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_CXX=: + + case $host_cpu in + hppa*64*|ia64*) + hardcode_libdir_flag_spec_ld_CXX='+b $libdir' + ;; + *) + export_dynamic_flag_spec_CXX='${wl}-E' + ;; + esac + fi + case $host_cpu in + hppa*64*|ia64*) + hardcode_direct_CXX=no + hardcode_shlibpath_var_CXX=no + ;; + *) + hardcode_direct_CXX=yes + hardcode_minus_L_CXX=yes # Not in the search PATH, + # but as the default + # location of the library. + ;; + esac + + case $cc_basename in + CC*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + aCC*) + case $host_cpu in + hppa*64*) + archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) + archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + *) + if test "$GXX" = yes; then + if test $with_gnu_ld = no; then + case $host_cpu in + hppa*64*) + archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) + archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + fi + else + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + fi + ;; + esac + ;; + interix3*) + hardcode_direct_CXX=no + hardcode_shlibpath_var_CXX=no + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + export_dynamic_flag_spec_CXX='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + archive_expsym_cmds_CXX='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + irix5* | irix6*) + case $cc_basename in + CC*) + # SGI C++ + archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + + # Archives containing C++ object files must be created using + # "CC -ar", where "CC" is the IRIX C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs' + ;; + *) + if test "$GXX" = yes; then + if test "$with_gnu_ld" = no; then + archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' + fi + fi + link_all_deplibs_CXX=yes + ;; + esac + hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_CXX=: + ;; + linux*) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + + hardcode_libdir_flag_spec_CXX='${wl}--rpath,$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-dynamic' + + # Archives containing C++ object files must be created using + # "CC -Bstatic", where "CC" is the KAI C++ compiler. + old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' + ;; + icpc*) + # Intel C++ + with_gnu_ld=yes + # version 8.0 and above of icpc choke on multiply defined symbols + # if we add $predep_objects and $postdep_objects, however 7.1 and + # earlier do not add the objects themselves. + case `$CC -V 2>&1` in + *"Version 7."*) + archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + ;; + *) # Version 8.0 or newer + tmp_idyn= + case $host_cpu in + ia64*) tmp_idyn=' -i_dynamic';; + esac + archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + ;; + esac + archive_cmds_need_lc_CXX=no + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-dynamic' + whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + ;; + pgCC*) + # Portland Group C++ compiler + archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' + + hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-dynamic' + whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + ;; + cxx*) + # Compaq C++ + archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' + + runpath_var=LD_RUN_PATH + hardcode_libdir_flag_spec_CXX='-rpath $libdir' + hardcode_libdir_separator_CXX=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + esac + ;; + lynxos*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + m88k*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + mvs*) + case $cc_basename in + cxx*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + netbsd* | netbsdelf*-gnu | knetbsd*-gnu) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' + wlarc= + hardcode_libdir_flag_spec_CXX='-R$libdir' + hardcode_direct_CXX=yes + hardcode_shlibpath_var_CXX=no + fi + # Workaround some broken pre-1.5 toolchains + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' + ;; + openbsd2*) + # C++ shared libraries are fairly broken + ld_shlibs_CXX=no + ;; + openbsd*) + hardcode_direct_CXX=yes + hardcode_shlibpath_var_CXX=no + archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' + export_dynamic_flag_spec_CXX='${wl}-E' + whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + fi + output_verbose_link_cmd='echo' + ;; + osf3*) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + hardcode_libdir_separator_CXX=: + + # Archives containing C++ object files must be created using + # "CC -Bstatic", where "CC" is the KAI C++ compiler. + old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' + + ;; + RCC*) + # Rational C++ 2.4.1 + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + cxx*) + allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + + hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_CXX=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + *) + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + + hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_CXX=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' + + else + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + fi + ;; + esac + ;; + osf4* | osf5*) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + hardcode_libdir_separator_CXX=: + + # Archives containing C++ object files must be created using + # the KAI C++ compiler. + old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' + ;; + RCC*) + # Rational C++ 2.4.1 + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + cxx*) + allow_undefined_flag_CXX=' -expect_unresolved \*' + archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ + echo "-hidden">> $lib.exp~ + $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~ + $rm $lib.exp' + + hardcode_libdir_flag_spec_CXX='-rpath $libdir' + hardcode_libdir_separator_CXX=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + *) + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + + hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_CXX=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' + + else + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + fi + ;; + esac + ;; + psos*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + lcc*) + # Lucid + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + solaris*) + case $cc_basename in + CC*) + # Sun C++ 4.2, 5.x and Centerline C++ + archive_cmds_need_lc_CXX=yes + no_undefined_flag_CXX=' -zdefs' + archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' + + hardcode_libdir_flag_spec_CXX='-R$libdir' + hardcode_shlibpath_var_CXX=no + case $host_os in + solaris2.[0-5] | solaris2.[0-5].*) ;; + *) + # The C++ compiler is used as linker so we must use $wl + # flag to pass the commands to the underlying system + # linker. We must also pass each convience library through + # to the system linker between allextract/defaultextract. + # The C++ compiler will combine linker options so we + # cannot just pass the convience library names through + # without $wl. + # Supported since Solaris 2.6 (maybe 2.5.1?) + whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' + ;; + esac + link_all_deplibs_CXX=yes + + output_verbose_link_cmd='echo' + + # Archives containing C++ object files must be created using + # "CC -xar", where "CC" is the Sun C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' + ;; + gcx*) + # Green Hills C++ Compiler + archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + + # The C++ compiler must be used to create the archive. + old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs' + ;; + *) + # GNU C++ compiler with Solaris linker + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + no_undefined_flag_CXX=' ${wl}-z ${wl}defs' + if $CC --version | grep -v '^2\.7' > /dev/null; then + archive_cmds_CXX='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + archive_expsym_cmds_CXX='$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' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" + else + # g++ 2.7 appears to require `-G' NOT `-shared' on this + # platform. + archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" + fi + + hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir' + fi + ;; + esac + ;; + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) + no_undefined_flag_CXX='${wl}-z,text' + archive_cmds_need_lc_CXX=no + hardcode_shlibpath_var_CXX=no + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + # For security reasons, it is highly recommended that you always + # use absolute paths for naming shared libraries, and exclude the + # DT_RUNPATH tag from executables and libraries. But doing so + # requires that you compile everything twice, which is a pain. + # So that behaviour is only enabled if SCOABSPATH is set to a + # non-empty value in the environment. Most likely only useful for + # creating official distributions of packages. + # This is a hack until libtool officially supports absolute path + # names for shared libraries. + no_undefined_flag_CXX='${wl}-z,text' + allow_undefined_flag_CXX='${wl}-z,nodefs' + archive_cmds_need_lc_CXX=no + hardcode_shlibpath_var_CXX=no + hardcode_libdir_flag_spec_CXX='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' + hardcode_libdir_separator_CXX=':' + link_all_deplibs_CXX=yes + export_dynamic_flag_spec_CXX='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + archive_cmds_CXX='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds_CXX='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + tandem*) + case $cc_basename in + NCC*) + # NonStop-UX NCC 3.20 + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + vxworks*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; +esac +echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 +echo "${ECHO_T}$ld_shlibs_CXX" >&6 +test "$ld_shlibs_CXX" = no && can_build_shared=no + +GCC_CXX="$GXX" +LD_CXX="$LD" + + +cat > conftest.$ac_ext <&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # Parse the compiler output and extract the necessary + # objects, libraries and library flags. + + # Sentinel used to keep track of whether or not we are before + # the conftest object file. + pre_test_object_deps_done=no + + # The `*' in the case matches for architectures that use `case' in + # $output_verbose_cmd can trigger glob expansion during the loop + # eval without this substitution. + output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"` + + for p in `eval $output_verbose_link_cmd`; do + case $p in + + -L* | -R* | -l*) + # Some compilers place space between "-{L,R}" and the path. + # Remove the space. + if test $p = "-L" \ + || test $p = "-R"; then + prev=$p + continue + else + prev= + fi + + if test "$pre_test_object_deps_done" = no; then + case $p in + -L* | -R*) + # Internal compiler library paths should come after those + # provided the user. The postdeps already come after the + # user supplied libs so there is no need to process them. + if test -z "$compiler_lib_search_path_CXX"; then + compiler_lib_search_path_CXX="${prev}${p}" + else + compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}" + fi + ;; + # The "-l" case would never come before the object being + # linked, so don't bother handling this case. + esac + else + if test -z "$postdeps_CXX"; then + postdeps_CXX="${prev}${p}" + else + postdeps_CXX="${postdeps_CXX} ${prev}${p}" + fi + fi + ;; + + *.$objext) + # This assumes that the test object file only shows up + # once in the compiler output. + if test "$p" = "conftest.$objext"; then + pre_test_object_deps_done=yes + continue + fi + + if test "$pre_test_object_deps_done" = no; then + if test -z "$predep_objects_CXX"; then + predep_objects_CXX="$p" + else + predep_objects_CXX="$predep_objects_CXX $p" + fi + else + if test -z "$postdep_objects_CXX"; then + postdep_objects_CXX="$p" + else + postdep_objects_CXX="$postdep_objects_CXX $p" + fi + fi + ;; + + *) ;; # Ignore the rest. + + esac + done + + # Clean up. + rm -f a.out a.exe +else + echo "libtool.m4: error: problem compiling CXX test program" +fi + +$rm -f confest.$objext + +# PORTME: override above test on systems where it is broken +case $host_os in +interix3*) + # Interix 3.5 installs completely hosed .la files for C++, so rather than + # hack all around it, let's just trust "g++" to DTRT. + predep_objects_CXX= + postdep_objects_CXX= + postdeps_CXX= + ;; + +solaris*) + case $cc_basename in + CC*) + # Adding this requires a known-good setup of shared libraries for + # Sun compiler versions before 5.6, else PIC objects from an old + # archive will be linked into the output, leading to subtle bugs. + postdeps_CXX='-lCstd -lCrun' + ;; + esac + ;; +esac + + +case " $postdeps_CXX " in +*" -lc "*) archive_cmds_need_lc_CXX=no ;; +esac + +lt_prog_compiler_wl_CXX= +lt_prog_compiler_pic_CXX= +lt_prog_compiler_static_CXX= + +echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 +echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 + + # C++ specific cases for pic, static, wl, etc. + if test "$GXX" = yes; then + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_static_CXX='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static_CXX='-Bstatic' + fi + ;; + amigaos*) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4' + ;; + beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + mingw* | os2* | pw32*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic_CXX='-DDLL_EXPORT' + ;; + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic_CXX='-fno-common' + ;; + *djgpp*) + # DJGPP does not support shared libraries at all + lt_prog_compiler_pic_CXX= + ;; + interix3*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + sysv4*MP*) + if test -d /usr/nec; then + lt_prog_compiler_pic_CXX=-Kconform_pic + fi + ;; + hpux*) + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + ;; + *) + lt_prog_compiler_pic_CXX='-fPIC' + ;; + esac + ;; + *) + lt_prog_compiler_pic_CXX='-fPIC' + ;; + esac + else + case $host_os in + aix4* | aix5*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static_CXX='-Bstatic' + else + lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp' + fi + ;; + chorus*) + case $cc_basename in + cxch68*) + # Green Hills C++ Compiler + # _LT_AC_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" + ;; + esac + ;; + darwin*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + case $cc_basename in + xlc*) + lt_prog_compiler_pic_CXX='-qnocommon' + lt_prog_compiler_wl_CXX='-Wl,' + ;; + esac + ;; + dgux*) + case $cc_basename in + ec++*) + lt_prog_compiler_pic_CXX='-KPIC' + ;; + ghcx*) + # Green Hills C++ Compiler + lt_prog_compiler_pic_CXX='-pic' + ;; + *) + ;; + esac + ;; + freebsd* | kfreebsd*-gnu | dragonfly*) + # FreeBSD uses GNU C++ + ;; + hpux9* | hpux10* | hpux11*) + case $cc_basename in + CC*) + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' + if test "$host_cpu" != ia64; then + lt_prog_compiler_pic_CXX='+Z' + fi + ;; + aCC*) + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic_CXX='+Z' + ;; + esac + ;; + *) + ;; + esac + ;; + interix*) + # This is c89, which is MS Visual C++ (no shared libs) + # Anyone wants to do a port? + ;; + irix5* | irix6* | nonstopux*) + case $cc_basename in + CC*) + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_static_CXX='-non_shared' + # CC pic flag -KPIC is the default. + ;; + *) + ;; + esac + ;; + linux*) + case $cc_basename in + KCC*) + # KAI C++ Compiler + lt_prog_compiler_wl_CXX='--backend -Wl,' + lt_prog_compiler_pic_CXX='-fPIC' + ;; + icpc* | ecpc*) + # Intel C++ + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_pic_CXX='-KPIC' + lt_prog_compiler_static_CXX='-static' + ;; + pgCC*) + # Portland Group C++ compiler. + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_pic_CXX='-fpic' + lt_prog_compiler_static_CXX='-Bstatic' + ;; + cxx*) + # Compaq C++ + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + lt_prog_compiler_pic_CXX= + lt_prog_compiler_static_CXX='-non_shared' + ;; + *) + ;; + esac + ;; + lynxos*) + ;; + m88k*) + ;; + mvs*) + case $cc_basename in + cxx*) + lt_prog_compiler_pic_CXX='-W c,exportall' + ;; + *) + ;; + esac + ;; + netbsd* | netbsdelf*-gnu | knetbsd*-gnu) + ;; + osf3* | osf4* | osf5*) + case $cc_basename in + KCC*) + lt_prog_compiler_wl_CXX='--backend -Wl,' + ;; + RCC*) + # Rational C++ 2.4.1 + lt_prog_compiler_pic_CXX='-pic' + ;; + cxx*) + # Digital/Compaq C++ + lt_prog_compiler_wl_CXX='-Wl,' + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + lt_prog_compiler_pic_CXX= + lt_prog_compiler_static_CXX='-non_shared' + ;; + *) + ;; + esac + ;; + psos*) + ;; + solaris*) + case $cc_basename in + CC*) + # Sun C++ 4.2, 5.x and Centerline C++ + lt_prog_compiler_pic_CXX='-KPIC' + lt_prog_compiler_static_CXX='-Bstatic' + lt_prog_compiler_wl_CXX='-Qoption ld ' + ;; + gcx*) + # Green Hills C++ Compiler + lt_prog_compiler_pic_CXX='-PIC' + ;; + *) + ;; + esac + ;; + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + lt_prog_compiler_pic_CXX='-pic' + lt_prog_compiler_static_CXX='-Bstatic' + ;; + lcc*) + # Lucid + lt_prog_compiler_pic_CXX='-pic' + ;; + *) + ;; + esac + ;; + tandem*) + case $cc_basename in + NCC*) + # NonStop-UX NCC 3.20 + lt_prog_compiler_pic_CXX='-KPIC' + ;; + *) + ;; + esac + ;; + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + case $cc_basename in + CC*) + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_pic_CXX='-KPIC' + lt_prog_compiler_static_CXX='-Bstatic' + ;; + esac + ;; + vxworks*) + ;; + *) + lt_prog_compiler_can_build_shared_CXX=no + ;; + esac + fi + +echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_CXX" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_CXX" >&6 + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$lt_prog_compiler_pic_CXX"; then + +echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 +echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... $ECHO_C" >&6 +if test "${lt_prog_compiler_pic_works_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_prog_compiler_pic_works_CXX=no + ac_outfile=conftest.$ac_objext + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:11699: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:11703: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_prog_compiler_pic_works_CXX=yes + fi + fi + $rm conftest* + +fi +echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_CXX" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_works_CXX" >&6 + +if test x"$lt_prog_compiler_pic_works_CXX" = xyes; then + case $lt_prog_compiler_pic_CXX in + "" | " "*) ;; + *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;; + esac +else + lt_prog_compiler_pic_CXX= + lt_prog_compiler_can_build_shared_CXX=no +fi + +fi +case $host_os in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + lt_prog_compiler_pic_CXX= + ;; + *) + lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC" + ;; +esac + +# +# Check to make sure the static flag actually works. +# +wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\" +echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6 +if test "${lt_prog_compiler_static_works_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_prog_compiler_static_works_CXX=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $lt_tmp_static_flag" + printf "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&5 + $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_prog_compiler_static_works_CXX=yes + fi + else + lt_prog_compiler_static_works_CXX=yes + fi + fi + $rm conftest* + LDFLAGS="$save_LDFLAGS" + +fi +echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_CXX" >&5 +echo "${ECHO_T}$lt_prog_compiler_static_works_CXX" >&6 + +if test x"$lt_prog_compiler_static_works_CXX" = xyes; then + : +else + lt_prog_compiler_static_CXX= +fi + + +echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 +echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 +if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_prog_compiler_c_o_CXX=no + $rm -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:11803: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:11807: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + lt_cv_prog_compiler_c_o_CXX=yes + fi + fi + chmod u+w . 2>&5 + $rm conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files + $rm out/* && rmdir out + cd .. + rmdir conftest + $rm conftest* + +fi +echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_CXX" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_c_o_CXX" >&6 + + +hard_links="nottested" +if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 +echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6 + hard_links=yes + $rm conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + echo "$as_me:$LINENO: result: $hard_links" >&5 +echo "${ECHO_T}$hard_links" >&6 + if test "$hard_links" = no; then + { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 +echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} + need_locks=warn + fi +else + need_locks=no +fi + +echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 + + export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + case $host_os in + aix4* | aix5*) + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + if $NM -V 2>&1 | grep 'GNU' > /dev/null; then + export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' + else + export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' + fi + ;; + pw32*) + export_symbols_cmds_CXX="$ltdll_cmds" + ;; + cygwin* | mingw*) + export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([^ ]*\) [^ ]*/\1 DATA/;/^I /d;/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' + ;; + kfreebsd*-gnu) + link_all_deplibs_CXX=no + ;; + linux*) + link_all_deplibs_CXX=no + ;; + *) + export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + ;; + esac + +echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 +echo "${ECHO_T}$ld_shlibs_CXX" >&6 +test "$ld_shlibs_CXX" = no && can_build_shared=no + +# +# Do we need to explicitly link libc? +# +case "x$archive_cmds_need_lc_CXX" in +x|xyes) + # Assume -lc should be added + archive_cmds_need_lc_CXX=yes + + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $archive_cmds_CXX in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 +echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6 + $rm conftest* + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + + 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); } 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_prog_compiler_wl_CXX + pic_flag=$lt_prog_compiler_pic_CXX + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag_CXX + allow_undefined_flag_CXX= + if { (eval echo "$as_me:$LINENO: \"$archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 + (eval $archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + then + archive_cmds_need_lc_CXX=no + else + archive_cmds_need_lc_CXX=yes + fi + allow_undefined_flag_CXX=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $rm conftest* + echo "$as_me:$LINENO: result: $archive_cmds_need_lc_CXX" >&5 +echo "${ECHO_T}$archive_cmds_need_lc_CXX" >&6 + ;; + esac + fi + ;; +esac + +echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 +echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6 +library_names_spec= +libname_spec='lib$name' +soname_spec= +shrext_cmds=".so" +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" +if test "$GCC" = yes; then + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then + # if the path contains ";" then we assume it to be the separator + # otherwise default to the standard path separator (i.e. ":") - it is + # assumed that no part of a normal pathname contains ";" but that should + # okay in the real world where ";" in dirpaths is itself problematic. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi +else + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" +fi +need_lib_prefix=unknown +hardcode_into_libs=no + +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown + +case $host_os in +aix3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + shlibpath_var=LIBPATH + + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='${libname}${release}${shared_ext}$major' + ;; + +aix4* | aix5*) + version_type=linux + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test "$host_cpu" = ia64; then + # AIX 5 supports IA64 + library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + else + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line `#! .'. This would cause the generated library to + # depend on `.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[01] | aix4.[01].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + if test "$aix_use_runtimelinking" = yes; then + # If using run time linking (on AIX 4.2 or later) use lib.so + # instead of lib.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + else + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='${libname}${release}.a $libname.a' + soname_spec='${libname}${release}${shared_ext}$major' + fi + shlibpath_var=LIBPATH + fi + ;; + +amigaos*) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; + +beos*) + library_names_spec='${libname}${shared_ext}' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; + +bsdi[45]*) + version_type=linux + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; + +cygwin* | mingw* | pw32*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$host_os in + yes,cygwin* | yes,mingw* | yes,pw32*) + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $rm \$dlpath' + shlibpath_overrides_runpath=yes + + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" + ;; + mingw*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH printed by + # mingw gcc, but we are running on Cygwin. Gcc prints its search + # path with ; separators, and with drive letters. We can handle the + # drive letters (cygwin fileutils understands them), so leave them, + # especially as we might pass files found there to a mingw objdump, + # which wouldn't understand a cygwinified path. Ahh. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + ;; + esac + ;; + + *) + library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + ;; + esac + dynamic_linker='Win32 ld.exe' + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; + +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' + # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. + if test "$GCC" = yes; then + sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` + else + sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' + fi + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +dgux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +freebsd1*) + dynamic_linker=no + ;; + +kfreebsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='GNU ld.so' + ;; + +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[123]*) objformat=aout ;; + *) objformat=elf ;; + esac + fi + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.[01]* | freebsdelf3.[01]*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ + freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + freebsd*) # from 4.6 on + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + esac + ;; + +gnu*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + ;; + +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case $host_cpu in + ia64*) + shrext_cmds='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + if test "X$HPUX_IA64_MODE" = X32; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + hppa*64*) + shrext_cmds='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext_cmds='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555. + postinstall_cmds='chmod 555 $lib' + ;; + +interix3*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test "$lt_cv_prog_gnu_ld" = yes; then + version_type=linux + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + hardcode_into_libs=yes + ;; + +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; + +# This must be Linux ELF. +linux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + fi + + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; + +netbsdelf*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='NetBSD ld.elf_so' + ;; + +knetbsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='GNU ld.so' + ;; + +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + +newsos6) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +nto-qnx*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +openbsd*) + version_type=sunos + sys_lib_dlsearch_path_spec="/usr/lib" + need_lib_prefix=no + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. + case $host_os in + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; + esac + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + case $host_os in + openbsd2.[89] | openbsd2.[89].*) + shlibpath_overrides_runpath=no + ;; + *) + shlibpath_overrides_runpath=yes + ;; + esac + else + shlibpath_overrides_runpath=yes + fi + ;; + +os2*) + libname_spec='$name' + shrext_cmds=".dll" + need_lib_prefix=no + library_names_spec='$libname${shared_ext} $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; + +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; + +solaris*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; + +sunos4*) + version_type=sunos + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test "$with_gnu_ld" = yes; then + need_lib_prefix=no + fi + need_version=yes + ;; + +sysv4 | sysv4.3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + export_dynamic_flag_spec='${wl}-Blargedynsym' + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; + esac + ;; + +sysv4*MP*) + if test -d /usr/nec ;then + version_type=linux + library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' + soname_spec='$libname${shared_ext}.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + version_type=freebsd-elf + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + if test "$with_gnu_ld" = yes; then + sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' + shlibpath_overrides_runpath=no + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + shlibpath_overrides_runpath=yes + case $host_os in + sco3.2v5*) + sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" + ;; + esac + fi + sys_lib_dlsearch_path_spec='/usr/lib' + ;; + +uts4*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +*) + dynamic_linker=no + ;; +esac +echo "$as_me:$LINENO: result: $dynamic_linker" >&5 +echo "${ECHO_T}$dynamic_linker" >&6 +test "$dynamic_linker" = no && can_build_shared=no + +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi + +echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 +echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 +hardcode_action_CXX= +if test -n "$hardcode_libdir_flag_spec_CXX" || \ + test -n "$runpath_var_CXX" || \ + test "X$hardcode_automatic_CXX" = "Xyes" ; then + + # We can hardcode non-existant directories. + if test "$hardcode_direct_CXX" != no && + # If the only mechanism to avoid hardcoding is shlibpath_var, we + # have to relink, otherwise we might link with an installed library + # when we should be linking with a yet-to-be-installed one + ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, CXX)" != no && + test "$hardcode_minus_L_CXX" != no; then + # Linking always hardcodes the temporary library directory. + hardcode_action_CXX=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + hardcode_action_CXX=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + hardcode_action_CXX=unsupported +fi +echo "$as_me:$LINENO: result: $hardcode_action_CXX" >&5 +echo "${ECHO_T}$hardcode_action_CXX" >&6 + +if test "$hardcode_action_CXX" = relink; then + # Fast installation is not supported + enable_fast_install=no +elif test "$shlibpath_overrides_runpath" = yes || + test "$enable_shared" = no; then + # Fast installation is not necessary + enable_fast_install=needless +fi + + +# The else clause should only fire when bootstrapping the +# libtool distribution, otherwise you forgot to ship ltmain.sh +# with your package, and you will get complaints that there are +# no rules to generate ltmain.sh. +if test -f "$ltmain"; then + # See if we are running on zsh, and set the options which allow our commands through + # without removal of \ escapes. + if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST + fi + # Now quote all the things that may contain metacharacters while being + # careful not to overquote the AC_SUBSTed values. We take copies of the + # variables and quote the copies for generation of the libtool script. + for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ + SED SHELL STRIP \ + libname_spec library_names_spec soname_spec extract_expsyms_cmds \ + old_striplib striplib file_magic_cmd finish_cmds finish_eval \ + deplibs_check_method reload_flag reload_cmds need_locks \ + lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ + lt_cv_sys_global_symbol_to_c_name_address \ + sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ + old_postinstall_cmds old_postuninstall_cmds \ + compiler_CXX \ + CC_CXX \ + LD_CXX \ + lt_prog_compiler_wl_CXX \ + lt_prog_compiler_pic_CXX \ + lt_prog_compiler_static_CXX \ + lt_prog_compiler_no_builtin_flag_CXX \ + export_dynamic_flag_spec_CXX \ + thread_safe_flag_spec_CXX \ + whole_archive_flag_spec_CXX \ + enable_shared_with_static_runtimes_CXX \ + old_archive_cmds_CXX \ + old_archive_from_new_cmds_CXX \ + predep_objects_CXX \ + postdep_objects_CXX \ + predeps_CXX \ + postdeps_CXX \ + compiler_lib_search_path_CXX \ + archive_cmds_CXX \ + archive_expsym_cmds_CXX \ + postinstall_cmds_CXX \ + postuninstall_cmds_CXX \ + old_archive_from_expsyms_cmds_CXX \ + allow_undefined_flag_CXX \ + no_undefined_flag_CXX \ + export_symbols_cmds_CXX \ + hardcode_libdir_flag_spec_CXX \ + hardcode_libdir_flag_spec_ld_CXX \ + hardcode_libdir_separator_CXX \ + hardcode_automatic_CXX \ + module_cmds_CXX \ + module_expsym_cmds_CXX \ + lt_cv_prog_compiler_c_o_CXX \ + exclude_expsyms_CXX \ + include_expsyms_CXX; do + + case $var in + old_archive_cmds_CXX | \ + old_archive_from_new_cmds_CXX | \ + archive_cmds_CXX | \ + archive_expsym_cmds_CXX | \ + module_cmds_CXX | \ + module_expsym_cmds_CXX | \ + old_archive_from_expsyms_cmds_CXX | \ + export_symbols_cmds_CXX | \ + extract_expsyms_cmds | reload_cmds | finish_cmds | \ + postinstall_cmds | postuninstall_cmds | \ + old_postinstall_cmds | old_postuninstall_cmds | \ + sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) + # Double-quote double-evaled strings. + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" + ;; + *) + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" + ;; + esac + done + + case $lt_echo in + *'\$0 --fallback-echo"') + lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` + ;; + esac + +cfgfile="$ofile" + + cat <<__EOF__ >> "$cfgfile" +# ### BEGIN LIBTOOL TAG CONFIG: $tagname + +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: + +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + +# Whether or not to build static libraries. +build_old_libs=$enable_static + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$archive_cmds_need_lc_CXX + +# Whether or not to disallow shared libs when runtime libs are static +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX + +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install + +# The host system. +host_alias=$host_alias +host=$host +host_os=$host_os + +# The build system. +build_alias=$build_alias +build=$build +build_os=$build_os + +# An echo program that does not interpret backslashes. +echo=$lt_echo + +# The archiver. +AR=$lt_AR +AR_FLAGS=$lt_AR_FLAGS + +# A C compiler. +LTCC=$lt_LTCC + +# LTCC compiler flags. +LTCFLAGS=$lt_LTCFLAGS + +# A language-specific compiler. +CC=$lt_compiler_CXX + +# Is the compiler the GNU C compiler? +with_gcc=$GCC_CXX + +# An ERE matcher. +EGREP=$lt_EGREP + +# The linker used to build libraries. +LD=$lt_LD_CXX + +# Whether we need hard or soft links. +LN_S=$lt_LN_S + +# A BSD-compatible nm program. +NM=$lt_NM + +# A symbol stripping program +STRIP=$lt_STRIP + +# Used to examine libraries when file_magic_cmd begins "file" +MAGIC_CMD=$MAGIC_CMD + +# 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=$objdir + +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds + +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl_CXX + +# Object file suffix (normally "o"). +objext="$ac_objext" + +# Old archive suffix (normally "a"). +libext="$libext" + +# Shared library suffix (normally ".so"). +shrext_cmds='$shrext_cmds' + +# Executable file suffix (normally ""). +exeext="$exeext" + +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic_CXX +pic_mode=$pic_mode + +# What is the maximum length of a command? +max_cmd_len=$lt_cv_sys_max_cmd_len + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX + +# Must we lock files when doing compilation? +need_locks=$lt_need_locks + +# Do we need the lib prefix for modules? +need_lib_prefix=$need_lib_prefix + +# Do we need a version for libraries? +need_version=$need_version + +# Whether dlopen is supported. +dlopen_support=$enable_dlopen + +# Whether dlopen of programs is supported. +dlopen_self=$enable_dlopen_self + +# Whether dlopen of statically linked programs is supported. +dlopen_self_static=$enable_dlopen_self_static + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_lt_prog_compiler_static_CXX + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX + +# Compiler flag to generate thread-safe objects. +thread_safe_flag_spec=$lt_thread_safe_flag_spec_CXX + +# Library versioning type. +version_type=$version_type + +# Format of library name prefix. +libname_spec=$lt_libname_spec + +# 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=$lt_library_names_spec + +# The coded name of the library, if different from the real name. +soname_spec=$lt_soname_spec + +# Commands used to build and install an old-style archive. +RANLIB=$lt_RANLIB +old_archive_cmds=$lt_old_archive_cmds_CXX +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX + +# Commands used to build and install a shared archive. +archive_cmds=$lt_archive_cmds_CXX +archive_expsym_cmds=$lt_archive_expsym_cmds_CXX +postinstall_cmds=$lt_postinstall_cmds +postuninstall_cmds=$lt_postuninstall_cmds + +# Commands used to build a loadable module (assumed same as above if empty) +module_cmds=$lt_module_cmds_CXX +module_expsym_cmds=$lt_module_expsym_cmds_CXX + +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib + +# Dependencies to place before the objects being linked to create a +# shared library. +predep_objects=$lt_predep_objects_CXX + +# Dependencies to place after the objects being linked to create a +# shared library. +postdep_objects=$lt_postdep_objects_CXX + +# Dependencies to place before the objects being linked to create a +# shared library. +predeps=$lt_predeps_CXX + +# Dependencies to place after the objects being linked to create a +# shared library. +postdeps=$lt_postdeps_CXX + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=$lt_compiler_lib_search_path_CXX + +# Method to check whether dependent libraries are shared objects. +deplibs_check_method=$lt_deplibs_check_method + +# Command to use when deplibs_check_method == file_magic. +file_magic_cmd=$lt_file_magic_cmd + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag_CXX + +# Flag that forces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag_CXX + +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds + +# Same as above, but a single script fragment to be evaled but not shown. +finish_eval=$lt_finish_eval + +# Take the output of nm and produce a listing of raw symbols and C names. +global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe + +# Transform the output of nm in a proper C declaration +global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl + +# Transform the output of nm in a C name address pair +global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address + +# This is the shared library runtime path variable. +runpath_var=$runpath_var + +# This is the shared library path variable. +shlibpath_var=$shlibpath_var + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath + +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action_CXX + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs + +# Flag to hardcode \$libdir into a binary during linking. +# This must work even if \$libdir does not exist. +hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX + +# 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=$lt_hardcode_libdir_flag_spec_ld_CXX + +# Whether we need a single -rpath flag with a separated argument. +hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX + +# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the +# resulting binary. +hardcode_direct=$hardcode_direct_CXX + +# Set to yes if using the -LDIR flag during linking hardcodes DIR into the +# resulting binary. +hardcode_minus_L=$hardcode_minus_L_CXX + +# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into +# the resulting binary. +hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX + +# 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=$hardcode_automatic_CXX + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at relink time. +variables_saved_for_relink="$variables_saved_for_relink" + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs_CXX + +# Compile-time system search path for libraries +sys_lib_search_path_spec=$lt_sys_lib_search_path_spec + +# Run-time system search path for libraries +sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec + +# Fix the shell variable \$srcfile for the compiler. +fix_srcfile_path="$fix_srcfile_path_CXX" + +# Set to yes if exported symbols are required. +always_export_symbols=$always_export_symbols_CXX + +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds_CXX + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_cmds + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_exclude_expsyms_CXX + +# Symbols that must always be exported. +include_expsyms=$lt_include_expsyms_CXX + +# ### END LIBTOOL TAG CONFIG: $tagname + +__EOF__ + + +else + # If there is no Makefile yet, we rely on a make rule to execute + # `config.status --recheck' to rerun these tests and create the + # libtool script then. + ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` + if test -f "$ltmain_in"; then + test -f Makefile && make "$ltmain" + fi +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 + +CC=$lt_save_CC +LDCXX=$LD +LD=$lt_save_LD +GCC=$lt_save_GCC +with_gnu_ldcxx=$with_gnu_ld +with_gnu_ld=$lt_save_with_gnu_ld +lt_cv_path_LDCXX=$lt_cv_path_LD +lt_cv_path_LD=$lt_save_path_LD +lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld +lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld + + else + tagname="" + fi + ;; + + F77) + if test -n "$F77" && test "X$F77" != "Xno"; then + +ac_ext=f +ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' +ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f77_compiler_gnu + + +archive_cmds_need_lc_F77=no +allow_undefined_flag_F77= +always_export_symbols_F77=no +archive_expsym_cmds_F77= +export_dynamic_flag_spec_F77= +hardcode_direct_F77=no +hardcode_libdir_flag_spec_F77= +hardcode_libdir_flag_spec_ld_F77= +hardcode_libdir_separator_F77= +hardcode_minus_L_F77=no +hardcode_automatic_F77=no +module_cmds_F77= +module_expsym_cmds_F77= +link_all_deplibs_F77=unknown +old_archive_cmds_F77=$old_archive_cmds +no_undefined_flag_F77= +whole_archive_flag_spec_F77= +enable_shared_with_static_runtimes_F77=no + +# Source file extension for f77 test sources. +ac_ext=f + +# Object file extension for compiled f77 test sources. +objext=o +objext_F77=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code=" subroutine t\n return\n end\n" + +# Code to be used in simple link tests +lt_simple_link_test_code=" program t\n end\n" + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC + + +# save warnings/boilerplate of simple test code +ac_outfile=conftest.$ac_objext +printf "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$rm conftest* + +ac_outfile=conftest.$ac_objext +printf "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$rm conftest* + + +# Allow CC to be a program name with arguments. +lt_save_CC="$CC" +CC=${F77-"f77"} +compiler=$CC +compiler_F77=$CC +for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + + +echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 +echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6 +echo "$as_me:$LINENO: result: $can_build_shared" >&5 +echo "${ECHO_T}$can_build_shared" >&6 + +echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 +echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6 +test "$can_build_shared" = "no" && enable_shared=no + +# On AIX, shared libraries and static libraries use the same namespace, and +# are all built from PIC. +case $host_os in +aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; +aix4* | aix5*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; +esac +echo "$as_me:$LINENO: result: $enable_shared" >&5 +echo "${ECHO_T}$enable_shared" >&6 + +echo "$as_me:$LINENO: checking whether to build static libraries" >&5 +echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6 +# Make sure either enable_shared or enable_static is yes. +test "$enable_shared" = yes || enable_static=yes +echo "$as_me:$LINENO: result: $enable_static" >&5 +echo "${ECHO_T}$enable_static" >&6 + +GCC_F77="$G77" +LD_F77="$LD" + +lt_prog_compiler_wl_F77= +lt_prog_compiler_pic_F77= +lt_prog_compiler_static_F77= + +echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 +echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 + + if test "$GCC" = yes; then + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_static_F77='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static_F77='-Bstatic' + fi + ;; + + amigaos*) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + lt_prog_compiler_pic_F77='-m68020 -resident32 -malways-restore-a4' + ;; + + beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + + mingw* | pw32* | os2*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic_F77='-DDLL_EXPORT' + ;; + + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic_F77='-fno-common' + ;; + + interix3*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + + msdosdjgpp*) + # Just because we use GCC doesn't mean we suddenly get shared libraries + # on systems that don't support them. + lt_prog_compiler_can_build_shared_F77=no + enable_shared=no + ;; + + sysv4*MP*) + if test -d /usr/nec; then + lt_prog_compiler_pic_F77=-Kconform_pic + fi + ;; + + hpux*) + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic_F77='-fPIC' + ;; + esac + ;; + + *) + lt_prog_compiler_pic_F77='-fPIC' + ;; + esac + else + # PORTME Check for flag to pass linker flags through the system compiler. + case $host_os in + aix*) + lt_prog_compiler_wl_F77='-Wl,' + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static_F77='-Bstatic' + else + lt_prog_compiler_static_F77='-bnso -bI:/lib/syscalls.exp' + fi + ;; + darwin*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + case $cc_basename in + xlc*) + lt_prog_compiler_pic_F77='-qnocommon' + lt_prog_compiler_wl_F77='-Wl,' + ;; + esac + ;; + + mingw* | pw32* | os2*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic_F77='-DDLL_EXPORT' + ;; + + hpux9* | hpux10* | hpux11*) + lt_prog_compiler_wl_F77='-Wl,' + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic_F77='+Z' + ;; + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? + lt_prog_compiler_static_F77='${wl}-a ${wl}archive' + ;; + + irix5* | irix6* | nonstopux*) + lt_prog_compiler_wl_F77='-Wl,' + # PIC (with -KPIC) is the default. + lt_prog_compiler_static_F77='-non_shared' + ;; + + newsos6) + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-Bstatic' + ;; + + linux*) + case $cc_basename in + icc* | ecc*) + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-static' + ;; + pgcc* | pgf77* | pgf90* | pgf95*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_pic_F77='-fpic' + lt_prog_compiler_static_F77='-Bstatic' + ;; + ccc*) + lt_prog_compiler_wl_F77='-Wl,' + # All Alpha code is PIC. + lt_prog_compiler_static_F77='-non_shared' + ;; + esac + ;; + + osf3* | osf4* | osf5*) + lt_prog_compiler_wl_F77='-Wl,' + # All OSF/1 code is PIC. + lt_prog_compiler_static_F77='-non_shared' + ;; + + solaris*) + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-Bstatic' + case $cc_basename in + f77* | f90* | f95*) + lt_prog_compiler_wl_F77='-Qoption ld ';; + *) + lt_prog_compiler_wl_F77='-Wl,';; + esac + ;; + + sunos4*) + lt_prog_compiler_wl_F77='-Qoption ld ' + lt_prog_compiler_pic_F77='-PIC' + lt_prog_compiler_static_F77='-Bstatic' + ;; + + sysv4 | sysv4.2uw2* | sysv4.3*) + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-Bstatic' + ;; + + sysv4*MP*) + if test -d /usr/nec ;then + lt_prog_compiler_pic_F77='-Kconform_pic' + lt_prog_compiler_static_F77='-Bstatic' + fi + ;; + + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-Bstatic' + ;; + + unicos*) + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_can_build_shared_F77=no + ;; + + uts4*) + lt_prog_compiler_pic_F77='-pic' + lt_prog_compiler_static_F77='-Bstatic' + ;; + + *) + lt_prog_compiler_can_build_shared_F77=no + ;; + esac + fi + +echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_F77" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_F77" >&6 + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$lt_prog_compiler_pic_F77"; then + +echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works" >&5 +echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works... $ECHO_C" >&6 +if test "${lt_prog_compiler_pic_works_F77+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_prog_compiler_pic_works_F77=no + ac_outfile=conftest.$ac_objext + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$lt_prog_compiler_pic_F77" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:13391: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:13395: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_prog_compiler_pic_works_F77=yes + fi + fi + $rm conftest* + +fi +echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_F77" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_works_F77" >&6 + +if test x"$lt_prog_compiler_pic_works_F77" = xyes; then + case $lt_prog_compiler_pic_F77 in + "" | " "*) ;; + *) lt_prog_compiler_pic_F77=" $lt_prog_compiler_pic_F77" ;; + esac +else + lt_prog_compiler_pic_F77= + lt_prog_compiler_can_build_shared_F77=no +fi + +fi +case $host_os in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + lt_prog_compiler_pic_F77= + ;; + *) + lt_prog_compiler_pic_F77="$lt_prog_compiler_pic_F77" + ;; +esac + +# +# Check to make sure the static flag actually works. +# +wl=$lt_prog_compiler_wl_F77 eval lt_tmp_static_flag=\"$lt_prog_compiler_static_F77\" +echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6 +if test "${lt_prog_compiler_static_works_F77+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_prog_compiler_static_works_F77=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $lt_tmp_static_flag" + printf "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&5 + $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_prog_compiler_static_works_F77=yes + fi + else + lt_prog_compiler_static_works_F77=yes + fi + fi + $rm conftest* + LDFLAGS="$save_LDFLAGS" + +fi +echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_F77" >&5 +echo "${ECHO_T}$lt_prog_compiler_static_works_F77" >&6 + +if test x"$lt_prog_compiler_static_works_F77" = xyes; then + : +else + lt_prog_compiler_static_F77= +fi + + +echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 +echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 +if test "${lt_cv_prog_compiler_c_o_F77+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_prog_compiler_c_o_F77=no + $rm -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:13495: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:13499: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + lt_cv_prog_compiler_c_o_F77=yes + fi + fi + chmod u+w . 2>&5 + $rm conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files + $rm out/* && rmdir out + cd .. + rmdir conftest + $rm conftest* + +fi +echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_F77" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_c_o_F77" >&6 + + +hard_links="nottested" +if test "$lt_cv_prog_compiler_c_o_F77" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 +echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6 + hard_links=yes + $rm conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + echo "$as_me:$LINENO: result: $hard_links" >&5 +echo "${ECHO_T}$hard_links" >&6 + if test "$hard_links" = no; then + { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 +echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} + need_locks=warn + fi +else + need_locks=no +fi + +echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 + + runpath_var= + allow_undefined_flag_F77= + enable_shared_with_static_runtimes_F77=no + archive_cmds_F77= + archive_expsym_cmds_F77= + old_archive_From_new_cmds_F77= + old_archive_from_expsyms_cmds_F77= + export_dynamic_flag_spec_F77= + whole_archive_flag_spec_F77= + thread_safe_flag_spec_F77= + hardcode_libdir_flag_spec_F77= + hardcode_libdir_flag_spec_ld_F77= + hardcode_libdir_separator_F77= + hardcode_direct_F77=no + hardcode_minus_L_F77=no + hardcode_shlibpath_var_F77=unsupported + link_all_deplibs_F77=unknown + hardcode_automatic_F77=no + module_cmds_F77= + module_expsym_cmds_F77= + always_export_symbols_F77=no + export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + # include_expsyms should be a list of space-separated symbols to be *always* + # included in the symbol list + include_expsyms_F77= + # exclude_expsyms can be an extended regexp of symbols to exclude + # it will be wrapped by ` (' and `)$', so one must not match beginning or + # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', + # as well as any symbol that contains `d'. + exclude_expsyms_F77="_GLOBAL_OFFSET_TABLE_" + # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out + # platforms (ab)use it in PIC code, but their linkers get confused if + # the symbol is explicitly referenced. Since portable code cannot + # rely on this symbol name, it's probably fine to never include it in + # preloaded symbol tables. + extract_expsyms_cmds= + # Just being paranoid about ensuring that cc_basename is set. + for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + + case $host_os in + cygwin* | mingw* | pw32*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + if test "$GCC" != yes; then + with_gnu_ld=no + fi + ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++) + with_gnu_ld=yes + ;; + openbsd*) + with_gnu_ld=no + ;; + esac + + ld_shlibs_F77=yes + if test "$with_gnu_ld" = yes; then + # If archive_cmds runs LD, not CC, wlarc should be empty + wlarc='${wl}' + + # Set some defaults for GNU ld with shared library support. These + # are reset later if shared libraries are not supported. Putting them + # here allows them to be overridden if necessary. + runpath_var=LD_RUN_PATH + hardcode_libdir_flag_spec_F77='${wl}--rpath ${wl}$libdir' + export_dynamic_flag_spec_F77='${wl}--export-dynamic' + # ancient GNU ld didn't support --whole-archive et. al. + if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then + whole_archive_flag_spec_F77="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + whole_archive_flag_spec_F77= + fi + supports_anon_versioning=no + case `$LD -v 2>/dev/null` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 + *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... + *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... + *\ 2.11.*) ;; # other 2.11 versions + *) supports_anon_versioning=yes ;; + esac + + # See if GNU ld supports shared libraries. + case $host_os in + aix3* | aix4* | aix5*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + ld_shlibs_F77=no + cat <&2 + +*** Warning: the GNU linker, at least up to release 2.9.1, is reported +*** to be unable to reliably create shared libraries on AIX. +*** Therefore, libtool is disabling shared libraries support. If you +*** really care for shared libraries, you may want to modify your PATH +*** so that a non-GNU linker is found, and then restart. + +EOF + fi + ;; + + amigaos*) + archive_cmds_F77='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_minus_L_F77=yes + + # Samuel A. Falvo II reports + # that the semantics of dynamic libraries on AmigaOS, at least up + # to version 4, is to share data among multiple programs linked + # with the same dynamic library. Since this doesn't match the + # behavior of shared libraries on other platforms, we can't use + # them. + ld_shlibs_F77=no + ;; + + beos*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + allow_undefined_flag_F77=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + archive_cmds_F77='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + ld_shlibs_F77=no + fi + ;; + + cygwin* | mingw* | pw32*) + # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, F77) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec_F77='-L$libdir' + allow_undefined_flag_F77=unsupported + always_export_symbols_F77=no + enable_shared_with_static_runtimes_F77=yes + export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' + + if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then + archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + archive_expsym_cmds_F77='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + ld_shlibs_F77=no + fi + ;; + + interix3*) + hardcode_direct_F77=no + hardcode_shlibpath_var_F77=no + hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' + export_dynamic_flag_spec_F77='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + archive_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + archive_expsym_cmds_F77='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + + linux*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + tmp_addflag= + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler + whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag' + ;; + pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers + whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag -Mnomain' ;; + ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 + tmp_addflag=' -i_dynamic' ;; + efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 + tmp_addflag=' -i_dynamic -nofor_main' ;; + ifc* | ifort*) # Intel Fortran compiler + tmp_addflag=' -nofor_main' ;; + esac + archive_cmds_F77='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + + if test $supports_anon_versioning = yes; then + archive_expsym_cmds_F77='$echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + $echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi + link_all_deplibs_F77=no + else + ld_shlibs_F77=no + fi + ;; + + netbsd* | netbsdelf*-gnu | knetbsd*-gnu) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + archive_cmds_F77='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else + archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + fi + ;; + + solaris*) + if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then + ld_shlibs_F77=no + cat <&2 + +*** Warning: The releases 2.8.* of the GNU linker cannot reliably +*** create shared libraries on Solaris systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.9.1 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +EOF + elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs_F77=no + fi + ;; + + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) + ld_shlibs_F77=no + cat <<_LT_EOF 1>&2 + +*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not +*** reliably create shared libraries on SCO systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.16.91.0.3 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + ;; + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + hardcode_libdir_flag_spec_F77='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' + archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' + archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' + else + ld_shlibs_F77=no + fi + ;; + esac + ;; + + sunos4*) + archive_cmds_F77='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' + wlarc= + hardcode_direct_F77=yes + hardcode_shlibpath_var_F77=no + ;; + + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs_F77=no + fi + ;; + esac + + if test "$ld_shlibs_F77" = no; then + runpath_var= + hardcode_libdir_flag_spec_F77= + export_dynamic_flag_spec_F77= + whole_archive_flag_spec_F77= + fi + else + # PORTME fill in a description of your system's linker (not GNU ld) + case $host_os in + aix3*) + allow_undefined_flag_F77=unsupported + always_export_symbols_F77=yes + archive_expsym_cmds_F77='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' + # Note: this linker hardcodes the directories in LIBPATH if there + # are no directories specified by -L. + hardcode_minus_L_F77=yes + if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then + # Neither direct hardcoding nor static linking is supported with a + # broken collect2. + hardcode_direct_F77=unsupported + fi + ;; + + aix4* | aix5*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + if $NM -V 2>&1 | grep 'GNU' > /dev/null; then + export_symbols_cmds_F77='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' + else + export_symbols_cmds_F77='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' + fi + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[23]|aix4.[23].*|aix5*) + for ld_flag in $LDFLAGS; do + if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then + aix_use_runtimelinking=yes + break + fi + done + ;; + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + archive_cmds_F77='' + hardcode_direct_F77=yes + hardcode_libdir_separator_F77=':' + link_all_deplibs_F77=yes + + if test "$GCC" = yes; then + case $host_os in aix4.[012]|aix4.[012].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && \ + strings "$collect2name" | grep resolve_lib_name >/dev/null + then + # We have reworked collect2 + hardcode_direct_F77=yes + else + # We have old collect2 + hardcode_direct_F77=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + hardcode_minus_L_F77=yes + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_libdir_separator_F77= + fi + ;; + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + always_export_symbols_F77=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + allow_undefined_flag_F77='-berok' + # Determine the default libpath from the value encoded in an empty executable. + cat >conftest.$ac_ext <<_ACEOF + program main + + end +_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_f77_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 + +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'`; 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_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath" + archive_expsym_cmds_F77="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + hardcode_libdir_flag_spec_F77='${wl}-R $libdir:/usr/lib:/lib' + allow_undefined_flag_F77="-z nodefs" + archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an empty executable. + cat >conftest.$ac_ext <<_ACEOF + program main + + end +_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_f77_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 + +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'`; 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_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + no_undefined_flag_F77=' ${wl}-bernotok' + allow_undefined_flag_F77=' ${wl}-berok' + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec_F77='$convenience' + archive_cmds_need_lc_F77=yes + # This is similar to how AIX traditionally builds its shared libraries. + archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + + amigaos*) + archive_cmds_F77='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_minus_L_F77=yes + # see comment about different semantics on the GNU ld section + ld_shlibs_F77=no + ;; + + bsdi[45]*) + export_dynamic_flag_spec_F77=-rdynamic + ;; + + cygwin* | mingw* | pw32*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + hardcode_libdir_flag_spec_F77=' ' + allow_undefined_flag_F77=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds_F77='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + old_archive_From_new_cmds_F77='true' + # FIXME: Should let the user specify the lib program. + old_archive_cmds_F77='lib /OUT:$oldlib$oldobjs$old_deplibs' + fix_srcfile_path_F77='`cygpath -w "$srcfile"`' + enable_shared_with_static_runtimes_F77=yes + ;; + + darwin* | rhapsody*) + case $host_os in + rhapsody* | darwin1.[012]) + allow_undefined_flag_F77='${wl}-undefined ${wl}suppress' + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[012]) + allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + ;; + 10.*) + allow_undefined_flag_F77='${wl}-undefined ${wl}dynamic_lookup' + ;; + esac + fi + ;; + esac + archive_cmds_need_lc_F77=no + hardcode_direct_F77=no + hardcode_automatic_F77=yes + hardcode_shlibpath_var_F77=unsupported + whole_archive_flag_spec_F77='' + link_all_deplibs_F77=yes + if test "$GCC" = yes ; then + output_verbose_link_cmd='echo' + archive_cmds_F77='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + case $cc_basename in + xlc*) + output_verbose_link_cmd='echo' + archive_cmds_F77='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' + module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + ;; + *) + ld_shlibs_F77=no + ;; + esac + fi + ;; + + dgux*) + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_shlibpath_var_F77=no + ;; + + freebsd1*) + ld_shlibs_F77=no + ;; + + # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor + # support. Future versions do this automatically, but an explicit c++rt0.o + # does not break anything, and helps significantly (at the cost of a little + # extra space). + freebsd2.2*) + archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' + hardcode_libdir_flag_spec_F77='-R$libdir' + hardcode_direct_F77=yes + hardcode_shlibpath_var_F77=no + ;; + + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + freebsd2*) + archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_F77=yes + hardcode_minus_L_F77=yes + hardcode_shlibpath_var_F77=no + ;; + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | dragonfly*) + archive_cmds_F77='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec_F77='-R$libdir' + hardcode_direct_F77=yes + hardcode_shlibpath_var_F77=no + ;; + + # GNU/kFreeBSD uses gcc -shared to do shared libraries. + kfreebsd*-gnu) + archive_cmds_F77='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec_F77='-R$libdir' + hardcode_direct_F77=yes + hardcode_shlibpath_var_F77=no + link_all_deplibs_F77=no + ;; + + hpux9*) + if test "$GCC" = yes; then + archive_cmds_F77='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + archive_cmds_F77='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + fi + hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_F77=: + hardcode_direct_F77=yes + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L_F77=yes + export_dynamic_flag_spec_F77='${wl}-E' + ;; + + hpux10*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_F77='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + fi + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_F77=: + + hardcode_direct_F77=yes + export_dynamic_flag_spec_F77='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L_F77=yes + fi + ;; + + hpux11*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + case $host_cpu in + hppa*64*) + archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + else + case $host_cpu in + hppa*64*) + archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + fi + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_F77=: + + case $host_cpu in + hppa*64*|ia64*) + hardcode_libdir_flag_spec_ld_F77='+b $libdir' + hardcode_direct_F77=no + hardcode_shlibpath_var_F77=no + ;; + *) + hardcode_direct_F77=yes + export_dynamic_flag_spec_F77='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L_F77=yes + ;; + esac + fi + ;; + + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then + archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + archive_cmds_F77='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec_ld_F77='-rpath $libdir' + fi + hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_F77=: + link_all_deplibs_F77=yes + ;; + + netbsd* | netbsdelf*-gnu | knetbsd*-gnu) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else + archive_cmds_F77='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi + hardcode_libdir_flag_spec_F77='-R$libdir' + hardcode_direct_F77=yes + hardcode_shlibpath_var_F77=no + ;; + + newsos6) + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_F77=yes + hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_F77=: + hardcode_shlibpath_var_F77=no + ;; + + openbsd*) + hardcode_direct_F77=yes + hardcode_shlibpath_var_F77=no + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' + hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' + export_dynamic_flag_spec_F77='${wl}-E' + else + case $host_os in + openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) + archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec_F77='-R$libdir' + ;; + *) + archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' + ;; + esac + fi + ;; + + os2*) + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_minus_L_F77=yes + allow_undefined_flag_F77=unsupported + archive_cmds_F77='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' + old_archive_From_new_cmds_F77='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + ;; + + osf3*) + if test "$GCC" = yes; then + allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + allow_undefined_flag_F77=' -expect_unresolved \*' + archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + fi + hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_F77=: + ;; + + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' + else + allow_undefined_flag_F77=' -expect_unresolved \*' + archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds_F77='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ + $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' + + # Both c and cxx compiler support -rpath directly + hardcode_libdir_flag_spec_F77='-rpath $libdir' + fi + hardcode_libdir_separator_F77=: + ;; + + solaris*) + no_undefined_flag_F77=' -z text' + if test "$GCC" = yes; then + wlarc='${wl}' + archive_cmds_F77='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_F77='$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' + else + wlarc='' + archive_cmds_F77='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' + fi + hardcode_libdir_flag_spec_F77='-R$libdir' + hardcode_shlibpath_var_F77=no + case $host_os in + solaris2.[0-5] | solaris2.[0-5].*) ;; + *) + # The compiler driver will combine linker options so we + # cannot just pass the convience library names through + # without $wl, iff we do not link with $LD. + # Luckily, gcc supports the same syntax we need for Sun Studio. + # Supported since Solaris 2.6 (maybe 2.5.1?) + case $wlarc in + '') + whole_archive_flag_spec_F77='-z allextract$convenience -z defaultextract' ;; + *) + whole_archive_flag_spec_F77='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; + esac ;; + esac + link_all_deplibs_F77=yes + ;; + + sunos4*) + if test "x$host_vendor" = xsequent; then + # Use $CC to link under sequent, because it throws in some extra .o + # files that make .init and .fini sections work. + archive_cmds_F77='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_F77='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' + fi + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_direct_F77=yes + hardcode_minus_L_F77=yes + hardcode_shlibpath_var_F77=no + ;; + + sysv4) + case $host_vendor in + sni) + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_F77=yes # is this really true??? + ;; + siemens) + ## LD is ld it makes a PLAMLIB + ## CC just makes a GrossModule. + archive_cmds_F77='$LD -G -o $lib $libobjs $deplibs $linker_flags' + reload_cmds_F77='$CC -r -o $output$reload_objs' + hardcode_direct_F77=no + ;; + motorola) + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_F77=no #Motorola manual says yes, but my tests say they lie + ;; + esac + runpath_var='LD_RUN_PATH' + hardcode_shlibpath_var_F77=no + ;; + + sysv4.3*) + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var_F77=no + export_dynamic_flag_spec_F77='-Bexport' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var_F77=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + ld_shlibs_F77=yes + fi + ;; + + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*) + no_undefined_flag_F77='${wl}-z,text' + archive_cmds_need_lc_F77=no + hardcode_shlibpath_var_F77=no + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + archive_cmds_F77='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_F77='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_F77='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + no_undefined_flag_F77='${wl}-z,text' + allow_undefined_flag_F77='${wl}-z,nodefs' + archive_cmds_need_lc_F77=no + hardcode_shlibpath_var_F77=no + hardcode_libdir_flag_spec_F77='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' + hardcode_libdir_separator_F77=':' + link_all_deplibs_F77=yes + export_dynamic_flag_spec_F77='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + archive_cmds_F77='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_F77='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_F77='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + uts4*) + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_shlibpath_var_F77=no + ;; + + *) + ld_shlibs_F77=no + ;; + esac + fi + +echo "$as_me:$LINENO: result: $ld_shlibs_F77" >&5 +echo "${ECHO_T}$ld_shlibs_F77" >&6 +test "$ld_shlibs_F77" = no && can_build_shared=no + +# +# Do we need to explicitly link libc? +# +case "x$archive_cmds_need_lc_F77" in +x|xyes) + # Assume -lc should be added + archive_cmds_need_lc_F77=yes + + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $archive_cmds_F77 in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 +echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6 + $rm conftest* + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + + 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); } 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_prog_compiler_wl_F77 + pic_flag=$lt_prog_compiler_pic_F77 + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag_F77 + allow_undefined_flag_F77= + if { (eval echo "$as_me:$LINENO: \"$archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 + (eval $archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + then + archive_cmds_need_lc_F77=no + else + archive_cmds_need_lc_F77=yes + fi + allow_undefined_flag_F77=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $rm conftest* + echo "$as_me:$LINENO: result: $archive_cmds_need_lc_F77" >&5 +echo "${ECHO_T}$archive_cmds_need_lc_F77" >&6 + ;; + esac + fi + ;; +esac + +echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 +echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6 +library_names_spec= +libname_spec='lib$name' +soname_spec= +shrext_cmds=".so" +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" +if test "$GCC" = yes; then + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then + # if the path contains ";" then we assume it to be the separator + # otherwise default to the standard path separator (i.e. ":") - it is + # assumed that no part of a normal pathname contains ";" but that should + # okay in the real world where ";" in dirpaths is itself problematic. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi +else + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" +fi +need_lib_prefix=unknown +hardcode_into_libs=no + +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown + +case $host_os in +aix3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + shlibpath_var=LIBPATH + + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='${libname}${release}${shared_ext}$major' + ;; + +aix4* | aix5*) + version_type=linux + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test "$host_cpu" = ia64; then + # AIX 5 supports IA64 + library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + else + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line `#! .'. This would cause the generated library to + # depend on `.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[01] | aix4.[01].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + if test "$aix_use_runtimelinking" = yes; then + # If using run time linking (on AIX 4.2 or later) use lib.so + # instead of lib.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + else + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='${libname}${release}.a $libname.a' + soname_spec='${libname}${release}${shared_ext}$major' + fi + shlibpath_var=LIBPATH + fi + ;; + +amigaos*) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; + +beos*) + library_names_spec='${libname}${shared_ext}' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; + +bsdi[45]*) + version_type=linux + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; + +cygwin* | mingw* | pw32*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$host_os in + yes,cygwin* | yes,mingw* | yes,pw32*) + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $rm \$dlpath' + shlibpath_overrides_runpath=yes + + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" + ;; + mingw*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH printed by + # mingw gcc, but we are running on Cygwin. Gcc prints its search + # path with ; separators, and with drive letters. We can handle the + # drive letters (cygwin fileutils understands them), so leave them, + # especially as we might pass files found there to a mingw objdump, + # which wouldn't understand a cygwinified path. Ahh. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + ;; + esac + ;; + + *) + library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + ;; + esac + dynamic_linker='Win32 ld.exe' + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; + +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' + # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. + if test "$GCC" = yes; then + sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` + else + sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' + fi + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +dgux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +freebsd1*) + dynamic_linker=no + ;; + +kfreebsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='GNU ld.so' + ;; + +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[123]*) objformat=aout ;; + *) objformat=elf ;; + esac + fi + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.[01]* | freebsdelf3.[01]*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ + freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + freebsd*) # from 4.6 on + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + esac + ;; + +gnu*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + ;; + +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case $host_cpu in + ia64*) + shrext_cmds='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + if test "X$HPUX_IA64_MODE" = X32; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + hppa*64*) + shrext_cmds='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext_cmds='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555. + postinstall_cmds='chmod 555 $lib' + ;; + +interix3*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test "$lt_cv_prog_gnu_ld" = yes; then + version_type=linux + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + hardcode_into_libs=yes + ;; + +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; + +# This must be Linux ELF. +linux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + fi + + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; + +netbsdelf*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='NetBSD ld.elf_so' + ;; + +knetbsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='GNU ld.so' + ;; + +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + +newsos6) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +nto-qnx*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +openbsd*) + version_type=sunos + sys_lib_dlsearch_path_spec="/usr/lib" + need_lib_prefix=no + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. + case $host_os in + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; + esac + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + case $host_os in + openbsd2.[89] | openbsd2.[89].*) + shlibpath_overrides_runpath=no + ;; + *) + shlibpath_overrides_runpath=yes + ;; + esac + else + shlibpath_overrides_runpath=yes + fi + ;; + +os2*) + libname_spec='$name' + shrext_cmds=".dll" + need_lib_prefix=no + library_names_spec='$libname${shared_ext} $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; + +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; + +solaris*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; + +sunos4*) + version_type=sunos + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test "$with_gnu_ld" = yes; then + need_lib_prefix=no + fi + need_version=yes + ;; + +sysv4 | sysv4.3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + export_dynamic_flag_spec='${wl}-Blargedynsym' + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; + esac + ;; + +sysv4*MP*) + if test -d /usr/nec ;then + version_type=linux + library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' + soname_spec='$libname${shared_ext}.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + version_type=freebsd-elf + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + if test "$with_gnu_ld" = yes; then + sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' + shlibpath_overrides_runpath=no + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + shlibpath_overrides_runpath=yes + case $host_os in + sco3.2v5*) + sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" + ;; + esac + fi + sys_lib_dlsearch_path_spec='/usr/lib' + ;; + +uts4*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +*) + dynamic_linker=no + ;; +esac +echo "$as_me:$LINENO: result: $dynamic_linker" >&5 +echo "${ECHO_T}$dynamic_linker" >&6 +test "$dynamic_linker" = no && can_build_shared=no + +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi + +echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 +echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 +hardcode_action_F77= +if test -n "$hardcode_libdir_flag_spec_F77" || \ + test -n "$runpath_var_F77" || \ + test "X$hardcode_automatic_F77" = "Xyes" ; then + + # We can hardcode non-existant directories. + if test "$hardcode_direct_F77" != no && + # If the only mechanism to avoid hardcoding is shlibpath_var, we + # have to relink, otherwise we might link with an installed library + # when we should be linking with a yet-to-be-installed one + ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, F77)" != no && + test "$hardcode_minus_L_F77" != no; then + # Linking always hardcodes the temporary library directory. + hardcode_action_F77=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + hardcode_action_F77=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + hardcode_action_F77=unsupported +fi +echo "$as_me:$LINENO: result: $hardcode_action_F77" >&5 +echo "${ECHO_T}$hardcode_action_F77" >&6 + +if test "$hardcode_action_F77" = relink; then + # Fast installation is not supported + enable_fast_install=no +elif test "$shlibpath_overrides_runpath" = yes || + test "$enable_shared" = no; then + # Fast installation is not necessary + enable_fast_install=needless +fi + + +# The else clause should only fire when bootstrapping the +# libtool distribution, otherwise you forgot to ship ltmain.sh +# with your package, and you will get complaints that there are +# no rules to generate ltmain.sh. +if test -f "$ltmain"; then + # See if we are running on zsh, and set the options which allow our commands through + # without removal of \ escapes. + if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST + fi + # Now quote all the things that may contain metacharacters while being + # careful not to overquote the AC_SUBSTed values. We take copies of the + # variables and quote the copies for generation of the libtool script. + for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ + SED SHELL STRIP \ + libname_spec library_names_spec soname_spec extract_expsyms_cmds \ + old_striplib striplib file_magic_cmd finish_cmds finish_eval \ + deplibs_check_method reload_flag reload_cmds need_locks \ + lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ + lt_cv_sys_global_symbol_to_c_name_address \ + sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ + old_postinstall_cmds old_postuninstall_cmds \ + compiler_F77 \ + CC_F77 \ + LD_F77 \ + lt_prog_compiler_wl_F77 \ + lt_prog_compiler_pic_F77 \ + lt_prog_compiler_static_F77 \ + lt_prog_compiler_no_builtin_flag_F77 \ + export_dynamic_flag_spec_F77 \ + thread_safe_flag_spec_F77 \ + whole_archive_flag_spec_F77 \ + enable_shared_with_static_runtimes_F77 \ + old_archive_cmds_F77 \ + old_archive_from_new_cmds_F77 \ + predep_objects_F77 \ + postdep_objects_F77 \ + predeps_F77 \ + postdeps_F77 \ + compiler_lib_search_path_F77 \ + archive_cmds_F77 \ + archive_expsym_cmds_F77 \ + postinstall_cmds_F77 \ + postuninstall_cmds_F77 \ + old_archive_from_expsyms_cmds_F77 \ + allow_undefined_flag_F77 \ + no_undefined_flag_F77 \ + export_symbols_cmds_F77 \ + hardcode_libdir_flag_spec_F77 \ + hardcode_libdir_flag_spec_ld_F77 \ + hardcode_libdir_separator_F77 \ + hardcode_automatic_F77 \ + module_cmds_F77 \ + module_expsym_cmds_F77 \ + lt_cv_prog_compiler_c_o_F77 \ + exclude_expsyms_F77 \ + include_expsyms_F77; do + + case $var in + old_archive_cmds_F77 | \ + old_archive_from_new_cmds_F77 | \ + archive_cmds_F77 | \ + archive_expsym_cmds_F77 | \ + module_cmds_F77 | \ + module_expsym_cmds_F77 | \ + old_archive_from_expsyms_cmds_F77 | \ + export_symbols_cmds_F77 | \ + extract_expsyms_cmds | reload_cmds | finish_cmds | \ + postinstall_cmds | postuninstall_cmds | \ + old_postinstall_cmds | old_postuninstall_cmds | \ + sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) + # Double-quote double-evaled strings. + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" + ;; + *) + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" + ;; + esac + done + + case $lt_echo in + *'\$0 --fallback-echo"') + lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` + ;; + esac + +cfgfile="$ofile" + + cat <<__EOF__ >> "$cfgfile" +# ### BEGIN LIBTOOL TAG CONFIG: $tagname + +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: + +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + +# Whether or not to build static libraries. +build_old_libs=$enable_static + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$archive_cmds_need_lc_F77 + +# Whether or not to disallow shared libs when runtime libs are static +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_F77 + +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install + +# The host system. +host_alias=$host_alias +host=$host +host_os=$host_os + +# The build system. +build_alias=$build_alias +build=$build +build_os=$build_os + +# An echo program that does not interpret backslashes. +echo=$lt_echo + +# The archiver. +AR=$lt_AR +AR_FLAGS=$lt_AR_FLAGS + +# A C compiler. +LTCC=$lt_LTCC + +# LTCC compiler flags. +LTCFLAGS=$lt_LTCFLAGS + +# A language-specific compiler. +CC=$lt_compiler_F77 + +# Is the compiler the GNU C compiler? +with_gcc=$GCC_F77 + +# An ERE matcher. +EGREP=$lt_EGREP + +# The linker used to build libraries. +LD=$lt_LD_F77 + +# Whether we need hard or soft links. +LN_S=$lt_LN_S + +# A BSD-compatible nm program. +NM=$lt_NM + +# A symbol stripping program +STRIP=$lt_STRIP + +# Used to examine libraries when file_magic_cmd begins "file" +MAGIC_CMD=$MAGIC_CMD + +# 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=$objdir + +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds + +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl_F77 + +# Object file suffix (normally "o"). +objext="$ac_objext" + +# Old archive suffix (normally "a"). +libext="$libext" + +# Shared library suffix (normally ".so"). +shrext_cmds='$shrext_cmds' + +# Executable file suffix (normally ""). +exeext="$exeext" + +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic_F77 +pic_mode=$pic_mode + +# What is the maximum length of a command? +max_cmd_len=$lt_cv_sys_max_cmd_len + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o_F77 + +# Must we lock files when doing compilation? +need_locks=$lt_need_locks + +# Do we need the lib prefix for modules? +need_lib_prefix=$need_lib_prefix + +# Do we need a version for libraries? +need_version=$need_version + +# Whether dlopen is supported. +dlopen_support=$enable_dlopen + +# Whether dlopen of programs is supported. +dlopen_self=$enable_dlopen_self + +# Whether dlopen of statically linked programs is supported. +dlopen_self_static=$enable_dlopen_self_static + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_lt_prog_compiler_static_F77 + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_F77 + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_F77 + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_whole_archive_flag_spec_F77 + +# Compiler flag to generate thread-safe objects. +thread_safe_flag_spec=$lt_thread_safe_flag_spec_F77 + +# Library versioning type. +version_type=$version_type + +# Format of library name prefix. +libname_spec=$lt_libname_spec + +# 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=$lt_library_names_spec + +# The coded name of the library, if different from the real name. +soname_spec=$lt_soname_spec + +# Commands used to build and install an old-style archive. +RANLIB=$lt_RANLIB +old_archive_cmds=$lt_old_archive_cmds_F77 +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_F77 + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_F77 + +# Commands used to build and install a shared archive. +archive_cmds=$lt_archive_cmds_F77 +archive_expsym_cmds=$lt_archive_expsym_cmds_F77 +postinstall_cmds=$lt_postinstall_cmds +postuninstall_cmds=$lt_postuninstall_cmds + +# Commands used to build a loadable module (assumed same as above if empty) +module_cmds=$lt_module_cmds_F77 +module_expsym_cmds=$lt_module_expsym_cmds_F77 + +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib + +# Dependencies to place before the objects being linked to create a +# shared library. +predep_objects=$lt_predep_objects_F77 + +# Dependencies to place after the objects being linked to create a +# shared library. +postdep_objects=$lt_postdep_objects_F77 + +# Dependencies to place before the objects being linked to create a +# shared library. +predeps=$lt_predeps_F77 + +# Dependencies to place after the objects being linked to create a +# shared library. +postdeps=$lt_postdeps_F77 + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=$lt_compiler_lib_search_path_F77 + +# Method to check whether dependent libraries are shared objects. +deplibs_check_method=$lt_deplibs_check_method + +# Command to use when deplibs_check_method == file_magic. +file_magic_cmd=$lt_file_magic_cmd + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag_F77 + +# Flag that forces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag_F77 + +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds + +# Same as above, but a single script fragment to be evaled but not shown. +finish_eval=$lt_finish_eval + +# Take the output of nm and produce a listing of raw symbols and C names. +global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe + +# Transform the output of nm in a proper C declaration +global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl + +# Transform the output of nm in a C name address pair +global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address + +# This is the shared library runtime path variable. +runpath_var=$runpath_var + +# This is the shared library path variable. +shlibpath_var=$shlibpath_var + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath + +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action_F77 + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs + +# Flag to hardcode \$libdir into a binary during linking. +# This must work even if \$libdir does not exist. +hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_F77 + +# 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=$lt_hardcode_libdir_flag_spec_ld_F77 + +# Whether we need a single -rpath flag with a separated argument. +hardcode_libdir_separator=$lt_hardcode_libdir_separator_F77 + +# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the +# resulting binary. +hardcode_direct=$hardcode_direct_F77 + +# Set to yes if using the -LDIR flag during linking hardcodes DIR into the +# resulting binary. +hardcode_minus_L=$hardcode_minus_L_F77 + +# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into +# the resulting binary. +hardcode_shlibpath_var=$hardcode_shlibpath_var_F77 + +# 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=$hardcode_automatic_F77 + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at relink time. +variables_saved_for_relink="$variables_saved_for_relink" + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs_F77 + +# Compile-time system search path for libraries +sys_lib_search_path_spec=$lt_sys_lib_search_path_spec + +# Run-time system search path for libraries +sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec + +# Fix the shell variable \$srcfile for the compiler. +fix_srcfile_path="$fix_srcfile_path_F77" + +# Set to yes if exported symbols are required. +always_export_symbols=$always_export_symbols_F77 + +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds_F77 + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_cmds + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_exclude_expsyms_F77 + +# Symbols that must always be exported. +include_expsyms=$lt_include_expsyms_F77 + +# ### END LIBTOOL TAG CONFIG: $tagname + +__EOF__ + + +else + # If there is no Makefile yet, we rely on a make rule to execute + # `config.status --recheck' to rerun these tests and create the + # libtool script then. + ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` + if test -f "$ltmain_in"; then + test -f Makefile && make "$ltmain" + fi +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 + +CC="$lt_save_CC" + + else + tagname="" + fi + ;; + + GCJ) + if test -n "$GCJ" && test "X$GCJ" != "Xno"; then + + + +# Source file extension for Java test sources. +ac_ext=java + +# Object file extension for compiled Java test sources. +objext=o +objext_GCJ=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="class foo {}\n" + +# Code to be used in simple link tests +lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }\n' + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC + + +# save warnings/boilerplate of simple test code +ac_outfile=conftest.$ac_objext +printf "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$rm conftest* + +ac_outfile=conftest.$ac_objext +printf "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$rm conftest* + + +# Allow CC to be a program name with arguments. +lt_save_CC="$CC" +CC=${GCJ-"gcj"} +compiler=$CC +compiler_GCJ=$CC +for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + + +# GCJ did not exist at the time GCC didn't implicitly link libc in. +archive_cmds_need_lc_GCJ=no + +old_archive_cmds_GCJ=$old_archive_cmds + + +lt_prog_compiler_no_builtin_flag_GCJ= + +if test "$GCC" = yes; then + lt_prog_compiler_no_builtin_flag_GCJ=' -fno-builtin' + + +echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 +echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6 +if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_prog_compiler_rtti_exceptions=no + ac_outfile=conftest.$ac_objext + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="-fno-rtti -fno-exceptions" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:15718: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:15722: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_rtti_exceptions=yes + fi + fi + $rm conftest* + +fi +echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6 + +if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then + lt_prog_compiler_no_builtin_flag_GCJ="$lt_prog_compiler_no_builtin_flag_GCJ -fno-rtti -fno-exceptions" +else + : +fi + +fi + +lt_prog_compiler_wl_GCJ= +lt_prog_compiler_pic_GCJ= +lt_prog_compiler_static_GCJ= + +echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 +echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 + + if test "$GCC" = yes; then + lt_prog_compiler_wl_GCJ='-Wl,' + lt_prog_compiler_static_GCJ='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static_GCJ='-Bstatic' + fi + ;; + + amigaos*) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + lt_prog_compiler_pic_GCJ='-m68020 -resident32 -malways-restore-a4' + ;; + + beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + + mingw* | pw32* | os2*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic_GCJ='-DDLL_EXPORT' + ;; + + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic_GCJ='-fno-common' + ;; + + interix3*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + + msdosdjgpp*) + # Just because we use GCC doesn't mean we suddenly get shared libraries + # on systems that don't support them. + lt_prog_compiler_can_build_shared_GCJ=no + enable_shared=no + ;; + + sysv4*MP*) + if test -d /usr/nec; then + lt_prog_compiler_pic_GCJ=-Kconform_pic + fi + ;; + + hpux*) + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic_GCJ='-fPIC' + ;; + esac + ;; + + *) + lt_prog_compiler_pic_GCJ='-fPIC' + ;; + esac + else + # PORTME Check for flag to pass linker flags through the system compiler. + case $host_os in + aix*) + lt_prog_compiler_wl_GCJ='-Wl,' + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static_GCJ='-Bstatic' + else + lt_prog_compiler_static_GCJ='-bnso -bI:/lib/syscalls.exp' + fi + ;; + darwin*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + case $cc_basename in + xlc*) + lt_prog_compiler_pic_GCJ='-qnocommon' + lt_prog_compiler_wl_GCJ='-Wl,' + ;; + esac + ;; + + mingw* | pw32* | os2*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic_GCJ='-DDLL_EXPORT' + ;; + + hpux9* | hpux10* | hpux11*) + lt_prog_compiler_wl_GCJ='-Wl,' + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic_GCJ='+Z' + ;; + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? + lt_prog_compiler_static_GCJ='${wl}-a ${wl}archive' + ;; + + irix5* | irix6* | nonstopux*) + lt_prog_compiler_wl_GCJ='-Wl,' + # PIC (with -KPIC) is the default. + lt_prog_compiler_static_GCJ='-non_shared' + ;; + + newsos6) + lt_prog_compiler_pic_GCJ='-KPIC' + lt_prog_compiler_static_GCJ='-Bstatic' + ;; + + linux*) + case $cc_basename in + icc* | ecc*) + lt_prog_compiler_wl_GCJ='-Wl,' + lt_prog_compiler_pic_GCJ='-KPIC' + lt_prog_compiler_static_GCJ='-static' + ;; + pgcc* | pgf77* | pgf90* | pgf95*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) + lt_prog_compiler_wl_GCJ='-Wl,' + lt_prog_compiler_pic_GCJ='-fpic' + lt_prog_compiler_static_GCJ='-Bstatic' + ;; + ccc*) + lt_prog_compiler_wl_GCJ='-Wl,' + # All Alpha code is PIC. + lt_prog_compiler_static_GCJ='-non_shared' + ;; + esac + ;; + + osf3* | osf4* | osf5*) + lt_prog_compiler_wl_GCJ='-Wl,' + # All OSF/1 code is PIC. + lt_prog_compiler_static_GCJ='-non_shared' + ;; + + solaris*) + lt_prog_compiler_pic_GCJ='-KPIC' + lt_prog_compiler_static_GCJ='-Bstatic' + case $cc_basename in + f77* | f90* | f95*) + lt_prog_compiler_wl_GCJ='-Qoption ld ';; + *) + lt_prog_compiler_wl_GCJ='-Wl,';; + esac + ;; + + sunos4*) + lt_prog_compiler_wl_GCJ='-Qoption ld ' + lt_prog_compiler_pic_GCJ='-PIC' + lt_prog_compiler_static_GCJ='-Bstatic' + ;; + + sysv4 | sysv4.2uw2* | sysv4.3*) + lt_prog_compiler_wl_GCJ='-Wl,' + lt_prog_compiler_pic_GCJ='-KPIC' + lt_prog_compiler_static_GCJ='-Bstatic' + ;; + + sysv4*MP*) + if test -d /usr/nec ;then + lt_prog_compiler_pic_GCJ='-Kconform_pic' + lt_prog_compiler_static_GCJ='-Bstatic' + fi + ;; + + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + lt_prog_compiler_wl_GCJ='-Wl,' + lt_prog_compiler_pic_GCJ='-KPIC' + lt_prog_compiler_static_GCJ='-Bstatic' + ;; + + unicos*) + lt_prog_compiler_wl_GCJ='-Wl,' + lt_prog_compiler_can_build_shared_GCJ=no + ;; + + uts4*) + lt_prog_compiler_pic_GCJ='-pic' + lt_prog_compiler_static_GCJ='-Bstatic' + ;; + + *) + lt_prog_compiler_can_build_shared_GCJ=no + ;; + esac + fi + +echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_GCJ" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_GCJ" >&6 + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$lt_prog_compiler_pic_GCJ"; then + +echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works" >&5 +echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works... $ECHO_C" >&6 +if test "${lt_prog_compiler_pic_works_GCJ+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_prog_compiler_pic_works_GCJ=no + ac_outfile=conftest.$ac_objext + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$lt_prog_compiler_pic_GCJ" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:15986: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:15990: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_prog_compiler_pic_works_GCJ=yes + fi + fi + $rm conftest* + +fi +echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_GCJ" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_works_GCJ" >&6 + +if test x"$lt_prog_compiler_pic_works_GCJ" = xyes; then + case $lt_prog_compiler_pic_GCJ in + "" | " "*) ;; + *) lt_prog_compiler_pic_GCJ=" $lt_prog_compiler_pic_GCJ" ;; + esac +else + lt_prog_compiler_pic_GCJ= + lt_prog_compiler_can_build_shared_GCJ=no +fi + +fi +case $host_os in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + lt_prog_compiler_pic_GCJ= + ;; + *) + lt_prog_compiler_pic_GCJ="$lt_prog_compiler_pic_GCJ" + ;; +esac + +# +# Check to make sure the static flag actually works. +# +wl=$lt_prog_compiler_wl_GCJ eval lt_tmp_static_flag=\"$lt_prog_compiler_static_GCJ\" +echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6 +if test "${lt_prog_compiler_static_works_GCJ+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_prog_compiler_static_works_GCJ=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $lt_tmp_static_flag" + printf "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&5 + $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_prog_compiler_static_works_GCJ=yes + fi + else + lt_prog_compiler_static_works_GCJ=yes + fi + fi + $rm conftest* + LDFLAGS="$save_LDFLAGS" + +fi +echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_GCJ" >&5 +echo "${ECHO_T}$lt_prog_compiler_static_works_GCJ" >&6 + +if test x"$lt_prog_compiler_static_works_GCJ" = xyes; then + : +else + lt_prog_compiler_static_GCJ= +fi + + +echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 +echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 +if test "${lt_cv_prog_compiler_c_o_GCJ+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_prog_compiler_c_o_GCJ=no + $rm -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:16090: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:16094: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + lt_cv_prog_compiler_c_o_GCJ=yes + fi + fi + chmod u+w . 2>&5 + $rm conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files + $rm out/* && rmdir out + cd .. + rmdir conftest + $rm conftest* + +fi +echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_GCJ" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_c_o_GCJ" >&6 + + +hard_links="nottested" +if test "$lt_cv_prog_compiler_c_o_GCJ" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 +echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6 + hard_links=yes + $rm conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + echo "$as_me:$LINENO: result: $hard_links" >&5 +echo "${ECHO_T}$hard_links" >&6 + if test "$hard_links" = no; then + { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 +echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} + need_locks=warn + fi +else + need_locks=no +fi + +echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 + + runpath_var= + allow_undefined_flag_GCJ= + enable_shared_with_static_runtimes_GCJ=no + archive_cmds_GCJ= + archive_expsym_cmds_GCJ= + old_archive_From_new_cmds_GCJ= + old_archive_from_expsyms_cmds_GCJ= + export_dynamic_flag_spec_GCJ= + whole_archive_flag_spec_GCJ= + thread_safe_flag_spec_GCJ= + hardcode_libdir_flag_spec_GCJ= + hardcode_libdir_flag_spec_ld_GCJ= + hardcode_libdir_separator_GCJ= + hardcode_direct_GCJ=no + hardcode_minus_L_GCJ=no + hardcode_shlibpath_var_GCJ=unsupported + link_all_deplibs_GCJ=unknown + hardcode_automatic_GCJ=no + module_cmds_GCJ= + module_expsym_cmds_GCJ= + always_export_symbols_GCJ=no + export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + # include_expsyms should be a list of space-separated symbols to be *always* + # included in the symbol list + include_expsyms_GCJ= + # exclude_expsyms can be an extended regexp of symbols to exclude + # it will be wrapped by ` (' and `)$', so one must not match beginning or + # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', + # as well as any symbol that contains `d'. + exclude_expsyms_GCJ="_GLOBAL_OFFSET_TABLE_" + # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out + # platforms (ab)use it in PIC code, but their linkers get confused if + # the symbol is explicitly referenced. Since portable code cannot + # rely on this symbol name, it's probably fine to never include it in + # preloaded symbol tables. + extract_expsyms_cmds= + # Just being paranoid about ensuring that cc_basename is set. + for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + + case $host_os in + cygwin* | mingw* | pw32*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + if test "$GCC" != yes; then + with_gnu_ld=no + fi + ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++) + with_gnu_ld=yes + ;; + openbsd*) + with_gnu_ld=no + ;; + esac + + ld_shlibs_GCJ=yes + if test "$with_gnu_ld" = yes; then + # If archive_cmds runs LD, not CC, wlarc should be empty + wlarc='${wl}' + + # Set some defaults for GNU ld with shared library support. These + # are reset later if shared libraries are not supported. Putting them + # here allows them to be overridden if necessary. + runpath_var=LD_RUN_PATH + hardcode_libdir_flag_spec_GCJ='${wl}--rpath ${wl}$libdir' + export_dynamic_flag_spec_GCJ='${wl}--export-dynamic' + # ancient GNU ld didn't support --whole-archive et. al. + if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then + whole_archive_flag_spec_GCJ="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + whole_archive_flag_spec_GCJ= + fi + supports_anon_versioning=no + case `$LD -v 2>/dev/null` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 + *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... + *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... + *\ 2.11.*) ;; # other 2.11 versions + *) supports_anon_versioning=yes ;; + esac + + # See if GNU ld supports shared libraries. + case $host_os in + aix3* | aix4* | aix5*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + ld_shlibs_GCJ=no + cat <&2 + +*** Warning: the GNU linker, at least up to release 2.9.1, is reported +*** to be unable to reliably create shared libraries on AIX. +*** Therefore, libtool is disabling shared libraries support. If you +*** really care for shared libraries, you may want to modify your PATH +*** so that a non-GNU linker is found, and then restart. + +EOF + fi + ;; + + amigaos*) + archive_cmds_GCJ='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec_GCJ='-L$libdir' + hardcode_minus_L_GCJ=yes + + # Samuel A. Falvo II reports + # that the semantics of dynamic libraries on AmigaOS, at least up + # to version 4, is to share data among multiple programs linked + # with the same dynamic library. Since this doesn't match the + # behavior of shared libraries on other platforms, we can't use + # them. + ld_shlibs_GCJ=no + ;; + + beos*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + allow_undefined_flag_GCJ=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + archive_cmds_GCJ='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + ld_shlibs_GCJ=no + fi + ;; + + cygwin* | mingw* | pw32*) + # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, GCJ) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec_GCJ='-L$libdir' + allow_undefined_flag_GCJ=unsupported + always_export_symbols_GCJ=no + enable_shared_with_static_runtimes_GCJ=yes + export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' + + if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then + archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + archive_expsym_cmds_GCJ='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + ld_shlibs_GCJ=no + fi + ;; + + interix3*) + hardcode_direct_GCJ=no + hardcode_shlibpath_var_GCJ=no + hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' + export_dynamic_flag_spec_GCJ='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + archive_cmds_GCJ='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + archive_expsym_cmds_GCJ='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + + linux*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + tmp_addflag= + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler + whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag' + ;; + pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers + whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag -Mnomain' ;; + ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 + tmp_addflag=' -i_dynamic' ;; + efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 + tmp_addflag=' -i_dynamic -nofor_main' ;; + ifc* | ifort*) # Intel Fortran compiler + tmp_addflag=' -nofor_main' ;; + esac + archive_cmds_GCJ='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + + if test $supports_anon_versioning = yes; then + archive_expsym_cmds_GCJ='$echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + $echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi + link_all_deplibs_GCJ=no + else + ld_shlibs_GCJ=no + fi + ;; + + netbsd* | netbsdelf*-gnu | knetbsd*-gnu) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + archive_cmds_GCJ='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else + archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + fi + ;; + + solaris*) + if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then + ld_shlibs_GCJ=no + cat <&2 + +*** Warning: The releases 2.8.* of the GNU linker cannot reliably +*** create shared libraries on Solaris systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.9.1 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +EOF + elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs_GCJ=no + fi + ;; + + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) + ld_shlibs_GCJ=no + cat <<_LT_EOF 1>&2 + +*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not +*** reliably create shared libraries on SCO systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.16.91.0.3 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + ;; + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + hardcode_libdir_flag_spec_GCJ='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' + archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' + archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' + else + ld_shlibs_GCJ=no + fi + ;; + esac + ;; + + sunos4*) + archive_cmds_GCJ='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' + wlarc= + hardcode_direct_GCJ=yes + hardcode_shlibpath_var_GCJ=no + ;; + + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs_GCJ=no + fi + ;; + esac + + if test "$ld_shlibs_GCJ" = no; then + runpath_var= + hardcode_libdir_flag_spec_GCJ= + export_dynamic_flag_spec_GCJ= + whole_archive_flag_spec_GCJ= + fi + else + # PORTME fill in a description of your system's linker (not GNU ld) + case $host_os in + aix3*) + allow_undefined_flag_GCJ=unsupported + always_export_symbols_GCJ=yes + archive_expsym_cmds_GCJ='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' + # Note: this linker hardcodes the directories in LIBPATH if there + # are no directories specified by -L. + hardcode_minus_L_GCJ=yes + if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then + # Neither direct hardcoding nor static linking is supported with a + # broken collect2. + hardcode_direct_GCJ=unsupported + fi + ;; + + aix4* | aix5*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + if $NM -V 2>&1 | grep 'GNU' > /dev/null; then + export_symbols_cmds_GCJ='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' + else + export_symbols_cmds_GCJ='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' + fi + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[23]|aix4.[23].*|aix5*) + for ld_flag in $LDFLAGS; do + if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then + aix_use_runtimelinking=yes + break + fi + done + ;; + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + archive_cmds_GCJ='' + hardcode_direct_GCJ=yes + hardcode_libdir_separator_GCJ=':' + link_all_deplibs_GCJ=yes + + if test "$GCC" = yes; then + case $host_os in aix4.[012]|aix4.[012].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && \ + strings "$collect2name" | grep resolve_lib_name >/dev/null + then + # We have reworked collect2 + hardcode_direct_GCJ=yes + else + # We have old collect2 + hardcode_direct_GCJ=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + hardcode_minus_L_GCJ=yes + hardcode_libdir_flag_spec_GCJ='-L$libdir' + hardcode_libdir_separator_GCJ= + fi + ;; + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + always_export_symbols_GCJ=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + allow_undefined_flag_GCJ='-berok' + # Determine the default libpath from the value encoded in an empty executable. + 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 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 + +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'`; 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_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath" + archive_expsym_cmds_GCJ="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + hardcode_libdir_flag_spec_GCJ='${wl}-R $libdir:/usr/lib:/lib' + allow_undefined_flag_GCJ="-z nodefs" + archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an empty executable. + 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 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 + +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'`; 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_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + no_undefined_flag_GCJ=' ${wl}-bernotok' + allow_undefined_flag_GCJ=' ${wl}-berok' + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec_GCJ='$convenience' + archive_cmds_need_lc_GCJ=yes + # This is similar to how AIX traditionally builds its shared libraries. + archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + + amigaos*) + archive_cmds_GCJ='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec_GCJ='-L$libdir' + hardcode_minus_L_GCJ=yes + # see comment about different semantics on the GNU ld section + ld_shlibs_GCJ=no + ;; + + bsdi[45]*) + export_dynamic_flag_spec_GCJ=-rdynamic + ;; + + cygwin* | mingw* | pw32*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + hardcode_libdir_flag_spec_GCJ=' ' + allow_undefined_flag_GCJ=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds_GCJ='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + old_archive_From_new_cmds_GCJ='true' + # FIXME: Should let the user specify the lib program. + old_archive_cmds_GCJ='lib /OUT:$oldlib$oldobjs$old_deplibs' + fix_srcfile_path_GCJ='`cygpath -w "$srcfile"`' + enable_shared_with_static_runtimes_GCJ=yes + ;; + + darwin* | rhapsody*) + case $host_os in + rhapsody* | darwin1.[012]) + allow_undefined_flag_GCJ='${wl}-undefined ${wl}suppress' + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[012]) + allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + ;; + 10.*) + allow_undefined_flag_GCJ='${wl}-undefined ${wl}dynamic_lookup' + ;; + esac + fi + ;; + esac + archive_cmds_need_lc_GCJ=no + hardcode_direct_GCJ=no + hardcode_automatic_GCJ=yes + hardcode_shlibpath_var_GCJ=unsupported + whole_archive_flag_spec_GCJ='' + link_all_deplibs_GCJ=yes + if test "$GCC" = yes ; then + output_verbose_link_cmd='echo' + archive_cmds_GCJ='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + case $cc_basename in + xlc*) + output_verbose_link_cmd='echo' + archive_cmds_GCJ='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' + module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + ;; + *) + ld_shlibs_GCJ=no + ;; + esac + fi + ;; + + dgux*) + archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec_GCJ='-L$libdir' + hardcode_shlibpath_var_GCJ=no + ;; + + freebsd1*) + ld_shlibs_GCJ=no + ;; + + # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor + # support. Future versions do this automatically, but an explicit c++rt0.o + # does not break anything, and helps significantly (at the cost of a little + # extra space). + freebsd2.2*) + archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' + hardcode_libdir_flag_spec_GCJ='-R$libdir' + hardcode_direct_GCJ=yes + hardcode_shlibpath_var_GCJ=no + ;; + + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + freebsd2*) + archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_GCJ=yes + hardcode_minus_L_GCJ=yes + hardcode_shlibpath_var_GCJ=no + ;; + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | dragonfly*) + archive_cmds_GCJ='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec_GCJ='-R$libdir' + hardcode_direct_GCJ=yes + hardcode_shlibpath_var_GCJ=no + ;; + + # GNU/kFreeBSD uses gcc -shared to do shared libraries. + kfreebsd*-gnu) + archive_cmds_GCJ='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec_GCJ='-R$libdir' + hardcode_direct_GCJ=yes + hardcode_shlibpath_var_GCJ=no + link_all_deplibs_GCJ=no + ;; + + hpux9*) + if test "$GCC" = yes; then + archive_cmds_GCJ='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + archive_cmds_GCJ='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + fi + hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_GCJ=: + hardcode_direct_GCJ=yes + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L_GCJ=yes + export_dynamic_flag_spec_GCJ='${wl}-E' + ;; + + hpux10*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_GCJ='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + fi + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_GCJ=: + + hardcode_direct_GCJ=yes + export_dynamic_flag_spec_GCJ='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L_GCJ=yes + fi + ;; + + hpux11*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + case $host_cpu in + hppa*64*) + archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + else + case $host_cpu in + hppa*64*) + archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + fi + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_GCJ=: + + case $host_cpu in + hppa*64*|ia64*) + hardcode_libdir_flag_spec_ld_GCJ='+b $libdir' + hardcode_direct_GCJ=no + hardcode_shlibpath_var_GCJ=no + ;; + *) + hardcode_direct_GCJ=yes + export_dynamic_flag_spec_GCJ='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L_GCJ=yes + ;; + esac + fi + ;; + + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then + archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + archive_cmds_GCJ='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec_ld_GCJ='-rpath $libdir' + fi + hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_GCJ=: + link_all_deplibs_GCJ=yes + ;; + + netbsd* | netbsdelf*-gnu | knetbsd*-gnu) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else + archive_cmds_GCJ='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi + hardcode_libdir_flag_spec_GCJ='-R$libdir' + hardcode_direct_GCJ=yes + hardcode_shlibpath_var_GCJ=no + ;; + + newsos6) + archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_GCJ=yes + hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_GCJ=: + hardcode_shlibpath_var_GCJ=no + ;; + + openbsd*) + hardcode_direct_GCJ=yes + hardcode_shlibpath_var_GCJ=no + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' + hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' + export_dynamic_flag_spec_GCJ='${wl}-E' + else + case $host_os in + openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) + archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec_GCJ='-R$libdir' + ;; + *) + archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' + ;; + esac + fi + ;; + + os2*) + hardcode_libdir_flag_spec_GCJ='-L$libdir' + hardcode_minus_L_GCJ=yes + allow_undefined_flag_GCJ=unsupported + archive_cmds_GCJ='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' + old_archive_From_new_cmds_GCJ='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + ;; + + osf3*) + if test "$GCC" = yes; then + allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + allow_undefined_flag_GCJ=' -expect_unresolved \*' + archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + fi + hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_GCJ=: + ;; + + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' + else + allow_undefined_flag_GCJ=' -expect_unresolved \*' + archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds_GCJ='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ + $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' + + # Both c and cxx compiler support -rpath directly + hardcode_libdir_flag_spec_GCJ='-rpath $libdir' + fi + hardcode_libdir_separator_GCJ=: + ;; + + solaris*) + no_undefined_flag_GCJ=' -z text' + if test "$GCC" = yes; then + wlarc='${wl}' + archive_cmds_GCJ='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_GCJ='$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' + else + wlarc='' + archive_cmds_GCJ='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' + fi + hardcode_libdir_flag_spec_GCJ='-R$libdir' + hardcode_shlibpath_var_GCJ=no + case $host_os in + solaris2.[0-5] | solaris2.[0-5].*) ;; + *) + # The compiler driver will combine linker options so we + # cannot just pass the convience library names through + # without $wl, iff we do not link with $LD. + # Luckily, gcc supports the same syntax we need for Sun Studio. + # Supported since Solaris 2.6 (maybe 2.5.1?) + case $wlarc in + '') + whole_archive_flag_spec_GCJ='-z allextract$convenience -z defaultextract' ;; + *) + whole_archive_flag_spec_GCJ='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; + esac ;; + esac + link_all_deplibs_GCJ=yes + ;; + + sunos4*) + if test "x$host_vendor" = xsequent; then + # Use $CC to link under sequent, because it throws in some extra .o + # files that make .init and .fini sections work. + archive_cmds_GCJ='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_GCJ='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' + fi + hardcode_libdir_flag_spec_GCJ='-L$libdir' + hardcode_direct_GCJ=yes + hardcode_minus_L_GCJ=yes + hardcode_shlibpath_var_GCJ=no + ;; + + sysv4) + case $host_vendor in + sni) + archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_GCJ=yes # is this really true??? + ;; + siemens) + ## LD is ld it makes a PLAMLIB + ## CC just makes a GrossModule. + archive_cmds_GCJ='$LD -G -o $lib $libobjs $deplibs $linker_flags' + reload_cmds_GCJ='$CC -r -o $output$reload_objs' + hardcode_direct_GCJ=no + ;; + motorola) + archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_GCJ=no #Motorola manual says yes, but my tests say they lie + ;; + esac + runpath_var='LD_RUN_PATH' + hardcode_shlibpath_var_GCJ=no + ;; + + sysv4.3*) + archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var_GCJ=no + export_dynamic_flag_spec_GCJ='-Bexport' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var_GCJ=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + ld_shlibs_GCJ=yes + fi + ;; + + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*) + no_undefined_flag_GCJ='${wl}-z,text' + archive_cmds_need_lc_GCJ=no + hardcode_shlibpath_var_GCJ=no + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + archive_cmds_GCJ='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_GCJ='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_GCJ='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_GCJ='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + no_undefined_flag_GCJ='${wl}-z,text' + allow_undefined_flag_GCJ='${wl}-z,nodefs' + archive_cmds_need_lc_GCJ=no + hardcode_shlibpath_var_GCJ=no + hardcode_libdir_flag_spec_GCJ='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' + hardcode_libdir_separator_GCJ=':' + link_all_deplibs_GCJ=yes + export_dynamic_flag_spec_GCJ='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + archive_cmds_GCJ='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_GCJ='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_GCJ='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_GCJ='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + uts4*) + archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec_GCJ='-L$libdir' + hardcode_shlibpath_var_GCJ=no + ;; + + *) + ld_shlibs_GCJ=no + ;; + esac + fi + +echo "$as_me:$LINENO: result: $ld_shlibs_GCJ" >&5 +echo "${ECHO_T}$ld_shlibs_GCJ" >&6 +test "$ld_shlibs_GCJ" = no && can_build_shared=no + +# +# Do we need to explicitly link libc? +# +case "x$archive_cmds_need_lc_GCJ" in +x|xyes) + # Assume -lc should be added + archive_cmds_need_lc_GCJ=yes + + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $archive_cmds_GCJ in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 +echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6 + $rm conftest* + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + + 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); } 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_prog_compiler_wl_GCJ + pic_flag=$lt_prog_compiler_pic_GCJ + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag_GCJ + allow_undefined_flag_GCJ= + if { (eval echo "$as_me:$LINENO: \"$archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 + (eval $archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + then + archive_cmds_need_lc_GCJ=no + else + archive_cmds_need_lc_GCJ=yes + fi + allow_undefined_flag_GCJ=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $rm conftest* + echo "$as_me:$LINENO: result: $archive_cmds_need_lc_GCJ" >&5 +echo "${ECHO_T}$archive_cmds_need_lc_GCJ" >&6 + ;; + esac + fi + ;; +esac + +echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 +echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6 +library_names_spec= +libname_spec='lib$name' +soname_spec= +shrext_cmds=".so" +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" +if test "$GCC" = yes; then + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then + # if the path contains ";" then we assume it to be the separator + # otherwise default to the standard path separator (i.e. ":") - it is + # assumed that no part of a normal pathname contains ";" but that should + # okay in the real world where ";" in dirpaths is itself problematic. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi +else + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" +fi +need_lib_prefix=unknown +hardcode_into_libs=no + +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown + +case $host_os in +aix3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + shlibpath_var=LIBPATH + + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='${libname}${release}${shared_ext}$major' + ;; + +aix4* | aix5*) + version_type=linux + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test "$host_cpu" = ia64; then + # AIX 5 supports IA64 + library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + else + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line `#! .'. This would cause the generated library to + # depend on `.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[01] | aix4.[01].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + if test "$aix_use_runtimelinking" = yes; then + # If using run time linking (on AIX 4.2 or later) use lib.so + # instead of lib.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + else + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='${libname}${release}.a $libname.a' + soname_spec='${libname}${release}${shared_ext}$major' + fi + shlibpath_var=LIBPATH + fi + ;; + +amigaos*) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; + +beos*) + library_names_spec='${libname}${shared_ext}' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; + +bsdi[45]*) + version_type=linux + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; + +cygwin* | mingw* | pw32*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$host_os in + yes,cygwin* | yes,mingw* | yes,pw32*) + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $rm \$dlpath' + shlibpath_overrides_runpath=yes + + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" + ;; + mingw*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH printed by + # mingw gcc, but we are running on Cygwin. Gcc prints its search + # path with ; separators, and with drive letters. We can handle the + # drive letters (cygwin fileutils understands them), so leave them, + # especially as we might pass files found there to a mingw objdump, + # which wouldn't understand a cygwinified path. Ahh. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + ;; + esac + ;; + + *) + library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + ;; + esac + dynamic_linker='Win32 ld.exe' + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; + +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' + # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. + if test "$GCC" = yes; then + sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` + else + sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' + fi + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +dgux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +freebsd1*) + dynamic_linker=no + ;; + +kfreebsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='GNU ld.so' + ;; + +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[123]*) objformat=aout ;; + *) objformat=elf ;; + esac + fi + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.[01]* | freebsdelf3.[01]*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ + freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + freebsd*) # from 4.6 on + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + esac + ;; + +gnu*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + ;; + +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case $host_cpu in + ia64*) + shrext_cmds='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + if test "X$HPUX_IA64_MODE" = X32; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + hppa*64*) + shrext_cmds='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext_cmds='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555. + postinstall_cmds='chmod 555 $lib' + ;; + +interix3*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test "$lt_cv_prog_gnu_ld" = yes; then + version_type=linux + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + hardcode_into_libs=yes + ;; + +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; + +# This must be Linux ELF. +linux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + fi + + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; + +netbsdelf*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='NetBSD ld.elf_so' + ;; + +knetbsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='GNU ld.so' + ;; + +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + +newsos6) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +nto-qnx*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +openbsd*) + version_type=sunos + sys_lib_dlsearch_path_spec="/usr/lib" + need_lib_prefix=no + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. + case $host_os in + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; + esac + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + case $host_os in + openbsd2.[89] | openbsd2.[89].*) + shlibpath_overrides_runpath=no + ;; + *) + shlibpath_overrides_runpath=yes + ;; + esac + else + shlibpath_overrides_runpath=yes + fi + ;; + +os2*) + libname_spec='$name' + shrext_cmds=".dll" + need_lib_prefix=no + library_names_spec='$libname${shared_ext} $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; + +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; + +solaris*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; + +sunos4*) + version_type=sunos + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test "$with_gnu_ld" = yes; then + need_lib_prefix=no + fi + need_version=yes + ;; + +sysv4 | sysv4.3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + export_dynamic_flag_spec='${wl}-Blargedynsym' + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; + esac + ;; + +sysv4*MP*) + if test -d /usr/nec ;then + version_type=linux + library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' + soname_spec='$libname${shared_ext}.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + version_type=freebsd-elf + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + if test "$with_gnu_ld" = yes; then + sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' + shlibpath_overrides_runpath=no + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + shlibpath_overrides_runpath=yes + case $host_os in + sco3.2v5*) + sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" + ;; + esac + fi + sys_lib_dlsearch_path_spec='/usr/lib' + ;; + +uts4*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +*) + dynamic_linker=no + ;; +esac +echo "$as_me:$LINENO: result: $dynamic_linker" >&5 +echo "${ECHO_T}$dynamic_linker" >&6 +test "$dynamic_linker" = no && can_build_shared=no + +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi + +echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 +echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 +hardcode_action_GCJ= +if test -n "$hardcode_libdir_flag_spec_GCJ" || \ + test -n "$runpath_var_GCJ" || \ + test "X$hardcode_automatic_GCJ" = "Xyes" ; then + + # We can hardcode non-existant directories. + if test "$hardcode_direct_GCJ" != no && + # If the only mechanism to avoid hardcoding is shlibpath_var, we + # have to relink, otherwise we might link with an installed library + # when we should be linking with a yet-to-be-installed one + ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, GCJ)" != no && + test "$hardcode_minus_L_GCJ" != no; then + # Linking always hardcodes the temporary library directory. + hardcode_action_GCJ=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + hardcode_action_GCJ=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + hardcode_action_GCJ=unsupported +fi +echo "$as_me:$LINENO: result: $hardcode_action_GCJ" >&5 +echo "${ECHO_T}$hardcode_action_GCJ" >&6 + +if test "$hardcode_action_GCJ" = relink; then + # Fast installation is not supported + enable_fast_install=no +elif test "$shlibpath_overrides_runpath" = yes || + test "$enable_shared" = no; then + # Fast installation is not necessary + enable_fast_install=needless +fi + + +# The else clause should only fire when bootstrapping the +# libtool distribution, otherwise you forgot to ship ltmain.sh +# with your package, and you will get complaints that there are +# no rules to generate ltmain.sh. +if test -f "$ltmain"; then + # See if we are running on zsh, and set the options which allow our commands through + # without removal of \ escapes. + if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST + fi + # Now quote all the things that may contain metacharacters while being + # careful not to overquote the AC_SUBSTed values. We take copies of the + # variables and quote the copies for generation of the libtool script. + for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ + SED SHELL STRIP \ + libname_spec library_names_spec soname_spec extract_expsyms_cmds \ + old_striplib striplib file_magic_cmd finish_cmds finish_eval \ + deplibs_check_method reload_flag reload_cmds need_locks \ + lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ + lt_cv_sys_global_symbol_to_c_name_address \ + sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ + old_postinstall_cmds old_postuninstall_cmds \ + compiler_GCJ \ + CC_GCJ \ + LD_GCJ \ + lt_prog_compiler_wl_GCJ \ + lt_prog_compiler_pic_GCJ \ + lt_prog_compiler_static_GCJ \ + lt_prog_compiler_no_builtin_flag_GCJ \ + export_dynamic_flag_spec_GCJ \ + thread_safe_flag_spec_GCJ \ + whole_archive_flag_spec_GCJ \ + enable_shared_with_static_runtimes_GCJ \ + old_archive_cmds_GCJ \ + old_archive_from_new_cmds_GCJ \ + predep_objects_GCJ \ + postdep_objects_GCJ \ + predeps_GCJ \ + postdeps_GCJ \ + compiler_lib_search_path_GCJ \ + archive_cmds_GCJ \ + archive_expsym_cmds_GCJ \ + postinstall_cmds_GCJ \ + postuninstall_cmds_GCJ \ + old_archive_from_expsyms_cmds_GCJ \ + allow_undefined_flag_GCJ \ + no_undefined_flag_GCJ \ + export_symbols_cmds_GCJ \ + hardcode_libdir_flag_spec_GCJ \ + hardcode_libdir_flag_spec_ld_GCJ \ + hardcode_libdir_separator_GCJ \ + hardcode_automatic_GCJ \ + module_cmds_GCJ \ + module_expsym_cmds_GCJ \ + lt_cv_prog_compiler_c_o_GCJ \ + exclude_expsyms_GCJ \ + include_expsyms_GCJ; do + + case $var in + old_archive_cmds_GCJ | \ + old_archive_from_new_cmds_GCJ | \ + archive_cmds_GCJ | \ + archive_expsym_cmds_GCJ | \ + module_cmds_GCJ | \ + module_expsym_cmds_GCJ | \ + old_archive_from_expsyms_cmds_GCJ | \ + export_symbols_cmds_GCJ | \ + extract_expsyms_cmds | reload_cmds | finish_cmds | \ + postinstall_cmds | postuninstall_cmds | \ + old_postinstall_cmds | old_postuninstall_cmds | \ + sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) + # Double-quote double-evaled strings. + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" + ;; + *) + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" + ;; + esac + done + + case $lt_echo in + *'\$0 --fallback-echo"') + lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` + ;; + esac + +cfgfile="$ofile" + + cat <<__EOF__ >> "$cfgfile" +# ### BEGIN LIBTOOL TAG CONFIG: $tagname + +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: + +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + +# Whether or not to build static libraries. +build_old_libs=$enable_static + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$archive_cmds_need_lc_GCJ + +# Whether or not to disallow shared libs when runtime libs are static +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_GCJ + +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install + +# The host system. +host_alias=$host_alias +host=$host +host_os=$host_os + +# The build system. +build_alias=$build_alias +build=$build +build_os=$build_os + +# An echo program that does not interpret backslashes. +echo=$lt_echo + +# The archiver. +AR=$lt_AR +AR_FLAGS=$lt_AR_FLAGS + +# A C compiler. +LTCC=$lt_LTCC + +# LTCC compiler flags. +LTCFLAGS=$lt_LTCFLAGS + +# A language-specific compiler. +CC=$lt_compiler_GCJ + +# Is the compiler the GNU C compiler? +with_gcc=$GCC_GCJ + +# An ERE matcher. +EGREP=$lt_EGREP + +# The linker used to build libraries. +LD=$lt_LD_GCJ + +# Whether we need hard or soft links. +LN_S=$lt_LN_S + +# A BSD-compatible nm program. +NM=$lt_NM + +# A symbol stripping program +STRIP=$lt_STRIP + +# Used to examine libraries when file_magic_cmd begins "file" +MAGIC_CMD=$MAGIC_CMD + +# 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=$objdir + +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds + +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl_GCJ + +# Object file suffix (normally "o"). +objext="$ac_objext" + +# Old archive suffix (normally "a"). +libext="$libext" + +# Shared library suffix (normally ".so"). +shrext_cmds='$shrext_cmds' + +# Executable file suffix (normally ""). +exeext="$exeext" + +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic_GCJ +pic_mode=$pic_mode + +# What is the maximum length of a command? +max_cmd_len=$lt_cv_sys_max_cmd_len + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o_GCJ + +# Must we lock files when doing compilation? +need_locks=$lt_need_locks + +# Do we need the lib prefix for modules? +need_lib_prefix=$need_lib_prefix + +# Do we need a version for libraries? +need_version=$need_version + +# Whether dlopen is supported. +dlopen_support=$enable_dlopen + +# Whether dlopen of programs is supported. +dlopen_self=$enable_dlopen_self + +# Whether dlopen of statically linked programs is supported. +dlopen_self_static=$enable_dlopen_self_static + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_lt_prog_compiler_static_GCJ + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_GCJ + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_GCJ + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_whole_archive_flag_spec_GCJ + +# Compiler flag to generate thread-safe objects. +thread_safe_flag_spec=$lt_thread_safe_flag_spec_GCJ + +# Library versioning type. +version_type=$version_type + +# Format of library name prefix. +libname_spec=$lt_libname_spec + +# 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=$lt_library_names_spec + +# The coded name of the library, if different from the real name. +soname_spec=$lt_soname_spec + +# Commands used to build and install an old-style archive. +RANLIB=$lt_RANLIB +old_archive_cmds=$lt_old_archive_cmds_GCJ +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_GCJ + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_GCJ + +# Commands used to build and install a shared archive. +archive_cmds=$lt_archive_cmds_GCJ +archive_expsym_cmds=$lt_archive_expsym_cmds_GCJ +postinstall_cmds=$lt_postinstall_cmds +postuninstall_cmds=$lt_postuninstall_cmds + +# Commands used to build a loadable module (assumed same as above if empty) +module_cmds=$lt_module_cmds_GCJ +module_expsym_cmds=$lt_module_expsym_cmds_GCJ + +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib + +# Dependencies to place before the objects being linked to create a +# shared library. +predep_objects=$lt_predep_objects_GCJ + +# Dependencies to place after the objects being linked to create a +# shared library. +postdep_objects=$lt_postdep_objects_GCJ + +# Dependencies to place before the objects being linked to create a +# shared library. +predeps=$lt_predeps_GCJ + +# Dependencies to place after the objects being linked to create a +# shared library. +postdeps=$lt_postdeps_GCJ + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=$lt_compiler_lib_search_path_GCJ + +# Method to check whether dependent libraries are shared objects. +deplibs_check_method=$lt_deplibs_check_method + +# Command to use when deplibs_check_method == file_magic. +file_magic_cmd=$lt_file_magic_cmd + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag_GCJ + +# Flag that forces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag_GCJ + +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds + +# Same as above, but a single script fragment to be evaled but not shown. +finish_eval=$lt_finish_eval + +# Take the output of nm and produce a listing of raw symbols and C names. +global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe + +# Transform the output of nm in a proper C declaration +global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl + +# Transform the output of nm in a C name address pair +global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address + +# This is the shared library runtime path variable. +runpath_var=$runpath_var + +# This is the shared library path variable. +shlibpath_var=$shlibpath_var + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath + +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action_GCJ + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs + +# Flag to hardcode \$libdir into a binary during linking. +# This must work even if \$libdir does not exist. +hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_GCJ + +# 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=$lt_hardcode_libdir_flag_spec_ld_GCJ + +# Whether we need a single -rpath flag with a separated argument. +hardcode_libdir_separator=$lt_hardcode_libdir_separator_GCJ + +# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the +# resulting binary. +hardcode_direct=$hardcode_direct_GCJ + +# Set to yes if using the -LDIR flag during linking hardcodes DIR into the +# resulting binary. +hardcode_minus_L=$hardcode_minus_L_GCJ + +# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into +# the resulting binary. +hardcode_shlibpath_var=$hardcode_shlibpath_var_GCJ + +# 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=$hardcode_automatic_GCJ + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at relink time. +variables_saved_for_relink="$variables_saved_for_relink" + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs_GCJ + +# Compile-time system search path for libraries +sys_lib_search_path_spec=$lt_sys_lib_search_path_spec + +# Run-time system search path for libraries +sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec + +# Fix the shell variable \$srcfile for the compiler. +fix_srcfile_path="$fix_srcfile_path_GCJ" + +# Set to yes if exported symbols are required. +always_export_symbols=$always_export_symbols_GCJ + +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds_GCJ + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_cmds + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_exclude_expsyms_GCJ + +# Symbols that must always be exported. +include_expsyms=$lt_include_expsyms_GCJ + +# ### END LIBTOOL TAG CONFIG: $tagname + +__EOF__ + + +else + # If there is no Makefile yet, we rely on a make rule to execute + # `config.status --recheck' to rerun these tests and create the + # libtool script then. + ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` + if test -f "$ltmain_in"; then + test -f Makefile && make "$ltmain" + fi +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 + +CC="$lt_save_CC" + + else + tagname="" + fi + ;; + + RC) + + + +# Source file extension for RC test sources. +ac_ext=rc + +# Object file extension for compiled RC test sources. +objext=o +objext_RC=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n' + +# Code to be used in simple link tests +lt_simple_link_test_code="$lt_simple_compile_test_code" + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC + + +# save warnings/boilerplate of simple test code +ac_outfile=conftest.$ac_objext +printf "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$rm conftest* + +ac_outfile=conftest.$ac_objext +printf "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$rm conftest* + + +# Allow CC to be a program name with arguments. +lt_save_CC="$CC" +CC=${RC-"windres"} +compiler=$CC +compiler_RC=$CC +for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + +lt_cv_prog_compiler_c_o_RC=yes + +# The else clause should only fire when bootstrapping the +# libtool distribution, otherwise you forgot to ship ltmain.sh +# with your package, and you will get complaints that there are +# no rules to generate ltmain.sh. +if test -f "$ltmain"; then + # See if we are running on zsh, and set the options which allow our commands through + # without removal of \ escapes. + if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST + fi + # Now quote all the things that may contain metacharacters while being + # careful not to overquote the AC_SUBSTed values. We take copies of the + # variables and quote the copies for generation of the libtool script. + for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ + SED SHELL STRIP \ + libname_spec library_names_spec soname_spec extract_expsyms_cmds \ + old_striplib striplib file_magic_cmd finish_cmds finish_eval \ + deplibs_check_method reload_flag reload_cmds need_locks \ + lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ + lt_cv_sys_global_symbol_to_c_name_address \ + sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ + old_postinstall_cmds old_postuninstall_cmds \ + compiler_RC \ + CC_RC \ + LD_RC \ + lt_prog_compiler_wl_RC \ + lt_prog_compiler_pic_RC \ + lt_prog_compiler_static_RC \ + lt_prog_compiler_no_builtin_flag_RC \ + export_dynamic_flag_spec_RC \ + thread_safe_flag_spec_RC \ + whole_archive_flag_spec_RC \ + enable_shared_with_static_runtimes_RC \ + old_archive_cmds_RC \ + old_archive_from_new_cmds_RC \ + predep_objects_RC \ + postdep_objects_RC \ + predeps_RC \ + postdeps_RC \ + compiler_lib_search_path_RC \ + archive_cmds_RC \ + archive_expsym_cmds_RC \ + postinstall_cmds_RC \ + postuninstall_cmds_RC \ + old_archive_from_expsyms_cmds_RC \ + allow_undefined_flag_RC \ + no_undefined_flag_RC \ + export_symbols_cmds_RC \ + hardcode_libdir_flag_spec_RC \ + hardcode_libdir_flag_spec_ld_RC \ + hardcode_libdir_separator_RC \ + hardcode_automatic_RC \ + module_cmds_RC \ + module_expsym_cmds_RC \ + lt_cv_prog_compiler_c_o_RC \ + exclude_expsyms_RC \ + include_expsyms_RC; do + + case $var in + old_archive_cmds_RC | \ + old_archive_from_new_cmds_RC | \ + archive_cmds_RC | \ + archive_expsym_cmds_RC | \ + module_cmds_RC | \ + module_expsym_cmds_RC | \ + old_archive_from_expsyms_cmds_RC | \ + export_symbols_cmds_RC | \ + extract_expsyms_cmds | reload_cmds | finish_cmds | \ + postinstall_cmds | postuninstall_cmds | \ + old_postinstall_cmds | old_postuninstall_cmds | \ + sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) + # Double-quote double-evaled strings. + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" + ;; + *) + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" + ;; + esac + done + + case $lt_echo in + *'\$0 --fallback-echo"') + lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` + ;; + esac + +cfgfile="$ofile" + + cat <<__EOF__ >> "$cfgfile" +# ### BEGIN LIBTOOL TAG CONFIG: $tagname + +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: + +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + +# Whether or not to build static libraries. +build_old_libs=$enable_static + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$archive_cmds_need_lc_RC + +# Whether or not to disallow shared libs when runtime libs are static +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_RC + +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install + +# The host system. +host_alias=$host_alias +host=$host +host_os=$host_os + +# The build system. +build_alias=$build_alias +build=$build +build_os=$build_os + +# An echo program that does not interpret backslashes. +echo=$lt_echo + +# The archiver. +AR=$lt_AR +AR_FLAGS=$lt_AR_FLAGS + +# A C compiler. +LTCC=$lt_LTCC + +# LTCC compiler flags. +LTCFLAGS=$lt_LTCFLAGS + +# A language-specific compiler. +CC=$lt_compiler_RC + +# Is the compiler the GNU C compiler? +with_gcc=$GCC_RC + +# An ERE matcher. +EGREP=$lt_EGREP + +# The linker used to build libraries. +LD=$lt_LD_RC + +# Whether we need hard or soft links. +LN_S=$lt_LN_S + +# A BSD-compatible nm program. +NM=$lt_NM + +# A symbol stripping program +STRIP=$lt_STRIP + +# Used to examine libraries when file_magic_cmd begins "file" +MAGIC_CMD=$MAGIC_CMD + +# 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=$objdir + +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds + +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl_RC + +# Object file suffix (normally "o"). +objext="$ac_objext" + +# Old archive suffix (normally "a"). +libext="$libext" + +# Shared library suffix (normally ".so"). +shrext_cmds='$shrext_cmds' + +# Executable file suffix (normally ""). +exeext="$exeext" + +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic_RC +pic_mode=$pic_mode + +# What is the maximum length of a command? +max_cmd_len=$lt_cv_sys_max_cmd_len + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o_RC + +# Must we lock files when doing compilation? +need_locks=$lt_need_locks + +# Do we need the lib prefix for modules? +need_lib_prefix=$need_lib_prefix + +# Do we need a version for libraries? +need_version=$need_version + +# Whether dlopen is supported. +dlopen_support=$enable_dlopen + +# Whether dlopen of programs is supported. +dlopen_self=$enable_dlopen_self + +# Whether dlopen of statically linked programs is supported. +dlopen_self_static=$enable_dlopen_self_static + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_lt_prog_compiler_static_RC + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_RC + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_RC + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_whole_archive_flag_spec_RC + +# Compiler flag to generate thread-safe objects. +thread_safe_flag_spec=$lt_thread_safe_flag_spec_RC + +# Library versioning type. +version_type=$version_type + +# Format of library name prefix. +libname_spec=$lt_libname_spec + +# 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=$lt_library_names_spec + +# The coded name of the library, if different from the real name. +soname_spec=$lt_soname_spec + +# Commands used to build and install an old-style archive. +RANLIB=$lt_RANLIB +old_archive_cmds=$lt_old_archive_cmds_RC +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_RC + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_RC + +# Commands used to build and install a shared archive. +archive_cmds=$lt_archive_cmds_RC +archive_expsym_cmds=$lt_archive_expsym_cmds_RC +postinstall_cmds=$lt_postinstall_cmds +postuninstall_cmds=$lt_postuninstall_cmds + +# Commands used to build a loadable module (assumed same as above if empty) +module_cmds=$lt_module_cmds_RC +module_expsym_cmds=$lt_module_expsym_cmds_RC + +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib + +# Dependencies to place before the objects being linked to create a +# shared library. +predep_objects=$lt_predep_objects_RC + +# Dependencies to place after the objects being linked to create a +# shared library. +postdep_objects=$lt_postdep_objects_RC + +# Dependencies to place before the objects being linked to create a +# shared library. +predeps=$lt_predeps_RC + +# Dependencies to place after the objects being linked to create a +# shared library. +postdeps=$lt_postdeps_RC + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=$lt_compiler_lib_search_path_RC + +# Method to check whether dependent libraries are shared objects. +deplibs_check_method=$lt_deplibs_check_method + +# Command to use when deplibs_check_method == file_magic. +file_magic_cmd=$lt_file_magic_cmd + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag_RC + +# Flag that forces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag_RC + +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds + +# Same as above, but a single script fragment to be evaled but not shown. +finish_eval=$lt_finish_eval + +# Take the output of nm and produce a listing of raw symbols and C names. +global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe + +# Transform the output of nm in a proper C declaration +global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl + +# Transform the output of nm in a C name address pair +global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address + +# This is the shared library runtime path variable. +runpath_var=$runpath_var + +# This is the shared library path variable. +shlibpath_var=$shlibpath_var + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath + +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action_RC + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs + +# Flag to hardcode \$libdir into a binary during linking. +# This must work even if \$libdir does not exist. +hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_RC + +# 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=$lt_hardcode_libdir_flag_spec_ld_RC + +# Whether we need a single -rpath flag with a separated argument. +hardcode_libdir_separator=$lt_hardcode_libdir_separator_RC + +# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the +# resulting binary. +hardcode_direct=$hardcode_direct_RC + +# Set to yes if using the -LDIR flag during linking hardcodes DIR into the +# resulting binary. +hardcode_minus_L=$hardcode_minus_L_RC + +# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into +# the resulting binary. +hardcode_shlibpath_var=$hardcode_shlibpath_var_RC + +# 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=$hardcode_automatic_RC + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at relink time. +variables_saved_for_relink="$variables_saved_for_relink" + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs_RC + +# Compile-time system search path for libraries +sys_lib_search_path_spec=$lt_sys_lib_search_path_spec + +# Run-time system search path for libraries +sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec + +# Fix the shell variable \$srcfile for the compiler. +fix_srcfile_path="$fix_srcfile_path_RC" + +# Set to yes if exported symbols are required. +always_export_symbols=$always_export_symbols_RC + +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds_RC + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_cmds + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_exclude_expsyms_RC + +# Symbols that must always be exported. +include_expsyms=$lt_include_expsyms_RC + +# ### END LIBTOOL TAG CONFIG: $tagname + +__EOF__ + + +else + # If there is no Makefile yet, we rely on a make rule to execute + # `config.status --recheck' to rerun these tests and create the + # libtool script then. + ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` + if test -f "$ltmain_in"; then + test -f Makefile && make "$ltmain" + fi +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 + +CC="$lt_save_CC" + + ;; + + *) + { { echo "$as_me:$LINENO: error: Unsupported tag name: $tagname" >&5 +echo "$as_me: error: Unsupported tag name: $tagname" >&2;} + { (exit 1); exit 1; }; } + ;; + esac + + # Append the new tag name to the list of available tags. + if test -n "$tagname" ; then + available_tags="$available_tags $tagname" + fi + fi + done + IFS="$lt_save_ifs" + + # Now substitute the updated list of available tags. + if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then + mv "${ofile}T" "$ofile" + chmod +x "$ofile" + else + rm -f "${ofile}T" + { { echo "$as_me:$LINENO: error: unable to update list of available tagged configurations." >&5 +echo "$as_me: error: unable to update list of available tagged configurations." >&2;} + { (exit 1); exit 1; }; } + fi +fi + + + +# This can be used to rebuild libtool when needed +LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" + +# Always use our own libtool. +LIBTOOL='$(SHELL) $(top_builddir)/libtool' + +# Prevent multiple expansion + + + + + + + + + + + + + + + + + + + + + +PLUGIN_LDFLAGS="-module -avoid-version" + + +# work around a bug where need_version is set to no by the above +# -avoid-version call when this is not supported on OpenBSD (or am I +# completely wrong about this?) +case "${host_os}" in + openbsd*) + sed 's/^need_version=no$/need_version=yes/' < libtool > libtool.tmp && mv -f libtool.tmp libtool + ;; + esac + + + +# Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; 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_path_PKG_CONFIG+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + ;; +esac +fi +PKG_CONFIG=$ac_cv_path_PKG_CONFIG + +if test -n "$PKG_CONFIG"; then + echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 +echo "${ECHO_T}$PKG_CONFIG" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + + if test x$prefix != xNONE; then + PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$prefix/lib/pkgconfig" + fi + + PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig" + export PKG_CONFIG_PATH + + + succeeded=no + + if test -z "$PKG_CONFIG"; then + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; 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_path_PKG_CONFIG+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" + ;; +esac +fi +PKG_CONFIG=$ac_cv_path_PKG_CONFIG + +if test -n "$PKG_CONFIG"; then + echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 +echo "${ECHO_T}$PKG_CONFIG" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + fi + + if test "$PKG_CONFIG" = "no" ; then + echo "*** The pkg-config script could not be found. Make sure it is" + echo "*** in your path, or set the PKG_CONFIG environment variable" + echo "*** to the full path to pkg-config." + echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." + else + PKG_CONFIG_MIN_VERSION=0.9.0 + if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then + echo "$as_me:$LINENO: checking for libgift >= 0.11.4 libgift < 0.12.0" >&5 +echo $ECHO_N "checking for libgift >= 0.11.4 libgift < 0.12.0... $ECHO_C" >&6 + + if $PKG_CONFIG --exists "libgift >= 0.11.4 libgift < 0.12.0" ; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + succeeded=yes + + echo "$as_me:$LINENO: checking GNUTELLA_CFLAGS" >&5 +echo $ECHO_N "checking GNUTELLA_CFLAGS... $ECHO_C" >&6 + GNUTELLA_CFLAGS=`$PKG_CONFIG --cflags "libgift >= 0.11.4 libgift < 0.12.0"` + echo "$as_me:$LINENO: result: $GNUTELLA_CFLAGS" >&5 +echo "${ECHO_T}$GNUTELLA_CFLAGS" >&6 + + echo "$as_me:$LINENO: checking GNUTELLA_LIBS" >&5 +echo $ECHO_N "checking GNUTELLA_LIBS... $ECHO_C" >&6 + GNUTELLA_LIBS=`$PKG_CONFIG --libs "libgift >= 0.11.4 libgift < 0.12.0"` + echo "$as_me:$LINENO: result: $GNUTELLA_LIBS" >&5 +echo "${ECHO_T}$GNUTELLA_LIBS" >&6 + else + GNUTELLA_CFLAGS="" + GNUTELLA_LIBS="" + ## If we have a custom action on failure, don't print errors, but + ## do set a variable so people can do so. + GNUTELLA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libgift >= 0.11.4 libgift < 0.12.0"` + echo $GNUTELLA_PKG_ERRORS + fi + + + + else + echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." + echo "*** See http://www.freedesktop.org/software/pkgconfig" + fi + fi + + if test $succeeded = yes; then + : + else + { { echo "$as_me:$LINENO: error: Library requirements (libgift >= 0.11.4 libgift < 0.12.0) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 +echo "$as_me: error: Library requirements (libgift >= 0.11.4 libgift < 0.12.0) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} + { (exit 1); exit 1; }; } + fi + + + # fudge libgiftproto in there which doesnt have any pkg-config entry + GNUTELLA_LIBS="$GNUTELLA_LIBS -lgiftproto" + + # hack to set libgift_version + libgift_version=`pkg-config libgift --modversion` + + + + + + + +# Get rid of -g[0-9] -Wall -O[0-9] and add them unconditionally if +# compiling in maintainer mode +if test x"$USE_MAINTAINER_MODE" = xyes; then + CFLAGS=`echo "$CFLAGS" | sed 's/-Wall\>//; s/-O[0-9]//; s/-g\([0-9]\)*//'` + CFLAGS="$CFLAGS -Wall -g3 -O0" +fi + + + + +for ac_func in getpid getppid +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != $ac_func; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +eval "$as_ac_var=no" +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + + + +for ac_func in hstrerror +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 + + + +OPT_ZLIB= + +# Check whether --with-zlib or --without-zlib was given. +if test "${with_zlib+set}" = set; then + withval="$with_zlib" + OPT_ZLIB=$withval +fi; + +if test x"$OPT_ZLIB" = xno; then + { { echo "$as_me:$LINENO: error: zlib support is required" >&5 +echo "$as_me: error: zlib support is required" >&2;} + { (exit 1); exit 1; }; } +fi + + + # set the minimum ZLIB_VER we're willing to link against... + ZLIB_VER=1.1.4 + + # for some reason Darwin has a 1.1.3 version with the 1.1.4 security fix + # applied backwards... + case "${host}" in + *-*-darwin* ) + ZLIB_VER=1.1.3 + ;; + esac + + if test x"$OPT_ZLIB" = xno; then + zlib_ok=no + else + ZLIB_DIRS="$OPT_ZLIB /usr /usr/local /sw" + for ZLIB_DIR in $ZLIB_DIRS; + do + LIBS_SAVE="$LIBS" + CPPFLAGS_SAVE="$CPPFLAGS" + LIBS="$LIBS -L${ZLIB_DIR}/lib" + CPPFLAGS="$CPPFLAGS -I${ZLIB_DIR}/include" + echo "$as_me:$LINENO: checking for zlib version ${ZLIB_VER}+ in ${ZLIB_DIR}" >&5 +echo $ECHO_N "checking for zlib version ${ZLIB_VER}+ in ${ZLIB_DIR}... $ECHO_C" >&6 +if test "${zlib_ok+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then + zlib_ok=yes +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 + void main() { + exit(strcmp(ZLIB_VERSION, "${ZLIB_VER}") < 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 + zlib_ok=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 ) +zlib_ok=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: $zlib_ok" >&5 +echo "${ECHO_T}$zlib_ok" >&6 + + if test "$zlib_ok" != "no"; then + echo "$as_me:$LINENO: checking for gzread" >&5 +echo $ECHO_N "checking for gzread... $ECHO_C" >&6 +if test "${ac_cv_func_gzread+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 gzread to an innocuous variant, in case declares gzread. + For example, HP-UX 11i declares gettimeofday. */ +#define gzread innocuous_gzread + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char gzread (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef gzread + +/* 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 gzread (); +/* 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_gzread) || defined (__stub___gzread) +choke me +#else +char (*f) () = gzread; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != gzread; + ; + 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_gzread=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_func_gzread=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_func_gzread" >&5 +echo "${ECHO_T}$ac_cv_func_gzread" >&6 +if test $ac_cv_func_gzread = yes; then + : +else + +echo "$as_me:$LINENO: checking for gzread in -lz" >&5 +echo $ECHO_N "checking for gzread in -lz... $ECHO_C" >&6 +if test "${ac_cv_lib_z_gzread+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lz $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 gzread (); +int +main () +{ +gzread (); + ; + 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_z_gzread=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_z_gzread=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_z_gzread" >&5 +echo "${ECHO_T}$ac_cv_lib_z_gzread" >&6 +if test $ac_cv_lib_z_gzread = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBZ 1 +_ACEOF + + LIBS="-lz $LIBS" + +fi + +fi + + cat >>confdefs.h <<\_ACEOF +#define USE_ZLIB 1 +_ACEOF + + + break + fi + LIBS="$LIBS_SAVE" + CPPFLAGS="$CPPFLAGS_SAVE" + done + + if test "$zlib_ok" = "no"; then + { { echo "$as_me:$LINENO: error: +NOTE: The zlib compression library version ${ZLIB_VER} or greater was not found + on your system. + + If zlib ${ZLIB_VER}+ is not installed, install it. + " >&5 +echo "$as_me: error: +NOTE: The zlib compression library version ${ZLIB_VER} or greater was not found + on your system. + + If zlib ${ZLIB_VER}+ is not installed, install it. + " >&2;} + { (exit 1); exit 1; }; } + fi + fi + + + +OPT_LIBXML=no + +# Check whether --with-libxml or --without-libxml was given. +if test "${with_libxml+set}" = set; then + withval="$with_libxml" + OPT_LIBXML=$withval +fi; + +echo "$as_me:$LINENO: checking whether libxml should be used" >&5 +echo $ECHO_N "checking whether libxml should be used... $ECHO_C" >&6 +use_libxml=no + +if test x"$OPT_LIBXML" != xno; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + + # + # Check on the user's PATH if no path was specified in OPT_LIBXML, + # when the user has passed --with-libxml without a directory, + # or check the directory if one was supplied. + # + if test x"$OPT_LIBXML" = xyes; then + # Extract the first word of "xml2-config", so it can be a program name with args. +set dummy xml2-config; 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_path_XML2_CONFIG+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $XML2_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_XML2_CONFIG="$XML2_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_XML2_CONFIG="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + test -z "$ac_cv_path_XML2_CONFIG" && ac_cv_path_XML2_CONFIG="no" + ;; +esac +fi +XML2_CONFIG=$ac_cv_path_XML2_CONFIG + +if test -n "$XML2_CONFIG"; then + echo "$as_me:$LINENO: result: $XML2_CONFIG" >&5 +echo "${ECHO_T}$XML2_CONFIG" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + else + XMLPATH="$OPT_LIBXML/bin" + # Extract the first word of "xml2-config", so it can be a program name with args. +set dummy xml2-config; 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_path_XML2_CONFIG+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $XML2_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_XML2_CONFIG="$XML2_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $XMLPATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_XML2_CONFIG="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + test -z "$ac_cv_path_XML2_CONFIG" && ac_cv_path_XML2_CONFIG="no" + ;; +esac +fi +XML2_CONFIG=$ac_cv_path_XML2_CONFIG + +if test -n "$XML2_CONFIG"; then + echo "$as_me:$LINENO: result: $XML2_CONFIG" >&5 +echo "${ECHO_T}$XML2_CONFIG" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + fi + + if test x"$XML2_CONFIG" != xno; then + LIBXML2_CFLAGS=`$XML2_CONFIG --cflags` + LIBXML2_LIBS=`$XML2_CONFIG --libs` + + + + cat >>confdefs.h <<\_ACEOF +#define USE_LIBXML2 1 +_ACEOF + + else + { { echo "$as_me:$LINENO: error: +Couldn't run ${OPT_LIBXML}/bin/xml2-config + +" >&5 +echo "$as_me: error: +Couldn't run ${OPT_LIBXML}/bin/xml2-config + +" >&2;} + { (exit 1); exit 1; }; } + fi + + use_libxml=yes +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + + ac_config_files="$ac_config_files Makefile m4/Makefile src/Makefile src/encoding/Makefile src/io/Makefile src/message/Makefile src/transfer/Makefile data/Makefile gnutella.spec" + + +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 "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"MAINTAINER_MODE\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"MAINTAINER_MODE\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"AMDEP\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +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 + +: ${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 gift-gnutella $as_me 0.0.11, 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="\\ +gift-gnutella config.status 0.0.11 +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" ;; + "m4/Makefile" ) CONFIG_FILES="$CONFIG_FILES m4/Makefile" ;; + "src/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; + "src/encoding/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/encoding/Makefile" ;; + "src/io/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/io/Makefile" ;; + "src/message/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/message/Makefile" ;; + "src/transfer/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/transfer/Makefile" ;; + "data/Makefile" ) CONFIG_FILES="$CONFIG_FILES data/Makefile" ;; + "gnutella.spec" ) CONFIG_FILES="$CONFIG_FILES gnutella.spec" ;; + "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,@MAINTAINER_MODE_TRUE@,$MAINTAINER_MODE_TRUE,;t t +s,@MAINTAINER_MODE_FALSE@,$MAINTAINER_MODE_FALSE,;t t +s,@MAINT@,$MAINT,;t t +s,@CC@,$CC,;t t +s,@CFLAGS@,$CFLAGS,;t t +s,@LDFLAGS@,$LDFLAGS,;t t +s,@CPPFLAGS@,$CPPFLAGS,;t t +s,@ac_ct_CC@,$ac_ct_CC,;t t +s,@EXEEXT@,$EXEEXT,;t t +s,@OBJEXT@,$OBJEXT,;t t +s,@DEPDIR@,$DEPDIR,;t t +s,@am__include@,$am__include,;t t +s,@am__quote@,$am__quote,;t t +s,@AMDEP_TRUE@,$AMDEP_TRUE,;t t +s,@AMDEP_FALSE@,$AMDEP_FALSE,;t t +s,@AMDEPBACKSLASH@,$AMDEPBACKSLASH,;t t +s,@CCDEPMODE@,$CCDEPMODE,;t t +s,@am__fastdepCC_TRUE@,$am__fastdepCC_TRUE,;t t +s,@am__fastdepCC_FALSE@,$am__fastdepCC_FALSE,;t t +s,@CPP@,$CPP,;t t +s,@EGREP@,$EGREP,;t t +s,@build@,$build,;t t +s,@build_cpu@,$build_cpu,;t t +s,@build_vendor@,$build_vendor,;t t +s,@build_os@,$build_os,;t t +s,@host@,$host,;t t +s,@host_cpu@,$host_cpu,;t t +s,@host_vendor@,$host_vendor,;t t +s,@host_os@,$host_os,;t t +s,@LN_S@,$LN_S,;t t +s,@ECHO@,$ECHO,;t t +s,@AR@,$AR,;t t +s,@ac_ct_AR@,$ac_ct_AR,;t t +s,@RANLIB@,$RANLIB,;t t +s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t +s,@CXX@,$CXX,;t t +s,@CXXFLAGS@,$CXXFLAGS,;t t +s,@ac_ct_CXX@,$ac_ct_CXX,;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,@CXXCPP@,$CXXCPP,;t t +s,@F77@,$F77,;t t +s,@FFLAGS@,$FFLAGS,;t t +s,@ac_ct_F77@,$ac_ct_F77,;t t +s,@LIBTOOL@,$LIBTOOL,;t t +s,@PLUGIN_LDFLAGS@,$PLUGIN_LDFLAGS,;t t +s,@PKG_CONFIG@,$PKG_CONFIG,;t t +s,@GNUTELLA_CFLAGS@,$GNUTELLA_CFLAGS,;t t +s,@GNUTELLA_LIBS@,$GNUTELLA_LIBS,;t t +s,@USE_ZLIB@,$USE_ZLIB,;t t +s,@XML2_CONFIG@,$XML2_CONFIG,;t t +s,@LIBXML2_CFLAGS@,$LIBXML2_CFLAGS,;t t +s,@LIBXML2_LIBS@,$LIBXML2_LIBS,;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 + + # 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; } + + 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 +_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 + 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 + + + +echo +echo "$PACKAGE_NAME $VERSION" +echo +echo "-------------------- core ---" +echo +echo "libgift.................: $libgift_version" +echo "libgiftproto............: $libgift_version" +echo +echo "-------------- extensions ---" +echo +echo "use zlib................: yes (required)" +echo "use libxml..............: $use_libxml" +echo +echo "-----------------------------" +echo + + + + libgift_prefix=`pkg-config --variable=prefix libgift` + + gift_plugin_prefix=$prefix + if test x"$prefix" = xNONE; then + gift_plugin_prefix=/usr/local + fi + + if test x"$libgift_prefix" != x"$gift_plugin_prefix"; then + { echo "$as_me:$LINENO: WARNING: + You are trying to install in $gift_plugin_prefix, but I only + detected a giFT installation in $libgift_prefix. + You may be installing in the wrong place. + + You should probably supply --prefix=$libgift_prefix + to configure. Or, if you have a giFT installation in + $gift_plugin_prefix, you could add ${gift_plugin_prefix}/lib/pkgconfig + to the PKG_CONFIG_PATH environment variable, so I can detect it. +" >&5 +echo "$as_me: WARNING: + You are trying to install in $gift_plugin_prefix, but I only + detected a giFT installation in $libgift_prefix. + You may be installing in the wrong place. + + You should probably supply --prefix=$libgift_prefix + to configure. Or, if you have a giFT installation in + $gift_plugin_prefix, you could add ${gift_plugin_prefix}/lib/pkgconfig + to the PKG_CONFIG_PATH environment variable, so I can detect it. +" >&2;} + fi + + + +echo +echo "Type 'make' ('gmake' on some systems) to compile gift-gnutella." +echo diff -r 000000000000 -r d39e1d0d75b6 configure.ac --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/configure.ac Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,192 @@ +############################################################################### +## +## $Id: configure.ac,v 1.38 2006/08/06 17:26:39 hexwab Exp $ +## +## Copyright (C) 2001-2003 giFT project (gift.sourceforge.net) +## +## 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. +## +############################################################################### + +dnl ########################################################################### +dnl Initialize autoconf... +dnl ########################################################################### + +AC_PREREQ(2.53) + +AC_INIT(gift-gnutella, 0.0.11) +AC_CONFIG_SRCDIR([src/gt_gnutella.h]) + +AC_DEFINE(GT_MAJOR_VERSION, ["0"], [Major]) +AC_DEFINE(GT_MINOR_VERSION, ["0"], [Minor]) +AC_DEFINE(GT_MICRO_VERSION, ["11"], [Micro]) + +if test -e "$srcdir/CVS"; then + AC_DEFINE(GT_EXTRA_VERSION, ["-cvs"], [Extra]) +else + AC_DEFINE(GT_EXTRA_VERSION, [""], [Extra]) +fi + +dnl ########################################################################### +dnl Initialize automake... +dnl ########################################################################### + +AM_INIT_AUTOMAKE([dist-bzip2]) +AM_CONFIG_HEADER(config.h) + +AM_MAINTAINER_MODE + +dnl ########################################################################### +dnl Initialize autoheader... +dnl ########################################################################### + +AH_VERBATIM([USE_ZLIB], [#undef USE_ZLIB]) +AH_VERBATIM([USE_LIBXML2], [#undef USE_LIBXML2]) + +dnl ########################################################################### +dnl Check for the necessary build tools and configure libtool +dnl ########################################################################### + +AC_PROG_CC +AM_PROG_CC_STDC +AC_HEADER_STDC +AC_PROG_INSTALL + +AM_DISABLE_STATIC +AC_PROG_LIBTOOL + +PLUGIN_LDFLAGS="-module -avoid-version" +AC_SUBST(PLUGIN_LDFLAGS) + +# work around a bug where need_version is set to no by the above +# -avoid-version call when this is not supported on OpenBSD (or am I +# completely wrong about this?) +OPENBSD_LIBTOOL_WORKAROUND + +dnl ########################################################################### +dnl Test for libgift and libgiftproto... +dnl ########################################################################### + +GIFT_PLUGIN_PKGCONFIG(GNUTELLA, 0.11.4, 0.12.0) +AC_SUBST(GNUTELLA_CFLAGS) +AC_SUBST(GNUTELLA_LIBS) + +# Get rid of -g[0-9] -Wall -O[0-9] and add them unconditionally if +# compiling in maintainer mode +if test x"$USE_MAINTAINER_MODE" = xyes; then + CFLAGS=`echo "$CFLAGS" | sed 's/-Wall\>//; s/-O[[0-9]]//; s/-g\([[0-9]]\)*//'` + CFLAGS="$CFLAGS -Wall -g3 -O0" +fi + +dnl ########################################################################### +dnl Check for platform functions +dnl ########################################################################### + +AC_CHECK_FUNCS(getpid getppid) + +dnl ########################################################################### +dnl Check for gethostbyname/h_errno/hstrerror +dnl ########################################################################### + +dnl This is not really the best that can be done but it's enough atm +AC_CHECK_FUNCS(hstrerror) + +dnl ########################################################################### +dnl Test for zlib... +dnl ########################################################################### + +dnl Default to compiler & linker defaults for files & libraries. +OPT_ZLIB= +AC_ARG_WITH(zlib,dnl +[ --with-zlib[=DIR] where to look for ZLIB [compiler/linker default paths] + DIR points to the ZLIB installation prefix [/usr/local]], +OPT_ZLIB=$withval, +) + +if test x"$OPT_ZLIB" = xno; then + AC_MSG_ERROR([zlib support is required]) +fi + +GIFT_PLUGIN_CHECK_ZLIB + +dnl ########################################################################### +dnl Test for libxml... +dnl ########################################################################### + +OPT_LIBXML=no +AC_ARG_WITH(libxml,dnl +[ --with-libxml[=DIR] where to look for libxml [compiler/linker default paths] + DIR points to the libxml installation prefix [/usr/local]], +OPT_LIBXML=$withval, +) + +AC_MSG_CHECKING([whether libxml should be used]) +use_libxml=no + +if test x"$OPT_LIBXML" != xno; then + AC_MSG_RESULT([yes]) + GIFT_GNUTELLA_CHECK_LIBXML + use_libxml=yes +else + AC_MSG_RESULT([no]) +fi + +dnl ########################################################################### +dnl Finish generation of the build environment +dnl ########################################################################### + +AC_CONFIG_FILES([ +Makefile +m4/Makefile +src/Makefile +src/encoding/Makefile +src/io/Makefile +src/message/Makefile +src/transfer/Makefile +data/Makefile +gnutella.spec +]) + +AC_OUTPUT + +dnl ########################################################################### +dnl Print summary to the user... +dnl ########################################################################### + +echo +echo "$PACKAGE_NAME $VERSION" +echo +echo "-------------------- core ---" +echo +echo "libgift.................: $libgift_version" +echo "libgiftproto............: $libgift_version" +echo +echo "-------------- extensions ---" +echo +echo "use zlib................: yes (required)" +echo "use libxml..............: $use_libxml" +echo +echo "-----------------------------" +echo + +dnl ########################################################################### +dnl Sanity check the prefix where we're installing +dnl ########################################################################### + +GIFT_PLUGIN_CHECK_PREFIX + +dnl ########################################################################### +dnl Warn about needing GNU make +dnl ########################################################################### + +echo +echo "Type 'make' ('gmake' on some systems) to compile gift-gnutella." +echo diff -r 000000000000 -r d39e1d0d75b6 data/Gnutella.conf --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/data/Gnutella.conf Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,49 @@ +# +# This is the configuration file for the Gnutella plugin. +# The default settings are listed, but commented out. +# + +[main] +# +# This is the port the Gnutella plugin uses. If you want to download +# from firewalled users, other users must be able to connect to this port. +# +#port = 6346 + +[local] +# +# Set this if you want to run locally +# +#lan_mode = 0 +# +# This controls which hosts will be allowed to download +# +#hosts_allow = LOCAL + +[http] +# +# Use the proxy server for communicating HTTP. Currently, this is +# only used for requests to the gwebcaches, not for download/uploads. +# +# This field must be formatted as hostname:port, with an optional 'http://' +# prefix and optional trailing slash. For example, http://my.proxy.com:8080/ +# and my.proxy.com:8080 are valid. +# +#proxy = + +[packet] +# +# This will print information about each packet received/sent on stdout +# +#debug = 0 + +[search] +# +# Print information about each search performed to the log file +# +#log_results = 0 +# +# Print a line for each result packet generated to the log file +# This line includes just the number of results in each packet +# +#log_result_packets = 0 diff -r 000000000000 -r d39e1d0d75b6 data/Gnutella.conf.template --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/data/Gnutella.conf.template Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,43 @@ +############################################################################## +# MAIN + +[main] + +# +# Which port the Gnutella plugin uses. The default for the Gnutella network +# is normally 6346, but it is random for this plugin in order not to interfere +# with other Gnutella clients. +# +# Unlike OpenFT, the Gnutella plugin uses a single port for both HTTP and +# protocol communication. Similar to OpenFT, this port must be reachable from +# the outside Internet if you want to download from firewalled users. Download +# and search result performance is much better when this port is reachable, as +# quite a fair number of hosts on the Gnutella network are firewalled. +# +# Default: random (3312, 4312) +# +port = 3512 + +############################################################################## +# HTTP CONFIGURATION + +[http] + +# +# Should the Gnutella plugin use an HTTP proxy server? +# +# The Gnutella plugin will contact some websites over HTTP for finding an +# initial list of nodes. If you need to go through a proxy server to access +# websites, the plugin will fail to connect to the Gnutella network unless you +# fill in your proxy server here. This should probably go away and be replaced +# by checking the 'http_proxy' environment variable instead. Please fix me. +# +# This field can be formatted as hostname:port, with an optional 'http://' +# prefix and optional trailing slash. For example, http://my.proxy.com:8080/ +# and my.proxy.com:8080 are valid. +# +# Most people can probably leave this blank. +# +# Default: none +# +proxy = diff -r 000000000000 -r d39e1d0d75b6 data/Makefile.am --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/data/Makefile.am Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,12 @@ +# $Id: Makefile.am,v 1.4 2003/09/08 05:52:41 jasta Exp $ +############################################################################### + +Gnutelladatadir = $(datadir)/giFT/Gnutella +Gnutelladata_DATA = \ + gwebcaches \ + hostiles.txt \ + Gnutella.conf.template \ + Gnutella.conf + +EXTRA_DIST = \ + $(Gnutelladata_DATA) diff -r 000000000000 -r d39e1d0d75b6 data/Makefile.in --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/data/Makefile.in Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,327 @@ +# Makefile.in generated by automake 1.7.9 from Makefile.am. +# @configure_input@ + +# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 +# 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@ + +# $Id: Makefile.am,v 1.4 2003/09/08 05:52:41 jasta Exp $ +############################################################################### + +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 = : +host_triplet = @host@ +ACLOCAL = @ACLOCAL@ +AMDEP_FALSE = @AMDEP_FALSE@ +AMDEP_TRUE = @AMDEP_TRUE@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +GNUTELLA_CFLAGS = @GNUTELLA_CFLAGS@ +GNUTELLA_LIBS = @GNUTELLA_LIBS@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIBXML2_CFLAGS = @LIBXML2_CFLAGS@ +LIBXML2_LIBS = @LIBXML2_LIBS@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ +MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ +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@ +PKG_CONFIG = @PKG_CONFIG@ +PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ +RANLIB = @RANLIB@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +USE_ZLIB = @USE_ZLIB@ +VERSION = @VERSION@ +XML2_CONFIG = @XML2_CONFIG@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +ac_ct_RANLIB = @ac_ct_RANLIB@ +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@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +datadir = @datadir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +oldincludedir = @oldincludedir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ + +Gnutelladatadir = $(datadir)/giFT/Gnutella +Gnutelladata_DATA = \ + gwebcaches \ + hostiles.txt \ + Gnutella.conf.template \ + Gnutella.conf + + +EXTRA_DIST = \ + $(Gnutelladata_DATA) + +subdir = data +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +DIST_SOURCES = +DATA = $(Gnutelladata_DATA) + +DIST_COMMON = $(srcdir)/Makefile.in Makefile.am +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4) + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu data/Makefile +Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in $(top_builddir)/config.status + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe) + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +distclean-libtool: + -rm -f libtool +uninstall-info-am: +GnutelladataDATA_INSTALL = $(INSTALL_DATA) +install-GnutelladataDATA: $(Gnutelladata_DATA) + @$(NORMAL_INSTALL) + $(mkinstalldirs) $(DESTDIR)$(Gnutelladatadir) + @list='$(Gnutelladata_DATA)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f="`echo $$p | sed -e 's|^.*/||'`"; \ + echo " $(GnutelladataDATA_INSTALL) $$d$$p $(DESTDIR)$(Gnutelladatadir)/$$f"; \ + $(GnutelladataDATA_INSTALL) $$d$$p $(DESTDIR)$(Gnutelladatadir)/$$f; \ + done + +uninstall-GnutelladataDATA: + @$(NORMAL_UNINSTALL) + @list='$(Gnutelladata_DATA)'; for p in $$list; do \ + f="`echo $$p | sed -e 's|^.*/||'`"; \ + echo " rm -f $(DESTDIR)$(Gnutelladatadir)/$$f"; \ + rm -f $(DESTDIR)$(Gnutelladatadir)/$$f; \ + done +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) + +top_distdir = .. +distdir = $(top_distdir)/$(PACKAGE)-$(VERSION) + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ + list='$(DISTFILES)'; for file in $$list; do \ + case $$file in \ + $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ + $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ + esac; \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test "$$dir" != "$$file" && test "$$dir" != "."; then \ + dir="/$$dir"; \ + $(mkinstalldirs) "$(distdir)$$dir"; \ + else \ + dir=''; \ + fi; \ + if test -d $$d/$$file; then \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(DATA) + +installdirs: + $(mkinstalldirs) $(DESTDIR)$(Gnutelladatadir) +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-libtool + +dvi: dvi-am + +dvi-am: + +info: info-am + +info-am: + +install-data-am: install-GnutelladataDATA + +install-exec-am: + +install-info: install-info-am + +install-man: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-GnutelladataDATA uninstall-info-am + +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + distclean distclean-generic distclean-libtool distdir dvi \ + dvi-am info info-am install install-GnutelladataDATA install-am \ + install-data install-data-am install-exec install-exec-am \ + install-info install-info-am install-man install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am uninstall \ + uninstall-GnutelladataDATA uninstall-am uninstall-info-am + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff -r 000000000000 -r d39e1d0d75b6 data/gwebcaches --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/data/gwebcaches Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,43 @@ +http://bootstrap.gtkg.net/ 0 +http://cache.kicks-ass.net:8000/ 0 +http://galvatron.dyndns.org:59009/gwcache 0 +http://gwc1c.olden.ch.3557.nyud.net:8090/gwc/ 0 +http://gwc2.nonexiste.net/ 0 +http://gwcrab.sarcastro.com:8001/ 0 +http://kisama.ath.cx:8080/ 0 +http://krill.shacknet.nu:20095/gwc 0 +http://loot.alumnigroup.org/ 0 +http://overbeer.ghostwhitecrab.de/ 0 +http://t.az.is.teh.r0x0r.gtkg.de/ 0 +http://tribaldance.ibiza.bishopston.net:3558/ 0 +http://xn--nc-hpa.de/ 0 +http://pokerface.ibiza.bishopston.net:3558/ 0 +http://mcache.firstlight.dk/mcache.php 0 +http://gwc.greyfade.us:8080/gwc/ 0 +http://gcache1.downtownurban.com/gwcii.php 0 +http://g2cache.theg2.net/gwcache/lynnx.asp 0 +http://gwc.nonexiste.net/ 0 +http://www.deepnetexplorer.co.uk/webcache/ 0 +http://www.deepnetexplorer.co.uk/webcache/index.asp 0 +http://www.sexymobile.co.za/cache.asp 0 +http://portalemedia.shinranet.com/modules/AllMyGuests/gcache.php 0 +http://www.exactmobile.co.za/cache.asp 0 +http://www.exactmobile.co.za/cache.asp/ 0 +http://blogblogsoupdocwindowgluenewsuo.xolox.nl/gwebcache/default.asp 0 +http://bloxtwasavsuedev.xolox.nl/gwebcache/default.asp 0 +http://extrasap.xolox.nl/gwebcache/default.asp 0 +http://gcachw.xolox.nl/gwebcache/ 0 +http://intense.homelinux.coww.xolox.nl/gwebcache/ 0 +http://noxnoxtelasox.xolox.nl/gwebcache/default.asp 0 +http://ophlh8ohnjhxfvnnkoalokd8vxc.xolox.nl/gwebcache/default.asp 0 +http://xyz.xolox.nl/gwebcache/ 0 +http://reukiodo.dyndns.org/gwebcache/gwcii.php 0 +http://wildcard-dns-sucks-biiiiig-time.xolox.nl/gwebcache/ 0 +http://www.xolox.nl/gwebcache/ 0 +http://www.xolox.nl/gwebcache/default.asp 0 +http://www.easwww.xolox.nl/gwebcache/ 0 +http://wefucktheworld.xolox.nl/gwebcache/default.asp 0 +http://what.xolox.nl/gwebcache/ 0 +http://wildcard-dns-sucks-biiiiig-time.xolox.nl/gwebcache/default.asp 0 +http://www.easwww.xolox.nl/GWEBcache/ 0 +http://www.easwww.xolox.nl/gwebcache/default.asp 0 diff -r 000000000000 -r d39e1d0d75b6 data/hostiles.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/data/hostiles.txt Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,16078 @@ +204.9.116.0/255.255.253.0 +204.193.136.0/255.255.255.0 +212.71.252.0/255.255.255.0 +38.118.150.0/255.255.235.0 +0.0.0.1/252.0.0.1 +4.0.38.42/255.255.255.245 +4.0.38.74/255.255.255.249 +4.0.38.114/255.255.255.249 +4.0.242.66/255.255.255.241 +4.1.75.142/255.255.255.241 +4.1.137.10/255.255.255.237 +4.1.137.30/255.255.255.241 +4.1.137.218/255.255.255.219 +4.1.138.150/255.255.255.249 +4.1.143.86/255.255.255.249 +4.2.144.64/255.255.255.224 +4.2.144.224/255.255.255.248 +4.2.144.248/255.255.255.248 +4.2.153.0/255.255.255.248 +4.2.160.64/255.255.255.240 +4.2.161.0/255.255.255.248 +4.2.161.128/255.255.255.128 +4.2.162.128/255.255.255.248 +4.2.162.144/255.255.255.248 +4.2.170.144/255.255.255.248 +4.2.173.32/255.255.255.224 +4.2.176.64/255.255.255.248 +4.2.176.88/255.255.255.248 +4.2.176.224/255.255.255.240 +4.2.179.32/255.255.255.240 +4.2.179.232/255.255.255.248 +4.2.179.240/255.255.255.248 +4.2.187.128/255.255.255.128 +4.2.188.96/255.255.255.248 +4.2.192.64/255.255.255.240 +4.2.225.248/255.255.255.248 +4.2.227.0/255.255.255.224 +4.2.227.72/255.255.255.248 +4.2.227.80/255.255.255.248 +4.2.227.128/255.255.255.248 +4.17.1.64/255.255.255.224 +4.17.2.240/255.255.255.240 +4.17.3.128/255.255.255.192 +4.17.24.0/255.255.251.0 +4.17.71.200/255.255.255.248 +4.17.129.64/255.255.255.248 +4.17.130.0/255.255.255.224 +4.17.130.88/255.255.255.248 +4.17.135.8/255.255.255.248 +4.17.140.48/255.255.255.240 +4.17.142.128/255.255.255.192 +4.17.160.128/255.255.255.224 +4.17.160.240/255.255.255.248 +4.17.168.224/255.255.255.224 +4.17.180.0/255.255.254.0 +4.17.183.112/255.255.255.248 +4.17.183.128/255.255.255.128 +4.17.192.64/255.255.255.240 +4.17.192.128/255.255.255.128 +4.17.222.96/255.255.255.224 +4.17.229.0/255.255.255.224 +4.17.245.128/255.255.255.128 +4.18.5.128/255.255.255.192 +4.18.32.96/255.255.255.224 +4.18.32.128/255.255.255.224 +4.18.32.184/255.255.255.248 +4.18.34.136/255.255.255.248 +4.18.34.224/255.255.255.248 +4.18.35.200/255.255.255.248 +4.18.37.16/255.255.255.240 +4.18.37.128/255.255.255.128 +4.18.40.64/255.255.255.240 +4.18.40.160/255.255.255.248 +4.18.42.8/255.255.255.248 +4.18.44.80/255.255.255.240 +4.18.49.0/255.255.255.240 +4.18.49.224/255.255.255.240 +4.18.52.176/255.255.255.240 +4.18.55.144/255.255.255.248 +4.18.55.152/255.255.255.248 +4.18.63.0/255.255.255.192 +4.18.78.128/255.255.255.128 +4.18.96.168/255.255.255.248 +4.18.101.0/255.255.255.248 +4.18.101.16/255.255.255.240 +4.18.101.64/255.255.255.192 +4.18.101.224/255.255.255.224 +4.18.128.88/255.255.255.248 +4.18.142.128/255.255.255.192 +4.18.154.0/255.255.255.0 +4.18.162.48/255.255.255.240 +4.18.192.176/255.255.255.240 +4.18.228.0/255.255.255.0 +4.18.234.0/255.255.255.0 +4.18.239.48/255.255.255.240 +4.18.239.192/255.255.255.192 +4.18.246.0/255.255.255.224 +4.18.247.128/255.255.255.128 +4.18.253.0/255.255.255.240 +4.18.253.48/255.255.255.240 +4.18.253.64/255.255.255.192 +4.19.32.0/255.255.255.248 +4.19.32.8/255.255.255.248 +4.19.32.16/255.255.255.240 +4.19.67.32/255.255.255.248 +4.19.67.48/255.255.255.248 +4.19.68.112/255.255.255.240 +4.19.72.0/255.255.254.0 +4.19.74.0/255.255.255.0 +4.19.76.0/255.255.255.224 +4.19.83.0/255.255.255.0 +4.19.84.128/255.255.255.0 +4.19.90.0/255.255.255.128 +4.19.90.128/255.255.255.128 +4.19.93.48/255.255.255.240 +4.19.93.160/255.255.255.240 +4.19.99.48/255.255.255.240 +4.19.225.0/255.255.255.0 +4.20.2.0/255.255.254.0 +4.20.14.0/255.255.254.0 +4.20.17.0/255.255.253.0 +4.20.32.0/255.255.255.248 +4.20.75.0/255.255.255.128 +4.20.96.48/255.255.255.248 +4.20.105.0/255.255.255.240 +4.20.128.64/255.255.255.224 +4.20.161.0/255.255.255.248 +4.20.161.136/255.255.255.248 +4.20.192.32/255.255.255.240 +4.20.192.48/255.255.255.240 +4.20.192.128/255.255.255.240 +4.20.224.64/255.255.255.224 +4.20.224.128/255.255.255.192 +4.20.228.0/255.255.255.0 +4.21.40.0/255.255.255.128 +4.21.42.0/255.255.255.0 +4.21.68.48/255.255.255.248 +4.21.70.0/255.255.255.0 +4.21.76.32/255.255.255.224 +4.21.76.120/255.255.255.248 +4.21.87.64/255.255.255.240 +4.21.87.224/255.255.255.240 +4.21.96.16/255.255.255.248 +4.21.96.112/255.255.255.240 +4.21.100.0/255.255.255.128 +4.21.100.128/255.255.255.248 +4.21.100.184/255.255.255.248 +4.21.100.192/255.255.255.192 +4.21.108.8/255.255.255.248 +4.21.108.32/255.255.255.248 +4.21.108.48/255.255.255.248 +4.21.108.224/255.255.255.240 +4.21.111.208/255.255.255.240 +4.21.111.240/255.255.255.248 +4.21.114.80/255.255.255.240 +4.21.114.96/255.255.255.224 +4.21.114.144/255.255.255.248 +4.21.116.0/255.255.255.128 +4.21.120.24/255.255.255.248 +4.21.122.0/255.255.255.248 +4.21.122.8/255.255.255.248 +4.21.122.16/255.255.255.248 +4.21.122.24/255.255.255.248 +4.21.122.64/255.255.255.248 +4.21.122.192/255.255.255.192 +4.21.126.0/255.255.254.192 +4.21.129.16/255.255.255.240 +4.21.132.0/255.255.255.248 +4.21.132.64/255.255.255.192 +4.21.133.0/255.255.255.0 +4.21.139.64/255.255.255.224 +4.21.139.128/255.255.255.128 +4.21.140.0/255.255.255.192 +4.21.148.64/255.255.255.224 +4.21.148.96/255.255.255.224 +4.21.148.128/255.255.255.240 +4.21.148.144/255.255.255.240 +4.21.154.224/255.255.255.224 +4.21.155.0/255.255.255.128 +4.21.160.0/255.255.255.248 +4.21.161.216/255.255.255.248 +4.21.161.224/255.255.255.248 +4.21.161.232/255.255.255.248 +4.21.164.0/255.255.255.192 +4.21.165.32/255.255.255.240 +4.21.166.64/255.255.255.240 +4.21.166.80/255.255.255.248 +4.21.166.128/255.255.255.192 +4.21.167.160/255.255.255.224 +4.21.169.0/255.255.255.0 +4.21.170.0/255.255.254.0 +4.21.176.128/255.255.255.128 +4.21.179.32/255.255.255.224 +4.21.181.112/255.255.255.240 +4.21.181.184/255.255.255.248 +4.21.192.192/255.255.255.240 +4.21.194.192/255.255.255.224 +4.21.194.232/255.255.255.248 +4.21.196.128/255.255.255.248 +4.21.196.224/255.255.255.240 +4.21.197.128/255.255.255.192 +4.21.197.192/255.255.255.224 +4.21.197.224/255.255.255.248 +4.21.198.0/255.255.255.240 +4.21.211.0/255.255.255.248 +4.21.212.0/255.255.255.0 +4.21.214.0/255.255.255.128 +4.22.32.88/255.255.255.248 +4.22.66.0/255.255.254.0 +4.22.72.0/255.255.248.0 +4.22.106.56/255.255.255.248 +4.22.121.0/255.255.255.0 +4.22.125.128/255.255.255.128 +4.22.129.0/255.255.255.0 +4.22.134.0/255.255.254.0 +4.22.136.160/255.255.255.248 +4.22.138.128/255.255.255.128 +4.22.139.192/255.255.255.192 +4.22.140.128/255.255.255.192 +4.22.150.0/255.255.255.248 +4.22.150.8/255.255.255.248 +4.22.151.0/255.255.255.224 +4.22.173.192/255.255.255.240 +4.22.237.0/255.255.255.0 +4.22.248.64/255.255.255.224 +4.23.9.96/255.255.255.240 +4.23.12.0/255.255.255.0 +4.23.64.0/255.255.255.0 +4.23.65.24/255.255.255.248 +4.23.96.0/255.255.252.0 +4.23.104.176/255.255.255.240 +4.23.105.0/255.255.255.0 +4.23.132.224/255.255.255.240 +4.23.160.176/255.255.255.248 +4.23.160.184/255.255.255.248 +4.23.160.240/255.255.255.240 +4.23.161.208/255.255.255.240 +4.23.170.16/255.255.255.240 +4.23.170.128/255.255.255.240 +4.23.170.224/255.255.255.240 +4.23.172.32/255.255.255.240 +4.23.179.120/255.255.255.248 +4.23.183.192/255.255.255.192 +4.24.32.238/255.255.255.238 +4.24.48.206/255.255.255.241 +4.24.48.230/255.255.255.249 +4.24.48.238/255.255.255.239 +4.24.58.138/255.255.255.241 +4.24.70.58/255.255.255.213 +4.24.70.194/255.255.255.229 +4.24.70.222/255.255.255.249 +4.24.86.154/255.255.255.249 +4.24.92.66/255.255.255.249 +4.24.154.206/255.255.255.206 +4.24.176.54/255.255.255.54 +4.24.195.38/255.255.255.249 +4.24.195.58/255.255.255.201 +4.24.198.222/255.255.255.249 +4.24.203.58/255.255.255.249 +4.24.214.150/255.255.255.249 +4.24.239.58/255.255.255.249 +4.24.247.114/255.255.255.249 +4.34.0.0/255.255.128.0 +4.36.109.0/255.255.255.0 +4.36.129.0/255.255.255.192 +4.36.129.128/255.255.255.192 +4.36.198.0/255.255.255.128 +4.36.226.128/255.255.255.128 +4.37.64.136/255.255.255.248 +4.37.64.144/255.255.255.248 +4.37.64.152/255.255.255.248 +4.37.68.8/255.255.255.248 +4.37.71.8/255.255.255.248 +4.37.72.0/255.255.255.128 +4.37.96.80/255.255.255.248 +4.37.96.120/255.255.255.248 +4.37.109.0/255.255.255.0 +4.37.113.0/255.255.255.224 +4.37.113.32/255.255.255.224 +4.37.160.112/255.255.255.248 +4.37.248.0/255.255.248.0 +4.38.38.0/255.255.255.128 +4.38.41.128/255.255.255.128 +4.38.79.0/255.255.255.128 +4.38.79.128/255.255.255.128 +4.38.93.96/255.255.255.224 +4.38.94.0/255.255.255.160 +4.38.94.96/255.255.255.248 +4.39.37.0/255.255.255.128 +4.42.176.184/255.255.255.248 +4.42.189.80/255.255.255.240 +4.42.192.200/255.255.255.248 +4.42.204.192/255.255.255.192 +4.42.208.16/255.255.255.248 +4.42.208.24/255.255.255.248 +4.42.209.184/255.255.255.248 +4.42.209.224/255.255.255.248 +4.42.224.96/255.255.255.248 +4.42.224.112/255.255.255.240 +4.42.237.224/255.255.255.224 +4.42.244.160/255.255.255.240 +4.42.244.192/255.255.255.224 +4.42.244.224/255.255.255.240 +4.43.32.200/255.255.255.248 +4.43.36.0/255.255.255.192 +4.43.47.0/255.255.255.0 +4.43.64.160/255.255.255.248 +4.43.67.64/255.255.255.192 +4.43.96.0/255.255.255.0 +4.43.101.0/255.255.255.128 +4.43.108.0/255.255.255.0 +4.43.121.224/255.255.255.240 +4.43.124.64/255.255.255.192 +4.43.124.192/255.255.255.192 +4.67.10.0/255.255.255.192 +4.67.10.128/255.255.255.128 +4.67.18.0/255.255.255.0 +4.67.43.0/255.255.255.0 +4.67.72.0/255.255.255.0 +4.67.80.64/255.255.255.192 +4.134.133.64/255.255.255.192 +8.0.0.0/255.0.0.0 +9.0.0.0/255.0.0.0 +12.0.27.0/255.255.255.0 +12.0.32.232/255.255.255.248 +12.0.45.208/255.255.255.248 +12.1.175.96/255.255.255.240 +12.1.224.0/255.255.255.240 +12.1.224.32/255.255.255.240 +12.1.224.96/255.255.255.240 +12.1.231.128/255.255.255.128 +12.1.240.0/255.255.254.128 +12.2.21.0/255.255.255.0 +12.2.27.0/255.255.255.128 +12.2.121.0/255.255.255.128 +12.2.153.224/255.255.255.224 +12.2.215.0/255.255.255.0 +12.2.224.0/255.255.255.248 +12.2.231.0/255.255.255.128 +12.3.50.120/255.255.255.248 +12.3.126.0/255.255.254.0 +12.3.159.0/255.255.255.128 +12.4.3.0/255.255.255.0 +12.4.10.0/255.255.255.128 +12.4.21.192/255.255.255.192 +12.4.48.128/255.255.255.128 +12.4.69.32/255.255.255.224 +12.4.102.0/255.255.255.0 +12.4.123.32/255.255.255.224 +12.4.123.64/255.255.255.240 +12.4.196.21/255.255.255.240 +12.4.208.144/255.255.255.240 +12.4.208.192/255.255.255.192 +12.4.214.24/255.255.255.248 +12.4.214.96/255.255.255.224 +12.4.214.128/255.255.255.240 +12.4.214.160/255.255.255.240 +12.4.217.16/255.255.255.240 +12.5.153.0/255.255.255.128 +12.5.171.80/255.255.255.240 +12.5.225.8/255.255.255.248 +12.5.239.0/255.255.255.0 +12.5.248.128/255.255.255.128 +12.6.42.0/255.255.254.0 +12.6.96.0/255.255.255.0 +12.6.138.168/255.255.255.248 +12.6.146.0/255.255.255.0 +12.6.157.128/255.255.255.192 +12.6.225.0/255.255.255.0 +12.6.243.80/255.255.255.240 +12.6.246.128/255.255.255.128 +12.7.133.0/255.255.255.0 +12.7.209.0/255.255.255.128 +12.8.0.128/255.255.255.248 +12.8.0.160/255.255.255.240 +12.8.1.192/255.255.255.240 +12.8.2.0/255.255.254.0 +12.8.6.128/255.255.255.240 +12.8.6.144/255.255.255.240 +12.8.6.160/255.255.255.240 +12.8.17.80/255.255.255.240 +12.8.17.192/255.255.255.248 +12.8.19.144/255.255.255.240 +12.8.21.128/255.255.255.0 +12.8.36.32/255.255.255.240 +12.8.47.64/255.255.255.240 +12.9.17.0/255.255.255.0 +12.9.27.64/255.255.255.160 +12.9.27.176/255.255.255.240 +12.9.27.192/255.255.255.240 +12.9.27.240/255.255.255.240 +12.9.125.0/255.255.255.0 +12.9.145.96/255.255.255.224 +12.9.200.144/255.255.255.240 +12.9.240.160/255.255.255.240 +12.9.242.0/255.255.255.0 +12.9.246.0/255.255.255.248 +12.9.246.48/255.255.255.240 +12.9.246.224/255.255.255.224 +12.10.17.192/255.255.255.224 +12.10.34.48/255.255.255.240 +12.10.117.144/255.255.255.240 +12.10.146.0/255.255.255.0 +12.10.147.128/255.255.255.128 +12.10.149.0/255.255.255.0 +12.10.192.0/255.255.248.0 +12.10.208.0/255.255.254.0 +12.10.216.128/255.255.255.128 +12.11.145.64/255.255.255.192 +12.11.145.128/255.255.255.128 +12.11.178.192/255.255.255.240 +12.11.179.0/255.255.255.0 +12.13.60.128/255.255.255.128 +12.13.61.192/255.255.255.224 +12.13.102.208/255.255.255.240 +12.13.114.208/255.255.255.240 +12.13.167.128/255.255.255.128 +12.13.174.128/255.255.255.128 +12.13.178.200/255.255.255.248 +12.13.207.0/255.255.255.0 +12.13.216.64/255.255.255.224 +12.14.23.0/255.255.255.192 +12.14.64.0/255.255.255.192 +12.14.82.192/255.255.255.192 +12.14.126.0/255.255.255.192 +12.14.218.128/255.255.255.192 +12.15.11.0/255.255.255.0 +12.15.208.0/255.255.255.128 +12.16.33.16/255.255.255.224 +12.16.156.96/255.255.255.240 +12.17.12.64/255.255.255.240 +12.17.12.112/255.255.255.248 +12.17.23.48/255.255.255.248 +12.17.76.0/255.255.252.0 +12.17.117.96/255.255.255.240 +12.17.122.112/255.255.255.240 +12.17.125.208/255.255.255.240 +12.17.131.176/255.255.255.248 +12.17.136.128/255.255.255.128 +12.17.172.8/255.255.255.248 +12.17.195.0/255.255.255.0 +12.17.210.96/255.255.255.240 +12.17.221.240/255.255.255.240 +12.17.225.96/255.255.255.224 +12.18.6.0/255.255.255.128 +12.18.63.96/255.255.255.224 +12.18.71.80/255.255.255.240 +12.18.119.0/255.255.255.0 +12.18.140.144/255.255.255.240 +12.18.145.0/255.255.255.128 +12.18.154.0/255.255.255.128 +12.18.252.128/255.255.255.192 +12.19.23.0/255.255.255.0 +12.19.52.64/255.255.255.240 +12.19.82.0/255.255.255.0 +12.20.24.0/255.255.255.240 +12.20.25.112/255.255.255.240 +12.20.128.0/255.255.255.128 +12.20.200.0/255.255.252.0 +12.20.217.184/255.255.255.248 +12.20.225.0/255.255.255.192 +12.21.10.160/255.255.255.224 +12.21.94.0/255.255.255.192 +12.21.129.0/255.255.255.192 +12.21.167.128/255.255.255.192 +12.21.172.0/255.255.255.128 +12.21.174.112/255.255.255.240 +12.21.181.0/255.255.255.192 +12.21.182.0/255.255.255.192 +12.21.183.0/255.255.255.192 +12.21.186.8/255.255.255.248 +12.22.36.192/255.255.255.192 +12.22.53.80/255.255.255.248 +12.22.82.224/255.255.255.224 +12.22.131.0/255.255.255.0 +12.22.163.112/255.255.255.240 +12.22.220.240/255.255.255.240 +12.22.223.32/255.255.255.240 +12.23.28.0/255.255.254.240 +12.23.29.32/255.255.255.224 +12.23.29.96/255.255.255.224 +12.23.29.176/255.255.255.240 +12.23.84.0/255.255.255.0 +12.23.96.224/255.255.255.248 +12.23.97.0/255.255.255.0 +12.23.100.0/255.255.254.0 +12.23.247.128/255.255.255.128 +12.24.116.32/255.255.255.224 +12.24.137.128/255.255.255.128 +12.25.46.0/255.255.255.0 +12.25.165.232/255.255.255.248 +12.25.173.64/255.255.255.192 +12.25.180.0/255.255.255.0 +12.25.204.0/255.255.254.0 +12.26.26.32/255.255.255.224 +12.26.52.16/255.255.255.240 +12.26.70.0/255.255.255.192 +12.26.71.128/255.255.255.128 +12.26.74.112/255.255.255.240 +12.26.85.192/255.255.255.224 +12.26.224.192/255.255.255.224 +12.26.225.0/255.255.255.192 +12.27.22.80/255.255.255.240 +12.27.76.80/255.255.255.240 +12.27.204.0/255.255.255.0 +12.27.233.0/255.255.255.128 +12.28.8.192/255.255.255.240 +12.28.12.0/255.255.255.248 +12.28.17.0/255.255.255.0 +12.28.72.128/255.255.255.192 +12.28.199.0/255.255.255.0 +12.28.222.0/255.255.254.0 +12.28.233.0/255.255.255.192 +12.29.112.0/255.255.255.240 +12.30.34.0/255.255.255.0 +12.30.64.16/255.255.255.240 +12.30.80.128/255.255.255.128 +12.30.88.80/255.255.255.240 +12.30.152.128/255.255.255.128 +12.30.156.64/255.255.255.192 +12.30.240.192/255.255.255.240 +12.30.241.0/255.255.255.0 +12.30.242.0/255.255.254.0 +12.30.248.144/255.255.255.240 +12.31.35.0/255.255.255.128 +12.31.64.0/255.255.255.0 +12.31.116.32/255.255.255.240 +12.31.142.96/255.255.255.240 +12.31.168.240/255.255.255.240 +12.31.240.112/255.255.255.240 +12.32.10.64/255.255.255.224 +12.32.69.64/255.255.255.224 +12.32.69.128/255.255.255.224 +12.32.128.128/255.255.255.224 +12.32.180.32/255.255.255.240 +12.32.193.128/255.255.255.128 +12.33.0.64/255.255.255.240 +12.33.0.112/255.255.255.240 +12.33.3.32/255.255.255.248 +12.33.79.0/255.255.255.128 +12.33.92.112/255.255.255.240 +12.33.137.0/255.255.255.240 +12.33.141.8/255.255.255.248 +12.33.141.32/255.255.255.224 +12.33.141.128/255.255.255.176 +12.33.144.16/255.255.255.248 +12.33.144.48/255.255.255.240 +12.33.203.240/255.255.255.240 +12.34.24.192/255.255.255.192 +12.34.27.96/255.255.255.224 +12.34.56.128/255.255.255.128 +12.34.64.48/255.255.255.240 +12.34.102.16/255.255.255.248 +12.34.125.192/255.255.255.240 +12.34.196.32/255.255.255.224 +12.35.47.112/255.255.255.240 +12.35.47.160/255.255.255.240 +12.35.80.0/255.255.240.0 +12.35.166.0/255.255.255.0 +12.35.167.0/255.255.255.224 +12.35.205.208/255.255.255.240 +12.35.244.112/255.255.255.240 +12.35.253.176/255.255.255.248 +12.36.20.48/255.255.255.240 +12.36.131.192/255.255.255.224 +12.36.136.48/255.255.255.240 +12.36.209.0/255.255.255.0 +12.36.242.0/255.255.254.128 +12.37.72.0/255.255.255.240 +12.37.128.32/255.255.255.240 +12.37.128.128/255.255.255.128 +12.37.139.168/255.255.255.248 +12.37.209.64/255.255.255.240 +12.37.209.176/255.255.255.240 +12.38.31.216/255.255.255.248 +12.38.86.72/255.255.255.248 +12.38.87.0/255.255.255.0 +12.38.128.48/255.255.255.240 +12.38.210.0/255.255.255.192 +12.39.34.128/255.255.255.192 +12.39.196.80/255.255.255.240 +12.39.200.16/255.255.255.224 +12.39.202.32/255.255.255.224 +12.39.240.0/255.255.255.224 +12.39.242.64/255.255.255.224 +12.39.247.128/255.255.255.192 +12.40.12.176/255.255.255.248 +12.40.85.0/255.255.255.0 +12.40.92.176/255.255.255.240 +12.40.133.192/255.255.255.240 +12.40.135.128/255.255.255.240 +12.40.163.128/255.255.255.128 +12.41.10.96/255.255.255.224 +12.41.10.192/255.255.255.192 +12.41.57.240/255.255.255.240 +12.41.72.0/255.255.255.232 +12.41.72.128/255.255.255.128 +12.41.172.64/255.255.255.240 +12.41.237.0/255.255.255.0 +12.42.32.88/255.255.255.248 +12.42.43.80/255.255.255.248 +12.42.52.0/255.255.255.0 +12.42.84.160/255.255.255.240 +12.42.160.112/255.255.255.240 +12.42.163.24/255.255.255.216 +12.42.226.208/255.255.255.248 +12.43.212.160/255.255.255.240 +12.44.12.64/255.255.255.248 +12.44.28.144/255.255.255.240 +12.44.31.152/255.255.255.248 +12.44.50.112/255.255.255.248 +12.44.251.32/255.255.255.248 +12.45.13.0/255.255.255.0 +12.45.34.224/255.255.255.240 +12.45.97.80/255.255.255.248 +12.45.127.0/255.255.255.0 +12.45.172.152/255.255.255.248 +12.45.173.128/255.255.255.128 +12.45.230.96/255.255.255.224 +12.45.231.0/255.255.255.248 +12.45.231.160/255.255.255.224 +12.46.0.176/255.255.255.240 +12.46.15.0/255.255.255.0 +12.46.120.0/255.255.255.128 +12.46.138.128/255.255.255.240 +12.47.48.144/255.255.255.240 +12.47.164.96/255.255.255.248 +12.60.32.0/255.255.255.240 +12.60.136.80/255.255.255.240 +12.61.17.32/255.255.255.240 +12.61.168.64/255.255.255.240 +12.61.200.128/255.255.255.240 +12.62.226.80/255.255.255.240 +12.62.229.128/255.255.255.192 +12.62.240.0/255.255.255.128 +12.96.13.0/255.255.255.128 +12.96.39.0/255.255.255.0 +12.96.129.192/255.255.255.192 +12.96.131.0/255.255.255.224 +12.96.236.16/255.255.255.240 +12.104.55.80/255.255.255.240 +12.104.97.144/255.255.255.248 +12.104.152.152/255.255.255.248 +12.104.153.0/255.255.255.0 +12.104.194.32/255.255.255.224 +12.104.222.0/255.255.255.128 +12.105.35.16/255.255.255.240 +12.105.79.128/255.255.255.240 +12.105.235.224/255.255.255.240 +12.106.28.128/255.255.255.128 +12.106.67.0/255.255.255.0 +12.106.237.64/255.255.255.240 +12.106.237.192/255.255.255.240 +12.107.1.0/255.255.255.0 +12.107.2.16/255.255.255.240 +12.107.55.64/255.255.255.240 +12.107.70.128/255.255.255.224 +12.107.80.64/255.255.255.192 +12.107.83.96/255.255.255.248 +12.107.84.64/255.255.255.240 +12.107.84.208/255.255.255.240 +12.107.124.96/255.255.255.224 +12.107.134.0/255.255.255.128 +12.107.134.144/255.255.255.240 +12.107.206.128/255.255.255.128 +12.107.210.128/255.255.255.128 +12.108.4.144/255.255.255.240 +12.108.192.168/255.255.255.248 +12.109.33.96/255.255.255.224 +12.109.131.0/255.255.255.240 +12.109.131.24/255.255.255.248 +12.109.137.24/255.255.255.248 +12.109.137.224/255.255.255.240 +12.109.138.144/255.255.255.248 +12.109.140.0/255.255.255.224 +12.109.149.0/255.255.255.192 +12.109.164.0/255.255.252.0 +12.109.206.0/255.255.255.224 +12.110.93.64/255.255.255.248 +12.110.101.48/255.255.255.240 +12.110.110.184/255.255.255.184 +12.111.18.160/255.255.255.240 +12.111.20.208/255.255.255.248 +12.111.25.224/255.255.255.240 +12.111.70.64/255.255.255.240 +12.111.116.0/255.255.255.0 +12.111.227.0/255.255.255.216 +12.129.16.176/255.255.255.240 +12.129.64.0/255.255.192.0 +12.129.196.32/255.255.255.240 +12.129.207.0/255.255.255.224 +12.129.209.80/255.255.255.240 +12.129.230.152/255.255.255.216 +12.129.232.0/255.255.252.0 +12.129.248.208/255.255.255.240 +12.130.6.248/255.255.255.248 +12.130.14.64/255.255.255.192 +12.144.7.192/255.255.255.248 +12.144.14.176/255.255.255.240 +12.144.36.208/255.255.255.240 +12.144.54.80/255.255.255.248 +12.144.106.0/255.255.255.128 +12.144.198.112/255.255.255.240 +12.145.42.0/255.255.255.0 +12.145.63.0/255.255.255.0 +12.145.126.32/255.255.255.224 +12.145.192.0/255.255.255.0 +12.145.193.0/255.255.255.192 +12.146.65.16/255.255.255.240 +12.146.149.208/255.255.255.240 +12.146.160.16/255.255.255.248 +12.146.196.64/255.255.255.224 +12.146.198.160/255.255.255.240 +12.147.49.128/255.255.255.248 +12.147.232.48/255.255.255.248 +12.148.10.16/255.255.255.240 +12.148.54.128/255.255.255.192 +12.148.80.0/255.255.252.0 +12.148.196.128/255.255.255.128 +12.148.206.0/255.255.255.0 +12.148.209.192/255.255.255.192 +12.148.241.0/255.255.255.192 +12.149.9.48/255.255.255.240 +12.149.9.112/255.255.255.240 +12.149.15.128/255.255.255.128 +12.149.38.80/255.255.255.240 +12.149.41.144/255.255.255.240 +12.149.76.32/255.255.255.192 +12.149.94.160/255.255.255.224 +12.149.115.128/255.255.255.192 +12.149.182.96/255.255.255.224 +12.149.220.0/255.255.255.224 +12.150.104.128/255.255.255.224 +12.150.112.240/255.255.255.248 +12.150.125.160/255.255.255.240 +12.150.185.64/255.255.255.192 +12.150.186.0/255.255.255.0 +12.150.191.0/255.255.255.0 +12.150.205.176/255.255.255.240 +12.150.244.240/255.255.255.240 +12.150.248.0/255.255.255.224 +12.151.3.0/255.255.255.0 +12.151.30.48/255.255.255.240 +12.151.32.128/255.255.252.128 +12.151.42.0/255.255.254.0 +12.151.196.48/255.255.255.240 +12.152.140.176/255.255.255.224 +12.152.140.208/255.255.255.240 +12.152.177.0/255.255.255.128 +12.152.184.0/255.255.254.0 +12.153.20.0/255.255.254.0 +12.153.47.96/255.255.255.240 +12.153.47.160/255.255.255.240 +12.153.64.128/255.255.255.248 +12.153.67.112/255.255.255.248 +12.154.48.136/255.255.255.248 +12.154.48.160/255.255.255.224 +12.154.48.224/255.255.255.224 +12.154.67.96/255.255.255.224 +12.154.80.0/255.255.255.128 +12.154.88.0/255.255.255.0 +12.154.183.0/255.255.255.0 +12.155.35.0/255.255.255.248 +12.155.96.0/255.255.255.128 +12.155.103.192/255.255.255.192 +12.155.105.128/255.255.255.224 +12.155.129.128/255.255.255.128 +12.155.194.0/255.255.255.248 +12.158.1.80/255.255.255.240 +12.158.57.96/255.255.255.248 +12.158.129.128/255.255.255.128 +12.158.141.128/255.255.255.128 +12.159.40.248/255.255.255.248 +12.159.44.0/255.255.255.192 +12.159.240.128/255.255.255.192 +12.160.51.0/255.255.255.128 +12.160.67.240/255.255.255.240 +12.160.68.144/255.255.255.240 +12.160.77.208/255.255.255.248 +12.160.187.112/255.255.255.240 +12.161.5.32/255.255.255.240 +12.161.21.208/255.255.255.240 +12.161.64.48/255.255.255.248 +12.161.65.0/255.255.255.0 +12.161.68.0/255.255.252.0 +12.161.118.112/255.255.255.224 +12.162.33.16/255.255.255.240 +12.162.33.48/255.255.255.240 +12.162.107.128/255.255.255.192 +12.163.178.32/255.255.255.240 +12.164.192.0/255.255.255.248 +12.164.236.0/255.255.252.0 +12.165.33.0/255.255.255.192 +12.165.187.128/255.255.255.128 +12.166.244.144/255.255.255.240 +12.167.146.0/255.255.254.0 +12.167.192.128/255.255.255.128 +12.168.81.96/255.255.255.224 +12.169.40.0/255.255.252.0 +12.169.46.0/255.255.255.128 +12.169.64.0/255.255.255.128 +12.170.132.0/255.255.254.0 +12.170.154.0/255.255.254.0 +12.170.157.8/255.255.255.248 +12.171.160.192/255.255.255.192 +12.172.56.0/255.255.255.0 +12.173.207.192/255.255.255.248 +12.174.92.0/255.255.255.0 +12.174.149.160/255.255.255.224 +12.175.0.32/255.255.255.240 +12.175.124.80/255.255.255.240 +12.178.7.0/255.255.255.128 +12.178.64.64/255.255.255.248 +12.179.225.0/255.255.255.0 +12.220.252.0/255.255.252.0 +13.0.0.0/255.0.0.0 +15.0.0.0/253.0.0.0 +24.2.32.0/255.255.224.0 +25.0.0.0/254.0.0.0 +32.0.0.0/253.0.0.0 +38.112.50.0/255.255.144.128 +38.112.161.160/255.255.226.160 +38.112.191.0/255.254.250.0 +38.113.214.0/255.255.255.0 +38.113.215.0/255.254.249.0 +38.114.222.0/255.255.181.0 +38.115.41.0/255.255.165.125 +38.115.131.133/255.254.247.193 +38.116.139.197/255.255.255.238 +38.116.139.216/255.255.255.218 +38.116.139.255/255.255.133.255 +38.117.6.0/255.255.255.0 +38.117.7.0/255.254.120.98 +38.118.142.158/255.255.255.112 +38.118.143.47/255.255.255.160 +38.118.143.144/255.255.255.186 +38.118.143.215/255.255.255.244 +38.118.143.228/255.255.79.66 +38.119.64.162/255.255.253.162 +38.119.67.0/255.255.255.0 +38.119.68.0/255.255.219.0 +38.119.105.0/255.255.255.0 +38.119.106.0/255.231.34.0 +38.144.72.0/255.255.255.0 +38.144.73.0/255.255.131.190 +38.144.197.66/255.255.255.66 +38.144.198.151/255.144.198.151 +40.0.0.0/255.0.0.0 +44.0.0.0/254.0.0.0 +47.0.0.0/255.0.0.0 +49.0.0.0/253.0.0.0 +60.32.3.40/255.255.255.248 +60.32.3.112/255.255.255.240 +60.191.1.208/255.255.255.248 +60.191.1.232/255.255.255.248 +60.191.3.160/255.255.255.240 +60.200.0.0/255.251.0.0 +60.234.64.0/255.255.255.248 +60.255.0.0/255.255.0.0 +61.6.64.168/255.255.255.248 +61.6.68.192/255.255.255.248 +61.7.5.16/255.255.255.240 +61.8.5.48/255.255.255.240 +61.8.13.192/255.255.255.240 +61.8.244.56/255.255.255.222 +61.8.244.128/255.255.255.240 +61.8.244.208/255.255.255.240 +61.8.247.64/255.255.255.224 +61.12.8.160/255.255.255.224 +61.13.4.64/255.255.255.192 +61.13.4.192/255.255.255.192 +61.13.6.64/255.255.255.192 +61.13.21.64/255.255.255.192 +61.13.29.64/255.255.255.192 +61.13.45.192/255.255.255.192 +61.13.73.64/255.255.255.192 +61.13.118.0/255.255.255.192 +61.13.128.224/255.255.255.224 +61.13.129.160/255.255.255.224 +61.13.137.192/255.255.255.224 +61.13.146.128/255.255.255.224 +61.13.147.96/255.255.255.224 +61.13.159.96/255.255.255.224 +61.13.161.192/255.255.255.224 +61.14.34.80/255.255.255.248 +61.14.55.16/255.255.255.240 +61.14.136.128/255.255.255.224 +61.16.6.160/255.255.255.224 +61.16.23.224/255.255.255.224 +61.16.24.160/255.255.255.224 +61.16.43.96/255.255.255.224 +61.16.82.192/255.255.255.224 +61.16.108.192/255.255.255.224 +61.16.168.128/255.255.255.224 +61.16.169.24/255.255.255.248 +61.16.233.240/255.255.255.248 +61.16.236.224/255.255.255.240 +61.16.237.160/255.255.255.248 +61.32.39.128/255.255.255.128 +61.32.69.64/255.255.255.192 +61.32.168.96/255.255.255.224 +61.32.199.64/255.255.255.192 +61.32.226.128/255.255.255.240 +61.32.255.0/255.255.255.0 +61.33.22.0/255.255.255.128 +61.33.113.64/255.255.255.192 +61.33.156.128/255.255.255.128 +61.34.131.0/255.255.255.192 +61.35.135.0/255.255.255.192 +61.35.220.128/255.255.255.192 +61.35.254.0/255.255.255.0 +61.36.174.128/255.255.255.128 +61.37.33.128/255.255.255.128 +61.38.109.64/255.255.255.192 +61.38.211.192/255.255.255.224 +61.39.117.192/255.255.255.192 +61.39.168.0/255.255.250.0 +61.39.193.0/255.255.255.0 +61.39.195.0/255.255.255.0 +61.39.197.0/255.255.253.0 +61.40.51.128/255.255.255.192 +61.40.72.192/255.255.255.192 +61.40.110.64/255.255.255.192 +61.40.131.64/255.255.255.192 +61.40.211.192/255.255.255.192 +61.41.88.0/255.255.253.0 +61.41.92.0/255.255.255.0 +61.41.94.0/255.255.255.0 +61.41.96.0/255.255.252.0 +61.41.102.0/255.255.254.0 +61.42.40.0/255.255.255.0 +61.42.83.0/255.255.255.0 +61.46.0.0/255.255.0.0 +61.49.0.0/255.255.255.0 +61.49.1.0/255.255.255.0 +61.49.9.160/255.255.255.224 +61.49.16.0/255.255.255.0 +61.49.17.0/255.255.255.224 +61.56.128.0/255.255.224.0 +61.57.32.0/255.255.224.0 +61.57.224.0/255.255.240.0 +61.60.0.0/255.255.224.0 +61.60.32.0/255.255.160.0 +61.62.0.0/255.255.0.0 +61.64.64.0/255.255.200.0 +61.64.128.0/255.255.128.0 +61.67.64.0/255.255.224.0 +61.73.42.0/255.255.243.0 +61.82.138.0/255.255.255.0 +61.86.129.176/255.255.255.240 +61.92.167.96/255.255.255.224 +61.92.170.56/255.255.255.248 +61.95.12.224/255.255.255.224 +61.95.18.32/255.255.255.224 +61.95.39.128/255.255.255.224 +61.95.69.0/255.255.255.0 +61.95.83.192/255.255.255.192 +61.95.100.32/255.255.255.224 +61.95.104.224/255.255.255.224 +61.95.132.224/255.255.255.224 +61.95.145.104/255.255.255.248 +61.95.152.0/255.255.255.224 +61.95.152.160/255.255.255.224 +61.95.152.192/255.255.255.192 +61.95.158.0/255.255.255.224 +61.95.158.120/255.255.255.248 +61.95.167.0/255.255.255.0 +61.95.179.128/255.255.255.192 +61.95.225.104/255.255.255.248 +61.95.226.16/255.255.255.240 +61.95.226.176/255.255.255.248 +61.95.242.0/255.255.255.248 +61.100.22.0/255.255.254.0 +61.102.212.64/255.255.255.192 +61.103.161.64/255.255.255.192 +61.107.88.0/255.255.255.0 +61.107.106.0/255.255.255.0 +61.113.9.240/255.255.255.248 +61.113.21.48/255.255.255.248 +61.113.25.168/255.255.255.248 +61.113.25.184/255.255.255.248 +61.113.47.208/255.255.255.248 +61.113.98.0/255.255.254.0 +61.113.110.96/255.255.255.240 +61.113.110.192/255.255.255.248 +61.113.110.200/255.255.255.248 +61.113.174.64/255.255.255.224 +61.113.176.136/255.255.255.248 +61.114.64.224/255.255.255.248 +61.114.97.128/255.255.255.240 +61.115.0.168/255.255.255.248 +61.115.1.152/255.255.255.248 +61.115.6.192/255.255.255.240 +61.115.36.208/255.255.255.240 +61.115.128.0/255.255.192.0 +61.115.200.48/255.255.255.240 +61.115.207.160/255.255.255.240 +61.117.136.192/255.255.255.192 +61.117.137.64/255.255.255.192 +61.117.138.144/255.255.255.240 +61.117.145.32/255.255.255.224 +61.117.156.224/255.255.255.224 +61.117.188.32/255.255.255.224 +61.117.190.32/255.255.255.224 +61.117.215.96/255.255.255.224 +61.117.216.64/255.255.255.224 +61.119.0.32/255.255.255.248 +61.119.2.128/255.255.255.240 +61.119.4.128/255.255.255.240 +61.119.22.176/255.255.255.240 +61.119.39.224/255.255.255.240 +61.119.69.104/255.255.255.248 +61.119.120.208/255.255.255.248 +61.119.121.192/255.255.255.248 +61.119.121.208/255.255.255.240 +61.120.1.152/255.255.255.248 +61.120.3.160/255.255.255.248 +61.120.5.128/255.255.255.192 +61.120.14.16/255.255.255.248 +61.120.30.232/255.255.255.248 +61.120.35.168/255.255.255.248 +61.120.44.192/255.255.255.240 +61.120.56.64/255.255.255.248 +61.120.61.64/255.255.255.240 +61.120.61.168/255.255.255.248 +61.120.65.104/255.255.255.248 +61.120.65.192/255.255.255.240 +61.120.74.120/255.255.255.248 +61.120.93.16/255.255.255.240 +61.120.99.24/255.255.255.248 +61.120.99.120/255.255.255.240 +61.120.106.8/255.255.255.248 +61.120.109.176/255.255.255.240 +61.120.141.0/255.255.255.240 +61.120.141.40/255.255.255.248 +61.120.141.64/255.255.255.248 +61.120.141.248/255.255.255.248 +61.120.151.160/255.255.255.240 +61.120.152.208/255.255.255.248 +61.120.160.0/255.255.224.0 +61.120.193.192/255.255.255.248 +61.120.194.64/255.255.255.192 +61.120.197.240/255.255.255.248 +61.121.108.16/255.255.255.208 +61.121.194.48/255.255.255.240 +61.121.248.128/255.255.255.248 +61.121.253.128/255.255.255.128 +61.122.56.0/255.255.248.0 +61.122.217.176/255.255.255.240 +61.123.128.80/255.255.255.240 +61.123.130.160/255.255.255.248 +61.123.133.120/255.255.255.248 +61.123.141.112/255.255.255.240 +61.123.218.0/255.255.252.0 +61.123.222.0/255.255.254.0 +61.125.24.96/255.255.255.248 +61.127.2.64/255.255.255.240 +61.127.6.64/255.255.255.240 +61.127.7.232/255.255.255.248 +61.127.10.72/255.255.255.248 +61.127.22.176/255.255.255.248 +61.127.109.152/255.255.255.248 +61.127.255.112/255.255.255.248 +61.128.103.164/255.255.255.248 +61.129.39.64/255.255.255.192 +61.129.40.0/255.255.255.192 +61.129.109.224/255.255.255.224 +61.129.120.0/255.255.255.240 +61.129.255.128/255.255.255.128 +61.130.5.64/255.255.255.240 +61.130.174.160/255.255.255.240 +61.131.5.64/255.255.255.192 +61.131.28.160/255.255.255.248 +61.131.28.176/255.255.255.248 +61.131.28.184/255.255.255.248 +61.131.29.208/255.255.255.248 +61.131.29.216/255.255.255.248 +61.131.30.136/255.255.255.248 +61.131.30.144/255.255.255.248 +61.131.30.176/255.255.255.240 +61.131.30.240/255.255.255.248 +61.131.32.192/255.255.255.248 +61.131.37.232/255.255.255.248 +61.131.42.136/255.255.255.248 +61.131.42.144/255.255.255.240 +61.131.50.0/255.255.255.240 +61.131.51.16/255.255.255.248 +61.131.51.32/255.255.255.248 +61.131.56.248/255.255.255.248 +61.131.65.232/255.255.255.248 +61.131.66.208/255.255.255.248 +61.131.67.176/255.255.255.248 +61.132.29.208/255.255.255.248 +61.132.29.240/255.255.255.248 +61.132.140.128/255.255.255.240 +61.133.3.0/255.255.255.240 +61.133.4.208/255.255.255.240 +61.133.70.240/255.255.255.248 +61.133.83.160/255.255.255.224 +61.133.92.192/255.255.255.224 +61.133.99.64/255.255.255.192 +61.133.237.0/255.255.255.224 +61.134.11.224/255.255.255.224 +61.134.15.224/255.255.255.240 +61.134.16.128/255.255.255.248 +61.134.32.160/255.255.255.248 +61.134.34.16/255.255.255.248 +61.136.19.112/255.255.255.248 +61.136.19.120/255.255.255.248 +61.136.27.32/255.255.255.224 +61.136.96.128/255.255.255.248 +61.136.109.192/255.255.255.192 +61.136.113.0/255.255.255.240 +61.136.113.120/255.255.255.248 +61.136.114.232/255.255.255.248 +61.136.116.0/255.255.255.192 +61.136.116.80/255.255.255.192 +61.136.117.64/255.255.255.224 +61.136.118.8/255.255.255.248 +61.136.122.48/255.255.255.240 +61.136.122.128/255.255.255.224 +61.136.123.192/255.255.255.192 +61.136.125.32/255.255.255.248 +61.136.126.160/255.255.255.224 +61.136.207.192/255.255.255.240 +61.138.35.224/255.255.255.224 +61.138.185.24/255.255.255.248 +61.138.195.0/255.255.255.0 +61.140.75.160/255.255.255.240 +61.140.229.96/255.255.255.128 +61.141.9.160/255.255.255.240 +61.143.59.96/255.255.255.240 +61.143.59.176/255.255.255.240 +61.144.66.96/255.255.255.224 +61.144.202.224/255.255.255.224 +61.144.203.208/255.255.255.240 +61.145.220.0/255.255.255.224 +61.146.79.32/255.255.255.248 +61.146.115.64/255.255.255.224 +61.147.254.0/255.255.255.240 +61.150.35.56/255.255.255.248 +61.150.40.64/255.255.255.240 +61.150.40.160/255.255.255.240 +61.150.43.128/255.255.255.192 +61.151.241.96/255.255.255.224 +61.151.242.0/255.255.255.224 +61.151.247.160/255.255.255.240 +61.152.198.0/255.255.254.0 +61.152.224.240/255.255.255.240 +61.153.1.192/255.255.255.224 +61.153.4.104/255.255.255.248 +61.153.41.80/255.255.255.248 +61.153.43.160/255.255.255.248 +61.153.53.56/255.255.255.248 +61.153.60.32/255.255.255.248 +61.153.202.248/255.255.255.248 +61.153.208.120/255.255.255.248 +61.153.221.32/255.255.255.248 +61.153.222.208/255.255.255.248 +61.153.226.216/255.255.255.248 +61.153.244.120/255.255.255.248 +61.153.245.208/255.255.255.248 +61.153.253.216/255.255.255.248 +61.154.41.192/255.255.255.224 +61.154.42.224/255.255.255.224 +61.154.45.176/255.255.255.248 +61.154.45.192/255.255.255.224 +61.154.45.232/255.255.255.248 +61.155.16.128/255.255.255.240 +61.155.58.128/255.255.255.248 +61.155.64.64/255.255.255.248 +61.155.64.152/255.255.255.248 +61.155.65.96/255.255.255.248 +61.155.65.208/255.255.255.248 +61.155.97.56/255.255.255.248 +61.155.101.208/255.255.255.248 +61.159.50.136/255.255.255.248 +61.159.50.176/255.255.255.240 +61.159.59.48/255.255.255.248 +61.159.60.80/255.255.255.248 +61.159.161.192/255.255.255.232 +61.159.187.160/255.255.255.248 +61.159.212.144/255.255.255.240 +61.159.212.176/255.255.255.240 +61.159.213.0/255.255.255.240 +61.163.216.0/255.255.255.64 +61.163.220.52/255.255.255.248 +61.163.222.8/255.255.255.248 +61.163.227.48/255.255.255.248 +61.163.228.8/255.255.255.248 +61.163.231.64/255.255.255.224 +61.163.236.160/255.255.255.240 +61.167.71.64/255.255.255.224 +61.172.243.0/255.255.255.0 +61.172.246.192/255.255.255.192 +61.172.249.194/255.255.255.237 +61.172.250.96/255.255.255.240 +61.172.253.104/255.255.255.232 +61.172.253.160/255.255.255.224 +61.174.211.136/255.255.255.248 +61.174.211.232/255.255.255.248 +61.175.192.88/255.255.255.248 +61.175.197.152/255.255.255.248 +61.175.220.72/255.255.255.248 +61.175.223.112/255.255.255.248 +61.175.223.144/255.255.255.248 +61.175.223.224/255.255.255.240 +61.175.223.240/255.255.255.248 +61.175.224.0/255.255.255.248 +61.175.244.24/255.255.255.248 +61.177.56.192/255.255.255.248 +61.177.57.152/255.255.255.248 +61.177.58.240/255.255.255.248 +61.177.59.0/255.255.255.248 +61.177.61.168/255.255.255.248 +61.177.75.224/255.255.255.248 +61.177.182.56/255.255.255.248 +61.177.182.240/255.255.255.248 +61.177.195.128/255.255.255.248 +61.177.201.128/255.255.255.248 +61.177.207.160/255.255.255.224 +61.177.222.184/255.255.255.248 +61.185.208.136/255.255.255.248 +61.185.209.32/255.255.255.248 +61.185.212.160/255.255.255.240 +61.185.221.72/255.255.255.248 +61.185.224.64/255.255.255.192 +61.185.245.192/255.255.255.224 +61.193.160.64/255.255.255.224 +61.193.162.64/255.255.255.192 +61.193.165.128/255.255.255.192 +61.193.185.16/255.255.255.240 +61.193.190.0/255.255.255.192 +61.193.191.32/255.255.255.240 +61.194.6.176/255.255.255.248 +61.194.6.216/255.255.255.248 +61.194.8.8/255.255.255.248 +61.194.8.32/255.255.255.248 +61.194.10.0/255.255.255.248 +61.194.10.88/255.255.255.248 +61.194.11.136/255.255.255.248 +61.194.11.224/255.255.255.248 +61.194.14.80/255.255.255.248 +61.194.25.48/255.255.255.248 +61.194.37.112/255.255.255.248 +61.194.39.32/255.255.255.248 +61.194.39.120/255.255.255.248 +61.194.64.32/255.255.255.248 +61.194.195.112/255.255.255.248 +61.194.198.24/255.255.255.248 +61.194.201.216/255.255.255.248 +61.194.214.40/255.255.255.248 +61.194.226.120/255.255.255.248 +61.194.228.240/255.255.255.248 +61.194.228.248/255.255.255.248 +61.194.243.240/255.255.255.248 +61.194.248.16/255.255.255.240 +61.195.144.0/255.255.240.0 +61.196.106.128/255.255.255.240 +61.196.106.176/255.255.255.240 +61.196.158.168/255.255.255.168 +61.196.182.160/255.255.255.240 +61.196.208.224/255.255.255.248 +61.196.233.216/255.255.255.248 +61.196.245.136/255.255.255.248 +61.196.250.0/255.255.255.248 +61.197.165.8/255.255.255.248 +61.197.172.240/255.255.255.248 +61.197.180.104/255.255.255.248 +61.197.180.120/255.255.255.248 +61.197.185.64/255.255.255.248 +61.197.200.24/255.255.255.248 +61.197.201.0/255.255.255.248 +61.197.217.136/255.255.255.248 +61.197.218.160/255.255.255.248 +61.197.219.96/255.255.255.248 +61.197.223.80/255.255.255.240 +61.197.225.96/255.255.255.223 +61.197.229.192/255.255.255.240 +61.197.229.208/255.255.255.224 +61.197.230.80/255.255.255.248 +61.197.235.144/255.255.255.248 +61.197.242.152/255.255.255.248 +61.197.243.224/255.255.255.248 +61.197.244.88/255.255.255.248 +61.197.245.232/255.255.255.248 +61.197.249.208/255.255.255.248 +61.197.255.96/255.255.255.140 +61.199.195.248/255.255.255.248 +61.199.197.248/255.255.255.248 +61.199.201.8/255.255.255.248 +61.199.203.80/255.255.255.248 +61.199.206.208/255.255.255.240 +61.199.217.80/255.255.255.248 +61.199.218.192/255.255.255.248 +61.199.221.248/255.255.255.248 +61.199.223.16/255.255.255.248 +61.199.234.48/255.255.255.240 +61.199.241.176/255.255.255.248 +61.199.242.16/255.255.255.248 +61.199.244.192/255.255.255.240 +61.200.0.0/255.240.0.0 +61.242.215.96/255.255.255.240 +61.246.165.0/255.255.255.224 +61.246.185.0/255.255.255.224 +61.246.193.144/255.255.255.240 +61.246.193.160/255.255.255.224 +61.246.216.32/255.255.255.240 +61.246.216.48/255.255.255.240 +61.246.216.64/255.255.255.240 +61.246.217.0/255.255.255.192 +61.246.232.32/255.255.255.240 +61.246.247.0/255.255.255.224 +61.250.68.0/255.255.255.0 +61.250.166.128/255.255.255.224 +61.251.58.9/255.255.255.241 +61.251.253.128/255.255.255.192 +62.0.34.128/255.255.255.128 +62.0.35.32/255.255.255.240 +62.0.39.0/255.255.255.0 +62.1.7.160/255.255.255.240 +62.1.104.160/255.255.255.240 +62.1.184.192/255.255.255.240 +62.2.253.192/255.255.255.224 +62.3.66.0/255.255.255.248 +62.3.66.176/255.255.255.248 +62.3.67.216/255.255.255.248 +62.3.72.216/255.255.255.248 +62.3.73.64/255.255.255.248 +62.3.75.168/255.255.255.248 +62.3.77.152/255.255.255.248 +62.3.78.96/255.255.255.248 +62.3.92.40/255.255.255.248 +62.3.101.88/255.255.255.248 +62.3.102.232/255.255.255.248 +62.3.103.240/255.255.255.248 +62.3.104.104/255.255.255.248 +62.3.104.168/255.255.255.248 +62.3.108.40/255.255.255.248 +62.3.110.16/255.255.255.248 +62.3.114.184/255.255.255.248 +62.3.114.216/255.255.255.248 +62.3.115.88/255.255.255.248 +62.3.120.48/255.255.255.248 +62.3.124.152/255.255.255.248 +62.3.125.40/255.255.255.248 +62.3.127.40/255.255.255.248 +62.5.140.80/255.255.255.240 +62.6.104.64/255.255.255.224 +62.6.144.160/255.255.255.248 +62.6.147.128/255.255.255.192 +62.6.148.128/255.255.255.240 +62.6.151.64/255.255.255.224 +62.6.154.152/255.255.255.248 +62.6.159.128/255.255.255.240 +62.6.159.176/255.255.255.248 +62.6.160.192/255.255.255.224 +62.6.161.48/255.255.255.240 +62.6.163.96/255.255.255.224 +62.6.163.192/255.255.255.224 +62.6.164.64/255.255.255.224 +62.6.166.32/255.255.255.240 +62.6.174.88/255.255.255.248 +62.6.179.176/255.255.255.248 +62.6.184.0/255.255.255.128 +62.6.241.0/255.255.255.224 +62.6.245.0/255.255.255.224 +62.6.245.80/255.255.255.240 +62.6.245.208/255.255.255.240 +62.6.247.112/255.255.255.240 +62.6.248.0/255.255.255.0 +62.6.249.80/255.255.255.240 +62.6.250.104/255.255.255.248 +62.7.231.112/255.255.255.240 +62.8.97.240/255.255.255.240 +62.8.99.192/255.255.255.248 +62.8.109.80/255.255.255.240 +62.8.116.144/255.255.255.248 +62.8.118.240/255.255.255.248 +62.8.121.240/255.255.255.240 +62.8.128.80/255.255.255.248 +62.8.129.176/255.255.255.240 +62.8.134.48/255.255.255.248 +62.8.134.104/255.255.255.248 +62.8.144.56/255.255.255.248 +62.8.146.64/255.255.255.192 +62.8.156.40/255.255.255.248 +62.8.158.120/255.255.255.248 +62.8.193.0/255.255.255.0 +62.8.198.160/255.255.255.224 +62.8.203.224/255.255.255.224 +62.8.206.0/255.255.255.0 +62.8.207.40/255.255.255.248 +62.8.215.168/255.255.255.248 +62.8.219.120/255.255.255.248 +62.8.226.152/255.255.255.248 +62.8.227.80/255.255.255.248 +62.8.230.192/255.255.255.240 +62.8.231.128/255.255.255.240 +62.8.233.56/255.255.255.248 +62.8.238.248/255.255.255.248 +62.8.246.168/255.255.255.248 +62.12.129.184/255.255.255.248 +62.12.139.192/255.255.255.240 +62.13.41.176/255.255.255.240 +62.13.42.0/255.255.255.240 +62.13.133.24/255.255.255.248 +62.17.17.0/255.255.255.240 +62.17.23.0/255.255.255.192 +62.17.24.192/255.255.255.240 +62.17.150.0/255.255.255.224 +62.17.152.64/255.255.255.192 +62.17.155.208/255.255.255.240 +62.17.159.80/255.255.255.240 +62.17.162.64/255.255.255.240 +62.17.172.248/255.255.255.248 +62.17.173.0/255.255.255.0 +62.17.174.56/255.255.255.232 +62.17.174.216/255.255.255.248 +62.17.240.64/255.255.255.248 +62.17.246.56/255.255.255.248 +62.17.250.128/255.255.255.240 +62.20.1.128/255.255.255.128 +62.20.3.0/255.255.255.0 +62.20.48.0/255.255.250.0 +62.20.55.48/255.255.255.248 +62.20.120.144/255.255.255.240 +62.22.15.8/255.255.255.248 +62.22.15.128/255.255.255.192 +62.22.17.0/255.255.255.224 +62.22.17.32/255.255.255.224 +62.22.29.224/255.255.255.224 +62.22.44.48/255.255.255.248 +62.22.61.48/255.255.255.240 +62.22.63.0/255.255.255.0 +62.22.66.0/255.255.255.0 +62.22.75.128/255.255.255.224 +62.22.162.0/255.255.255.128 +62.23.3.96/255.255.255.224 +62.23.5.48/255.255.255.240 +62.23.8.8/255.255.255.248 +62.23.15.48/255.255.255.240 +62.23.19.80/255.255.255.248 +62.23.19.152/255.255.255.248 +62.23.22.0/255.255.255.0 +62.23.27.72/255.255.255.248 +62.23.34.80/255.255.255.248 +62.23.36.104/255.255.255.248 +62.23.44.128/255.255.255.224 +62.23.47.200/255.255.255.248 +62.23.54.152/255.255.255.248 +62.23.78.240/255.255.255.248 +62.23.82.16/255.255.255.240 +62.23.85.48/255.255.255.240 +62.23.91.80/255.255.255.248 +62.23.96.0/255.255.255.192 +62.23.109.72/255.255.255.248 +62.23.118.160/255.255.255.224 +62.23.135.224/255.255.255.240 +62.23.136.32/255.255.255.248 +62.23.138.208/255.255.255.240 +62.23.138.248/255.255.255.248 +62.23.139.0/255.255.255.0 +62.23.149.248/255.255.255.248 +62.23.151.160/255.255.255.240 +62.23.163.88/255.255.255.248 +62.23.166.240/255.255.255.248 +62.23.169.232/255.255.255.248 +62.23.171.176/255.255.255.240 +62.23.177.8/255.255.255.248 +62.23.180.80/255.255.255.240 +62.23.183.80/255.255.255.240 +62.23.185.120/255.255.255.248 +62.23.193.40/255.255.255.248 +62.23.218.136/255.255.255.248 +62.23.232.152/255.255.255.248 +62.23.247.32/255.255.255.248 +62.23.247.40/255.255.255.248 +62.24.101.128/255.255.255.192 +62.26.113.0/255.255.255.0 +62.26.126.0/255.255.255.0 +62.26.127.112/255.255.255.240 +62.26.131.0/255.255.255.0 +62.26.137.0/255.255.255.0 +62.27.1.0/255.255.255.0 +62.27.8.0/255.255.255.0 +62.27.28.48/255.255.255.240 +62.27.32.76/255.255.255.244 +62.27.33.16/255.255.255.240 +62.29.248.224/255.255.255.224 +62.32.50.0/255.255.255.0 +62.32.58.0/255.255.254.0 +62.32.63.248/255.255.255.248 +62.32.159.88/255.255.255.248 +62.32.160.32/255.255.255.240 +62.32.172.64/255.255.255.240 +62.32.189.88/255.255.255.248 +62.32.190.0/255.255.255.240 +62.32.206.64/255.255.255.240 +62.32.206.88/255.255.255.248 +62.36.228.224/255.255.255.224 +62.39.162.0/255.255.255.0 +62.40.73.224/255.255.255.240 +62.40.89.176/255.255.255.248 +62.40.92.32/255.255.255.224 +62.41.64.128/255.255.255.224 +62.43.255.32/255.255.255.224 +62.44.5.40/255.255.255.248 +62.44.7.40/255.255.255.248 +62.44.68.200/255.255.255.248 +62.48.159.144/255.255.255.240 +62.48.170.192/255.255.255.240 +62.48.175.248/255.255.255.248 +62.48.177.32/255.255.255.248 +62.48.181.48/255.255.255.224 +62.48.189.24/255.255.255.248 +62.48.219.96/255.255.255.248 +62.48.219.136/255.255.255.248 +62.48.219.224/255.255.255.240 +62.49.42.0/255.255.255.248 +62.49.64.96/255.255.255.240 +62.49.83.224/255.255.255.248 +62.49.127.144/255.255.255.240 +62.49.143.104/255.255.255.248 +62.49.148.64/255.255.255.240 +62.49.152.0/255.255.255.224 +62.49.167.208/255.255.255.240 +62.49.189.160/255.255.255.240 +62.49.202.32/255.255.255.240 +62.49.243.0/255.255.255.248 +62.52.11.192/255.255.255.232 +62.52.11.224/255.255.255.224 +62.52.21.0/255.255.255.0 +62.52.24.0/255.255.255.128 +62.52.25.0/255.255.255.176 +62.52.27.64/255.255.255.232 +62.52.27.120/255.255.255.248 +62.52.27.168/255.255.255.240 +62.52.27.208/255.255.255.248 +62.52.27.224/255.255.255.240 +62.52.27.248/255.255.255.248 +62.52.55.48/255.255.255.248 +62.52.55.120/255.255.255.248 +62.52.71.0/255.255.255.0 +62.52.78.0/255.255.255.0 +62.52.86.0/255.255.255.0 +62.52.90.0/255.255.255.0 +62.52.91.0/255.255.255.0 +62.52.96.0/255.255.255.0 +62.52.97.0/255.255.255.128 +62.52.98.0/255.255.255.128 +62.52.100.128/255.255.255.224 +62.52.100.192/255.255.255.192 +62.52.101.0/255.255.255.0 +62.52.102.128/255.255.255.192 +62.52.102.192/255.255.255.224 +62.52.104.0/255.255.254.0 +62.52.107.0/255.255.255.0 +62.52.108.208/255.255.255.248 +62.52.109.0/255.255.255.248 +62.52.150.0/255.255.255.0 +62.52.224.0/255.255.250.0 +62.52.230.0/255.255.251.0 +62.52.235.0/255.255.250.0 +62.52.241.0/255.255.255.0 +62.52.242.0/255.255.242.0 +62.53.136.8/255.255.255.248 +62.53.136.24/255.255.255.248 +62.53.153.72/255.255.255.248 +62.53.162.0/255.255.255.240 +62.53.200.224/255.255.255.224 +62.53.201.32/255.255.255.224 +62.53.201.128/255.255.255.128 +62.53.205.176/255.255.255.248 +62.53.224.16/255.255.255.248 +62.53.226.128/255.255.255.224 +62.53.230.8/255.255.255.248 +62.53.230.48/255.255.255.240 +62.53.241.24/255.255.255.248 +62.53.241.40/255.255.255.248 +62.53.241.48/255.255.255.232 +62.53.241.72/255.255.255.248 +62.53.248.0/255.255.255.248 +62.53.248.32/255.255.255.240 +62.55.192.0/255.255.255.0 +62.55.193.0/255.255.254.0 +62.55.195.0/255.255.255.0 +62.55.197.0/255.255.255.0 +62.55.198.0/255.255.254.0 +62.55.201.0/255.255.255.0 +62.58.32.16/255.255.255.248 +62.58.149.216/255.255.255.248 +62.58.163.104/255.255.255.248 +62.58.165.136/255.255.255.248 +62.58.172.136/255.255.255.248 +62.58.178.232/255.255.255.248 +62.58.181.192/255.255.255.240 +62.58.188.88/255.255.255.248 +62.58.191.0/255.255.255.0 +62.59.31.40/255.255.255.248 +62.59.250.240/255.255.255.248 +62.59.251.160/255.255.255.248 +62.60.128.0/255.255.128.0 +62.61.0.0/255.255.224.0 +62.61.92.96/255.255.255.224 +62.64.88.208/255.255.255.248 +62.64.126.0/255.255.255.0 +62.65.23.0/255.255.255.240 +62.65.26.0/255.255.255.192 +62.65.38.128/255.255.255.240 +62.65.105.208/255.255.255.248 +62.65.153.112/255.255.255.248 +62.67.54.64/255.255.255.192 +62.67.209.0/255.255.255.192 +62.67.228.0/255.255.252.0 +62.69.67.216/255.255.255.248 +62.69.104.160/255.255.255.248 +62.69.105.0/255.255.255.0 +62.70.2.224/255.255.255.240 +62.70.9.0/255.255.255.240 +62.70.51.0/255.255.255.0 +62.70.58.224/255.255.255.248 +62.70.58.248/255.255.255.248 +62.70.81.96/255.255.255.208 +62.70.97.0/255.255.255.224 +62.70.97.80/255.255.255.240 +62.71.9.0/255.255.255.192 +62.72.74.32/255.255.255.240 +62.72.74.160/255.255.255.248 +62.72.80.96/255.255.255.224 +62.72.98.96/255.255.255.240 +62.72.103.0/255.255.255.240 +62.72.105.16/255.255.255.240 +62.72.105.64/255.255.255.248 +62.72.107.0/255.255.255.0 +62.72.116.176/255.255.255.248 +62.72.124.112/255.255.255.248 +62.73.83.32/255.255.255.224 +62.73.171.0/255.255.255.0 +62.73.173.0/255.255.255.240 +62.73.173.120/255.255.255.248 +62.73.186.0/255.255.255.0 +62.76.84.32/255.255.255.240 +62.76.182.0/255.255.254.0 +62.77.37.72/255.255.255.248 +62.77.45.0/255.255.255.240 +62.77.47.208/255.255.255.240 +62.77.162.192/255.255.255.248 +62.77.163.96/255.255.255.248 +62.77.163.120/255.255.255.248 +62.77.163.184/255.255.255.248 +62.77.163.208/255.255.255.240 +62.77.165.88/255.255.255.248 +62.77.165.160/255.255.255.248 +62.77.168.0/255.255.255.192 +62.77.168.160/255.255.255.248 +62.77.168.184/255.255.255.248 +62.77.169.80/255.255.255.248 +62.77.169.96/255.255.255.248 +62.77.169.112/255.255.255.248 +62.77.170.0/255.255.255.224 +62.77.170.64/255.255.255.248 +62.77.171.0/255.255.255.128 +62.77.171.200/255.255.255.248 +62.77.172.160/255.255.255.240 +62.77.175.0/255.255.255.240 +62.77.175.120/255.255.255.248 +62.77.175.200/255.255.255.248 +62.77.176.0/255.255.255.248 +62.77.176.72/255.255.255.248 +62.77.177.160/255.255.255.224 +62.77.177.200/255.255.255.248 +62.77.178.104/255.255.255.248 +62.77.178.232/255.255.255.248 +62.77.179.88/255.255.255.248 +62.77.181.0/255.255.255.0 +62.77.182.80/255.255.255.248 +62.77.184.32/255.255.255.248 +62.79.75.224/255.255.255.240 +62.79.84.156/255.255.255.236 +62.79.84.188/255.255.255.248 +62.79.90.32/255.255.255.248 +62.79.93.0/255.255.255.248 +62.79.93.92/255.255.255.224 +62.79.93.160/255.255.255.224 +62.79.93.224/255.255.255.240 +62.79.103.192/255.255.255.248 +62.79.111.64/255.255.255.248 +62.79.126.0/255.255.255.224 +62.79.155.16/255.255.255.240 +62.80.0.0/255.255.255.240 +62.80.24.144/255.255.255.248 +62.81.136.112/255.255.255.248 +62.81.142.16/255.255.255.240 +62.81.142.48/255.255.255.248 +62.81.143.0/255.255.255.0 +62.81.148.0/255.255.255.0 +62.81.156.0/255.255.255.248 +62.81.156.152/255.255.255.248 +62.81.160.96/255.255.255.248 +62.81.165.96/255.255.255.248 +62.81.165.128/255.255.255.248 +62.81.177.176/255.255.255.224 +62.81.177.240/255.255.255.248 +62.81.192.184/255.255.255.248 +62.81.205.168/255.255.255.248 +62.81.220.0/255.255.255.0 +62.81.239.160/255.255.255.224 +62.81.241.160/255.255.255.240 +62.81.249.0/255.255.255.0 +62.84.144.64/255.255.255.192 +62.84.175.0/255.255.255.0 +62.84.194.112/255.255.255.248 +62.84.195.16/255.255.255.248 +62.84.197.0/255.255.255.128 +62.84.200.168/255.255.255.240 +62.84.218.0/255.255.255.240 +62.84.228.0/255.255.254.0 +62.85.15.224/255.255.255.240 +62.85.33.0/255.255.255.240 +62.85.89.144/255.255.255.248 +62.85.110.0/255.255.255.224 +62.89.76.104/255.255.255.248 +62.89.76.176/255.255.255.240 +62.89.79.192/255.255.255.224 +62.89.86.112/255.255.255.248 +62.89.99.216/255.255.255.248 +62.89.101.32/255.255.255.248 +62.89.108.144/255.255.255.240 +62.89.110.184/255.255.255.248 +62.89.112.208/255.255.255.248 +62.89.187.72/255.255.255.248 +62.90.0.72/255.255.255.248 +62.90.7.0/255.255.255.248 +62.90.28.32/255.255.255.240 +62.90.73.32/255.255.255.224 +62.90.83.48/255.255.255.248 +62.90.85.96/255.255.255.224 +62.90.236.224/255.255.255.248 +62.90.237.128/255.255.255.240 +62.90.237.240/255.255.255.248 +62.90.238.112/255.255.255.248 +62.90.240.192/255.255.255.248 +62.90.245.32/255.255.255.240 +62.92.19.48/255.255.255.240 +62.92.19.224/255.255.255.240 +62.92.36.112/255.255.255.240 +62.92.54.0/255.255.254.0 +62.92.103.40/255.255.255.248 +62.92.110.64/255.255.255.248 +62.92.114.160/255.255.255.248 +62.92.143.160/255.255.255.224 +62.93.161.112/255.255.255.244 +62.93.161.208/255.255.255.248 +62.93.164.64/255.255.255.240 +62.93.165.80/255.255.255.248 +62.93.165.112/255.255.255.248 +62.93.166.128/255.255.255.240 +62.93.171.96/255.255.255.240 +62.93.174.248/255.255.255.249 +62.93.181.160/255.255.255.248 +62.93.183.0/255.255.255.240 +62.93.183.64/255.255.255.224 +62.94.18.64/255.255.255.240 +62.94.52.128/255.255.255.240 +62.94.61.16/255.255.255.248 +62.94.72.128/255.255.255.240 +62.94.74.160/255.255.255.248 +62.94.76.64/255.255.255.208 +62.94.82.192/255.255.255.224 +62.94.92.96/255.255.255.248 +62.94.102.112/255.255.255.248 +62.94.103.144/255.255.255.248 +62.94.103.208/255.255.255.248 +62.94.123.96/255.255.255.248 +62.94.146.8/255.255.255.248 +62.94.184.56/255.255.255.248 +62.94.201.112/255.255.255.240 +62.94.203.88/255.255.255.248 +62.94.210.88/255.255.255.248 +62.94.211.248/255.255.255.248 +62.94.212.136/255.255.255.248 +62.94.213.0/255.255.255.0 +62.94.218.152/255.255.255.248 +62.94.219.16/255.255.255.240 +62.94.219.96/255.255.255.248 +62.94.219.128/255.255.255.248 +62.94.238.104/255.255.255.248 +62.94.239.192/255.255.255.248 +62.94.242.192/255.255.255.248 +62.94.250.16/255.255.255.248 +62.95.48.208/255.255.255.248 +62.95.69.0/255.255.255.0 +62.95.88.224/255.255.255.224 +62.96.12.48/255.255.255.240 +62.96.12.112/255.255.255.240 +62.96.16.16/255.255.255.240 +62.96.20.0/255.255.255.240 +62.96.20.16/255.255.255.240 +62.96.24.16/255.255.255.248 +62.96.24.40/255.255.255.248 +62.96.24.240/255.255.255.248 +62.96.25.88/255.255.255.248 +62.96.26.56/255.255.255.248 +62.96.28.88/255.255.255.248 +62.96.28.248/255.255.255.248 +62.96.29.88/255.255.255.248 +62.96.29.168/255.255.255.248 +62.96.49.232/255.255.255.248 +62.96.53.56/255.255.255.248 +62.96.59.120/255.255.255.248 +62.96.63.56/255.255.255.248 +62.96.63.72/255.255.255.248 +62.96.64.128/255.255.255.248 +62.96.67.48/255.255.255.248 +62.96.67.168/255.255.255.248 +62.96.73.120/255.255.255.248 +62.96.74.80/255.255.255.248 +62.96.75.224/255.255.255.248 +62.96.76.32/255.255.255.248 +62.96.100.216/255.255.255.248 +62.96.202.0/255.255.255.144 +62.96.202.112/255.255.255.248 +62.96.204.48/255.255.255.248 +62.96.223.128/255.255.255.192 +62.96.227.0/255.255.255.192 +62.96.234.0/255.255.253.0 +62.97.72.0/255.255.255.248 +62.97.100.144/255.255.255.248 +62.97.100.160/255.255.255.224 +62.97.112.16/255.255.255.240 +62.97.113.64/255.255.255.224 +62.97.113.176/255.255.255.248 +62.97.116.64/255.255.255.224 +62.97.116.224/255.255.255.240 +62.99.133.0/255.255.255.248 +62.99.133.80/255.255.255.248 +62.99.135.96/255.255.255.248 +62.99.140.64/255.255.255.240 +62.99.156.248/255.255.255.248 +62.99.177.216/255.255.255.248 +62.99.182.208/255.255.255.240 +62.99.191.24/255.255.255.248 +62.99.200.144/255.255.255.248 +62.99.208.240/255.255.255.240 +62.99.214.40/255.255.255.248 +62.99.216.80/255.255.255.248 +62.99.227.16/255.255.255.240 +62.99.231.192/255.255.255.248 +62.99.236.128/255.255.255.240 +62.99.244.40/255.255.255.248 +62.100.242.0/255.255.255.192 +62.101.94.96/255.255.255.240 +62.101.103.0/255.255.255.0 +62.102.35.112/255.255.255.248 +62.105.143.88/255.255.255.248 +62.108.227.0/255.255.255.0 +62.110.24.216/255.255.255.216 +62.110.38.128/255.255.255.128 +62.110.118.192/255.255.255.224 +62.110.128.128/255.255.255.248 +62.110.146.56/255.255.255.248 +62.110.151.60/255.255.255.244 +62.110.175.176/255.255.255.240 +62.110.189.208/255.255.255.240 +62.110.191.136/255.255.255.248 +62.111.76.96/255.255.255.240 +62.111.183.112/255.255.255.248 +62.111.189.144/255.255.255.248 +62.112.132.0/255.255.255.240 +62.116.51.8/255.255.255.248 +62.116.53.128/255.255.255.128 +62.118.42.128/255.255.255.192 +62.118.63.0/255.255.255.192 +62.118.80.0/255.255.255.0 +62.118.224.128/255.255.255.128 +62.119.95.0/255.255.255.0 +62.119.135.88/255.255.255.248 +62.127.104.0/255.255.255.224 +62.128.5.0/255.255.255.0 +62.128.12.96/255.255.255.224 +62.128.128.170/255.255.255.246 +62.129.54.88/255.255.255.248 +62.129.63.232/255.255.255.248 +62.129.138.192/255.255.255.224 +62.130.140.0/255.255.254.0 +62.130.241.0/255.255.255.0 +62.134.61.0/255.255.254.176 +62.134.136.0/255.255.255.192 +62.138.8.64/255.255.255.224 +62.138.12.192/255.255.255.192 +62.138.14.0/255.255.255.240 +62.138.14.128/255.255.255.240 +62.138.14.144/255.255.255.240 +62.138.38.184/255.255.255.248 +62.138.40.128/255.255.255.248 +62.138.54.208/255.255.255.248 +62.138.55.208/255.255.255.240 +62.138.163.112/255.255.255.248 +62.138.169.0/255.255.255.224 +62.138.172.224/255.255.255.248 +62.138.179.16/255.255.255.240 +62.138.195.192/255.255.255.224 +62.138.207.192/255.255.255.240 +62.138.214.176/255.255.255.248 +62.138.226.144/255.255.255.240 +62.138.228.96/255.255.255.224 +62.138.229.136/255.255.255.248 +62.138.239.248/255.255.255.248 +62.138.244.64/255.255.255.240 +62.138.253.240/255.255.255.240 +62.140.210.96/255.255.255.248 +62.144.7.128/255.255.255.192 +62.144.160.128/255.255.255.240 +62.144.211.32/255.255.255.224 +62.145.22.232/255.255.255.248 +62.145.28.248/255.255.255.248 +62.145.135.192/255.255.255.192 +62.146.45.0/255.255.255.0 +62.146.52.224/255.255.255.224 +62.146.80.192/255.255.255.192 +62.146.83.120/255.255.255.248 +62.146.92.208/255.255.255.248 +62.146.105.224/255.255.255.248 +62.146.114.176/255.255.255.248 +62.146.136.0/255.255.255.128 +62.148.81.32/255.255.255.240 +62.148.92.32/255.255.255.240 +62.148.197.16/255.255.255.248 +62.148.199.16/255.255.255.240 +62.149.66.24/255.255.255.248 +62.150.0.0/255.255.255.0 +62.152.120.0/255.255.255.0 +62.152.234.88/255.255.255.248 +62.153.61.112/255.255.255.248 +62.153.63.224/255.255.255.248 +62.153.67.0/255.255.255.224 +62.153.67.160/255.255.255.248 +62.153.79.56/255.255.255.248 +62.153.82.120/255.255.255.248 +62.153.86.64/255.255.255.240 +62.153.89.40/255.255.255.248 +62.153.91.240/255.255.255.240 +62.153.103.120/255.255.255.248 +62.153.103.200/255.255.255.248 +62.153.115.72/255.255.255.248 +62.153.119.176/255.255.255.248 +62.153.131.160/255.255.255.240 +62.153.145.240/255.255.255.248 +62.153.147.88/255.255.255.248 +62.153.151.56/255.255.255.248 +62.153.155.88/255.255.255.248 +62.153.174.16/255.255.255.248 +62.153.192.24/255.255.255.248 +62.153.195.224/255.255.255.240 +62.153.206.152/255.255.255.248 +62.153.217.184/255.255.255.248 +62.153.221.216/255.255.255.248 +62.153.225.216/255.255.255.248 +62.153.230.112/255.255.255.248 +62.153.231.192/255.255.255.248 +62.153.238.72/255.255.255.248 +62.153.238.104/255.255.255.248 +62.153.240.224/255.255.255.248 +62.154.130.160/255.255.255.224 +62.154.137.64/255.255.255.248 +62.154.142.224/255.255.255.248 +62.154.151.104/255.255.255.248 +62.154.152.80/255.255.255.248 +62.154.158.144/255.255.255.248 +62.154.167.176/255.255.255.248 +62.154.173.64/255.255.255.192 +62.154.173.184/255.255.255.248 +62.154.180.0/255.255.255.248 +62.154.181.0/255.255.255.248 +62.154.194.24/255.255.255.248 +62.154.204.168/255.255.255.248 +62.154.206.16/255.255.255.248 +62.154.206.208/255.255.255.248 +62.154.217.120/255.255.255.248 +62.154.218.80/255.255.255.248 +62.154.218.112/255.255.255.248 +62.154.225.216/255.255.255.248 +62.154.252.0/255.255.255.224 +62.154.255.0/255.255.255.0 +62.156.146.128/255.255.255.0 +62.156.153.0/255.255.255.0 +62.157.107.32/255.255.255.240 +62.157.127.152/255.255.255.248 +62.157.130.176/255.255.255.248 +62.157.145.152/255.255.255.248 +62.157.170.144/255.255.255.248 +62.157.170.168/255.255.255.248 +62.157.185.168/255.255.255.248 +62.157.191.128/255.255.255.128 +62.157.195.240/255.255.255.248 +62.157.215.64/255.255.255.240 +62.157.217.104/255.255.255.248 +62.159.14.192/255.255.255.248 +62.159.20.128/255.255.255.192 +62.159.42.224/255.255.255.248 +62.159.67.32/255.255.255.224 +62.159.79.40/255.255.255.248 +62.159.110.128/255.255.255.248 +62.159.120.192/255.255.255.192 +62.159.121.216/255.255.255.248 +62.159.122.48/255.255.255.240 +62.159.123.240/255.255.255.248 +62.159.150.0/255.255.255.240 +62.159.156.120/255.255.255.248 +62.159.188.88/255.255.255.248 +62.159.202.224/255.255.255.248 +62.159.234.0/255.255.255.0 +62.159.246.48/255.255.255.248 +62.159.248.136/255.255.255.248 +62.159.253.208/255.255.255.240 +62.159.255.192/255.255.255.248 +62.160.0.64/255.255.255.224 +62.160.38.0/255.255.255.0 +62.160.39.232/255.255.255.240 +62.160.55.0/255.255.255.0 +62.160.56.136/255.255.255.248 +62.160.61.56/255.255.255.248 +62.160.64.0/255.255.255.0 +62.160.76.0/255.255.254.0 +62.160.78.0/255.255.255.0 +62.160.107.168/255.255.255.248 +62.160.153.0/255.255.255.0 +62.160.188.0/255.255.255.0 +62.160.219.240/255.255.255.248 +62.160.224.0/255.255.255.0 +62.160.236.8/255.255.255.248 +62.161.46.0/255.255.255.0 +62.161.48.0/255.255.255.0 +62.161.56.0/255.255.255.0 +62.161.113.32/255.255.255.248 +62.161.113.136/255.255.255.248 +62.161.119.24/255.255.255.248 +62.161.124.56/255.255.255.248 +62.161.124.72/255.255.255.248 +62.161.124.80/255.255.255.248 +62.161.125.0/255.255.255.224 +62.161.125.192/255.255.255.224 +62.161.152.96/255.255.255.224 +62.161.152.144/255.255.255.240 +62.161.154.200/255.255.255.248 +62.161.155.96/255.255.255.248 +62.161.170.64/255.255.255.224 +62.161.177.192/255.255.255.248 +62.161.177.208/255.255.255.248 +62.161.178.80/255.255.255.240 +62.161.178.176/255.255.255.240 +62.161.185.64/255.255.255.224 +62.161.185.160/255.255.255.224 +62.161.195.0/255.255.255.224 +62.161.199.224/255.255.255.224 +62.161.215.48/255.255.255.248 +62.161.215.120/255.255.255.248 +62.161.215.128/255.255.255.248 +62.161.216.208/255.255.255.240 +62.161.217.208/255.255.255.240 +62.161.217.232/255.255.255.248 +62.161.227.64/255.255.255.248 +62.161.229.128/255.255.255.240 +62.161.232.112/255.255.255.240 +62.161.232.208/255.255.255.240 +62.161.238.64/255.255.255.248 +62.161.238.96/255.255.255.248 +62.161.238.176/255.255.255.248 +62.161.238.184/255.255.255.248 +62.161.239.128/255.255.255.240 +62.161.240.144/255.255.255.240 +62.161.240.176/255.255.255.240 +62.161.245.112/255.255.255.248 +62.161.245.240/255.255.255.240 +62.161.247.128/255.255.255.192 +62.161.252.192/255.255.255.224 +62.161.253.32/255.255.255.224 +62.161.253.224/255.255.255.224 +62.161.255.160/255.255.255.224 +62.166.70.240/255.255.255.248 +62.166.134.0/255.255.255.248 +62.166.142.56/255.255.255.248 +62.166.143.136/255.255.255.248 +62.166.150.112/255.255.255.248 +62.166.162.192/255.255.255.248 +62.166.238.216/255.255.255.248 +62.166.239.112/255.255.255.248 +62.168.11.16/255.255.255.248 +62.168.40.232/255.255.255.248 +62.168.42.64/255.255.255.224 +62.168.57.96/255.255.255.240 +62.168.123.64/255.255.255.248 +62.168.149.240/255.255.255.248 +62.169.4.32/255.255.255.248 +62.169.204.128/255.255.255.248 +62.170.23.0/255.255.255.240 +62.172.74.128/255.255.255.192 +62.172.97.224/255.255.255.224 +62.172.98.136/255.255.255.248 +62.172.105.144/255.255.255.240 +62.172.108.80/255.255.255.248 +62.172.108.160/255.255.255.240 +62.172.122.112/255.255.255.240 +62.172.122.128/255.255.255.224 +62.172.132.56/255.255.255.248 +62.172.141.192/255.255.255.192 +62.172.143.248/255.255.255.248 +62.172.145.64/255.255.255.224 +62.172.181.0/255.255.255.0 +62.172.206.0/255.255.255.224 +62.172.207.32/255.255.255.240 +62.172.208.240/255.255.255.240 +62.173.79.104/255.255.255.247 +62.173.97.96/255.255.255.224 +62.173.104.240/255.255.255.240 +62.173.114.48/255.255.255.248 +62.173.115.112/255.255.255.240 +62.173.120.128/255.255.255.248 +62.173.203.0/255.255.255.0 +62.173.224.184/255.255.255.248 +62.176.33.96/255.255.255.224 +62.176.40.160/255.255.255.224 +62.176.77.224/255.255.255.224 +62.176.236.0/255.255.255.128 +62.177.154.16/255.255.255.248 +62.177.177.120/255.255.255.248 +62.177.186.96/255.255.255.248 +62.177.202.56/255.255.255.248 +62.177.213.104/255.255.255.248 +62.177.214.128/255.255.255.248 +62.177.238.120/255.255.255.248 +62.180.59.144/255.255.255.240 +62.180.63.0/255.255.255.192 +62.180.88.160/255.255.255.240 +62.180.96.192/255.255.255.224 +62.181.71.48/255.255.255.248 +62.181.182.0/255.255.255.248 +62.181.185.200/255.255.255.248 +62.181.193.64/255.255.255.224 +62.181.210.96/255.255.255.248 +62.181.210.160/255.255.255.248 +62.181.211.0/255.255.255.224 +62.184.18.120/255.255.255.248 +62.184.26.224/255.255.255.224 +62.184.34.0/255.255.255.0 +62.184.44.96/255.255.255.240 +62.184.44.128/255.255.255.192 +62.184.45.8/255.255.255.248 +62.184.45.160/255.255.255.248 +62.184.61.0/255.255.255.0 +62.184.72.192/255.255.255.192 +62.184.76.32/255.255.255.240 +62.184.76.192/255.255.255.240 +62.184.124.0/255.255.255.0 +62.184.125.0/255.255.255.128 +62.184.165.48/255.255.255.240 +62.184.167.0/255.255.255.0 +62.184.179.0/255.255.255.0 +62.184.215.0/255.255.255.224 +62.184.252.40/255.255.255.248 +62.184.252.48/255.255.255.240 +62.185.3.0/255.255.255.128 +62.185.22.0/255.255.255.224 +62.185.65.128/255.255.255.128 +62.185.132.224/255.255.255.248 +62.185.132.232/255.255.255.248 +62.185.161.160/255.255.255.224 +62.185.204.0/255.255.255.0 +62.185.227.224/255.255.255.224 +62.186.3.192/255.255.255.224 +62.186.7.64/255.255.255.240 +62.186.33.192/255.255.255.192 +62.186.95.224/255.255.255.224 +62.186.98.0/255.255.255.224 +62.186.137.160/255.255.255.240 +62.187.30.176/255.255.255.240 +62.187.40.128/255.255.255.248 +62.187.45.64/255.255.255.248 +62.187.46.0/255.255.255.0 +62.187.61.192/255.255.255.192 +62.187.106.128/255.255.255.224 +62.187.109.192/255.255.255.224 +62.187.144.16/255.255.255.240 +62.187.149.0/255.255.255.128 +62.187.149.128/255.255.255.128 +62.187.151.240/255.255.255.240 +62.187.254.48/255.255.255.240 +62.189.0.64/255.255.255.240 +62.189.51.192/255.255.255.192 +62.189.64.240/255.255.255.240 +62.189.70.160/255.255.255.240 +62.189.93.0/255.255.255.0 +62.189.102.224/255.255.255.224 +62.189.108.16/255.255.255.240 +62.189.122.176/255.255.255.240 +62.189.124.64/255.255.255.240 +62.189.126.80/255.255.255.240 +62.189.126.176/255.255.255.248 +62.189.167.128/255.255.255.128 +62.189.228.128/255.255.255.192 +62.189.235.96/255.255.255.240 +62.189.243.160/255.255.255.240 +62.190.55.0/255.255.255.128 +62.190.90.0/255.255.254.224 +62.190.108.0/255.255.255.0 +62.190.166.192/255.255.255.192 +62.190.167.48/255.255.255.240 +62.190.187.24/255.255.255.248 +62.190.198.64/255.255.255.224 +62.190.210.0/255.255.255.192 +62.192.1.0/255.255.255.0 +62.192.104.0/255.255.255.240 +62.196.0.0/255.255.0.0 +62.197.39.0/255.255.255.0 +62.200.29.176/255.255.255.248 +62.200.52.160/255.255.255.240 +62.200.56.96/255.255.255.224 +62.200.89.0/255.255.255.0 +62.200.100.128/255.255.255.192 +62.200.133.160/255.255.255.224 +62.200.144.0/255.255.255.224 +62.200.166.128/255.255.255.192 +62.200.173.0/255.255.255.224 +62.200.228.32/255.255.255.224 +62.204.191.0/255.255.255.0 +62.206.42.112/255.255.255.248 +62.206.56.0/255.255.255.224 +62.206.56.192/255.255.255.224 +62.206.65.192/255.255.255.248 +62.206.86.80/255.255.255.240 +62.206.87.80/255.255.255.248 +62.206.96.16/255.255.255.248 +62.206.114.32/255.255.255.240 +62.206.114.176/255.255.255.240 +62.206.191.0/255.255.255.0 +62.206.211.0/255.255.255.248 +62.209.161.48/255.255.255.240 +62.210.130.96/255.255.255.240 +62.210.138.0/255.255.255.0 +62.210.162.240/255.255.255.240 +62.212.89.0/255.255.255.0 +62.215.215.160/255.255.255.224 +62.215.216.80/255.255.255.248 +62.215.216.88/255.255.255.248 +62.215.221.192/255.255.255.192 +62.215.228.96/255.255.255.224 +62.215.230.0/255.255.255.240 +62.215.232.80/255.255.255.239 +62.216.250.64/255.255.255.192 +62.217.33.16/255.255.255.248 +62.217.38.80/255.255.255.240 +62.217.53.16/255.255.255.240 +62.218.20.24/255.255.255.248 +62.218.20.160/255.255.255.224 +62.218.47.80/255.255.255.240 +62.218.145.64/255.255.255.248 +62.218.145.128/255.255.255.240 +62.218.145.160/255.255.255.240 +62.219.32.248/255.255.255.248 +62.219.177.56/255.255.255.248 +62.219.177.224/255.255.255.240 +62.219.178.192/255.255.255.248 +62.219.178.240/255.255.255.248 +62.219.180.112/255.255.255.248 +62.219.185.16/255.255.255.248 +62.219.242.96/255.255.255.240 +62.219.245.200/255.255.255.248 +62.219.249.96/255.255.255.248 +62.219.254.208/255.255.255.240 +62.220.6.32/255.255.255.248 +62.220.28.32/255.255.255.248 +62.220.134.96/255.255.255.248 +62.225.14.88/255.255.255.248 +62.225.44.128/255.255.255.248 +62.225.44.152/255.255.255.248 +62.225.66.0/255.255.255.0 +62.225.109.64/255.255.255.224 +62.225.109.216/255.255.255.248 +62.225.117.0/255.255.255.112 +62.225.118.80/255.255.255.248 +62.225.118.168/255.255.255.248 +62.225.123.216/255.255.255.248 +62.225.130.32/255.255.255.248 +62.225.130.192/255.255.255.224 +62.225.135.64/255.255.255.248 +62.225.135.192/255.255.255.248 +62.225.139.0/255.255.255.240 +62.225.141.208/255.255.255.248 +62.225.153.64/255.255.255.224 +62.225.158.112/255.255.255.240 +62.225.160.232/255.255.255.248 +62.225.163.152/255.255.255.248 +62.225.178.8/255.255.255.248 +62.225.181.32/255.255.255.248 +62.225.182.104/255.255.255.248 +62.225.182.112/255.255.255.248 +62.225.189.176/255.255.255.248 +62.231.0.96/255.255.255.248 +62.231.40.112/255.255.255.240 +62.231.80.0/255.255.255.224 +62.231.111.48/255.255.255.248 +62.231.114.128/255.255.255.192 +62.231.141.160/255.255.255.224 +62.232.14.8/255.255.255.248 +62.232.27.16/255.255.255.240 +62.232.32.176/255.255.255.248 +62.232.33.224/255.255.255.248 +62.232.60.0/255.255.255.0 +62.232.79.0/255.255.255.240 +62.233.129.128/255.255.255.248 +62.233.130.8/255.255.255.248 +62.234.226.40/255.255.255.248 +62.236.93.32/255.255.255.248 +62.236.160.144/255.255.255.248 +62.236.224.0/255.255.240.0 +62.237.16.0/255.255.248.0 +62.237.129.176/255.255.255.248 +62.242.162.104/255.255.255.248 +62.242.207.136/255.255.255.248 +62.243.123.0/255.255.255.128 +62.243.244.0/255.255.255.192 +62.244.16.192/255.255.255.192 +62.244.31.32/255.255.255.240 +62.244.182.128/255.255.255.248 +62.244.188.208/255.255.255.248 +62.245.128.192/255.255.255.224 +62.245.129.112/255.255.255.240 +62.245.129.208/255.255.255.240 +62.245.142.128/255.255.255.128 +62.245.155.208/255.255.255.240 +62.245.169.112/255.255.255.240 +62.245.171.48/255.255.255.240 +62.245.186.160/255.255.255.240 +62.245.186.192/255.255.255.248 +62.245.198.112/255.255.255.240 +62.245.200.160/255.255.255.240 +62.245.201.96/255.255.255.248 +62.245.204.64/255.255.255.248 +62.245.204.72/255.255.255.248 +62.245.223.144/255.255.255.240 +62.245.230.224/255.255.255.240 +62.245.231.104/255.255.255.248 +62.247.0.32/255.255.255.224 +62.247.128.32/255.255.255.240 +62.249.1.48/255.255.255.240 +62.249.9.0/255.255.255.224 +62.250.12.0/255.255.255.0 +62.251.168.0/255.255.255.240 +62.251.192.144/255.255.255.240 +62.251.194.32/255.255.255.224 +62.251.196.64/255.255.255.192 +62.251.201.128/255.255.255.240 +62.251.204.16/255.255.255.240 +62.251.206.32/255.255.255.240 +62.251.207.96/255.255.255.240 +62.251.216.32/255.255.255.224 +62.253.218.0/255.255.255.128 +62.254.162.128/255.255.255.240 +62.254.168.128/255.255.255.224 +62.254.168.160/255.255.255.224 +62.254.173.0/255.255.255.0 +62.254.178.112/255.255.255.240 +62.254.205.144/255.255.255.240 +62.254.212.160/255.255.255.224 +63.64.5.0/255.255.255.0 +63.64.20.0/255.255.255.0 +63.64.74.184/255.255.255.248 +63.64.94.0/255.255.255.0 +63.64.120.96/255.255.255.224 +63.64.157.0/255.255.255.0 +63.65.55.32/255.255.255.248 +63.65.67.0/255.255.255.0 +63.65.106.0/255.255.255.0 +63.65.235.0/255.255.255.0 +63.66.225.192/255.255.255.240 +63.67.5.0/255.255.255.128 +63.67.26.72/255.255.255.232 +63.67.74.216/255.255.255.248 +63.67.76.160/255.255.255.248 +63.67.185.128/255.255.255.192 +63.68.14.32/255.255.255.224 +63.68.20.0/255.255.252.0 +63.68.220.192/255.255.255.240 +63.68.233.112/255.255.255.240 +63.68.242.104/255.255.255.248 +63.69.4.216/255.255.255.248 +63.69.11.0/255.255.255.0 +63.69.82.0/255.255.255.128 +63.69.127.16/255.255.255.240 +63.69.160.192/255.255.255.192 +63.70.42.0/255.255.255.0 +63.70.44.0/255.255.252.0 +63.70.49.88/255.255.255.248 +63.70.56.0/255.255.254.0 +63.70.134.64/255.255.255.224 +63.70.153.0/255.255.255.0 +63.70.170.24/255.255.255.248 +63.70.198.192/255.255.255.192 +63.70.238.64/255.255.255.224 +63.71.2.0/255.255.255.0 +63.71.41.192/255.255.255.224 +63.71.64.160/255.255.255.248 +63.71.102.160/255.255.255.224 +63.71.228.0/255.255.254.0 +63.72.0.0/255.255.252.0 +63.72.7.192/255.255.255.224 +63.72.45.240/255.255.255.248 +63.72.53.0/255.255.255.0 +63.72.55.0/255.255.255.192 +63.72.100.128/255.255.255.128 +63.72.160.0/255.255.255.192 +63.72.213.128/255.255.255.128 +63.72.254.208/255.255.255.240 +63.73.31.240/255.255.255.248 +63.73.35.32/255.255.255.240 +63.73.71.208/255.255.255.240 +63.73.96.64/255.255.255.248 +63.73.96.120/255.255.255.248 +63.73.130.0/255.255.254.0 +63.73.207.192/255.255.255.240 +63.73.211.0/255.255.255.0 +63.73.235.80/255.255.255.240 +63.74.109.0/255.255.255.0 +63.75.98.240/255.255.255.240 +63.75.107.32/255.255.255.224 +63.75.117.192/255.255.255.192 +63.75.133.0/255.255.255.0 +63.75.195.64/255.255.255.192 +63.75.214.0/255.255.255.0 +63.76.30.144/255.255.255.248 +63.76.142.48/255.255.255.240 +63.76.173.32/255.255.255.240 +63.76.174.64/255.255.255.240 +63.77.211.120/255.255.255.248 +63.77.248.0/255.255.252.0 +63.78.30.0/255.255.255.192 +63.78.79.144/255.255.255.248 +63.78.79.184/255.255.255.248 +63.78.156.192/255.255.255.240 +63.78.220.64/255.255.255.248 +63.78.220.96/255.255.255.224 +63.78.235.192/255.255.255.192 +63.79.9.72/255.255.255.248 +63.79.100.0/255.255.252.0 +63.79.165.192/255.255.255.224 +63.79.199.64/255.255.255.192 +63.80.6.0/255.255.255.0 +63.80.58.192/255.255.255.192 +63.80.74.32/255.255.255.224 +63.80.74.128/255.255.255.224 +63.80.79.96/255.255.255.224 +63.80.88.0/255.255.254.0 +63.80.97.64/255.255.255.240 +63.80.197.192/255.255.255.192 +63.80.203.16/255.255.255.240 +63.80.207.16/255.255.255.240 +63.80.233.176/255.255.255.240 +63.80.233.240/255.255.255.240 +63.80.249.48/255.255.255.240 +63.80.249.80/255.255.255.240 +63.80.249.128/255.255.255.128 +63.81.4.48/255.255.255.240 +63.81.4.64/255.255.255.192 +63.81.4.224/255.255.255.240 +63.81.9.80/255.255.255.240 +63.81.10.0/255.255.255.0 +63.81.35.80/255.255.255.208 +63.81.35.128/255.255.255.240 +63.81.44.0/255.255.255.192 +63.81.47.144/255.255.255.240 +63.81.48.32/255.255.255.240 +63.81.75.208/255.255.255.240 +63.81.98.0/255.255.255.240 +63.81.133.0/255.255.255.240 +63.81.133.64/255.255.255.224 +63.81.133.96/255.255.255.240 +63.81.138.16/255.255.255.240 +63.81.143.248/255.255.255.248 +63.82.99.136/255.255.255.248 +63.82.112.0/255.255.248.0 +63.83.35.64/255.255.255.248 +63.83.205.0/255.255.255.0 +63.85.13.240/255.255.255.240 +63.85.241.0/255.255.255.128 +63.85.241.128/255.255.255.224 +63.86.88.0/255.255.255.0 +63.86.138.112/255.255.255.240 +63.86.140.80/255.255.255.240 +63.87.2.0/255.255.255.0 +63.87.106.0/255.255.254.0 +63.87.140.0/255.255.255.192 +63.87.175.96/255.255.255.224 +63.87.188.200/255.255.255.248 +63.87.238.0/255.255.254.0 +63.88.40.0/255.255.255.0 +63.88.110.128/255.255.255.224 +63.88.212.0/255.255.254.0 +63.90.82.0/255.255.255.128 +63.90.143.128/255.255.255.224 +63.90.153.64/255.255.255.224 +63.92.1.160/255.255.255.224 +63.92.207.64/255.255.255.192 +63.93.193.0/255.255.255.0 +63.94.97.16/255.255.255.240 +63.95.49.0/255.255.255.128 +63.99.146.0/255.255.255.0 +63.100.18.40/255.255.255.248 +63.100.49.240/255.255.255.248 +63.100.163.0/255.255.255.0 +63.100.235.128/255.255.255.192 +63.101.46.136/255.255.255.248 +63.103.176.208/255.255.255.240 +63.103.242.122/255.255.255.238 +63.103.244.82/255.255.255.210 +63.103.245.103/255.255.255.245 +63.103.251.128/255.255.255.224 +63.104.218.0/255.255.254.0 +63.105.37.0/255.255.255.0 +63.107.15.80/255.255.255.248 +63.108.102.32/255.255.255.224 +63.109.12.0/255.255.255.0 +63.109.88.104/255.255.255.248 +63.109.101.0/255.255.255.0 +63.109.192.0/255.255.240.0 +63.109.213.208/255.255.255.240 +63.109.215.144/255.255.255.248 +63.110.14.0/255.255.255.0 +63.110.47.32/255.255.255.224 +63.110.80.0/255.255.255.0 +63.111.47.32/255.255.255.224 +63.111.50.184/255.255.255.248 +63.114.82.128/255.255.255.240 +63.114.203.96/255.255.255.240 +63.116.153.0/255.255.255.0 +63.116.160.0/255.255.255.0 +63.118.177.128/255.255.255.128 +63.119.51.88/255.255.255.248 +63.119.115.80/255.255.255.240 +63.119.206.112/255.255.255.240 +63.119.236.0/255.255.255.0 +63.120.11.0/255.255.255.0 +63.120.61.0/255.255.255.128 +63.120.254.160/255.255.255.224 +63.121.1.0/255.255.254.0 +63.121.64.0/255.255.255.0 +63.121.95.240/255.255.255.240 +63.121.140.0/255.255.255.0 +63.122.67.192/255.255.255.248 +63.122.165.144/255.255.255.240 +63.124.67.128/255.255.255.128 +63.124.150.200/255.255.255.248 +63.124.182.48/255.255.255.240 +63.125.11.104/255.255.255.248 +63.126.131.0/255.255.255.0 +63.126.147.64/255.255.255.240 +63.127.41.0/255.255.255.0 +63.127.255.0/255.255.255.0 +63.136.8.128/255.255.255.128 +63.136.32.0/255.255.224.0 +63.136.96.144/255.255.255.240 +63.136.120.128/255.255.255.240 +63.136.192.64/255.255.255.192 +63.136.233.32/255.255.255.224 +63.137.50.128/255.255.255.128 +63.137.53.0/255.255.255.0 +63.140.186.136/255.255.255.248 +63.141.21.168/255.255.255.248 +63.141.113.160/255.255.255.248 +63.141.152.0/255.255.255.0 +63.141.173.24/255.255.255.248 +63.141.181.0/255.255.255.0 +63.141.184.64/255.255.255.224 +63.141.186.40/255.255.255.248 +63.141.186.184/255.255.255.248 +63.141.209.0/255.255.255.0 +63.142.7.0/255.255.255.0 +63.142.41.0/255.255.255.0 +63.142.43.240/255.255.255.248 +63.142.181.176/255.255.255.248 +63.142.193.104/255.255.255.248 +63.143.23.224/255.255.255.248 +63.143.85.216/255.255.255.248 +63.143.129.32/255.255.255.248 +63.143.133.96/255.255.255.240 +63.143.140.0/255.255.255.0 +63.143.157.120/255.255.255.248 +63.143.176.80/255.255.255.248 +63.143.185.16/255.255.255.240 +63.143.211.232/255.255.255.248 +63.143.253.128/255.255.255.248 +63.144.20.192/255.255.255.224 +63.144.60.64/255.255.255.240 +63.144.73.192/255.255.255.224 +63.144.142.24/255.255.255.248 +63.144.183.224/255.255.255.224 +63.145.109.96/255.255.255.224 +63.145.169.160/255.255.255.224 +63.145.188.0/255.255.254.0 +63.146.109.128/255.255.255.128 +63.146.120.0/255.255.255.240 +63.146.120.24/255.255.255.248 +63.146.120.160/255.255.255.224 +63.146.124.0/255.255.255.192 +63.147.160.0/255.255.252.0 +63.148.71.64/255.255.255.224 +63.148.87.0/255.255.254.0 +63.148.99.224/255.255.255.224 +63.148.160.0/255.255.255.0 +63.150.44.0/255.255.255.0 +63.150.98.104/255.255.255.240 +63.150.98.176/255.255.255.248 +63.150.99.64/255.255.255.240 +63.150.99.184/255.255.255.248 +63.150.99.208/255.255.255.248 +63.150.101.160/255.255.255.240 +63.150.101.184/255.255.255.248 +63.150.111.8/255.255.255.248 +63.150.111.88/255.255.255.248 +63.150.111.112/255.255.255.248 +63.150.111.128/255.255.255.248 +63.150.111.144/255.255.255.248 +63.150.113.224/255.255.255.240 +63.150.121.40/255.255.255.240 +63.150.121.176/255.255.255.232 +63.150.121.200/255.255.255.248 +63.150.121.248/255.255.255.248 +63.150.127.176/255.255.255.240 +63.150.127.232/255.255.255.248 +63.150.127.240/255.255.255.248 +63.150.145.240/255.255.255.240 +63.150.149.0/255.255.255.0 +63.150.243.72/255.255.255.232 +63.150.243.112/255.255.255.240 +63.150.243.136/255.255.255.224 +63.150.243.192/255.255.255.248 +63.150.243.232/255.255.255.248 +63.150.248.128/255.255.255.240 +63.150.248.160/255.255.255.240 +63.150.248.216/255.255.255.240 +63.150.248.240/255.255.255.248 +63.150.250.96/255.255.255.248 +63.150.250.112/255.255.255.248 +63.150.250.184/255.255.255.248 +63.150.250.208/255.255.255.248 +63.160.58.96/255.255.255.224 +63.161.94.0/255.255.255.0 +63.162.96.160/255.255.255.240 +63.162.143.0/255.255.255.224 +63.162.157.160/255.255.255.224 +63.163.102.0/255.255.255.0 +63.163.104.32/255.255.255.240 +63.163.111.0/255.255.255.192 +63.163.164.48/255.255.255.240 +63.163.213.200/255.255.255.248 +63.163.246.0/255.255.255.128 +63.165.60.128/255.255.255.128 +63.166.47.168/255.255.255.248 +63.166.100.0/255.255.255.0 +63.166.249.0/255.255.255.0 +63.168.49.0/255.255.255.0 +63.168.56.0/255.255.255.0 +63.169.16.216/255.255.255.248 +63.171.40.128/255.255.255.128 +63.171.184.0/255.255.255.128 +63.171.224.0/255.255.255.112 +63.172.60.0/255.255.255.192 +63.172.99.224/255.255.255.224 +63.173.29.64/255.255.255.224 +63.174.161.16/255.255.255.240 +63.174.215.32/255.255.255.224 +63.192.13.208/255.255.255.248 +63.192.23.208/255.255.255.248 +63.192.34.64/255.255.255.224 +63.192.37.128/255.255.255.224 +63.192.41.176/255.255.255.248 +63.192.42.160/255.255.255.248 +63.192.44.192/255.255.255.248 +63.192.45.64/255.255.255.224 +63.192.118.0/255.255.255.0 +63.192.198.96/255.255.255.248 +63.192.200.152/255.255.255.248 +63.192.202.128/255.255.255.248 +63.192.236.216/255.255.255.248 +63.192.244.144/255.255.255.248 +63.192.253.16/255.255.255.248 +63.193.5.248/255.255.255.248 +63.193.52.144/255.255.255.248 +63.193.74.24/255.255.255.248 +63.193.78.192/255.255.255.224 +63.193.97.224/255.255.255.248 +63.193.102.112/255.255.255.248 +63.193.136.152/255.255.255.248 +63.193.176.0/255.255.255.128 +63.193.238.0/255.255.255.248 +63.194.4.120/255.255.255.248 +63.194.7.160/255.255.255.224 +63.194.32.64/255.255.255.224 +63.194.34.128/255.255.255.248 +63.194.35.208/255.255.255.248 +63.194.65.160/255.255.255.248 +63.194.67.80/255.255.255.248 +63.194.68.80/255.255.255.240 +63.194.68.128/255.255.255.248 +63.194.98.216/255.255.255.248 +63.194.177.128/255.255.255.248 +63.194.178.56/255.255.255.248 +63.194.182.136/255.255.255.248 +63.194.182.160/255.255.255.248 +63.194.192.40/255.255.255.248 +63.194.197.208/255.255.255.248 +63.194.198.184/255.255.255.248 +63.194.199.144/255.255.255.248 +63.194.205.80/255.255.255.248 +63.195.32.240/255.255.255.248 +63.195.41.0/255.255.255.248 +63.195.43.64/255.255.255.248 +63.195.65.64/255.255.255.224 +63.195.98.176/255.255.255.248 +63.195.135.120/255.255.255.248 +63.195.137.176/255.255.255.248 +63.195.185.128/255.255.255.224 +63.195.208.24/255.255.255.248 +63.195.209.8/255.255.255.248 +63.195.215.80/255.255.255.248 +63.195.219.144/255.255.255.248 +63.196.37.152/255.255.255.248 +63.196.41.168/255.255.255.248 +63.196.70.128/255.255.255.224 +63.196.146.88/255.255.255.248 +63.196.251.128/255.255.255.248 +63.197.166.248/255.255.255.248 +63.197.167.32/255.255.255.224 +63.197.168.0/255.255.255.0 +63.197.224.160/255.255.255.224 +63.197.239.240/255.255.255.248 +63.198.8.160/255.255.255.224 +63.198.9.112/255.255.255.248 +63.198.40.112/255.255.255.248 +63.198.138.248/255.255.255.248 +63.198.144.8/255.255.255.240 +63.198.147.224/255.255.255.224 +63.198.161.248/255.255.255.248 +63.198.168.72/255.255.255.248 +63.198.169.176/255.255.255.248 +63.198.248.152/255.255.255.248 +63.199.24.224/255.255.255.224 +63.199.48.32/255.255.255.248 +63.199.48.40/255.255.255.248 +63.199.48.48/255.255.255.248 +63.199.56.152/255.255.255.248 +63.199.57.32/255.255.255.248 +63.199.57.96/255.255.255.240 +63.199.57.120/255.255.255.248 +63.199.60.64/255.255.255.224 +63.199.110.88/255.255.255.248 +63.199.153.192/255.255.255.248 +63.199.157.184/255.255.255.248 +63.199.198.40/255.255.255.248 +63.199.208.232/255.255.255.248 +63.199.208.248/255.255.255.248 +63.200.21.16/255.255.255.248 +63.200.24.152/255.255.255.248 +63.200.43.200/255.255.255.248 +63.200.58.88/255.255.255.248 +63.200.76.0/255.255.255.224 +63.200.90.240/255.255.255.248 +63.200.191.200/255.255.255.248 +63.200.201.64/255.255.255.248 +63.200.218.80/255.255.255.240 +63.200.236.248/255.255.255.248 +63.200.237.216/255.255.255.248 +63.200.243.152/255.255.255.248 +63.201.18.72/255.255.255.248 +63.201.49.56/255.255.255.248 +63.201.57.80/255.255.255.248 +63.201.68.48/255.255.255.248 +63.201.83.128/255.255.255.248 +63.201.100.64/255.255.255.248 +63.201.108.40/255.255.255.248 +63.201.109.200/255.255.255.248 +63.201.114.64/255.255.255.192 +63.201.158.200/255.255.255.248 +63.202.5.32/255.255.255.224 +63.202.11.184/255.255.255.248 +63.202.16.240/255.255.255.248 +63.202.17.168/255.255.255.248 +63.202.18.0/255.255.255.224 +63.202.25.224/255.255.255.248 +63.202.32.40/255.255.255.248 +63.202.32.64/255.255.255.240 +63.202.44.56/255.255.255.248 +63.202.59.112/255.255.255.240 +63.202.60.232/255.255.255.248 +63.202.61.8/255.255.255.248 +63.202.95.112/255.255.255.248 +63.202.114.96/255.255.255.248 +63.202.126.224/255.255.255.224 +63.202.162.0/255.255.255.248 +63.202.162.24/255.255.255.248 +63.202.190.96/255.255.255.248 +63.202.201.208/255.255.255.248 +63.202.202.168/255.255.255.248 +63.202.202.184/255.255.255.248 +63.202.202.224/255.255.255.248 +63.202.206.96/255.255.255.248 +63.202.207.120/255.255.255.248 +63.202.227.200/255.255.255.248 +63.203.14.192/255.255.255.248 +63.203.56.240/255.255.255.248 +63.203.88.56/255.255.255.248 +63.203.125.232/255.255.255.248 +63.203.127.24/255.255.255.248 +63.203.128.56/255.255.255.248 +63.203.134.48/255.255.255.248 +63.203.141.128/255.255.255.224 +63.203.143.160/255.255.255.248 +63.203.186.232/255.255.255.248 +63.203.187.184/255.255.255.248 +63.203.203.200/255.255.255.248 +63.203.245.192/255.255.255.248 +63.204.35.240/255.255.255.248 +63.204.85.168/255.255.255.248 +63.204.123.232/255.255.255.248 +63.204.141.80/255.255.255.248 +63.204.167.216/255.255.255.248 +63.204.173.32/255.255.255.248 +63.204.234.48/255.255.255.240 +63.205.1.96/255.255.255.224 +63.205.22.24/255.255.255.248 +63.205.32.32/255.255.255.248 +63.205.127.216/255.255.255.248 +63.205.155.136/255.255.255.248 +63.205.210.96/255.255.255.248 +63.205.215.176/255.255.255.240 +63.206.11.128/255.255.255.248 +63.206.83.96/255.255.255.248 +63.206.83.120/255.255.255.248 +63.206.87.120/255.255.255.248 +63.206.108.184/255.255.255.248 +63.206.109.112/255.255.255.248 +63.206.109.168/255.255.255.248 +63.206.144.120/255.255.255.248 +63.206.150.0/255.255.255.0 +63.206.155.48/255.255.255.248 +63.206.209.104/255.255.255.248 +63.206.209.176/255.255.255.248 +63.206.217.48/255.255.255.248 +63.206.219.112/255.255.255.248 +63.206.249.104/255.255.255.248 +63.207.43.0/255.255.255.224 +63.207.92.192/255.255.255.248 +63.207.114.32/255.255.255.248 +63.207.114.48/255.255.255.248 +63.207.116.192/255.255.255.248 +63.207.164.64/255.255.255.224 +63.207.174.192/255.255.255.248 +63.207.175.24/255.255.255.248 +63.207.201.192/255.255.255.248 +63.207.240.112/255.255.255.248 +63.211.64.160/255.255.255.248 +63.211.64.176/255.255.255.248 +63.211.141.0/255.255.255.128 +63.212.171.0/255.255.255.0 +63.224.27.144/255.255.255.248 +63.224.68.104/255.255.255.248 +63.224.133.0/255.255.255.0 +63.224.141.192/255.255.255.248 +63.225.17.0/255.255.255.0 +63.225.18.88/255.255.255.248 +63.225.62.48/255.255.255.248 +63.225.119.16/255.255.255.248 +63.225.131.152/255.255.255.248 +63.225.168.152/255.255.255.248 +63.226.58.144/255.255.255.248 +63.226.99.88/255.255.255.248 +63.226.204.72/255.255.255.248 +63.227.33.184/255.255.255.248 +63.227.81.120/255.255.255.248 +63.227.153.160/255.255.255.240 +63.227.208.248/255.255.255.248 +63.228.175.0/255.255.255.248 +63.229.31.120/255.255.255.248 +63.229.189.0/255.255.255.248 +63.230.40.48/255.255.255.248 +63.230.43.112/255.255.255.248 +63.230.123.96/255.255.255.248 +63.230.129.72/255.255.255.248 +63.230.147.88/255.255.255.248 +63.230.213.208/255.255.255.248 +63.231.30.136/255.255.255.248 +63.231.70.0/255.255.255.248 +63.231.116.112/255.255.255.248 +63.231.237.112/255.255.255.248 +63.231.237.120/255.255.255.248 +63.231.247.232/255.255.255.248 +63.236.0.40/255.255.255.248 +63.236.3.64/255.255.255.224 +63.236.4.32/255.255.255.240 +63.236.5.128/255.255.255.224 +63.236.7.88/255.255.255.248 +63.236.7.160/255.255.255.240 +63.236.7.216/255.255.255.248 +63.236.8.0/255.255.255.128 +63.236.12.192/255.255.255.224 +63.236.45.0/255.255.255.0 +63.236.94.0/255.255.255.192 +63.236.94.128/255.255.255.192 +63.236.98.112/255.255.255.248 +63.236.107.48/255.255.255.248 +63.236.111.32/255.255.255.224 +63.236.132.104/255.255.255.248 +63.236.132.160/255.255.255.248 +63.236.220.240/255.255.255.248 +63.236.226.192/255.255.255.224 +63.237.158.32/255.255.255.224 +63.237.201.0/255.255.255.0 +63.237.221.192/255.255.255.192 +63.237.247.32/255.255.255.224 +63.237.253.160/255.255.255.224 +63.239.104.0/255.255.250.0 +63.239.157.48/255.255.255.248 +63.239.181.192/255.255.255.224 +63.239.239.248/255.255.255.248 +63.240.30.0/255.255.255.128 +63.240.193.224/255.255.255.240 +63.240.197.56/255.255.255.248 +63.240.207.0/255.255.255.0 +63.240.210.248/255.255.255.248 +63.240.233.128/255.255.255.192 +63.240.249.0/255.255.255.128 +63.241.6.48/255.255.255.248 +63.241.8.128/255.255.255.192 +63.241.11.0/255.255.255.224 +63.241.11.128/255.255.255.128 +63.241.16.0/255.255.248.0 +63.241.27.64/255.255.255.192 +63.241.27.128/255.255.255.192 +63.241.28.0/255.255.255.0 +63.241.35.0/255.255.255.0 +63.241.36.0/255.255.255.0 +63.241.44.0/255.255.254.0 +63.241.48.0/255.255.248.0 +63.241.57.0/255.255.255.248 +63.241.58.0/255.255.255.0 +63.241.60.40/255.255.255.248 +63.241.209.104/255.255.255.240 +63.241.233.64/255.255.255.224 +63.243.101.16/255.255.255.240 +63.245.128.0/255.255.192.0 +63.249.2.111/255.255.255.239 +63.249.4.0/255.255.255.0 +63.249.5.0/255.255.255.128 +63.249.27.32/255.255.255.224 +63.251.6.112/255.255.255.248 +63.251.10.32/255.255.255.224 +63.251.10.160/255.255.255.240 +63.251.51.192/255.255.255.224 +63.251.56.160/255.255.255.224 +63.251.80.0/255.255.255.128 +63.251.80.128/255.255.255.224 +63.251.80.160/255.255.255.240 +63.251.80.184/255.255.255.248 +63.251.80.192/255.255.255.192 +63.251.81.0/255.255.255.0 +63.251.82.0/255.255.255.0 +63.251.83.192/255.255.255.192 +63.251.88.0/255.255.255.224 +63.251.99.0/255.255.255.0 +63.251.144.160/255.255.255.224 +63.251.222.0/255.255.255.0 +63.252.160.136/255.255.255.248 +63.253.67.224/255.255.255.240 +63.253.242.0/255.255.255.0 +63.255.4.152/255.255.255.248 +64.8.128.0/255.255.192.0 +64.12.46.0/255.255.255.0 +64.13.121.232/255.255.255.248 +64.14.37.128/255.255.255.224 +64.14.40.160/255.255.255.224 +64.14.50.224/255.255.255.224 +64.14.61.64/255.255.255.224 +64.14.63.64/255.255.255.224 +64.15.164.128/255.255.255.224 +64.15.165.0/255.255.255.0 +64.15.202.0/255.255.255.0 +64.15.226.96/255.255.255.160 +64.15.227.224/255.255.255.224 +64.15.228.16/255.255.255.80 +64.15.228.224/255.255.255.224 +64.15.229.32/255.255.255.224 +64.15.231.64/255.255.255.224 +64.15.234.128/255.255.255.224 +64.15.234.224/255.255.255.224 +64.15.237.128/255.255.255.224 +64.15.238.64/255.255.255.224 +64.15.239.96/255.255.255.224 +64.15.245.0/255.255.255.223 +64.15.248.0/255.255.255.0 +64.15.250.0/255.255.255.224 +64.17.20.0/255.255.255.224 +64.19.191.176/255.255.255.240 +64.22.38.184/255.255.255.248 +64.22.105.240/255.255.255.240 +64.22.113.112/255.255.255.240 +64.22.118.160/255.255.255.240 +64.23.0.0/255.255.255.0 +64.23.10.48/255.255.255.240 +64.23.244.96/255.255.255.224 +64.25.5.224/255.255.255.248 +64.27.0.0/255.255.224.0 +64.29.192.0/255.255.246.235 +64.29.201.22/255.255.233.22 +64.36.201.16/255.255.255.240 +64.37.64.96/255.255.255.224 +64.37.75.32/255.255.255.224 +64.37.79.0/255.255.255.0 +64.38.192.0/255.255.245.246 +64.38.202.11/255.255.255.117 +64.38.202.165/255.255.202.165 +64.39.18.64/255.255.255.248 +64.39.51.0/255.255.255.0 +64.40.32.0/255.255.250.0 +64.41.133.160/255.255.255.224 +64.42.1.8/255.255.255.248 +64.42.107.144/255.255.255.248 +64.42.117.184/255.255.255.248 +64.42.210.64/255.255.255.240 +64.46.78.224/255.255.255.248 +64.49.65.216/255.255.255.248 +64.49.68.24/255.255.255.248 +64.49.192.0/255.255.249.18 +64.49.198.239/255.255.242.23 +64.49.212.217/255.255.253.120 +64.49.215.98/255.255.251.199 +64.49.219.156/255.255.255.236 +64.49.219.181/255.255.254.63 +64.49.221.122/255.255.255.103 +64.49.222.20/255.255.225.174 +64.49.252.103/255.255.254.68 +64.49.254.36/255.255.255.246 +64.49.254.47/255.255.254.47 +64.50.49.96/255.255.255.248 +64.51.9.64/255.255.255.224 +64.51.47.224/255.255.255.224 +64.51.74.0/255.255.255.224 +64.51.76.96/255.255.255.224 +64.51.83.144/255.255.255.240 +64.51.240.176/255.255.255.240 +64.52.7.152/255.255.255.248 +64.52.58.240/255.255.255.248 +64.52.60.216/255.255.255.248 +64.52.71.0/255.255.255.248 +64.52.72.48/255.255.255.248 +64.52.74.120/255.255.255.248 +64.52.80.224/255.255.255.240 +64.52.112.160/255.255.255.248 +64.52.112.176/255.255.255.248 +64.52.113.208/255.255.255.248 +64.52.117.224/255.255.255.248 +64.52.132.200/255.255.255.248 +64.52.227.176/255.255.255.248 +64.55.76.192/255.255.255.224 +64.55.86.160/255.255.255.224 +64.55.97.128/255.255.255.240 +64.55.165.129/255.255.255.194 +64.57.160.0/255.255.224.0 +64.58.66.192/255.255.255.224 +64.58.176.0/255.255.255.0 +64.59.17.96/255.255.255.248 +64.59.56.144/255.255.255.248 +64.60.7.128/255.255.255.224 +64.60.22.96/255.255.255.248 +64.60.67.216/255.255.255.248 +64.60.108.0/255.255.255.192 +64.60.114.128/255.255.255.128 +64.60.122.144/255.255.255.240 +64.60.130.120/255.255.255.248 +64.60.132.192/255.255.255.192 +64.60.141.176/255.255.255.240 +64.60.150.128/255.255.255.240 +64.60.194.0/255.255.255.248 +64.60.198.184/255.255.255.248 +64.60.202.152/255.255.255.248 +64.62.0.0/255.255.128.0 +64.62.142.224/255.255.255.224 +64.62.143.64/255.255.255.224 +64.62.168.0/255.255.255.128 +64.62.227.56/255.255.255.248 +64.62.227.128/255.255.255.128 +64.65.134.48/255.255.255.248 +64.65.142.160/255.255.255.224 +64.69.48.0/255.255.240.0 +64.69.125.88/255.255.255.248 +64.71.141.0/255.255.255.0 +64.71.144.0/255.255.255.128 +64.71.166.0/255.255.255.0 +64.72.67.128/255.255.255.224 +64.73.226.80/255.255.255.240 +64.74.82.224/255.255.255.224 +64.74.136.0/255.255.252.0 +64.74.214.0/255.255.255.0 +64.74.216.0/255.255.252.0 +64.75.4.192/255.255.255.224 +64.76.126.72/255.255.255.248 +64.76.126.240/255.255.255.248 +64.76.142.96/255.255.255.240 +64.76.146.48/255.255.255.240 +64.76.146.112/255.255.255.240 +64.76.179.80/255.255.255.248 +64.76.179.88/255.255.255.248 +64.77.29.16/255.255.255.248 +64.77.37.160/255.255.255.247 +64.77.41.176/255.255.255.248 +64.77.45.0/255.255.255.224 +64.77.68.80/255.255.255.248 +64.77.101.0/255.255.255.248 +64.77.101.8/255.255.255.248 +64.77.101.80/255.255.255.248 +64.78.0.0/255.255.192.0 +64.79.161.128/255.255.255.128 +64.80.137.32/255.255.255.240 +64.80.153.176/255.255.255.240 +64.81.91.240/255.255.255.248 +64.81.92.40/255.255.255.248 +64.81.92.224/255.255.255.232 +64.81.93.128/255.255.255.160 +64.81.94.48/255.255.255.208 +64.81.94.112/255.255.255.240 +64.81.94.136/255.255.255.152 +64.81.95.128/255.255.255.176 +64.81.156.64/255.255.255.248 +64.81.184.160/255.255.255.224 +64.81.216.80/255.255.255.248 +64.83.0.0/255.255.176.0 +64.84.29.104/255.255.255.248 +64.85.66.0/255.255.255.0 +64.85.69.0/255.255.255.0 +64.85.76.0/255.255.255.0 +64.86.63.0/255.255.255.0 +64.87.128.0/255.255.128.0 +64.92.150.0/255.255.255.0 +64.93.3.144/255.255.255.240 +64.93.9.200/255.255.255.248 +64.93.21.232/255.255.255.248 +64.94.5.160/255.255.255.224 +64.94.35.160/255.255.255.224 +64.94.69.80/255.255.255.240 +64.94.106.16/255.255.255.240 +64.94.206.32/255.255.255.224 +64.95.24.0/255.255.255.0 +64.95.65.0/255.255.255.128 +64.95.73.64/255.255.255.224 +64.95.112.160/255.255.255.224 +64.95.120.0/255.255.254.0 +64.106.170.128/255.255.255.191 +64.108.174.32/255.255.255.248 +64.108.232.64/255.255.255.224 +64.114.67.0/255.255.255.0 +64.115.129.144/255.255.255.248 +64.116.232.96/255.255.255.224 +64.116.233.216/255.255.255.248 +64.116.234.96/255.255.255.224 +64.117.37.128/255.255.255.192 +64.118.130.120/255.255.255.248 +64.119.224.0/255.255.240.0 +64.123.0.16/255.255.255.248 +64.123.0.40/255.255.255.248 +64.123.4.248/255.255.255.248 +64.123.37.88/255.255.255.248 +64.123.153.64/255.255.255.248 +64.123.168.208/255.255.255.248 +64.123.168.216/255.255.255.248 +64.123.169.200/255.255.255.248 +64.123.176.152/255.255.255.248 +64.123.229.136/255.255.255.248 +64.123.235.0/255.255.255.128 +64.124.5.0/255.255.255.224 +64.124.14.0/255.255.255.128 +64.124.17.40/255.255.255.248 +64.124.97.200/255.255.255.240 +64.124.108.128/255.255.255.128 +64.124.112.40/255.255.255.248 +64.124.125.0/255.255.255.224 +64.124.125.224/255.255.255.240 +64.124.136.96/255.255.255.240 +64.124.184.80/255.255.255.248 +64.124.229.160/255.255.255.248 +64.132.15.224/255.255.255.240 +64.132.120.0/255.255.255.0 +64.133.83.152/255.255.255.248 +64.138.64.32/255.255.255.248 +64.138.84.0/255.255.255.224 +64.139.133.128/255.255.255.128 +64.141.0.52/255.255.255.235 +64.143.0.0/255.255.32.0 +64.144.198.224/255.255.255.224 +64.144.245.32/255.255.255.240 +64.145.18.192/255.255.255.224 +64.145.21.24/255.255.255.248 +64.145.120.144/255.255.255.248 +64.145.168.112/255.255.255.248 +64.145.249.0/255.255.255.224 +64.146.49.32/255.255.255.224 +64.149.77.32/255.255.255.240 +64.151.64.0/255.255.192.0 +64.152.178.208/255.255.255.240 +64.153.0.0/255.255.0.0 +64.156.84.16/255.255.255.240 +64.159.4.81/255.255.255.249 +64.159.4.105/255.255.255.248 +64.160.1.160/255.255.255.224 +64.160.9.128/255.255.255.248 +64.160.129.200/255.255.255.248 +64.160.161.0/255.255.255.0 +64.160.188.200/255.255.255.248 +64.160.222.152/255.255.255.248 +64.160.237.152/255.255.255.248 +64.161.59.232/255.255.255.248 +64.161.60.224/255.255.255.248 +64.161.118.48/255.255.255.248 +64.161.118.104/255.255.255.248 +64.161.130.128/255.255.255.248 +64.161.140.88/255.255.255.248 +64.161.188.72/255.255.255.248 +64.161.194.160/255.255.255.248 +64.161.210.128/255.255.255.248 +64.161.211.0/255.255.255.224 +64.162.80.88/255.255.255.248 +64.162.166.96/255.255.255.216 +64.162.168.184/255.255.255.248 +64.162.174.48/255.255.255.248 +64.162.194.128/255.255.255.248 +64.162.195.136/255.255.255.248 +64.162.201.136/255.255.255.248 +64.162.231.16/255.255.255.240 +64.163.6.208/255.255.255.248 +64.163.67.240/255.255.255.248 +64.163.74.48/255.255.255.248 +64.163.79.96/255.255.255.224 +64.163.88.112/255.255.255.248 +64.163.106.64/255.255.255.248 +64.163.154.176/255.255.255.248 +64.163.191.160/255.255.255.248 +64.163.204.224/255.255.255.248 +64.163.205.8/255.255.255.248 +64.163.227.128/255.255.255.248 +64.163.247.192/255.255.255.240 +64.164.22.200/255.255.255.248 +64.164.23.56/255.255.255.248 +64.164.68.192/255.255.255.224 +64.164.89.88/255.255.255.248 +64.164.89.232/255.255.255.248 +64.164.95.128/255.255.255.128 +64.164.129.8/255.255.255.248 +64.164.137.176/255.255.255.248 +64.164.144.208/255.255.255.240 +64.164.156.200/255.255.255.248 +64.164.201.248/255.255.255.248 +64.164.207.64/255.255.255.248 +64.164.216.120/255.255.255.248 +64.164.255.192/255.255.255.240 +64.165.5.216/255.255.255.248 +64.165.27.176/255.255.255.248 +64.165.111.200/255.255.255.248 +64.165.121.216/255.255.255.248 +64.165.145.56/255.255.255.248 +64.165.185.112/255.255.255.248 +64.165.186.144/255.255.255.248 +64.165.198.32/255.255.255.248 +64.166.0.216/255.255.255.248 +64.166.7.128/255.255.255.240 +64.166.11.32/255.255.255.248 +64.166.34.192/255.255.255.192 +64.166.45.32/255.255.255.248 +64.166.49.104/255.255.255.248 +64.166.64.200/255.255.255.248 +64.166.65.144/255.255.255.248 +64.166.68.8/255.255.255.248 +64.166.76.128/255.255.255.128 +64.166.135.96/255.255.255.248 +64.166.187.128/255.255.255.225 +64.166.202.96/255.255.255.248 +64.166.228.128/255.255.255.248 +64.166.234.24/255.255.255.248 +64.166.244.56/255.255.255.248 +64.167.33.16/255.255.255.248 +64.167.72.0/255.255.255.224 +64.167.74.192/255.255.255.224 +64.167.104.128/255.255.255.248 +64.167.108.32/255.255.255.240 +64.167.120.8/255.255.255.248 +64.167.124.32/255.255.255.248 +64.167.126.56/255.255.255.248 +64.167.131.56/255.255.255.248 +64.167.225.0/255.255.255.112 +64.167.232.32/255.255.255.224 +64.167.254.136/255.255.255.248 +64.168.4.0/255.255.255.0 +64.168.42.248/255.255.255.248 +64.168.70.160/255.255.255.248 +64.168.78.112/255.255.255.248 +64.168.83.216/255.255.255.248 +64.168.87.160/255.255.255.248 +64.168.128.32/255.255.255.224 +64.168.133.16/255.255.255.248 +64.168.138.64/255.255.255.248 +64.168.146.168/255.255.255.248 +64.168.159.80/255.255.255.248 +64.168.208.160/255.255.255.248 +64.168.213.112/255.255.255.248 +64.168.214.16/255.255.255.248 +64.168.225.216/255.255.255.248 +64.168.227.144/255.255.255.248 +64.168.236.96/255.255.255.248 +64.169.18.192/255.255.255.248 +64.169.35.8/255.255.255.240 +64.169.37.248/255.255.255.248 +64.169.58.0/255.255.255.248 +64.169.64.40/255.255.255.248 +64.169.121.200/255.255.255.248 +64.169.124.168/255.255.255.248 +64.169.147.192/255.255.255.224 +64.169.167.176/255.255.255.248 +64.169.173.48/255.255.255.248 +64.169.173.80/255.255.255.248 +64.169.196.0/255.255.255.0 +64.169.201.200/255.255.255.248 +64.169.236.160/255.255.255.248 +64.169.237.224/255.255.255.248 +64.170.32.0/255.255.255.0 +64.170.41.136/255.255.255.248 +64.170.42.224/255.255.255.248 +64.170.65.8/255.255.255.248 +64.170.66.72/255.255.255.248 +64.170.95.240/255.255.255.248 +64.170.107.200/255.255.255.248 +64.170.132.8/255.255.255.248 +64.170.163.224/255.255.255.224 +64.170.227.216/255.255.255.248 +64.170.250.48/255.255.255.248 +64.170.253.232/255.255.255.248 +64.171.22.56/255.255.255.248 +64.171.50.168/255.255.255.248 +64.171.51.208/255.255.255.248 +64.171.114.152/255.255.255.248 +64.171.125.128/255.255.255.248 +64.171.150.184/255.255.255.248 +64.171.160.224/255.255.255.224 +64.171.161.128/255.255.255.192 +64.172.64.216/255.255.255.248 +64.172.64.240/255.255.255.248 +64.172.75.0/255.255.255.248 +64.172.75.88/255.255.255.248 +64.172.93.192/255.255.255.224 +64.172.160.40/255.255.255.248 +64.172.161.240/255.255.255.248 +64.172.164.40/255.255.255.248 +64.172.194.208/255.255.255.248 +64.172.206.48/255.255.255.248 +64.172.220.40/255.255.255.248 +64.172.220.48/255.255.255.248 +64.172.236.144/255.255.255.248 +64.172.248.160/255.255.255.248 +64.172.255.0/255.255.255.248 +64.173.58.8/255.255.255.248 +64.173.72.208/255.255.255.248 +64.173.101.24/255.255.255.248 +64.173.117.200/255.255.255.248 +64.173.143.24/255.255.255.248 +64.173.151.0/255.255.255.128 +64.173.173.64/255.255.255.248 +64.173.193.88/255.255.255.248 +64.173.229.184/255.255.255.248 +64.173.252.32/255.255.255.224 +64.173.253.0/255.255.255.0 +64.174.50.240/255.255.255.248 +64.174.58.0/255.255.255.248 +64.174.153.224/255.255.255.248 +64.174.180.0/255.255.255.192 +64.174.198.32/255.255.255.248 +64.174.199.40/255.255.255.248 +64.174.215.240/255.255.255.248 +64.174.223.72/255.255.255.248 +64.174.240.200/255.255.255.248 +64.175.21.176/255.255.255.248 +64.175.29.208/255.255.255.248 +64.175.31.216/255.255.255.248 +64.175.49.56/255.255.255.248 +64.175.126.72/255.255.255.248 +64.175.180.40/255.255.255.248 +64.175.196.80/255.255.255.240 +64.175.196.128/255.255.255.224 +64.175.201.24/255.255.255.248 +64.179.18.24/255.255.255.248 +64.186.39.0/255.255.255.0 +64.186.51.168/255.255.255.248 +64.186.243.80/255.255.255.248 +64.198.3.72/255.255.255.248 +64.198.35.88/255.255.255.248 +64.201.96.0/255.255.240.0 +64.201.173.240/255.255.255.240 +64.202.64.0/255.255.240.0 +64.204.33.160/255.255.255.240 +64.204.98.144/255.255.255.240 +64.204.102.0/255.255.255.224 +64.205.58.40/255.255.255.248 +64.205.73.16/255.255.255.240 +64.205.81.80/255.255.255.240 +64.205.121.224/255.255.255.224 +64.205.123.160/255.255.255.224 +64.205.164.192/255.255.255.224 +64.205.169.96/255.255.255.240 +64.205.196.160/255.255.255.240 +64.205.202.152/255.255.255.248 +64.205.208.144/255.255.255.240 +64.207.43.120/255.255.255.248 +64.207.44.16/255.255.255.248 +64.207.128.0/255.255.192.0 +64.208.86.128/255.255.255.224 +64.208.234.0/255.255.255.0 +64.209.193.0/255.255.255.0 +64.209.224.0/255.255.240.0 +64.211.77.224/255.255.255.224 +64.211.240.0/255.255.255.128 +64.216.44.232/255.255.255.248 +64.216.51.144/255.255.255.248 +64.216.160.192/255.255.255.224 +64.217.6.176/255.255.255.248 +64.217.109.96/255.255.255.248 +64.217.128.136/255.255.255.248 +64.217.131.64/255.255.255.248 +64.217.194.216/255.255.255.248 +64.217.215.128/255.255.255.248 +64.218.222.64/255.255.255.248 +64.219.0.0/255.255.254.128 +64.219.133.128/255.255.255.128 +64.219.143.168/255.255.255.248 +64.219.153.120/255.255.255.248 +64.219.190.224/255.255.255.224 +64.219.191.200/255.255.255.248 +64.219.207.160/255.255.255.248 +64.219.218.144/255.255.255.248 +64.225.136.192/255.255.255.240 +64.225.192.0/255.255.255.128 +64.225.202.0/255.255.255.0 +64.232.7.248/255.255.255.248 +64.232.74.0/255.255.255.224 +64.232.88.0/255.255.255.0 +64.232.136.176/255.255.255.240 +64.232.248.240/255.255.255.240 +64.233.46.64/255.255.255.248 +64.235.225.0/255.255.255.248 +64.235.225.112/255.255.255.240 +64.238.197.136/255.255.255.240 +64.238.203.0/255.255.254.0 +64.238.245.168/255.255.255.232 +64.240.46.16/255.255.255.248 +64.240.67.224/255.255.255.248 +64.240.228.0/255.255.255.0 +64.240.238.64/255.255.255.224 +64.241.25.0/255.255.255.0 +64.241.31.0/255.255.255.0 +64.241.49.208/255.255.255.240 +64.241.67.144/255.255.255.240 +64.241.229.0/255.255.255.192 +64.242.6.128/255.255.255.224 +64.242.33.192/255.255.255.224 +64.242.148.192/255.255.255.240 +64.242.153.0/255.255.253.0 +64.242.180.192/255.255.255.224 +64.242.196.0/255.255.254.0 +64.243.7.0/255.255.255.0 +64.243.18.0/255.255.255.0 +64.243.29.48/255.255.255.240 +64.243.29.144/255.255.255.240 +64.243.65.48/255.255.255.240 +64.243.89.80/255.255.255.240 +64.244.122.16/255.255.255.240 +64.246.135.0/255.255.255.240 +64.246.135.32/255.255.255.240 +64.248.9.16/255.255.255.248 +64.248.12.128/255.255.255.128 +64.248.18.16/255.255.255.240 +64.248.24.32/255.255.255.240 +64.248.30.144/255.255.255.240 +64.248.48.96/255.255.255.248 +64.248.58.64/255.255.255.248 +64.248.129.104/255.255.255.248 +64.248.219.32/255.255.255.224 +64.248.227.0/255.255.255.0 +64.249.5.48/255.255.255.240 +64.249.8.0/255.255.255.192 +64.249.48.208/255.255.255.248 +64.249.76.176/255.255.255.240 +64.249.120.128/255.255.255.248 +64.249.123.160/255.255.255.224 +64.249.123.192/255.255.255.224 +64.249.128.160/255.255.255.224 +64.249.152.128/255.255.255.240 +64.249.185.72/255.255.255.248 +64.249.218.56/255.255.255.248 +64.249.230.96/255.255.255.224 +64.251.1.0/255.255.255.224 +64.251.48.0/255.255.240.0 +64.252.30.144/255.255.255.248 +64.252.153.48/255.255.255.248 +64.252.252.224/255.255.255.248 +64.253.35.0/255.255.255.0 +64.253.63.0/255.255.255.128 +64.253.198.0/255.255.255.0 +64.254.141.64/255.255.255.240 +64.255.173.32/255.255.255.224 +64.255.196.0/255.255.252.0 +65.16.26.224/255.255.255.224 +65.16.79.0/255.255.255.224 +65.16.99.128/255.255.255.240 +65.19.29.0/255.255.255.0 +65.36.35.224/255.255.255.240 +65.36.47.136/255.255.255.248 +65.36.73.0/255.255.255.224 +65.36.74.24/255.255.255.248 +65.36.74.200/255.255.255.248 +65.36.111.200/255.255.255.248 +65.37.72.0/255.255.252.0 +65.42.32.248/255.255.255.248 +65.42.53.80/255.255.255.248 +65.42.129.200/255.255.255.248 +65.42.140.248/255.255.255.248 +65.42.141.0/255.255.255.248 +65.42.141.8/255.255.255.248 +65.42.147.208/255.255.255.248 +65.42.154.32/255.255.255.248 +65.42.160.232/255.255.255.248 +65.42.168.144/255.255.255.248 +65.42.181.168/255.255.255.248 +65.43.28.72/255.255.255.248 +65.43.57.224/255.255.255.248 +65.43.59.224/255.255.255.248 +65.43.89.16/255.255.255.248 +65.43.110.8/255.255.255.248 +65.57.83.0/255.255.255.0 +65.61.128.80/255.255.255.248 +65.61.131.232/255.255.255.248 +65.61.131.240/255.255.255.248 +65.64.16.0/255.255.252.0 +65.64.59.0/255.255.255.248 +65.64.90.200/255.255.255.248 +65.64.90.248/255.255.255.248 +65.65.101.88/255.255.255.248 +65.65.103.128/255.255.255.248 +65.65.162.96/255.255.255.224 +65.66.2.176/255.255.255.248 +65.66.3.176/255.255.255.248 +65.66.65.128/255.255.255.248 +65.67.31.176/255.255.255.248 +65.67.32.168/255.255.255.248 +65.67.38.40/255.255.255.248 +65.67.56.168/255.255.255.248 +65.67.75.144/255.255.255.248 +65.67.85.136/255.255.255.248 +65.67.98.208/255.255.255.248 +65.67.137.240/255.255.255.248 +65.67.139.80/255.255.255.248 +65.67.139.120/255.255.255.248 +65.67.186.0/255.255.255.240 +65.67.248.168/255.255.255.248 +65.67.255.232/255.255.255.248 +65.68.40.248/255.255.255.248 +65.68.59.112/255.255.255.248 +65.68.64.16/255.255.255.248 +65.68.107.120/255.255.255.248 +65.68.107.128/255.255.255.248 +65.68.125.160/255.255.255.248 +65.68.133.32/255.255.255.248 +65.68.211.240/255.255.255.248 +65.68.230.88/255.255.255.248 +65.68.237.144/255.255.255.248 +65.69.30.16/255.255.255.248 +65.69.30.40/255.255.255.248 +65.69.74.192/255.255.255.248 +65.69.106.120/255.255.255.248 +65.69.106.208/255.255.255.248 +65.69.145.184/255.255.255.248 +65.69.182.184/255.255.255.248 +65.69.237.104/255.255.255.248 +65.69.239.208/255.255.255.248 +65.69.249.152/255.255.255.248 +65.69.249.160/255.255.255.248 +65.69.251.0/255.255.255.248 +65.69.252.184/255.255.255.248 +65.70.0.232/255.255.255.248 +65.70.5.56/255.255.255.248 +65.70.48.208/255.255.255.248 +65.70.90.40/255.255.255.248 +65.70.124.200/255.255.255.248 +65.70.200.40/255.255.255.248 +65.70.212.136/255.255.255.248 +65.70.225.120/255.255.255.248 +65.71.12.240/255.255.255.248 +65.71.82.160/255.255.255.248 +65.71.115.32/255.255.255.248 +65.71.119.248/255.255.255.248 +65.71.146.240/255.255.255.248 +65.71.164.0/255.255.255.192 +65.71.181.0/255.255.255.224 +65.71.187.96/255.255.255.248 +65.73.180.176/255.255.255.240 +65.73.207.96/255.255.255.248 +65.73.232.216/255.255.255.248 +65.73.246.0/255.255.255.0 +65.77.255.0/255.255.255.0 +65.78.229.32/255.255.255.248 +65.84.27.88/255.255.255.248 +65.84.90.128/255.255.255.240 +65.84.173.240/255.255.255.248 +65.84.187.16/255.255.255.248 +65.84.193.192/255.255.255.240 +65.85.76.144/255.255.255.240 +65.85.80.64/255.255.255.240 +65.85.98.32/255.255.255.240 +65.85.120.128/255.255.255.224 +65.85.134.112/255.255.255.240 +65.85.208.128/255.255.255.240 +65.85.223.232/255.255.255.248 +65.86.51.160/255.255.255.240 +65.86.79.240/255.255.255.248 +65.86.115.16/255.255.255.240 +65.86.160.128/255.255.255.224 +65.87.18.24/255.255.255.248 +65.88.178.0/255.255.255.0 +65.89.9.160/255.255.255.240 +65.93.231.176/255.255.255.248 +65.93.239.152/255.255.255.248 +65.100.38.24/255.255.255.248 +65.100.136.96/255.255.255.248 +65.100.243.144/255.255.255.248 +65.101.4.208/255.255.255.248 +65.101.46.200/255.255.255.248 +65.101.147.16/255.255.255.248 +65.101.193.0/255.255.255.0 +65.101.208.224/255.255.255.248 +65.101.227.112/255.255.255.248 +65.101.245.104/255.255.255.248 +65.102.22.208/255.255.255.248 +65.102.167.200/255.255.255.248 +65.102.173.96/255.255.255.248 +65.102.210.176/255.255.255.248 +65.103.31.56/255.255.255.248 +65.103.128.136/255.255.255.248 +65.110.11.144/255.255.255.248 +65.110.224.0/255.255.224.0 +65.112.76.0/255.255.255.0 +65.112.91.248/255.255.255.248 +65.113.18.0/255.255.255.224 +65.113.47.176/255.255.255.248 +65.113.91.88/255.255.255.248 +65.113.91.112/255.255.255.240 +65.113.104.16/255.255.255.240 +65.114.6.48/255.255.255.248 +65.114.63.192/255.255.255.224 +65.114.156.0/255.255.255.0 +65.115.7.32/255.255.255.224 +65.115.117.0/255.255.255.0 +65.115.121.128/255.255.255.224 +65.115.195.0/255.255.255.224 +65.116.17.192/255.255.255.224 +65.116.70.0/255.255.255.224 +65.116.80.0/255.255.252.0 +65.116.151.192/255.255.255.240 +65.116.177.192/255.255.255.248 +65.117.1.24/255.255.255.248 +65.117.1.96/255.255.255.240 +65.117.1.152/255.255.255.248 +65.117.1.192/255.255.255.248 +65.117.2.8/255.255.255.240 +65.117.2.32/255.255.255.248 +65.117.2.72/255.255.255.248 +65.117.2.112/255.255.255.248 +65.117.2.144/255.255.255.248 +65.117.3.32/255.255.255.248 +65.117.3.48/255.255.255.240 +65.117.3.128/255.255.255.248 +65.117.3.144/255.255.255.240 +65.117.3.176/255.255.255.248 +65.117.3.200/255.255.255.248 +65.117.3.232/255.255.255.248 +65.117.3.248/255.255.255.248 +65.117.9.96/255.255.255.248 +65.117.9.160/255.255.255.248 +65.117.10.96/255.255.255.248 +65.117.10.232/255.255.255.248 +65.117.11.40/255.255.255.248 +65.117.11.160/255.255.255.248 +65.117.11.216/255.255.255.248 +65.117.12.0/255.255.255.248 +65.117.12.40/255.255.255.208 +65.117.12.112/255.255.255.248 +65.117.12.136/255.255.255.248 +65.117.12.200/255.255.255.248 +65.117.13.48/255.255.255.248 +65.117.13.88/255.255.255.248 +65.117.14.96/255.255.255.248 +65.117.15.0/255.255.255.248 +65.117.15.64/255.255.255.248 +65.117.15.96/255.255.255.248 +65.117.15.136/255.255.255.248 +65.117.17.24/255.255.255.248 +65.117.19.8/255.255.255.224 +65.117.19.56/255.255.255.248 +65.117.19.96/255.255.255.248 +65.117.19.208/255.255.255.248 +65.117.20.0/255.255.255.248 +65.117.20.16/255.255.255.248 +65.117.59.200/255.255.255.248 +65.118.41.192/255.255.255.224 +65.118.42.0/255.255.255.0 +65.118.144.0/255.255.254.0 +65.118.219.96/255.255.255.240 +65.118.220.0/255.255.255.0 +65.119.27.192/255.255.255.224 +65.119.33.16/255.255.255.248 +65.119.33.32/255.255.255.248 +65.119.39.160/255.255.255.240 +65.119.157.160/255.255.255.224 +65.120.64.64/255.255.255.224 +65.120.64.136/255.255.255.248 +65.120.218.248/255.255.255.248 +65.121.109.0/255.255.255.0 +65.121.232.128/255.255.255.248 +65.122.7.232/255.255.255.248 +65.122.14.144/255.255.255.240 +65.122.47.224/255.255.255.224 +65.122.139.128/255.255.255.192 +65.124.163.112/255.255.255.248 +65.125.0.0/255.255.255.0 +65.125.1.224/255.255.255.224 +65.125.29.0/255.255.255.128 +65.125.163.240/255.255.255.248 +65.125.168.0/255.255.255.0 +65.125.173.224/255.255.255.240 +65.126.23.160/255.255.255.240 +65.126.123.0/255.255.255.128 +65.126.196.152/255.255.255.248 +65.126.196.208/255.255.255.240 +65.126.197.64/255.255.255.248 +65.126.197.96/255.255.255.240 +65.126.198.192/255.255.255.248 +65.126.198.232/255.255.255.240 +65.126.221.0/255.255.255.0 +65.127.126.224/255.255.255.224 +65.127.162.0/255.255.255.0 +65.160.58.0/255.255.254.0 +65.160.68.192/255.255.255.192 +65.160.127.0/255.255.255.0 +65.163.128.64/255.255.255.192 +65.164.126.0/255.255.255.0 +65.166.64.192/255.255.255.192 +65.168.28.128/255.255.255.128 +65.168.118.0/255.255.255.0 +65.169.16.0/255.255.255.128 +65.169.154.112/255.255.255.240 +65.169.171.216/255.255.255.248 +65.170.114.0/255.255.254.0 +65.170.184.0/255.255.255.240 +65.171.101.224/255.255.255.224 +65.172.193.16/255.255.255.248 +65.173.188.0/255.255.254.0 +65.174.230.32/255.255.255.240 +65.192.0.0/255.255.255.0 +65.193.9.0/255.255.255.0 +65.193.213.128/255.255.255.192 +65.194.86.192/255.255.255.192 +65.195.54.0/255.255.255.128 +65.195.89.0/255.255.255.0 +65.195.171.192/255.255.255.224 +65.195.173.0/255.255.255.0 +65.196.8.0/255.255.255.0 +65.196.27.192/255.255.255.224 +65.196.47.0/255.255.255.128 +65.196.98.0/255.255.254.0 +65.196.188.0/255.255.255.0 +65.197.144.192/255.255.255.192 +65.197.153.0/255.255.255.128 +65.198.94.176/255.255.255.240 +65.198.192.0/255.255.252.0 +65.198.205.128/255.255.255.192 +65.198.216.2/255.255.255.3 +65.199.14.192/255.255.255.224 +65.199.219.64/255.255.255.248 +65.199.249.128/255.255.255.192 +65.200.58.0/255.255.255.224 +65.200.104.0/255.255.255.0 +65.200.176.224/255.255.255.240 +65.200.185.0/255.255.255.240 +65.201.90.0/255.255.255.0 +65.201.156.136/255.255.255.248 +65.201.196.0/255.255.255.0 +65.201.246.104/255.255.255.248 +65.202.51.32/255.255.255.224 +65.202.139.128/255.255.255.240 +65.203.122.128/255.255.255.128 +65.203.145.0/255.255.255.128 +65.203.232.192/255.255.255.224 +65.204.3.96/255.255.255.224 +65.204.55.224/255.255.255.224 +65.204.108.0/255.255.254.0 +65.204.138.24/255.255.255.248 +65.204.148.160/255.255.255.224 +65.204.149.128/255.255.255.224 +65.204.157.0/255.255.255.0 +65.204.208.0/255.255.255.0 +65.204.232.64/255.255.255.224 +65.205.145.64/255.255.255.224 +65.205.162.0/255.255.255.192 +65.205.231.128/255.255.255.128 +65.206.38.80/255.255.255.240 +65.206.171.56/255.255.255.248 +65.207.33.0/255.255.255.0 +65.207.61.136/255.255.255.248 +65.207.86.176/255.255.255.240 +65.208.134.128/255.255.255.128 +65.208.155.96/255.255.255.240 +65.208.157.16/255.255.255.240 +65.209.96.32/255.255.255.240 +65.209.107.96/255.255.255.224 +65.209.114.0/255.255.255.0 +65.210.79.192/255.255.255.192 +65.210.186.0/255.255.255.224 +65.211.238.0/255.255.255.0 +65.212.79.112/255.255.255.240 +65.212.148.0/255.255.252.0 +65.213.35.128/255.255.255.224 +65.213.135.32/255.255.255.248 +65.213.142.0/255.255.255.224 +65.214.34.0/255.255.255.0 +65.214.118.0/255.255.255.248 +65.214.130.0/255.255.255.0 +65.214.165.160/255.255.255.224 +65.214.172.0/255.255.255.0 +65.215.219.0/255.255.255.0 +65.216.254.40/255.255.255.248 +65.217.79.224/255.255.255.224 +65.217.219.192/255.255.255.224 +65.218.3.0/255.255.255.0 +65.218.168.64/255.255.255.192 +65.218.249.96/255.255.255.224 +65.219.49.136/255.255.255.248 +65.219.82.24/255.255.255.248 +65.219.170.0/255.255.255.0 +65.219.221.64/255.255.255.192 +65.219.224.0/255.255.255.0 +65.220.0.64/255.255.255.240 +65.220.11.0/255.255.255.0 +65.220.50.96/255.255.255.224 +65.220.54.224/255.255.255.248 +65.220.62.0/255.255.254.0 +65.220.69.144/255.255.255.248 +65.220.101.96/255.255.255.240 +65.220.101.128/255.255.255.224 +65.220.122.192/255.255.255.224 +65.221.2.64/255.255.255.192 +65.221.203.0/255.255.255.0 +65.222.158.128/255.255.255.240 +65.222.172.0/255.255.255.0 +65.222.177.0/255.255.255.0 +65.222.178.0/255.255.255.0 +65.222.200.0/255.255.255.0 +65.222.201.32/255.255.255.240 +65.222.202.104/255.255.255.248 +65.223.0.0/255.255.248.0 +65.223.14.0/255.255.255.0 +65.223.31.128/255.255.255.224 +65.223.84.128/255.255.255.224 +65.223.110.176/255.255.255.240 +65.223.139.0/255.255.255.0 +65.223.176.0/255.255.255.0 +65.223.188.128/255.255.255.224 +65.223.231.128/255.255.255.192 +65.233.255.0/255.255.255.0 +65.240.24.120/255.255.255.248 +65.241.19.0/255.255.255.0 +65.241.27.224/255.255.255.224 +65.241.32.0/255.255.255.0 +65.241.46.48/255.255.255.240 +65.241.116.0/255.255.254.0 +65.241.136.0/255.255.255.0 +65.242.71.112/255.255.255.248 +65.242.240.208/255.255.255.248 +65.243.215.0/255.255.255.192 +65.243.249.128/255.255.255.240 +65.244.20.64/255.255.255.224 +65.244.101.1/255.255.255.1 +65.244.129.32/255.255.255.244 +65.244.186.0/255.255.255.0 +65.244.224.160/255.255.255.224 +65.244.236.56/255.255.255.248 +65.244.238.0/255.255.255.0 +65.246.72.0/255.255.248.0 +65.246.152.0/255.255.248.0 +65.247.59.136/255.255.255.248 +65.247.82.224/255.255.255.240 +65.247.85.64/255.255.255.192 +65.247.105.240/255.255.255.240 +65.247.121.0/255.255.255.0 +65.247.180.0/255.255.255.0 +65.247.192.0/255.255.252.0 +65.247.252.96/255.255.255.248 +65.248.151.0/255.255.255.0 +65.249.196.0/255.255.255.0 +65.249.201.96/255.255.255.224 +65.249.230.64/255.255.255.224 +66.0.19.0/255.255.255.192 +66.0.110.176/255.255.255.248 +66.0.187.136/255.255.255.248 +66.4.0.0/255.254.0.0 +66.7.6.80/255.255.255.248 +66.7.28.152/255.255.255.248 +66.7.40.16/255.255.255.248 +66.7.226.192/255.255.255.248 +66.7.243.232/255.255.255.248 +66.7.244.64/255.255.255.248 +66.18.105.0/255.255.255.224 +66.34.0.0/255.255.0.1 +66.35.129.32/255.255.255.248 +66.35.153.8/255.255.255.248 +66.35.158.184/255.255.255.248 +66.35.159.72/255.255.255.248 +66.35.168.168/255.255.255.248 +66.35.177.112/255.255.255.248 +66.35.192.0/255.255.255.208 +66.35.192.48/255.255.255.240 +66.35.192.192/255.255.255.224 +66.35.192.224/255.255.255.240 +66.35.192.252/255.255.192.252 +66.36.243.0/255.255.255.0 +66.38.215.96/255.255.255.224 +66.42.53.0/255.255.255.0 +66.43.88.88/255.255.255.248 +66.43.171.96/255.255.255.240 +66.43.190.208/255.255.255.240 +66.45.26.32/255.255.255.248 +66.45.28.48/255.255.255.240 +66.51.24.192/255.255.255.224 +66.51.66.48/255.255.255.248 +66.51.175.32/255.255.255.248 +66.51.175.128/255.255.255.128 +66.52.5.0/255.255.250.0 +66.54.0.0/255.255.192.0 +66.54.64.0/255.255.208.0 +66.54.249.16/255.255.255.248 +66.55.224.0/255.255.224.0 +66.59.172.24/255.255.255.248 +66.59.174.160/255.255.255.224 +66.62.170.96/255.255.255.240 +66.63.11.0/255.255.255.224 +66.72.93.16/255.255.255.248 +66.72.140.40/255.255.255.248 +66.72.212.216/255.255.255.248 +66.73.146.104/255.255.255.248 +66.77.21.64/255.255.255.192 +66.77.21.128/255.255.255.128 +66.77.59.168/255.255.255.248 +66.77.60.128/255.255.255.192 +66.77.63.0/255.255.255.0 +66.77.70.64/255.255.255.192 +66.77.70.224/255.255.255.224 +66.77.73.0/255.255.254.0 +66.77.88.0/255.255.254.0 +66.77.90.224/255.255.255.240 +66.77.94.160/255.255.255.240 +66.77.102.0/255.255.255.0 +66.77.124.0/255.255.255.0 +66.77.126.64/255.255.255.248 +66.77.126.160/255.255.255.224 +66.77.127.64/255.255.255.192 +66.77.128.0/255.255.255.192 +66.77.142.96/255.255.255.224 +66.77.144.0/255.255.254.0 +66.77.147.192/255.255.255.224 +66.92.62.48/255.255.255.240 +66.92.93.0/255.255.255.240 +66.92.118.16/255.255.255.240 +66.92.175.192/255.255.255.192 +66.92.179.0/255.255.255.248 +66.93.65.80/255.255.255.224 +66.93.66.96/255.255.255.240 +66.93.66.112/255.255.255.240 +66.93.156.96/255.255.255.224 +66.95.0.0/255.255.0.0 +66.97.66.0/255.255.253.0 +66.100.10.0/255.255.255.0 +66.100.28.64/255.255.255.192 +66.100.29.0/255.255.255.128 +66.100.48.160/255.255.255.224 +66.100.83.0/255.255.255.0 +66.100.97.0/255.255.255.224 +66.100.113.0/255.255.255.248 +66.100.156.0/255.255.255.128 +66.100.160.0/255.255.255.0 +66.100.200.0/255.255.255.0 +66.101.96.0/255.255.255.0 +66.101.224.0/255.255.252.0 +66.109.227.136/255.255.255.248 +66.109.227.248/255.255.255.248 +66.111.54.167/255.255.255.240 +66.111.55.150/255.255.255.240 +66.111.96.0/255.255.240.0 +66.111.128.0/255.255.192.0 +66.114.194.0/255.255.255.208 +66.115.30.0/255.255.255.192 +66.117.2.0/255.255.255.0 +66.117.5.229/255.255.255.235 +66.117.6.226/255.255.255.232 +66.117.8.97/255.255.255.100 +66.120.93.128/255.255.255.224 +66.120.146.104/255.255.255.248 +66.120.153.128/255.255.255.248 +66.120.193.136/255.255.255.200 +66.120.194.0/255.255.255.248 +66.121.8.0/255.255.255.0 +66.121.60.72/255.255.255.248 +66.121.73.128/255.255.255.128 +66.121.83.128/255.255.255.224 +66.121.132.120/255.255.255.248 +66.121.154.248/255.255.255.248 +66.121.168.128/255.255.255.248 +66.121.174.80/255.255.255.248 +66.121.184.192/255.255.255.224 +66.121.208.160/255.255.255.240 +66.121.234.168/255.255.255.248 +66.122.26.0/255.255.255.192 +66.122.85.200/255.255.255.248 +66.122.116.16/255.255.255.248 +66.122.118.32/255.255.255.248 +66.122.125.56/255.255.255.248 +66.122.125.72/255.255.255.248 +66.122.170.80/255.255.255.248 +66.122.218.40/255.255.255.248 +66.122.254.248/255.255.255.248 +66.123.26.224/255.255.255.248 +66.123.27.200/255.255.255.248 +66.123.36.192/255.255.255.248 +66.123.37.232/255.255.255.248 +66.123.51.224/255.255.255.248 +66.123.62.144/255.255.255.248 +66.123.63.224/255.255.255.248 +66.123.74.112/255.255.255.248 +66.123.74.152/255.255.255.248 +66.123.75.224/255.255.255.248 +66.123.86.248/255.255.255.248 +66.123.94.176/255.255.255.248 +66.123.95.224/255.255.255.248 +66.123.117.128/255.255.255.248 +66.123.117.168/255.255.255.248 +66.123.122.248/255.255.255.248 +66.123.125.232/255.255.255.248 +66.123.136.80/255.255.255.240 +66.123.194.200/255.255.255.248 +66.123.208.176/255.255.255.248 +66.124.14.8/255.255.255.248 +66.124.51.128/255.255.255.128 +66.124.72.104/255.255.255.248 +66.124.86.240/255.255.255.248 +66.124.89.96/255.255.255.248 +66.124.118.8/255.255.255.248 +66.124.168.216/255.255.255.248 +66.124.239.104/255.255.255.248 +66.124.242.40/255.255.255.248 +66.125.19.0/255.255.255.248 +66.125.19.240/255.255.255.248 +66.125.59.56/255.255.255.248 +66.125.66.144/255.255.255.248 +66.125.73.144/255.255.255.248 +66.125.79.176/255.255.255.248 +66.125.87.64/255.255.255.240 +66.125.146.160/255.255.255.248 +66.125.169.152/255.255.255.248 +66.125.181.96/255.255.255.248 +66.125.185.48/255.255.255.248 +66.125.190.88/255.255.255.248 +66.125.194.192/255.255.255.248 +66.125.220.16/255.255.255.248 +66.125.221.152/255.255.255.248 +66.125.223.64/255.255.255.248 +66.125.232.232/255.255.255.248 +66.125.233.176/255.255.255.248 +66.125.234.144/255.255.255.248 +66.125.235.144/255.255.255.240 +66.125.243.104/255.255.255.248 +66.125.245.184/255.255.255.248 +66.125.247.224/255.255.255.248 +66.125.253.72/255.255.255.248 +66.126.97.120/255.255.255.248 +66.126.116.144/255.255.255.248 +66.126.138.64/255.255.255.192 +66.126.145.248/255.255.255.248 +66.126.158.128/255.255.255.128 +66.126.160.48/255.255.255.248 +66.126.161.64/255.255.255.248 +66.126.179.24/255.255.255.248 +66.126.193.136/255.255.255.248 +66.126.194.0/255.255.255.224 +66.126.194.136/255.255.255.240 +66.126.197.216/255.255.255.240 +66.126.198.224/255.255.255.248 +66.126.216.32/255.255.255.224 +66.126.237.208/255.255.255.248 +66.126.244.16/255.255.255.248 +66.126.244.40/255.255.255.248 +66.126.245.208/255.255.255.248 +66.126.247.88/255.255.255.232 +66.126.249.8/255.255.255.232 +66.126.251.72/255.255.255.248 +66.127.0.200/255.255.255.248 +66.127.3.72/255.255.255.248 +66.127.36.240/255.255.255.248 +66.127.62.48/255.255.255.248 +66.127.65.184/255.255.255.248 +66.127.66.184/255.255.255.248 +66.127.71.224/255.255.255.240 +66.127.80.160/255.255.255.240 +66.127.82.216/255.255.255.216 +66.127.83.128/255.255.255.240 +66.127.100.32/255.255.255.248 +66.127.121.224/255.255.255.248 +66.127.170.56/255.255.255.248 +66.127.172.200/255.255.255.248 +66.127.181.96/255.255.255.248 +66.127.184.96/255.255.255.248 +66.127.185.8/255.255.255.248 +66.127.185.216/255.255.255.248 +66.127.186.192/255.255.255.248 +66.127.187.144/255.255.255.248 +66.127.224.216/255.255.255.240 +66.127.237.8/255.255.255.240 +66.127.249.176/255.255.255.240 +66.128.225.128/255.255.255.192 +66.133.64.0/255.255.224.0 +66.136.8.192/255.255.255.248 +66.136.154.56/255.255.255.248 +66.136.155.224/255.255.255.248 +66.136.169.168/255.255.255.248 +66.136.223.248/255.255.255.248 +66.137.10.96/255.255.255.248 +66.137.15.176/255.255.255.248 +66.137.164.144/255.255.255.248 +66.137.165.200/255.255.255.248 +66.137.167.128/255.255.255.128 +66.137.197.192/255.255.255.248 +66.137.218.208/255.255.255.248 +66.137.238.184/255.255.255.248 +66.139.15.56/255.255.255.248 +66.139.45.208/255.255.255.248 +66.139.47.48/255.255.255.248 +66.139.140.64/255.255.255.248 +66.139.144.88/255.255.255.248 +66.139.145.88/255.255.255.248 +66.139.160.8/255.255.255.248 +66.139.176.16/255.255.255.248 +66.139.188.48/255.255.255.248 +66.139.210.16/255.255.255.248 +66.139.245.72/255.255.255.248 +66.140.65.80/255.255.255.248 +66.140.112.112/255.255.255.248 +66.140.136.48/255.255.255.240 +66.140.148.32/255.255.255.248 +66.140.199.0/255.255.255.0 +66.141.8.232/255.255.255.248 +66.141.51.240/255.255.255.240 +66.141.69.168/255.255.255.248 +66.141.189.32/255.255.255.248 +66.142.1.0/255.255.255.192 +66.142.8.0/255.255.252.0 +66.142.76.120/255.255.255.248 +66.142.81.208/255.255.255.248 +66.142.82.88/255.255.255.248 +66.143.70.160/255.255.255.248 +66.143.70.168/255.255.255.248 +66.143.148.168/255.255.255.248 +66.143.150.160/255.255.255.248 +66.143.180.248/255.255.255.248 +66.143.228.32/255.255.255.248 +66.144.0.0/255.254.0.0 +66.146.163.161/255.255.255.240 +66.146.163.193/255.255.255.240 +66.147.154.0/255.255.255.192 +66.150.94.0/255.255.255.0 +66.150.161.133/255.255.255.247 +66.150.223.160/255.255.255.224 +66.151.178.0/255.255.255.0 +66.151.181.0/255.255.255.0 +66.153.17.16/255.255.255.248 +66.153.18.8/255.255.255.248 +66.153.28.240/255.255.255.240 +66.153.61.224/255.255.255.224 +66.153.81.208/255.255.255.248 +66.153.100.64/255.255.255.248 +66.153.111.0/255.255.255.240 +66.155.0.0/255.255.128.0 +66.155.187.8/255.255.255.248 +66.159.22.0/255.255.255.0 +66.160.18.0/255.255.255.248 +66.160.144.64/255.255.255.224 +66.161.32.240/255.255.255.240 +66.162.5.64/255.255.255.224 +66.163.5.112/255.255.255.248 +66.163.224.0/255.255.224.0 +66.165.92.128/255.255.255.128 +66.170.100.224/255.255.255.240 +66.170.240.0/255.255.240.0 +66.179.42.224/255.255.255.224 +66.181.50.96/255.255.255.248 +66.181.60.32/255.255.255.248 +66.181.60.104/255.255.255.248 +66.181.62.0/255.255.255.248 +66.182.37.192/255.255.255.240 +66.184.204.0/255.255.255.0 +66.184.229.88/255.255.255.248 +66.185.109.192/255.255.255.248 +66.185.110.160/255.255.255.160 +66.185.165.96/255.255.255.224 +66.185.169.64/255.255.255.248 +66.186.20.0/255.255.255.192 +66.186.32.0/255.255.240.0 +66.187.133.64/255.255.255.240 +66.194.6.0/255.255.255.0 +66.194.10.0/255.255.254.0 +66.194.15.0/255.255.255.240 +66.194.160.0/255.255.252.0 +66.196.64.0/255.255.192.0 +66.196.198.176/255.255.255.240 +66.197.109.0/255.255.255.0 +66.197.111.0/255.255.255.0 +66.197.118.0/255.255.255.0 +66.197.119.0/255.255.255.0 +66.197.120.0/255.255.255.0 +66.197.122.0/255.255.255.0 +66.197.123.0/255.255.255.0 +66.197.125.0/255.255.255.0 +66.197.127.0/255.255.255.0 +66.199.24.56/255.255.255.248 +66.201.105.160/255.255.255.224 +66.204.0.0/255.255.0.0 +66.205.229.64/255.255.255.192 +66.207.106.208/255.255.255.240 +66.207.119.232/255.255.255.248 +66.207.120.224/255.255.255.240 +66.207.199.64/255.255.255.240 +66.212.125.0/255.255.255.0 +66.214.183.128/255.255.255.248 +66.214.252.56/255.255.255.248 +66.216.76.104/255.255.255.248 +66.216.80.176/255.255.255.240 +66.216.99.48/255.255.255.248 +66.216.104.80/255.255.255.240 +66.219.228.48/255.255.255.240 +66.219.232.32/255.255.255.248 +66.220.3.80/255.255.255.240 +66.220.31.128/255.255.255.224 +66.224.6.32/255.255.255.224 +66.225.64.0/255.255.224.0 +66.226.0.0/255.255.255.192 +66.226.128.0/255.255.224.0 +66.226.197.0/255.255.255.0 +66.227.1.97/255.255.255.248 +66.228.143.32/255.255.255.240 +66.228.160.0/255.255.224.0 +66.235.128.0/255.255.240.0 +66.235.231.0/255.255.253.0 +66.243.153.0/255.255.255.0 +66.244.0.0/255.255.192.0 +66.247.101.144/255.255.255.248 +66.250.24.2/255.255.255.248 +66.250.32.227/255.255.255.240 +66.252.128.0/255.255.240.0 +66.252.198.80/255.255.255.248 +66.255.92.112/255.255.255.240 +67.36.21.0/255.255.255.128 +67.36.21.160/255.255.255.248 +67.36.32.208/255.255.255.248 +67.36.32.240/255.255.255.248 +67.36.161.128/255.255.255.224 +67.36.168.32/255.255.255.248 +67.38.82.128/255.255.255.128 +67.38.96.232/255.255.255.248 +67.38.157.32/255.255.255.248 +67.38.188.152/255.255.255.248 +67.38.205.24/255.255.255.248 +67.38.226.216/255.255.255.248 +67.38.235.64/255.255.255.224 +67.39.27.120/255.255.255.248 +67.39.162.32/255.255.255.248 +67.39.214.8/255.255.255.248 +67.39.216.24/255.255.255.248 +67.39.252.8/255.255.255.248 +67.40.80.80/255.255.255.248 +67.41.40.128/255.255.255.248 +67.43.144.0/255.255.240.0 +67.50.160.48/255.255.255.240 +67.64.82.16/255.255.255.248 +67.64.88.176/255.255.255.248 +67.64.101.144/255.255.255.248 +67.64.101.224/255.255.255.248 +67.64.154.88/255.255.255.248 +67.64.210.248/255.255.255.248 +67.65.88.104/255.255.255.248 +67.65.97.192/255.255.255.248 +67.65.106.168/255.255.255.248 +67.65.140.232/255.255.255.248 +67.65.141.8/255.255.255.248 +67.65.195.32/255.255.255.224 +67.65.195.64/255.255.255.248 +67.65.207.96/255.255.255.248 +67.66.12.128/255.255.255.248 +67.66.52.48/255.255.255.248 +67.66.91.48/255.255.255.248 +67.66.108.0/255.255.255.248 +67.66.115.8/255.255.255.248 +67.66.115.16/255.255.255.248 +67.66.115.120/255.255.255.248 +67.66.193.88/255.255.255.248 +67.67.34.72/255.255.255.248 +67.67.87.96/255.255.255.248 +67.67.199.128/255.255.255.248 +67.69.2.232/255.255.255.248 +67.69.4.64/255.255.255.248 +67.69.8.192/255.255.255.248 +67.69.13.208/255.255.255.248 +67.69.15.128/255.255.255.248 +67.69.24.112/255.255.255.248 +67.69.25.8/255.255.255.248 +67.69.32.136/255.255.255.248 +67.69.50.224/255.255.255.224 +67.69.104.184/255.255.255.248 +67.70.213.144/255.255.255.248 +67.70.243.64/255.255.255.240 +67.70.248.96/255.255.255.224 +67.70.252.96/255.255.255.224 +67.70.255.160/255.255.255.248 +67.71.196.128/255.255.255.248 +67.71.227.0/255.255.255.248 +67.96.66.80/255.255.255.240 +67.97.3.128/255.255.255.128 +67.97.167.0/255.255.255.0 +67.98.2.224/255.255.255.224 +67.98.69.128/255.255.255.224 +67.98.72.64/255.255.255.224 +67.98.78.0/255.255.255.240 +67.98.78.32/255.255.255.240 +67.98.92.0/255.255.255.0 +67.98.223.0/255.255.255.0 +67.99.75.0/255.255.255.0 +67.112.11.176/255.255.255.248 +67.112.32.152/255.255.255.248 +67.112.66.192/255.255.255.248 +67.112.113.160/255.255.255.248 +67.112.127.240/255.255.255.248 +67.112.134.248/255.255.255.248 +67.112.135.16/255.255.255.248 +67.112.155.224/255.255.255.248 +67.112.188.144/255.255.255.248 +67.112.189.208/255.255.255.248 +67.112.232.208/255.255.255.248 +67.112.252.184/255.255.255.248 +67.113.21.176/255.255.255.248 +67.113.46.0/255.255.255.240 +67.113.89.112/255.255.255.248 +67.113.130.224/255.255.255.248 +67.113.132.208/255.255.255.248 +67.113.135.56/255.255.255.248 +67.113.166.32/255.255.255.240 +67.113.168.216/255.255.255.248 +67.113.170.248/255.255.255.248 +67.113.192.168/255.255.255.248 +67.113.206.80/255.255.255.248 +67.113.236.184/255.255.255.248 +67.113.238.16/255.255.255.248 +67.114.23.192/255.255.255.248 +67.114.24.232/255.255.255.248 +67.114.28.40/255.255.255.248 +67.114.82.8/255.255.255.248 +67.114.102.16/255.255.255.248 +67.114.148.176/255.255.255.248 +67.114.149.32/255.255.255.248 +67.114.152.136/255.255.255.248 +67.114.153.152/255.255.255.248 +67.114.161.112/255.255.255.248 +67.114.167.0/255.255.255.248 +67.114.167.8/255.255.255.248 +67.114.173.176/255.255.255.248 +67.114.199.112/255.255.255.248 +67.115.70.16/255.255.255.248 +67.115.70.136/255.255.255.248 +67.115.71.184/255.255.255.248 +67.115.83.64/255.255.255.248 +67.115.99.0/255.255.255.0 +67.115.128.72/255.255.255.248 +67.115.140.8/255.255.255.248 +67.115.141.112/255.255.255.248 +67.115.149.128/255.255.255.248 +67.115.156.80/255.255.255.248 +67.115.157.24/255.255.255.248 +67.115.175.0/255.255.255.128 +67.115.252.112/255.255.255.248 +67.116.9.72/255.255.255.248 +67.116.32.216/255.255.255.248 +67.116.43.32/255.255.255.248 +67.116.88.80/255.255.255.248 +67.116.96.56/255.255.255.248 +67.116.105.128/255.255.255.248 +67.116.118.24/255.255.255.248 +67.116.118.120/255.255.255.248 +67.116.124.112/255.255.255.248 +67.116.127.192/255.255.255.192 +67.116.155.120/255.255.255.248 +67.116.191.88/255.255.255.240 +67.116.191.112/255.255.255.248 +67.117.36.88/255.255.255.248 +67.117.42.24/255.255.255.248 +67.117.52.144/255.255.255.248 +67.117.53.0/255.255.255.248 +67.117.54.192/255.255.255.248 +67.117.55.248/255.255.255.248 +67.117.63.112/255.255.255.248 +67.117.70.248/255.255.255.248 +67.117.72.232/255.255.255.248 +67.117.116.160/255.255.255.248 +67.117.124.192/255.255.255.248 +67.117.136.160/255.255.255.248 +67.117.139.152/255.255.255.248 +67.117.166.0/255.255.255.240 +67.117.171.176/255.255.255.248 +67.117.180.184/255.255.255.248 +67.117.184.56/255.255.255.248 +67.117.186.160/255.255.255.240 +67.117.201.128/255.255.255.240 +67.117.222.232/255.255.255.248 +67.117.254.184/255.255.255.248 +67.118.42.24/255.255.255.248 +67.118.43.224/255.255.255.248 +67.118.65.8/255.255.255.248 +67.118.65.168/255.255.255.232 +67.118.80.192/255.255.255.192 +67.118.82.32/255.255.255.248 +67.118.104.8/255.255.255.248 +67.118.107.152/255.255.255.248 +67.118.168.64/255.255.255.248 +67.118.172.56/255.255.255.248 +67.118.174.96/255.255.255.248 +67.118.182.88/255.255.255.248 +67.118.183.240/255.255.255.248 +67.119.18.184/255.255.255.248 +67.119.41.40/255.255.255.248 +67.119.85.40/255.255.255.248 +67.119.112.184/255.255.255.248 +67.119.112.208/255.255.255.248 +67.119.126.152/255.255.255.248 +67.120.8.200/255.255.255.248 +67.120.12.128/255.255.255.248 +67.120.13.144/255.255.255.248 +67.120.39.80/255.255.255.240 +67.120.40.32/255.255.255.248 +67.120.62.32/255.255.255.248 +67.120.89.232/255.255.255.248 +67.120.124.8/255.255.255.248 +67.120.132.128/255.255.255.248 +67.120.132.152/255.255.255.248 +67.120.132.192/255.255.255.224 +67.120.156.184/255.255.255.240 +67.120.172.136/255.255.255.248 +67.120.220.80/255.255.255.248 +67.120.223.152/255.255.255.248 +67.120.239.104/255.255.255.248 +67.121.64.232/255.255.255.248 +67.121.65.216/255.255.255.248 +67.121.199.24/255.255.255.248 +67.121.226.208/255.255.255.248 +67.121.252.16/255.255.255.248 +67.122.36.80/255.255.255.248 +67.122.66.104/255.255.255.248 +67.122.142.232/255.255.255.248 +67.122.158.32/255.255.255.224 +67.122.170.176/255.255.255.248 +67.122.184.80/255.255.255.248 +67.122.186.48/255.255.255.248 +67.122.187.192/255.255.255.248 +67.122.195.48/255.255.255.248 +67.122.195.56/255.255.255.248 +67.122.196.136/255.255.255.248 +67.122.219.152/255.255.255.248 +67.123.61.208/255.255.255.248 +67.123.88.216/255.255.255.248 +67.123.102.32/255.255.255.248 +67.123.161.224/255.255.255.248 +67.124.23.88/255.255.255.248 +67.124.23.112/255.255.255.248 +67.124.33.224/255.255.255.248 +67.124.34.72/255.255.255.248 +67.124.83.8/255.255.255.248 +67.125.48.224/255.255.255.224 +67.125.49.192/255.255.255.248 +67.125.78.112/255.255.255.248 +67.125.219.56/255.255.255.248 +67.126.102.144/255.255.255.240 +67.126.137.176/255.255.255.248 +67.126.138.88/255.255.255.248 +67.126.138.240/255.255.255.248 +67.126.145.232/255.255.255.248 +67.126.168.24/255.255.255.248 +67.126.169.144/255.255.255.248 +67.126.193.48/255.255.255.248 +67.126.230.48/255.255.255.248 +67.127.38.184/255.255.255.248 +67.127.67.112/255.255.255.248 +67.127.104.48/255.255.255.248 +67.127.104.208/255.255.255.248 +67.127.108.80/255.255.255.248 +67.127.170.104/255.255.255.248 +67.127.183.176/255.255.255.248 +67.127.224.136/255.255.255.248 +67.127.231.208/255.255.255.248 +67.129.115.208/255.255.255.248 +67.130.47.64/255.255.255.224 +67.130.141.96/255.255.255.240 +67.131.215.96/255.255.255.240 +67.131.229.192/255.255.255.240 +67.136.66.128/255.255.255.248 +67.136.71.176/255.255.255.248 +68.20.54.16/255.255.255.248 +68.20.60.24/255.255.255.248 +68.20.61.216/255.255.255.248 +68.20.66.56/255.255.255.248 +68.20.66.168/255.255.255.248 +68.20.82.0/255.255.255.248 +68.20.100.160/255.255.255.248 +68.20.114.128/255.255.255.248 +68.20.115.0/255.255.255.248 +68.20.134.152/255.255.255.248 +68.20.157.104/255.255.255.248 +68.20.190.88/255.255.255.248 +68.20.229.40/255.255.255.248 +68.20.230.240/255.255.255.248 +68.20.240.64/255.255.255.248 +68.21.61.88/255.255.255.248 +68.21.62.8/255.255.255.248 +68.21.63.128/255.255.255.248 +68.21.79.40/255.255.255.248 +68.21.79.104/255.255.255.248 +68.21.110.232/255.255.255.248 +68.21.119.224/255.255.255.248 +68.21.226.40/255.255.255.248 +68.21.226.64/255.255.255.248 +68.21.227.232/255.255.255.248 +68.21.229.152/255.255.255.248 +68.22.3.96/255.255.255.248 +68.22.23.208/255.255.255.248 +68.22.86.224/255.255.255.248 +68.22.139.0/255.255.255.240 +68.22.174.96/255.255.255.248 +68.22.179.128/255.255.255.224 +68.22.212.200/255.255.255.248 +68.22.235.232/255.255.255.248 +68.23.0.16/255.255.255.248 +68.23.7.136/255.255.255.248 +68.23.57.152/255.255.255.248 +68.23.114.192/255.255.255.248 +68.23.192.216/255.255.255.248 +68.23.229.48/255.255.255.248 +68.23.230.40/255.255.255.248 +68.23.250.176/255.255.255.248 +68.72.41.216/255.255.255.248 +68.72.183.152/255.255.255.248 +68.72.195.248/255.255.255.248 +68.72.202.112/255.255.255.248 +68.72.250.64/255.255.255.224 +68.73.129.48/255.255.255.248 +68.73.234.56/255.255.255.248 +68.73.236.16/255.255.255.248 +68.73.247.24/255.255.255.248 +68.73.248.232/255.255.255.248 +68.73.255.176/255.255.255.248 +68.74.35.208/255.255.255.248 +68.74.86.192/255.255.255.224 +68.74.90.40/255.255.255.248 +68.74.91.152/255.255.255.248 +68.74.174.96/255.255.255.248 +68.74.211.224/255.255.255.248 +68.74.231.80/255.255.255.248 +68.74.248.240/255.255.255.248 +68.74.251.64/255.255.255.248 +68.75.86.88/255.255.255.248 +68.75.146.152/255.255.255.248 +68.75.208.120/255.255.255.248 +68.75.208.208/255.255.255.248 +68.76.35.176/255.255.255.248 +68.76.35.192/255.255.255.248 +68.76.69.0/255.255.255.248 +68.76.79.144/255.255.255.248 +68.76.90.160/255.255.255.240 +68.76.193.128/255.255.255.248 +68.76.251.96/255.255.255.248 +68.77.50.24/255.255.255.248 +68.77.191.128/255.255.255.248 +68.79.73.96/255.255.255.248 +68.79.74.224/255.255.255.248 +68.79.218.144/255.255.255.248 +68.79.219.96/255.255.255.248 +68.79.252.136/255.255.255.248 +68.88.25.128/255.255.255.248 +68.88.116.184/255.255.255.248 +68.88.116.200/255.255.255.248 +68.88.216.80/255.255.255.248 +68.89.12.16/255.255.255.248 +68.89.163.160/255.255.255.248 +68.90.154.192/255.255.255.248 +68.90.176.24/255.255.255.248 +68.91.248.112/255.255.255.248 +68.92.96.16/255.255.255.248 +68.92.134.16/255.255.255.248 +68.92.228.0/255.255.255.248 +68.92.228.40/255.255.255.248 +68.93.68.184/255.255.255.248 +68.94.128.192/255.255.255.248 +68.118.31.0/255.255.255.192 +68.120.58.232/255.255.255.248 +68.120.79.64/255.255.255.248 +68.120.93.104/255.255.255.248 +68.120.105.128/255.255.255.128 +68.120.174.240/255.255.255.248 +68.120.176.176/255.255.255.248 +68.120.222.8/255.255.255.248 +68.120.233.112/255.255.255.248 +68.121.30.200/255.255.255.248 +68.121.82.144/255.255.255.248 +68.121.99.0/255.255.255.248 +68.121.105.56/255.255.255.248 +68.121.107.128/255.255.255.248 +68.121.125.8/255.255.255.248 +68.121.125.232/255.255.255.248 +68.121.143.88/255.255.255.248 +68.121.143.168/255.255.255.248 +68.121.172.88/255.255.255.248 +68.121.186.176/255.255.255.248 +68.121.252.56/255.255.255.248 +68.122.30.120/255.255.255.248 +68.122.36.208/255.255.255.248 +68.122.93.216/255.255.255.248 +68.122.99.64/255.255.255.248 +68.122.215.24/255.255.255.248 +68.122.234.232/255.255.255.248 +68.122.235.16/255.255.255.248 +68.122.244.0/255.255.255.248 +68.122.247.144/255.255.255.248 +68.123.42.208/255.255.255.248 +68.123.42.240/255.255.255.248 +68.123.79.48/255.255.255.248 +68.123.79.64/255.255.255.224 +68.123.163.184/255.255.255.248 +68.123.201.64/255.255.255.248 +68.123.201.200/255.255.255.248 +68.124.141.200/255.255.255.248 +68.124.147.128/255.255.255.248 +68.124.158.176/255.255.255.248 +68.124.170.72/255.255.255.248 +68.124.174.120/255.255.255.248 +68.124.174.240/255.255.255.248 +68.124.208.104/255.255.255.248 +68.124.226.80/255.255.255.248 +68.125.44.80/255.255.255.248 +68.125.44.152/255.255.255.216 +68.125.45.112/255.255.255.240 +68.125.91.88/255.255.255.248 +68.125.178.16/255.255.255.248 +68.125.192.208/255.255.255.248 +68.126.245.120/255.255.255.248 +68.126.246.184/255.255.255.248 +68.126.247.248/255.255.255.248 +68.127.41.200/255.255.255.248 +68.127.141.48/255.255.255.248 +68.127.218.128/255.255.255.248 +68.161.255.160/255.255.255.224 +68.163.75.0/255.255.255.0 +68.163.88.64/255.255.255.224 +68.163.90.0/255.255.255.0 +68.167.223.144/255.255.255.240 +68.248.100.120/255.255.255.248 +68.248.174.168/255.255.255.248 +68.249.22.184/255.255.255.248 +68.249.53.64/255.255.255.248 +68.249.78.216/255.255.255.248 +68.249.78.224/255.255.255.248 +68.249.130.56/255.255.255.248 +68.249.134.64/255.255.255.248 +68.249.146.56/255.255.255.248 +68.249.222.96/255.255.255.248 +68.249.249.160/255.255.255.248 +68.250.10.232/255.255.255.248 +68.250.50.16/255.255.255.248 +68.250.51.216/255.255.255.248 +68.250.94.96/255.255.255.248 +68.250.130.128/255.255.255.240 +68.252.146.240/255.255.255.248 +68.252.203.160/255.255.255.248 +68.254.4.152/255.255.255.248 +68.255.180.168/255.255.255.248 +68.255.213.224/255.255.255.248 +68.255.222.72/255.255.255.248 +69.0.76.120/255.255.255.248 +69.0.88.16/255.255.255.248 +69.0.101.64/255.255.255.248 +69.0.109.128/255.255.255.248 +69.0.114.48/255.255.255.248 +69.1.192.0/255.255.224.0 +69.2.35.0/255.255.255.0 +69.2.228.24/255.255.255.248 +69.7.166.128/255.255.255.192 +69.7.202.72/255.255.255.248 +69.8.156.192/255.255.255.192 +69.15.64.169/255.255.255.249 +69.20.12.136/255.255.255.248 +69.20.18.104/255.255.255.248 +69.20.18.112/255.255.255.248 +69.20.111.32/255.255.255.248 +69.22.160.0/255.255.255.0 +69.25.16.0/255.255.248.0 +69.25.34.64/255.255.255.192 +69.25.35.0/255.255.255.224 +69.26.160.0/255.255.224.0 +69.27.13.104/255.255.255.248 +69.27.15.96/255.255.255.240 +69.27.242.64/255.255.255.224 +69.36.32.0/255.255.240.0 +69.37.46.8/255.255.255.248 +69.37.46.152/255.255.255.248 +69.37.46.200/255.255.255.248 +69.42.64.0/255.255.224.0 +69.44.123.32/255.255.255.224 +69.50.137.0/255.255.254.0 +69.54.160.0/255.255.224.0 +69.56.42.144/255.255.255.248 +69.56.42.152/255.255.255.248 +69.56.42.160/255.255.255.248 +69.56.42.168/255.255.255.248 +69.59.128.0/255.255.192.0 +69.63.162.33/255.255.255.224 +69.67.32.144/255.255.255.240 +69.104.5.72/255.255.255.248 +69.104.27.144/255.255.255.248 +69.104.27.208/255.255.255.248 +69.104.29.216/255.255.255.248 +69.104.29.224/255.255.255.224 +69.104.155.144/255.255.255.248 +69.104.209.56/255.255.255.248 +69.105.160.160/255.255.255.248 +69.105.181.56/255.255.255.248 +69.105.209.192/255.255.255.248 +69.105.210.80/255.255.255.248 +69.105.228.48/255.255.255.248 +69.106.172.8/255.255.255.248 +69.106.192.216/255.255.255.248 +69.107.255.248/255.255.255.248 +69.108.214.216/255.255.255.248 +69.110.85.32/255.255.255.248 +69.110.86.112/255.255.255.248 +69.111.23.184/255.255.255.248 +69.111.46.88/255.255.255.248 +69.111.141.192/255.255.255.248 +69.111.172.40/255.255.255.248 +69.111.239.120/255.255.255.248 +69.150.104.72/255.255.255.248 +69.153.161.16/255.255.255.240 +69.208.98.88/255.255.255.248 +69.210.170.48/255.255.255.248 +69.210.170.152/255.255.255.248 +69.210.170.168/255.255.255.248 +69.210.171.32/255.255.255.248 +69.210.227.96/255.255.255.240 +69.211.47.24/255.255.255.248 +69.212.253.144/255.255.255.248 +69.224.53.104/255.255.255.240 +69.224.53.128/255.255.255.232 +69.224.61.40/255.255.255.248 +69.224.63.8/255.255.255.248 +69.224.84.128/255.255.255.224 +69.224.109.152/255.255.255.248 +69.224.124.176/255.255.255.248 +69.224.129.64/255.255.255.248 +69.224.176.72/255.255.255.248 +69.224.176.216/255.255.255.248 +69.224.208.128/255.255.255.248 +69.224.215.32/255.255.255.248 +69.224.253.144/255.255.255.248 +69.225.152.0/255.255.255.248 +69.225.170.112/255.255.255.248 +69.226.0.24/255.255.255.248 +69.226.49.24/255.255.255.232 +69.226.51.144/255.255.255.248 +69.226.153.0/255.255.255.240 +69.226.164.80/255.255.255.248 +69.227.11.88/255.255.255.248 +69.227.180.104/255.255.255.248 +69.227.181.112/255.255.255.248 +69.232.19.104/255.255.255.248 +69.232.22.16/255.255.255.248 +69.232.22.40/255.255.255.248 +69.232.22.56/255.255.255.248 +69.232.122.144/255.255.255.248 +69.232.164.200/255.255.255.248 +69.232.176.160/255.255.255.248 +69.232.176.240/255.255.255.248 +69.232.177.168/255.255.255.248 +69.232.177.184/255.255.255.248 +69.233.17.240/255.255.255.248 +69.233.28.64/255.255.255.248 +70.241.165.216/255.255.255.248 +80.5.89.64/255.255.255.224 +80.6.88.248/255.255.255.248 +80.6.91.48/255.255.255.248 +80.15.240.152/255.255.255.248 +80.16.24.64/255.255.255.236 +80.16.41.192/255.255.255.240 +80.16.45.64/255.255.255.240 +80.16.58.112/255.255.255.240 +80.16.80.176/255.255.255.248 +80.16.147.160/255.255.255.240 +80.16.152.72/255.255.255.248 +80.16.161.152/255.255.255.248 +80.16.164.112/255.255.255.248 +80.16.172.32/255.255.255.240 +80.16.180.136/255.255.255.248 +80.16.219.144/255.255.255.244 +80.16.228.40/255.255.255.248 +80.16.233.176/255.255.255.240 +80.16.234.144/255.255.255.244 +80.16.239.184/255.255.255.248 +80.16.243.32/255.255.255.248 +80.17.12.16/255.255.255.240 +80.17.17.104/255.255.255.248 +80.17.32.80/255.255.255.240 +80.17.34.132/255.255.255.244 +80.17.49.40/255.255.255.248 +80.17.80.64/255.255.255.248 +80.17.157.40/255.255.255.248 +80.17.183.32/255.255.255.248 +80.17.231.176/255.255.255.248 +80.17.233.96/255.255.255.248 +80.18.20.112/255.255.255.248 +80.18.20.232/255.255.255.248 +80.18.21.152/255.255.255.248 +80.18.22.160/255.255.255.248 +80.18.28.152/255.255.255.248 +80.18.55.64/255.255.255.248 +80.18.55.208/255.255.255.240 +80.18.73.32/255.255.255.240 +80.18.74.96/255.255.255.248 +80.18.83.136/255.255.255.248 +80.18.93.16/255.255.255.248 +80.18.190.232/255.255.255.248 +80.19.25.112/255.255.255.240 +80.19.49.32/255.255.255.240 +80.19.57.128/255.255.255.240 +80.19.60.16/255.255.255.240 +80.19.80.8/255.255.255.248 +80.19.86.144/255.255.255.248 +80.19.101.40/255.255.255.248 +80.19.109.156/255.255.255.244 +80.19.121.112/255.255.255.248 +80.19.172.224/255.255.255.248 +80.19.180.72/255.255.255.248 +80.19.208.0/255.255.255.0 +80.20.84.56/255.255.255.248 +80.20.101.160/255.255.255.248 +80.20.154.48/255.255.255.240 +80.20.154.120/255.255.255.248 +80.20.212.216/255.255.255.248 +80.21.34.232/255.255.255.248 +80.21.37.64/255.255.255.248 +80.21.38.40/255.255.255.248 +80.21.39.176/255.255.255.248 +80.21.47.176/255.255.255.248 +80.21.48.240/255.255.255.248 +80.21.52.56/255.255.255.248 +80.21.81.224/255.255.255.248 +80.21.100.64/255.255.255.248 +80.21.105.216/255.255.255.248 +80.21.144.232/255.255.255.248 +80.21.146.120/255.255.255.248 +80.21.153.112/255.255.255.248 +80.21.203.0/255.255.255.0 +80.21.206.16/255.255.255.248 +80.21.208.96/255.255.255.248 +80.21.214.240/255.255.255.248 +80.21.243.88/255.255.255.248 +80.22.48.192/255.255.255.248 +80.22.49.232/255.255.255.248 +80.22.97.64/255.255.255.248 +80.22.186.136/255.255.255.248 +80.22.231.8/255.255.255.248 +80.22.231.16/255.255.255.240 +80.22.237.64/255.255.255.240 +80.22.237.80/255.255.255.240 +80.23.45.48/255.255.255.240 +80.23.45.72/255.255.255.248 +80.23.57.200/255.255.255.248 +80.23.88.32/255.255.255.224 +80.23.92.112/255.255.255.240 +80.23.158.72/255.255.255.248 +80.23.190.168/255.255.255.248 +80.23.204.8/255.255.255.232 +80.23.219.120/255.255.255.248 +80.23.237.48/255.255.255.248 +80.23.237.64/255.255.255.248 +80.23.237.120/255.255.255.248 +80.23.240.168/255.255.255.248 +80.23.241.240/255.255.255.248 +80.23.242.0/255.255.255.248 +80.23.243.80/255.255.255.248 +80.48.177.0/255.255.255.0 +80.53.164.184/255.255.255.248 +80.53.196.104/255.255.255.248 +80.55.24.224/255.255.255.248 +80.55.64.24/255.255.255.248 +80.55.84.224/255.255.255.248 +80.55.92.216/255.255.255.248 +80.55.134.88/255.255.255.248 +80.55.162.72/255.255.255.248 +80.55.168.24/255.255.255.248 +80.55.168.32/255.255.255.248 +80.55.255.104/255.255.255.248 +80.55.255.136/255.255.255.248 +80.55.255.240/255.255.255.248 +80.62.237.184/255.255.255.248 +80.63.27.48/255.255.255.248 +80.63.60.32/255.255.255.248 +80.64.195.224/255.255.255.240 +80.64.196.72/255.255.255.248 +80.65.107.224/255.255.255.248 +80.65.230.8/255.255.255.248 +80.65.231.0/255.255.255.128 +80.66.6.208/255.255.255.248 +80.69.4.0/255.255.255.192 +80.69.207.0/255.255.255.192 +80.69.207.64/255.255.255.224 +80.69.225.0/255.255.255.0 +80.71.2.0/255.255.255.248 +80.71.2.32/255.255.255.248 +80.71.3.160/255.255.255.224 +80.73.203.64/255.255.255.248 +80.73.224.0/255.255.253.0 +80.75.9.32/255.255.255.224 +80.75.64.128/255.255.255.224 +80.77.67.96/255.255.255.248 +80.77.98.24/255.255.255.248 +80.77.98.80/255.255.255.240 +80.77.106.0/255.255.255.240 +80.80.2.120/255.255.255.248 +80.80.2.160/255.255.255.240 +80.80.3.80/255.255.255.248 +80.80.11.200/255.255.255.248 +80.80.16.96/255.255.255.224 +80.80.19.128/255.255.254.128 +80.80.165.160/255.255.255.240 +80.81.112.0/255.255.255.0 +80.81.115.80/255.255.255.248 +80.82.42.32/255.255.255.248 +80.86.66.144/255.255.255.240 +80.86.114.64/255.255.255.192 +80.88.32.0/255.255.240.0 +80.89.65.208/255.255.255.240 +80.89.65.224/255.255.255.240 +80.89.66.0/255.255.255.128 +80.89.129.64/255.255.255.240 +80.93.2.64/255.255.255.224 +80.93.10.0/255.255.255.248 +80.93.10.96/255.255.255.248 +80.95.113.120/255.255.255.248 +80.96.72.0/255.255.255.240 +80.96.186.0/255.255.255.0 +80.97.150.192/255.255.255.208 +80.105.84.192/255.255.255.248 +80.105.219.24/255.255.255.244 +80.105.228.108/255.255.255.244 +80.120.141.192/255.255.255.248 +80.120.154.64/255.255.255.248 +80.120.170.48/255.255.255.240 +80.121.145.96/255.255.255.224 +80.121.221.92/255.255.255.248 +80.121.228.200/255.255.255.248 +80.121.242.136/255.255.255.248 +80.121.244.144/255.255.255.248 +80.122.0.12/255.255.255.248 +80.122.5.136/255.255.255.248 +80.127.162.248/255.255.255.248 +80.127.175.48/255.255.255.240 +80.127.186.32/255.255.255.240 +80.127.192.216/255.255.255.248 +80.127.199.24/255.255.255.248 +80.127.208.192/255.255.255.240 +80.146.171.96/255.255.255.248 +80.146.171.112/255.255.255.240 +80.146.176.112/255.255.255.248 +80.146.179.32/255.255.255.248 +80.146.185.144/255.255.255.248 +80.146.186.80/255.255.255.248 +80.146.188.24/255.255.255.248 +80.146.192.8/255.255.255.248 +80.146.197.240/255.255.255.248 +80.146.208.216/255.255.255.248 +80.146.209.80/255.255.255.248 +80.146.210.16/255.255.255.248 +80.146.215.16/255.255.255.248 +80.146.216.192/255.255.255.248 +80.146.216.224/255.255.255.248 +80.146.223.200/255.255.255.248 +80.146.243.72/255.255.255.248 +80.146.243.240/255.255.255.248 +80.146.248.208/255.255.255.248 +80.148.8.40/255.255.255.248 +80.148.13.152/255.255.255.248 +80.148.13.192/255.255.255.224 +80.148.34.224/255.255.255.248 +80.152.7.184/255.255.255.248 +80.154.0.224/255.255.255.248 +80.154.3.128/255.255.255.224 +80.154.12.128/255.255.255.248 +80.156.1.232/255.255.255.248 +80.156.4.0/255.255.253.192 +80.156.11.0/255.255.255.248 +80.156.11.40/255.255.255.248 +80.160.64.192/255.255.255.248 +80.160.69.96/255.255.255.248 +80.161.239.16/255.255.255.248 +80.164.142.232/255.255.255.248 +80.165.80.144/255.255.255.248 +80.168.29.208/255.255.255.240 +80.168.34.32/255.255.255.240 +80.168.54.0/255.255.255.224 +80.168.66.56/255.255.255.248 +80.168.137.168/255.255.255.248 +80.168.150.72/255.255.255.248 +80.168.150.96/255.255.255.248 +80.168.151.120/255.255.255.248 +80.168.151.248/255.255.255.248 +80.168.152.0/255.255.255.248 +80.168.155.136/255.255.255.248 +80.168.157.224/255.255.255.248 +80.168.164.0/255.255.254.0 +80.168.168.224/255.255.255.248 +80.168.177.152/255.255.255.248 +80.168.217.16/255.255.255.248 +80.168.220.248/255.255.255.248 +80.168.221.96/255.255.255.248 +80.176.193.104/255.255.255.248 +80.176.202.192/255.255.255.240 +80.176.212.96/255.255.255.248 +80.176.214.16/255.255.255.240 +80.176.247.96/255.255.255.248 +80.177.41.16/255.255.255.248 +80.177.46.208/255.255.255.248 +80.177.54.144/255.255.255.248 +80.177.56.176/255.255.255.240 +80.177.57.232/255.255.255.248 +80.177.60.152/255.255.255.248 +80.177.62.64/255.255.255.248 +80.177.64.24/255.255.255.248 +80.177.76.176/255.255.255.248 +80.177.85.32/255.255.255.248 +80.177.87.40/255.255.255.248 +80.177.87.200/255.255.255.248 +80.177.93.208/255.255.255.240 +80.177.132.32/255.255.255.248 +80.177.139.72/255.255.255.248 +80.177.143.224/255.255.255.248 +80.177.148.56/255.255.255.248 +80.177.180.232/255.255.255.248 +80.177.188.176/255.255.255.240 +80.177.193.128/255.255.255.248 +80.177.198.128/255.255.255.240 +80.177.232.152/255.255.255.248 +80.177.248.176/255.255.255.240 +80.191.69.0/255.255.255.0 +80.191.78.0/255.255.254.0 +80.191.131.0/255.255.255.128 +80.196.172.200/255.255.255.248 +80.196.183.184/255.255.255.248 +80.198.113.96/255.255.255.248 +80.199.79.168/255.255.255.248 +80.199.248.80/255.255.255.240 +80.204.41.48/255.255.255.240 +80.204.68.56/255.255.255.248 +80.204.74.184/255.255.255.248 +80.204.77.200/255.255.255.248 +80.204.77.216/255.255.255.240 +80.204.126.120/255.255.255.248 +80.204.138.248/255.255.255.248 +80.204.153.72/255.255.255.248 +80.204.153.96/255.255.255.240 +80.204.184.168/255.255.255.248 +80.204.228.0/255.255.255.248 +80.204.232.24/255.255.255.248 +80.205.46.0/255.255.255.240 +80.205.47.48/255.255.255.248 +80.205.60.88/255.255.255.248 +80.205.61.160/255.255.255.240 +80.205.94.72/255.255.255.248 +80.205.94.112/255.255.255.240 +80.205.145.168/255.255.255.248 +80.205.150.224/255.255.255.248 +80.205.165.200/255.255.255.248 +80.205.174.224/255.255.255.248 +80.205.204.0/255.255.255.0 +80.205.233.96/255.255.255.240 +80.205.249.168/255.255.255.248 +80.206.62.0/255.255.255.248 +80.206.68.104/255.255.255.248 +80.206.88.192/255.255.255.248 +80.206.112.72/255.255.255.248 +80.206.115.80/255.255.255.248 +80.206.186.32/255.255.255.248 +80.206.214.152/255.255.255.248 +80.206.230.128/255.255.255.240 +80.207.16.192/255.255.255.240 +80.207.19.80/255.255.255.248 +80.207.28.152/255.255.255.248 +80.207.72.144/255.255.255.248 +80.207.83.112/255.255.255.240 +80.207.130.112/255.255.255.248 +80.207.144.88/255.255.255.248 +80.207.198.24/255.255.255.248 +80.207.201.16/255.255.255.248 +80.207.245.104/255.255.255.248 +80.207.246.80/255.255.255.248 +80.227.131.120/255.255.255.248 +80.227.131.128/255.255.255.248 +80.227.131.216/255.255.255.248 +80.227.146.8/255.255.255.248 +80.232.17.64/255.255.255.192 +80.232.140.224/255.255.255.240 +80.234.135.72/255.255.255.248 +80.237.230.32/255.255.255.224 +80.237.233.128/255.255.255.224 +80.237.254.160/255.255.255.224 +80.238.213.88/255.255.255.248 +80.239.13.136/255.255.255.248 +80.239.23.64/255.255.255.224 +80.240.227.160/255.255.255.248 +80.240.238.64/255.255.255.240 +80.246.71.32/255.255.255.240 +80.246.71.96/255.255.255.224 +80.246.96.0/255.255.240.0 +80.249.238.0/255.255.255.248 +80.250.173.64/255.255.255.224 +80.250.175.0/255.255.255.0 +80.250.183.0/255.255.255.0 +80.251.161.112/255.255.255.248 +80.251.161.208/255.255.255.248 +80.254.109.40/255.255.255.248 +80.254.109.56/255.255.255.248 +80.254.109.72/255.255.255.248 +80.254.178.120/255.255.255.248 +81.0.64.160/255.255.255.248 +81.0.202.0/255.255.255.0 +81.0.225.192/255.255.255.224 +81.0.237.240/255.255.255.248 +81.2.12.160/255.255.255.224 +81.2.12.192/255.255.255.224 +81.2.19.32/255.255.255.224 +81.2.78.192/255.255.255.240 +81.2.91.176/255.255.255.240 +81.2.95.0/255.255.255.248 +81.2.95.48/255.255.255.240 +81.2.190.0/255.255.255.224 +81.3.98.240/255.255.255.248 +81.4.78.0/255.255.255.0 +81.6.196.64/255.255.255.240 +81.6.198.224/255.255.255.248 +81.6.199.0/255.255.255.248 +81.8.128.224/255.255.255.224 +81.12.220.72/255.255.255.248 +81.15.38.128/255.255.255.224 +81.15.88.0/255.255.253.0 +81.15.190.112/255.255.255.240 +81.16.38.0/255.255.255.224 +81.18.73.208/255.255.255.248 +81.19.225.112/255.255.255.240 +81.19.228.144/255.255.255.240 +81.21.231.0/255.255.255.0 +81.26.0.0/255.255.255.0 +81.27.133.128/255.255.255.128 +81.30.106.64/255.255.255.248 +81.30.227.160/255.255.255.248 +81.30.227.168/255.255.255.248 +81.49.51.80/255.255.255.80 +81.58.20.224/255.255.255.248 +81.58.30.72/255.255.255.248 +81.58.30.104/255.255.255.248 +81.58.31.216/255.255.255.248 +81.72.71.0/255.255.255.0 +81.72.163.232/255.255.255.248 +81.72.191.16/255.255.255.248 +81.72.241.64/255.255.255.248 +81.73.28.216/255.255.255.248 +81.73.32.120/255.255.255.244 +81.73.91.8/255.255.255.248 +81.74.186.176/255.255.255.248 +81.75.98.208/255.255.255.248 +81.76.132.1/255.255.255.1 +81.80.18.192/255.255.255.248 +81.80.61.240/255.255.255.240 +81.80.80.128/255.255.255.248 +81.80.81.0/255.255.255.248 +81.80.88.192/255.255.255.192 +81.80.93.184/255.255.255.248 +81.80.104.128/255.255.255.248 +81.80.134.176/255.255.255.240 +81.80.147.64/255.255.255.224 +81.80.147.192/255.255.255.240 +81.80.156.128/255.255.255.248 +81.80.163.104/255.255.255.248 +81.80.172.232/255.255.255.240 +81.80.182.176/255.255.255.248 +81.80.201.24/255.255.255.248 +81.80.206.240/255.255.255.248 +81.80.212.176/255.255.255.232 +81.80.212.200/255.255.255.232 +81.80.212.224/255.255.255.232 +81.80.212.248/255.255.255.248 +81.80.213.128/255.255.255.240 +81.80.213.192/255.255.255.240 +81.80.228.128/255.255.255.128 +81.80.236.32/255.255.255.240 +81.86.10.40/255.255.255.248 +81.86.12.24/255.255.255.248 +81.86.13.136/255.255.255.248 +81.112.54.0/255.255.255.248 +81.112.73.96/255.255.255.240 +81.112.76.104/255.255.255.248 +81.112.86.96/255.255.255.248 +81.112.189.48/255.255.255.240 +81.112.224.0/255.255.255.248 +81.113.41.136/255.255.255.248 +81.113.50.24/255.255.255.248 +81.113.154.232/255.255.255.248 +81.113.155.16/255.255.255.248 +81.113.163.216/255.255.255.248 +81.113.172.240/255.255.255.248 +81.113.175.192/255.255.255.248 +81.113.190.0/255.255.255.0 +81.113.238.176/255.255.255.248 +81.114.79.96/255.255.255.240 +81.115.32.184/255.255.255.248 +81.115.140.0/255.255.255.248 +81.116.88.40/255.255.255.248 +81.138.99.8/255.255.255.248 +81.144.155.64/255.255.255.240 +81.144.169.128/255.255.255.192 +81.144.189.0/255.255.255.0 +81.144.246.192/255.255.255.192 +81.160.0.0/255.255.128.0 +81.168.3.192/255.255.255.248 +81.168.5.80/255.255.255.248 +81.168.20.64/255.255.255.248 +81.168.21.152/255.255.255.248 +81.178.4.240/255.255.255.248 +81.178.33.80/255.255.255.248 +81.187.37.144/255.255.255.248 +81.187.70.96/255.255.255.240 +81.187.195.64/255.255.255.248 +81.187.203.40/255.255.255.248 +81.187.227.216/255.255.255.248 +81.187.229.192/255.255.255.248 +81.188.20.240/255.255.255.248 +81.192.115.48/255.255.255.240 +81.192.226.136/255.255.255.248 +81.195.184.208/255.255.255.240 +81.196.105.160/255.255.255.224 +81.208.39.136/255.255.255.248 +81.208.56.0/255.255.255.0 +81.210.3.232/255.255.255.248 +81.210.22.112/255.255.255.240 +81.210.38.16/255.255.255.248 +81.223.11.72/255.255.255.248 +81.223.12.208/255.255.255.240 +81.223.14.24/255.255.255.248 +81.223.16.8/255.255.255.248 +81.223.46.128/255.255.255.248 +81.223.48.80/255.255.255.248 +81.223.55.96/255.255.255.248 +81.223.99.0/255.255.255.248 +81.223.115.0/255.255.255.128 +81.223.151.88/255.255.255.248 +81.223.151.176/255.255.255.240 +81.223.157.72/255.255.255.248 +81.223.179.112/255.255.255.248 +81.223.204.48/255.255.255.240 +81.223.212.96/255.255.255.248 +81.223.218.16/255.255.255.248 +81.223.220.40/255.255.255.248 +81.223.231.232/255.255.255.240 +81.255.9.24/255.255.255.248 +81.255.13.80/255.255.255.248 +81.255.16.80/255.255.255.240 +81.255.16.112/255.255.255.240 +81.255.18.96/255.255.255.224 +81.255.19.248/255.255.255.248 +81.255.20.80/255.255.255.240 +81.255.20.96/255.255.255.240 +81.255.22.96/255.255.255.248 +81.255.61.32/255.255.255.248 +81.255.62.96/255.255.255.248 +81.255.73.208/255.255.255.248 +81.255.74.192/255.255.255.240 +81.255.82.192/255.255.255.240 +81.255.86.176/255.255.255.248 +81.255.93.208/255.255.255.248 +81.255.97.152/255.255.255.248 +81.255.101.16/255.255.255.248 +81.255.101.112/255.255.255.248 +81.255.109.192/255.255.255.248 +81.255.112.224/255.255.255.240 +81.255.113.0/255.255.255.248 +81.255.120.192/255.255.255.224 +81.255.123.24/255.255.255.248 +81.255.124.200/255.255.255.248 +81.255.127.248/255.255.255.248 +81.255.128.0/255.255.255.240 +81.255.132.64/255.255.255.248 +81.255.132.88/255.255.255.248 +81.255.132.160/255.255.255.240 +81.255.137.0/255.255.255.0 +81.255.139.248/255.255.255.248 +81.255.140.144/255.255.255.240 +81.255.141.232/255.255.255.248 +81.255.147.112/255.255.255.248 +81.255.158.216/255.255.255.248 +81.255.195.128/255.255.255.248 +81.255.200.128/255.255.255.240 +82.68.28.160/255.255.255.248 +82.68.61.240/255.255.255.248 +82.68.79.232/255.255.255.248 +82.68.118.168/255.255.255.248 +82.68.159.32/255.255.255.248 +82.68.161.112/255.255.255.248 +82.68.162.168/255.255.255.248 +82.68.184.160/255.255.255.160 +82.68.185.8/255.255.255.160 +82.68.185.104/255.255.255.200 +82.68.199.192/255.255.255.240 +82.68.206.208/255.255.255.248 +82.68.207.152/255.255.255.248 +82.68.212.24/255.255.255.248 +82.68.214.64/255.255.255.248 +82.68.215.192/255.255.255.248 +82.68.220.160/255.255.255.248 +82.68.228.80/255.255.255.248 +82.68.237.16/255.255.255.248 +82.68.238.216/255.255.255.248 +82.70.11.192/255.255.255.248 +82.70.19.184/255.255.255.216 +82.70.22.216/255.255.255.248 +82.70.42.160/255.255.255.248 +82.70.51.176/255.255.255.248 +82.70.62.128/255.255.255.248 +82.70.73.72/255.255.255.248 +82.70.85.40/255.255.255.248 +82.70.86.200/255.255.255.248 +82.70.102.160/255.255.255.248 +82.70.111.0/255.255.255.248 +82.70.123.0/255.255.255.248 +82.70.146.96/255.255.255.248 +82.85.0.0/255.255.255.240 +82.98.209.0/255.255.255.128 +82.100.207.48/255.255.255.248 +82.108.18.16/255.255.255.248 +82.108.160.88/255.255.255.248 +82.108.168.24/255.255.255.248 +82.108.169.128/255.255.255.224 +82.108.169.160/255.255.255.240 +82.108.169.176/255.255.255.240 +82.108.169.216/255.255.255.248 +82.109.142.240/255.255.255.240 +82.109.189.128/255.255.255.128 +82.109.219.64/255.255.255.248 +82.109.219.72/255.255.255.248 +82.110.4.80/255.255.255.248 +82.110.82.160/255.255.255.240 +82.129.137.8/255.255.255.248 +82.133.25.56/255.255.255.248 +82.135.34.128/255.255.255.248 +82.135.36.40/255.255.255.248 +82.135.37.248/255.255.255.248 +82.135.40.200/255.255.255.248 +82.141.192.240/255.255.255.240 +82.144.58.32/255.255.255.248 +82.144.58.64/255.255.255.192 +82.162.35.144/255.255.255.240 +82.185.181.208/255.255.255.248 +82.187.9.136/255.255.255.248 +82.187.30.56/255.255.255.248 +82.187.31.144/255.255.255.248 +82.187.31.232/255.255.255.248 +82.189.41.184/255.255.255.248 +82.189.42.64/255.255.255.248 +82.189.42.216/255.255.249.240 +82.193.6.64/255.255.255.240 +82.212.204.0/255.255.252.0 +82.212.252.0/255.255.255.192 +82.221.28.0/255.255.255.0 +83.64.11.160/255.255.255.248 +83.64.32.144/255.255.255.248 +83.64.59.152/255.255.255.248 +83.64.69.120/255.255.255.248 +83.104.11.32/255.255.255.248 +83.146.1.64/255.255.255.240 +83.146.7.240/255.255.255.240 +83.146.58.216/255.255.255.248 +83.218.70.40/255.255.255.248 +83.228.103.0/255.255.255.0 +83.236.131.216/255.255.255.248 +83.236.155.136/255.255.255.248 +84.233.131.0/255.255.255.192 +84.233.131.64/255.255.255.192 +128.3.0.0/255.255.0.0 +128.11.18.0/255.255.255.0 +128.11.41.22/255.255.255.241 +128.11.42.78/255.255.255.236 +128.11.58.0/255.255.255.248 +128.20.0.0/255.255.0.0 +128.43.0.0/255.255.0.0 +128.51.0.0/255.255.0.0 +128.56.0.0/255.255.0.0 +128.63.0.0/255.255.0.0 +128.66.0.0/255.255.0.0 +128.93.0.0/255.255.0.0 +128.98.0.0/255.255.0.0 +128.127.0.0/255.255.0.0 +128.132.0.0/255.255.0.0 +128.150.0.0/255.255.0.0 +128.173.0.0/255.255.0.0 +128.202.0.0/255.255.0.0 +128.209.0.0/255.255.0.0 +128.215.0.0/255.255.0.0 +128.216.0.0/255.254.0.0 +128.219.0.0/255.255.0.0 +128.236.0.0/255.255.0.0 +128.241.247.0/255.255.255.170 +128.241.247.87/255.255.255.242 +128.241.247.102/255.255.255.120 +128.245.0.0/255.253.0.0 +129.4.0.0/255.255.0.0 +129.6.0.0/255.255.0.0 +129.20.0.0/255.255.0.0 +129.23.0.0/255.255.0.0 +129.28.0.0/255.254.0.0 +129.33.0.0/255.253.0.0 +129.38.0.0/255.251.0.0 +129.44.34.8/255.255.255.248 +129.48.0.0/255.255.0.0 +129.52.0.0/255.255.0.0 +129.53.0.0/255.254.0.0 +129.67.0.0/255.255.0.0 +129.88.0.0/255.255.0.0 +129.102.0.0/255.255.0.0 +129.104.0.0/255.255.0.0 +129.124.0.0/255.255.0.0 +129.126.0.0/255.255.0.0 +129.141.0.0/255.255.0.0 +129.142.30.32/255.255.255.240 +129.142.71.0/255.255.255.128 +129.142.172.176/255.255.255.240 +129.144.0.0/255.239.0.0 +129.175.0.0/255.255.0.0 +129.186.0.0/255.255.0.0 +129.197.0.0/255.255.0.0 +129.199.0.0/255.255.0.0 +129.201.0.0/255.252.0.0 +129.212.0.0/255.255.0.0 +129.222.0.0/255.250.0.0 +129.228.0.0/255.255.0.0 +129.231.0.0/255.255.0.0 +129.238.0.0/255.255.0.0 +129.243.0.0/255.255.0.0 +129.251.0.0/255.255.0.0 +129.254.0.0/255.255.0.0 +130.14.0.0/255.255.0.0 +130.28.0.0/255.255.0.0 +130.35.0.0/255.255.0.0 +130.45.0.0/255.255.0.0 +130.48.0.0/255.255.0.0 +130.55.0.0/255.255.0.0 +130.66.0.0/255.255.0.0 +130.72.0.0/255.254.0.0 +130.77.0.0/255.254.0.0 +130.79.0.0/255.255.0.0 +130.84.0.0/255.255.0.0 +130.90.0.0/255.255.0.0 +130.98.0.0/255.255.0.0 +130.105.0.0/255.254.0.0 +130.116.0.0/255.255.0.0 +130.119.0.0/255.255.0.0 +130.120.0.0/255.255.0.0 +130.124.0.0/255.255.0.0 +130.131.0.0/255.255.0.0 +130.138.0.0/255.246.0.0 +130.155.0.0/255.255.0.0 +130.165.0.0/255.255.0.0 +130.190.0.0/255.255.0.0 +130.196.0.0/255.255.0.0 +130.200.0.0/255.255.0.0 +130.202.0.0/255.255.0.0 +130.227.227.56/255.255.255.248 +130.228.196.8/255.255.255.248 +130.228.219.0/255.255.255.0 +130.242.58.0/255.255.255.0 +130.248.0.0/255.255.0.0 +131.3.0.0/255.255.0.0 +131.6.0.0/255.255.0.0 +131.10.0.0/255.255.0.0 +131.17.0.0/255.255.0.0 +131.21.0.0/255.254.0.0 +131.24.0.0/255.255.0.0 +131.25.0.0/255.255.0.0 +131.27.0.0/255.255.0.0 +131.30.0.0/255.255.0.0 +131.32.0.0/255.255.0.0 +131.35.0.0/255.254.0.0 +131.37.0.0/255.255.0.0 +131.38.0.0/255.254.0.0 +131.40.0.0/255.255.0.0 +131.44.0.0/255.255.0.0 +131.46.0.0/255.254.0.0 +131.50.0.0/255.255.0.0 +131.52.0.0/255.255.0.0 +131.56.0.0/255.255.0.0 +131.58.0.0/255.254.0.0 +131.61.0.0/255.255.0.0 +131.62.0.0/255.255.0.0 +131.74.0.0/255.255.0.0 +131.84.0.0/255.255.0.0 +131.105.0.0/255.255.0.0 +131.107.0.0/255.255.156.12 +131.107.99.245/255.255.99.245 +131.127.0.0/255.255.0.0 +131.131.0.0/255.245.0.0 +131.144.0.0/255.255.0.0 +131.158.0.0/255.255.0.0 +131.168.0.0/255.255.0.0 +131.176.0.0/255.255.0.0 +131.201.0.0/255.255.0.0 +131.205.0.0/255.255.0.0 +131.209.0.0/255.255.0.0 +131.218.0.0/255.255.0.0 +131.228.0.0/255.255.0.0 +131.236.0.0/255.255.0.0 +131.237.0.0/255.255.0.0 +131.241.0.0/255.254.0.0 +131.243.0.0/255.255.0.0 +131.254.0.0/255.255.0.0 +132.3.0.0/255.255.0.0 +132.5.0.0/255.254.0.0 +132.7.0.0/255.255.0.0 +132.9.0.0/255.254.0.0 +132.12.0.0/255.255.0.0 +132.13.0.0/255.254.0.0 +132.15.0.0/255.255.0.0 +132.16.0.0/255.255.0.0 +132.18.0.0/255.254.0.0 +132.20.0.0/255.255.0.0 +132.21.0.0/255.254.0.0 +132.24.0.0/255.255.0.0 +132.25.0.0/255.255.0.0 +132.27.0.0/255.254.0.0 +132.30.0.0/255.255.0.0 +132.31.0.0/255.255.0.0 +132.33.0.0/255.254.0.0 +132.35.0.0/255.255.0.0 +132.37.0.0/255.254.0.0 +132.39.0.0/255.255.0.0 +132.40.0.0/255.255.0.0 +132.42.0.0/255.254.0.0 +132.45.0.0/255.255.0.0 +132.46.0.0/255.255.0.0 +132.48.0.0/255.254.0.0 +132.50.0.0/255.255.0.0 +132.51.0.0/255.255.0.0 +132.52.0.0/255.255.0.0 +132.53.0.0/255.255.0.0 +132.54.0.0/255.254.0.0 +132.56.0.0/255.255.0.0 +132.57.0.0/255.254.0.0 +132.59.0.0/255.255.0.0 +132.60.0.0/255.254.0.0 +132.62.0.0/255.255.0.0 +132.109.0.0/255.232.0.0 +132.146.0.0/255.255.0.0 +132.149.0.0/255.255.0.0 +132.150.0.0/255.254.0.0 +132.165.0.0/255.255.0.0 +132.166.0.0/255.252.0.0 +132.175.0.0/255.255.0.0 +132.188.0.0/255.255.0.0 +132.200.0.0/255.255.0.0 +132.217.0.0/255.253.0.0 +132.227.0.0/255.255.0.0 +132.233.0.0/255.255.0.0 +133.27.228.0/255.255.255.0 +134.5.0.0/255.254.0.0 +134.11.0.0/255.254.0.0 +134.13.0.0/255.252.0.0 +134.47.0.0/255.255.0.0 +134.51.0.0/255.255.0.0 +134.59.0.0/255.255.0.0 +134.67.0.0/255.255.0.0 +134.100.0.0/255.255.0.0 +134.116.0.0/255.255.0.0 +134.131.0.0/255.255.0.0 +134.134.0.0/255.255.0.0 +134.136.0.0/255.255.0.0 +134.157.0.0/255.255.0.0 +134.168.0.0/255.255.0.0 +134.185.0.0/255.255.0.0 +134.186.0.0/255.255.0.0 +134.205.0.0/255.255.0.0 +134.206.0.0/255.255.0.0 +134.212.0.0/255.255.0.0 +134.214.0.0/255.255.0.0 +134.240.0.0/255.255.0.0 +135.107.0.0/255.255.0.0 +135.196.18.0/255.255.255.248 +136.198.0.0/255.255.0.0 +136.207.0.0/255.240.0.0 +136.232.0.0/255.253.0.0 +136.243.0.0/255.255.0.0 +137.1.0.0/255.255.0.0 +137.2.0.0/255.254.0.0 +137.4.0.0/255.255.0.0 +137.7.0.0/255.255.0.0 +137.8.0.0/255.255.0.0 +137.9.0.0/255.255.0.0 +137.10.0.0/255.255.0.0 +137.13.0.0/255.255.0.0 +137.14.0.0/255.255.0.0 +137.15.0.0/255.255.0.0 +137.16.0.0/255.255.0.0 +137.18.0.0/255.255.0.0 +137.19.0.0/255.255.0.0 +137.23.0.0/255.255.0.0 +137.29.0.0/255.255.0.0 +137.41.0.0/255.255.0.0 +137.46.0.0/255.255.0.0 +137.59.0.0/255.253.0.0 +137.77.0.0/255.255.0.0 +137.94.0.0/255.255.0.0 +137.95.0.0/255.255.0.0 +137.102.0.0/255.255.0.0 +137.105.0.0/255.255.0.0 +137.121.0.0/255.255.0.0 +137.126.0.0/255.255.0.0 +137.128.0.0/255.255.0.0 +137.147.0.0/255.255.0.0 +137.153.0.0/255.255.0.0 +137.160.0.0/255.255.0.0 +137.165.0.0/255.255.0.0 +137.167.0.0/255.255.0.0 +137.172.0.0/255.255.0.0 +137.191.0.0/255.255.0.0 +137.194.0.0/255.255.0.0 +137.200.0.0/255.255.0.0 +137.203.0.0/255.255.0.0 +137.241.0.0/255.254.0.0 +137.243.0.0/255.255.0.0 +137.244.0.0/255.254.0.0 +137.249.0.0/255.255.0.0 +137.252.0.0/255.255.0.0 +138.11.0.0/255.255.0.0 +138.12.0.0/255.255.0.0 +138.35.0.0/255.255.0.0 +138.42.0.0/255.255.0.0 +138.44.0.0/255.255.0.0 +138.52.0.0/255.255.0.0 +138.63.0.0/255.255.0.0 +138.69.0.0/255.255.0.0 +138.72.0.0/255.255.0.0 +138.79.0.0/255.255.0.0 +138.96.0.0/255.255.0.0 +138.102.0.0/255.255.0.0 +138.135.0.0/255.254.0.0 +138.139.0.0/255.251.0.0 +138.145.0.0/255.248.0.0 +138.153.0.0/255.255.0.0 +138.154.0.0/255.254.0.0 +138.156.0.0/255.253.0.0 +138.159.0.0/255.255.0.0 +138.162.0.0/255.255.0.0 +138.163.0.0/255.254.0.0 +138.165.0.0/255.253.0.0 +138.168.0.0/255.255.0.0 +138.177.0.0/255.255.0.0 +138.178.0.0/255.254.0.0 +138.180.0.0/255.255.0.0 +138.181.0.0/255.254.0.0 +138.183.0.0/255.255.0.0 +138.184.0.0/255.255.0.0 +138.188.0.0/255.254.0.0 +138.191.0.0/255.255.0.0 +138.194.0.0/255.255.0.0 +138.195.0.0/255.255.125.185 +138.195.130.72/255.255.130.72 +138.200.0.0/255.255.0.0 +138.209.0.0/255.255.0.0 +138.216.0.0/255.255.0.0 +138.231.0.0/255.255.0.0 +139.31.0.0/255.254.0.0 +139.33.0.0/255.255.0.0 +139.34.0.0/255.254.0.0 +139.36.0.0/255.255.0.0 +139.37.0.0/255.254.0.0 +139.39.0.0/255.255.0.0 +139.40.0.0/255.254.0.0 +139.42.0.0/255.255.0.0 +139.43.0.0/255.255.0.0 +139.60.0.0/255.255.0.0 +139.91.0.0/255.255.0.0 +139.100.0.0/255.255.0.0 +139.104.0.0/255.255.0.0 +139.124.0.0/255.255.0.0 +139.142.0.0/255.255.0.0 +139.191.0.0/255.255.0.0 +139.232.0.0/255.255.0.0 +140.77.0.0/255.255.0.0 +140.79.0.0/255.255.0.0 +140.90.0.0/255.255.0.0 +140.93.0.0/255.255.0.0 +140.147.0.0/255.255.0.0 +140.153.0.0/255.255.0.0 +140.175.0.0/255.255.0.0 +140.186.0.0/255.255.0.0 +140.187.0.0/255.255.0.0 +140.208.0.0/255.255.0.0 +140.217.0.0/255.255.0.0 +140.221.0.0/255.255.0.0 +140.229.0.0/255.255.0.0 +140.239.46.225/255.255.255.226 +140.239.50.113/255.255.255.242 +140.239.99.193/255.255.255.226 +140.239.150.241/255.255.255.242 +140.239.187.81/255.255.255.242 +140.239.211.65/255.255.255.194 +140.239.238.129/255.255.255.242 +140.242.0.0/255.255.0.0 +141.15.0.0/255.255.0.0 +141.90.0.0/255.255.0.0 +141.91.0.0/255.255.0.0 +141.104.0.0/255.255.0.0 +141.114.0.0/255.255.0.0 +141.149.113.160/255.255.255.248 +141.150.146.168/255.255.255.248 +141.150.184.0/255.255.255.224 +141.150.185.32/255.255.255.224 +141.153.107.64/255.255.255.192 +141.154.91.0/255.255.255.192 +141.154.255.192/255.255.255.224 +141.156.28.128/255.255.255.192 +141.156.96.0/255.255.255.0 +141.183.0.0/255.254.0.0 +141.198.0.0/255.255.0.0 +141.202.0.0/255.255.0.0 +141.205.0.0/255.255.0.0 +141.221.0.0/255.255.0.0 +141.236.0.0/255.255.0.0 +142.64.0.0/255.255.0.0 +142.72.0.0/255.255.0.0 +142.105.0.0/255.255.0.0 +142.138.0.0/255.255.0.0 +142.145.0.0/255.255.0.0 +142.193.0.0/255.255.0.0 +142.235.0.0/255.255.0.0 +143.45.0.0/255.254.0.0 +143.68.0.0/255.255.0.0 +143.69.0.0/255.251.0.0 +143.74.0.0/255.253.0.0 +143.77.0.0/255.255.0.0 +143.78.0.0/255.254.0.0 +143.80.0.0/255.255.0.0 +143.81.0.0/255.254.0.0 +143.84.0.0/255.255.0.0 +143.85.0.0/255.253.0.0 +143.114.0.0/255.255.0.0 +143.118.0.0/255.255.0.0 +143.138.0.0/255.255.0.0 +143.162.0.0/255.255.0.0 +143.166.0.0/255.255.0.0 +143.175.0.0/255.255.0.0 +143.181.0.0/255.251.0.0 +143.203.0.0/255.254.0.0 +143.228.0.0/255.255.0.0 +143.231.0.0/255.255.0.0 +143.247.0.0/255.255.0.0 +144.3.0.0/255.255.0.0 +144.16.0.0/255.255.0.0 +144.20.0.0/255.250.0.0 +144.36.0.0/255.255.0.0 +144.45.0.0/255.255.0.0 +144.47.0.0/255.255.0.0 +144.51.0.0/255.255.0.0 +144.65.0.0/255.255.0.0 +144.75.0.0/255.255.0.0 +144.76.0.0/255.255.0.0 +144.84.0.0/255.255.0.0 +144.100.0.0/255.252.0.0 +144.110.0.0/255.255.0.0 +144.111.0.0/255.255.0.0 +144.143.0.0/255.254.0.0 +144.146.0.0/255.254.0.0 +144.182.0.0/255.253.0.0 +144.204.0.0/255.255.0.0 +144.233.0.0/255.253.0.0 +144.236.0.0/255.249.0.0 +144.244.0.0/255.253.0.0 +144.247.0.0/255.255.0.0 +144.254.0.0/255.255.0.0 +145.64.0.0/255.255.0.0 +145.68.0.0/255.255.0.0 +145.119.0.0/255.255.0.0 +145.228.0.0/255.255.0.0 +145.232.0.0/255.255.0.0 +145.238.0.0/255.255.0.0 +145.242.0.0/255.255.0.0 +145.250.0.0/255.255.0.0 +145.253.66.120/255.255.255.248 +145.253.81.216/255.255.255.248 +145.253.92.0/255.255.255.128 +145.253.92.128/255.255.255.192 +145.253.99.16/255.255.255.240 +145.253.115.16/255.255.255.240 +145.253.115.208/255.255.255.240 +145.253.162.128/255.255.255.248 +145.253.170.112/255.255.255.248 +145.253.171.0/255.255.255.0 +145.253.174.128/255.255.255.192 +145.253.176.240/255.255.255.248 +145.253.185.128/255.255.255.192 +145.253.237.64/255.255.255.224 +145.253.255.16/255.255.255.240 +145.254.209.0/255.255.255.0 +146.19.0.0/255.255.0.0 +146.53.0.0/255.253.0.0 +146.63.0.0/255.255.0.0 +146.68.0.0/255.255.0.0 +146.76.0.0/255.255.0.0 +146.80.0.0/255.255.0.0 +146.82.146.0/255.255.254.0 +146.82.174.0/255.255.255.0 +146.93.0.0/255.255.0.0 +146.114.0.0/255.255.0.0 +146.118.0.0/255.255.0.0 +146.137.0.0/255.255.0.0 +146.138.0.0/255.255.0.0 +146.139.0.0/255.255.0.0 +146.145.1.32/255.255.255.248 +146.145.46.160/255.255.255.224 +146.145.98.224/255.255.255.240 +146.145.206.160/255.255.255.240 +146.145.226.96/255.255.255.224 +146.145.239.0/255.255.255.224 +146.153.0.0/255.255.0.0 +146.159.0.0/255.255.0.0 +146.215.0.0/255.255.0.0 +146.233.0.0/255.255.0.0 +146.243.0.0/255.255.0.0 +146.248.0.0/255.255.0.0 +147.29.0.0/255.254.0.0 +147.49.0.0/255.255.0.0 +147.51.0.0/255.255.0.0 +147.55.0.0/255.255.0.0 +147.58.0.0/255.255.0.0 +147.67.0.0/255.255.0.0 +147.72.0.0/255.254.0.0 +147.94.0.0/255.255.216.0 +147.94.128.0/255.255.240.0 +147.99.0.0/255.255.0.0 +147.100.0.0/255.255.0.0 +147.127.0.0/255.255.0.0 +147.130.0.0/255.254.0.0 +147.155.0.0/255.255.0.0 +147.171.0.0/255.255.0.0 +147.173.0.0/255.255.0.0 +147.191.0.0/255.255.0.0 +147.208.0.0/255.255.0.0 +147.210.0.0/255.255.0.0 +147.221.0.0/255.255.0.0 +147.242.0.0/255.255.0.0 +147.248.0.0/255.255.0.0 +147.254.0.0/255.255.0.0 +148.1.0.0/255.255.0.0 +148.3.0.0/255.255.0.0 +148.7.0.0/255.255.0.0 +148.60.0.0/255.255.0.0 +148.81.112.0/255.255.250.0 +148.110.0.0/255.255.0.0 +148.117.0.0/255.255.0.0 +148.149.0.0/255.255.0.0 +148.153.0.0/255.255.0.0 +148.184.0.0/255.255.0.0 +148.196.0.0/255.255.0.0 +148.243.229.128/255.255.255.224 +148.243.255.224/255.255.255.239 +148.244.134.0/255.255.253.0 +148.244.148.216/255.255.255.247 +148.244.250.161/255.255.255.242 +148.245.52.0/255.255.255.0 +148.245.99.0/255.255.255.192 +148.245.164.160/255.255.255.224 +148.245.167.128/255.255.255.224 +149.48.0.0/255.255.0.0 +149.56.0.0/255.255.0.0 +149.90.0.0/255.255.0.0 +149.98.0.0/255.255.0.0 +149.101.0.0/255.255.0.0 +149.114.0.0/255.255.0.0 +149.168.21.0/255.255.255.0 +149.168.32.0/255.255.255.0 +149.168.89.0/255.255.255.0 +149.168.96.0/255.255.254.0 +149.168.135.0/255.255.255.0 +149.168.154.0/255.255.255.0 +149.168.212.0/255.255.255.0 +149.168.213.0/255.255.255.0 +149.168.215.0/255.255.255.0 +149.168.223.0/255.255.255.0 +149.168.243.0/255.255.255.0 +149.235.0.0/255.255.0.0 +150.102.0.0/255.253.0.0 +150.111.0.0/255.255.0.0 +150.113.0.0/255.254.0.0 +150.118.0.0/255.254.0.0 +150.120.0.0/255.255.0.0 +150.124.0.0/255.255.0.0 +150.125.0.0/255.255.0.0 +150.133.0.0/255.255.0.0 +150.151.0.0/255.255.0.0 +150.157.0.0/255.255.0.0 +150.176.0.0/255.255.0.0 +150.177.0.0/255.255.0.0 +150.178.0.0/255.255.0.0 +150.180.0.0/255.255.0.0 +150.184.0.0/255.255.0.0 +150.190.0.0/255.255.0.0 +150.191.0.0/255.255.0.0 +150.196.0.0/255.255.0.0 +150.217.0.0/255.255.0.0 +150.220.0.0/255.253.0.0 +150.224.0.0/255.255.0.0 +150.245.0.0/255.251.0.0 +150.254.3.0/255.255.251.192 +150.254.7.68/255.255.255.244 +150.254.7.144/255.255.255.240 +150.254.7.192/255.255.239.128 +150.254.25.0/255.255.250.0 +150.254.32.0/255.255.252.0 +150.254.40.0/255.255.253.0 +150.254.45.0/255.255.253.0 +150.254.51.0/255.255.252.0 +150.254.128.0/255.255.253.0 +150.254.132.0/255.255.251.0 +150.254.142.0/255.255.255.224 +150.254.142.64/255.255.255.192 +150.254.143.0/255.255.254.224 +150.254.145.0/255.255.255.0 +150.254.147.0/255.255.255.0 +151.8.7.80/255.255.255.238 +151.8.66.112/255.255.255.240 +151.11.171.64/255.255.255.239 +151.12.60.64/255.255.255.224 +151.17.101.0/255.255.255.0 +151.17.103.0/255.255.255.0 +151.17.222.160/255.255.255.240 +151.90.0.0/255.255.0.0 +151.99.156.160/255.255.255.224 +151.99.187.248/255.255.255.248 +151.99.243.192/255.255.255.224 +151.121.0.0/255.255.0.0 +151.139.0.0/255.255.0.0 +151.176.0.0/255.255.0.0 +151.197.68.96/255.255.255.240 +151.198.224.0/255.255.255.192 +151.200.173.0/255.255.255.0 +151.200.233.32/255.255.255.224 +151.201.250.0/255.255.255.224 +151.204.98.248/255.255.255.248 +151.204.105.224/255.255.255.248 +151.204.164.224/255.255.255.224 +151.207.0.0/255.255.0.0 +152.70.0.0/255.255.0.0 +152.77.0.0/255.255.0.0 +152.80.0.0/255.255.0.0 +152.81.0.0/255.255.0.0 +152.82.0.0/255.255.0.0 +152.83.0.0/255.255.0.0 +152.91.0.0/255.255.0.0 +152.113.0.0/255.255.0.0 +152.119.0.0/255.251.0.0 +152.140.0.0/255.253.0.0 +152.160.124.0/255.255.255.0 +152.165.0.0/255.255.0.0 +152.229.0.0/255.255.0.0 +153.6.0.0/255.253.0.0 +153.12.0.0/255.255.0.0 +153.21.0.0/255.244.0.0 +155.5.0.0/255.253.0.0 +155.35.0.0/255.255.0.0 +155.39.0.0/255.255.0.0 +155.50.0.0/255.255.0.0 +155.61.0.0/255.255.0.0 +155.64.0.0/255.255.0.0 +155.74.0.0/255.251.0.0 +155.80.0.0/255.253.0.0 +155.96.0.0/255.255.0.0 +155.103.0.0/255.255.0.0 +155.149.0.0/255.255.0.0 +155.150.0.0/255.255.0.0 +155.178.0.0/255.255.0.0 +155.187.0.0/255.255.0.0 +155.201.0.0/255.255.0.0 +155.206.0.0/255.255.0.0 +155.213.0.0/255.254.0.0 +155.215.0.0/255.255.0.0 +155.216.0.0/255.254.0.0 +155.218.0.0/255.255.0.0 +155.219.0.0/255.254.0.0 +155.221.0.0/255.255.0.0 +155.228.0.0/255.255.0.0 +155.229.0.0/255.255.0.0 +155.234.0.0/255.255.0.0 +155.251.0.0/255.255.0.0 +156.3.0.0/255.255.0.0 +156.9.0.0/255.255.0.0 +156.14.0.0/255.255.0.0 +156.18.0.0/255.255.0.0 +156.20.0.0/255.255.0.0 +156.25.0.0/255.255.0.0 +156.27.0.0/255.255.0.0 +156.33.0.0/255.255.0.0 +156.40.0.0/255.253.0.0 +156.44.0.0/255.255.0.0 +156.46.8.0/255.255.255.128 +156.46.212.0/255.255.254.248 +156.47.0.0/255.255.0.0 +156.60.0.0/255.255.0.0 +156.63.0.0/255.255.0.0 +156.79.0.0/255.255.0.0 +156.82.0.0/255.255.0.0 +156.83.0.0/255.255.0.0 +156.98.0.0/255.254.0.0 +156.112.0.0/255.254.0.0 +156.117.0.0/255.255.0.0 +156.118.0.0/255.255.0.0 +156.119.0.0/255.242.0.0 +157.23.0.0/255.255.0.0 +157.26.0.0/255.255.0.0 +157.28.0.0/255.254.0.0 +157.54.0.0/255.249.0.0 +157.68.0.0/255.255.0.0 +157.79.0.0/255.255.0.0 +157.81.0.0/255.255.0.0 +157.87.0.0/255.255.0.0 +157.103.0.0/255.255.0.0 +157.109.0.0/255.255.0.0 +157.120.0.0/255.255.0.0 +157.121.0.0/255.255.0.0 +157.136.0.0/255.255.0.0 +157.141.0.0/255.255.0.0 +157.146.0.0/255.255.0.0 +157.150.0.0/255.255.0.0 +157.153.0.0/255.255.0.0 +157.159.0.0/255.255.0.0 +157.164.0.0/255.255.0.0 +157.166.0.0/255.255.0.0 +157.169.0.0/255.255.0.0 +157.170.0.0/255.255.0.0 +157.189.0.0/255.255.0.0 +157.202.0.0/255.255.0.0 +157.217.0.0/255.255.0.0 +157.224.0.0/255.255.0.0 +158.1.0.0/255.254.0.0 +158.4.0.0/255.254.0.0 +158.6.0.0/255.255.0.0 +158.7.0.0/255.254.0.0 +158.9.0.0/255.255.0.0 +158.12.0.0/255.255.0.0 +158.13.0.0/255.254.0.0 +158.15.0.0/255.255.0.0 +158.16.0.0/255.254.0.0 +158.18.0.0/255.255.0.0 +158.19.0.0/255.254.0.0 +158.63.0.0/255.255.0.0 +158.66.0.0/255.255.0.0 +158.70.0.0/255.251.0.0 +158.111.0.0/255.255.0.0 +158.116.0.0/255.255.0.0 +158.123.0.0/255.255.0.0 +158.166.0.0/255.253.0.0 +158.169.0.0/255.255.0.0 +158.183.0.0/255.255.0.0 +158.185.0.0/255.252.0.0 +158.219.0.0/255.255.0.0 +158.236.0.0/255.253.0.0 +158.240.0.0/255.255.0.0 +158.241.0.0/255.255.0.0 +158.242.0.0/255.255.0.0 +159.1.0.0/255.255.0.0 +159.6.0.0/255.255.0.0 +159.16.0.0/255.255.0.255 +159.22.0.0/255.255.0.0 +159.26.0.0/255.255.0.0 +159.31.0.0/255.255.0.0 +159.33.0.0/255.255.0.0 +159.36.0.0/255.255.0.0 +159.46.0.0/255.255.0.0 +159.56.0.0/255.255.0.0 +159.77.0.0/255.255.0.0 +159.84.0.0/255.255.0.0 +159.87.0.0/255.255.0.0 +159.106.0.0/255.255.0.0 +159.119.0.0/255.255.0.0 +159.121.0.0/255.255.0.0 +159.142.0.0/255.255.0.0 +159.145.0.0/255.255.0.0 +159.147.0.0/255.255.0.0 +159.150.0.0/255.255.0.0 +159.153.0.0/255.255.0.0 +159.157.0.0/255.255.0.0 +159.169.0.0/255.255.0.0 +159.181.0.0/255.255.0.0 +159.189.0.0/255.255.0.0 +159.199.0.0/255.255.0.0 +159.238.0.0/255.255.0.0 +159.247.0.0/255.255.0.0 +160.1.0.0/255.252.0.0 +160.25.0.0/255.255.0.0 +160.33.0.0/255.254.0.0 +160.38.0.0/255.255.0.0 +160.53.0.0/255.255.0.0 +160.67.0.0/255.254.0.0 +160.91.0.0/255.255.0.0 +160.103.0.0/255.254.0.0 +160.130.0.0/255.254.0.0 +160.134.0.0/255.255.0.0 +160.135.0.0/255.255.0.0 +160.138.0.0/255.254.0.0 +160.141.0.0/255.255.0.0 +160.143.0.0/255.255.0.0 +160.145.0.0/255.254.0.0 +160.149.0.0/255.255.0.0 +160.150.0.0/255.255.0.0 +160.151.0.0/255.255.0.0 +160.153.0.0/255.255.0.0 +160.187.0.0/255.255.0.0 +160.196.0.0/255.255.0.0 +160.205.0.0/255.255.0.0 +160.208.0.0/255.255.0.0 +160.228.0.0/255.255.0.0 +160.232.0.0/255.255.0.0 +161.3.0.0/255.255.0.0 +161.7.0.0/255.255.0.0 +161.11.0.0/255.255.0.0 +161.44.0.0/255.255.0.0 +161.55.0.0/255.255.0.0 +161.58.227.32/255.255.255.248 +161.80.0.0/255.255.0.0 +161.83.0.0/255.246.0.0 +161.104.0.0/255.254.0.0 +161.106.0.0/255.255.0.0 +161.108.0.0/255.255.0.0 +161.114.0.0/255.255.0.0 +161.119.0.0/255.255.0.0 +161.203.0.0/255.255.0.0 +161.214.0.0/255.255.0.0 +161.240.0.0/255.255.0.0 +162.1.0.0/255.255.0.0 +162.2.0.0/255.255.0.0 +162.23.0.0/255.255.0.0 +162.24.0.0/255.255.0.0 +162.35.0.0/255.255.0.0 +162.38.0.0/255.255.0.0 +162.49.0.0/255.255.0.0 +162.55.0.0/255.255.0.0 +162.58.0.0/255.255.0.0 +162.59.0.0/255.255.0.0 +162.62.0.0/255.255.0.0 +162.67.0.0/255.253.0.0 +162.70.0.0/255.255.0.0 +162.75.0.0/255.255.0.0 +162.77.0.0/255.255.0.0 +162.79.0.0/255.255.0.0 +162.80.0.0/255.255.0.0 +162.82.0.0/255.255.0.0 +162.90.0.0/255.255.0.0 +162.94.0.0/255.255.0.0 +162.108.0.0/255.255.0.0 +162.114.0.0/255.255.0.0 +162.127.0.0/255.255.0.0 +162.133.0.0/255.255.0.0 +162.138.0.0/255.255.0.0 +162.140.0.0/255.255.0.0 +162.143.0.0/255.255.0.0 +163.9.0.0/255.255.0.0 +163.29.0.0/255.255.0.0 +163.33.0.0/255.255.0.0 +163.150.0.0/255.255.0.0 +163.173.0.0/255.255.0.0 +163.174.0.0/255.255.0.0 +163.191.0.0/255.255.0.0 +163.244.0.0/255.255.0.0 +163.249.0.0/255.255.0.0 +163.251.0.0/255.255.0.0 +164.13.0.0/255.255.0.0 +164.49.0.0/255.255.0.0 +164.54.0.0/255.254.0.0 +164.62.0.0/255.255.0.0 +164.64.0.0/255.255.0.0 +164.66.0.0/255.255.0.0 +164.81.0.0/255.255.0.0 +164.82.0.0/255.255.0.0 +164.86.0.0/255.255.0.0 +164.87.0.0/255.255.0.0 +164.105.0.0/255.255.0.0 +164.110.0.0/255.255.0.0 +164.112.0.0/255.255.0.0 +164.119.0.0/255.255.0.0 +164.122.0.0/255.255.0.0 +164.128.50.32/255.255.255.248 +164.128.69.96/255.255.255.224 +164.133.0.0/255.255.0.0 +164.141.0.0/255.255.0.0 +164.143.248.0/255.255.252.0 +164.144.0.0/255.255.0.0 +164.154.0.0/255.255.0.0 +164.156.0.0/255.255.0.0 +164.157.0.0/255.255.0.0 +164.159.0.0/255.255.0.0 +164.164.0.0/255.255.0.0 +164.165.0.0/255.255.0.0 +164.195.0.0/255.255.0.0 +164.198.0.0/255.255.0.0 +164.214.0.0/255.255.0.0 +164.217.0.0/255.254.0.0 +164.220.0.0/255.254.0.0 +164.224.0.0/255.254.0.0 +165.13.0.0/255.255.0.0 +165.74.0.0/255.255.0.0 +165.105.0.0/255.255.0.0 +165.110.0.0/255.255.0.0 +165.119.0.0/255.255.0.0 +165.121.245.96/255.255.255.248 +165.121.254.240/255.255.255.248 +165.127.0.0/255.255.0.0 +165.135.0.0/255.255.0.0 +165.142.0.0/255.255.0.0 +165.151.0.0/255.255.0.0 +165.153.0.0/255.255.0.0 +165.163.0.0/255.255.0.0 +165.170.0.0/255.255.0.0 +165.187.0.0/255.255.0.0 +165.189.0.0/255.255.0.0 +165.191.0.0/255.255.0.0 +165.197.0.0/255.254.0.0 +165.221.0.0/255.255.0.0 +165.224.0.0/255.255.0.0 +165.234.0.0/255.255.0.0 +165.239.0.0/255.255.0.0 +165.247.197.72/255.255.255.248 +165.247.198.128/255.255.255.248 +165.252.0.0/255.255.0.0 +166.30.0.0/255.255.0.0 +166.64.0.0/255.255.0.0 +166.77.0.0/255.255.0.0 +166.96.0.0/255.255.0.0 +166.112.0.0/255.255.0.0 +166.121.0.0/255.255.0.0 +166.123.0.0/255.255.0.0 +167.7.0.0/255.255.0.0 +167.11.0.0/255.255.0.0 +167.13.0.0/255.255.0.0 +167.21.0.0/255.255.0.0 +167.27.0.0/255.255.0.0 +167.44.0.0/255.255.0.0 +167.68.0.0/255.255.0.0 +167.72.0.0/255.255.0.0 +167.102.0.0/255.255.0.0 +167.131.0.0/255.255.0.0 +167.141.0.0/255.255.0.0 +167.144.0.0/255.255.0.0 +167.154.0.0/255.255.0.0 +167.158.0.0/255.255.0.0 +167.167.0.0/255.255.0.0 +167.192.0.0/255.247.0.0 +167.206.48.160/255.255.255.248 +167.206.49.0/255.255.255.240 +167.206.67.32/255.255.255.240 +167.206.84.64/255.255.255.192 +167.206.144.88/255.255.255.248 +167.206.174.240/255.255.255.248 +167.218.0.0/255.255.0.0 +167.220.0.0/255.255.0.0 +167.229.0.0/255.255.0.0 +167.240.0.0/255.255.0.0 +167.254.0.0/255.255.0.0 +168.8.0.0/255.232.0.0 +168.32.0.0/255.227.0.0 +168.68.0.0/255.255.0.0 +168.71.0.0/255.255.0.0 +168.82.0.0/255.255.0.0 +168.85.0.0/255.254.0.0 +168.102.0.0/255.255.0.0 +168.127.0.0/255.255.0.0 +168.138.0.0/255.255.0.0 +168.161.0.0/255.255.0.0 +168.166.0.0/255.255.0.0 +168.177.0.0/255.252.0.0 +168.215.140.0/255.255.254.0 +168.242.0.0/255.255.0.0 +169.2.0.0/255.254.0.0 +169.130.0.0/255.255.0.0 +169.134.0.0/255.255.0.0 +169.135.0.0/255.255.0.0 +169.199.0.0/255.255.0.0 +169.203.0.0/255.255.0.0 +169.207.190.112/255.255.255.240 +169.228.0.0/255.246.0.0 +169.245.0.0/255.249.0.0 +169.252.0.0/255.254.0.0 +170.3.0.0/255.255.0.0 +170.47.0.0/255.255.0.0 +170.94.0.0/255.255.0.0 +170.99.0.0/255.255.0.0 +170.104.0.0/255.255.0.0 +170.110.0.0/255.255.0.0 +170.123.0.0/255.255.0.0 +170.141.0.0/255.253.0.0 +170.144.0.0/255.255.0.0 +170.154.0.0/255.255.0.0 +170.156.0.0/255.255.0.0 +170.190.0.0/255.255.0.0 +170.209.0.0/255.255.0.0 +170.214.0.0/255.255.0.0 +170.216.0.0/255.255.0.0 +170.248.0.0/255.255.0.0 +170.251.0.0/255.254.0.0 +192.5.8.0/255.255.255.0 +192.5.18.0/255.255.255.0 +192.5.21.0/255.255.251.0 +192.5.41.0/255.255.255.0 +192.5.142.0/255.255.255.0 +192.5.147.0/255.255.255.0 +192.5.170.0/255.255.224.0 +192.5.214.0/255.255.255.0 +192.6.144.0/255.255.144.0 +192.9.0.0/255.255.56.0 +192.9.201.0/255.255.202.0 +192.11.0.0/255.255.0.0 +192.12.9.0/255.255.255.0 +192.12.62.0/255.255.255.0 +192.12.64.0/255.255.255.0 +192.12.65.0/255.255.253.0 +192.12.74.0/255.255.255.0 +192.12.139.0/255.255.255.0 +192.16.180.0/255.255.255.0 +192.18.0.0/255.255.61.0 +192.18.196.0/255.255.196.0 +192.25.56.0/255.255.244.0 +192.25.71.0/255.255.249.0 +192.25.78.0/255.255.253.0 +192.25.81.0/255.255.236.0 +192.25.101.0/255.255.101.0 +192.26.7.0/255.255.255.0 +192.26.48.0/255.255.255.0 +192.26.89.0/255.255.255.0 +192.26.122.0/255.255.255.0 +192.26.154.0/255.255.236.0 +192.26.194.0/255.255.240.0 +192.26.213.0/255.255.255.0 +192.26.215.0/255.255.240.0 +192.28.110.0/255.255.226.0 +192.29.0.0/255.254.0.0 +192.31.8.0/255.255.255.0 +192.31.10.0/255.255.252.0 +192.31.16.0/255.255.251.0 +192.31.29.0/255.255.255.0 +192.31.38.0/255.255.255.0 +192.31.86.0/255.255.255.0 +192.31.106.0/255.255.255.0 +192.31.225.0/255.255.255.0 +192.31.229.0/255.255.255.0 +192.33.5.0/255.255.251.0 +192.33.13.0/255.255.255.0 +192.33.131.0/255.255.255.0 +192.33.158.0/255.255.255.0 +192.33.182.0/255.255.255.0 +192.33.185.0/255.255.255.0 +192.33.241.0/255.255.246.0 +192.34.0.0/255.255.0.0 +192.35.37.0/255.255.255.0 +192.35.74.0/255.255.253.0 +192.35.128.0/255.255.254.0 +192.35.204.0/255.255.255.0 +192.35.208.0/255.255.255.0 +192.35.230.0/255.255.255.0 +192.35.232.0/255.255.255.0 +192.36.20.0/255.255.255.0 +192.40.0.0/255.255.0.0 +192.41.146.0/255.255.255.0 +192.41.213.0/255.255.255.0 +192.41.221.0/255.255.255.0 +192.41.246.0/255.255.255.0 +192.41.250.0/255.255.250.0 +192.42.2.0/255.255.255.0 +192.42.60.0/255.255.253.0 +192.42.66.0/255.255.255.0 +192.42.148.0/255.255.253.0 +192.42.244.0/255.255.255.0 +192.42.249.0/255.255.255.0 +192.43.174.0/255.255.255.0 +192.43.189.0/255.255.255.0 +192.43.191.0/255.255.255.0 +192.46.0.0/255.255.0.0 +192.47.250.0/255.255.253.0 +192.48.123.0/255.255.255.0 +192.48.238.0/255.255.255.0 +192.48.242.0/255.255.255.0 +192.48.249.0/255.255.254.0 +192.52.0.0/255.255.205.0 +192.52.51.0/255.255.246.0 +192.52.72.0/255.255.254.0 +192.52.151.0/255.255.255.0 +192.52.171.0/255.255.250.0 +192.52.239.0/255.255.255.0 +192.52.246.0/255.255.255.0 +192.54.52.0/255.255.255.0 +192.54.74.0/255.255.255.0 +192.54.105.0/255.255.254.0 +192.54.122.0/255.255.255.0 +192.54.138.0/255.255.255.0 +192.54.143.0/255.255.255.0 +192.54.205.0/255.255.251.0 +192.54.221.0/255.255.255.0 +192.54.240.0/255.255.255.0 +192.55.32.0/255.255.206.0 +192.55.135.0/255.255.255.0 +192.55.223.0/255.255.255.0 +192.55.232.0/255.255.255.0 +192.56.0.0/255.255.0.0 +192.58.4.0/255.255.251.0 +192.58.28.0/255.255.248.0 +192.58.102.0/255.255.251.0 +192.58.149.0/255.255.255.0 +192.58.155.0/255.255.255.0 +192.58.181.0/255.255.255.0 +192.58.200.0/255.255.252.0 +192.58.206.0/255.255.251.0 +192.58.217.0/255.255.255.0 +192.58.247.0/255.255.255.0 +192.65.71.0/255.255.255.0 +192.65.80.0/255.255.255.0 +192.65.130.0/255.255.255.0 +192.65.137.0/255.255.255.0 +192.65.177.0/255.255.255.0 +192.65.204.0/255.255.249.0 +192.65.214.0/255.255.255.0 +192.65.216.0/255.255.255.0 +192.65.218.0/255.255.255.0 +192.65.220.0/255.255.255.0 +192.65.253.0/255.255.255.0 +192.67.12.0/255.255.255.0 +192.67.105.0/255.255.254.0 +192.67.158.0/255.255.255.0 +192.67.166.0/255.255.255.0 +192.67.170.0/255.255.255.0 +192.67.171.0/255.255.255.0 +192.67.209.0/255.255.255.0 +192.67.210.0/255.255.255.0 +192.67.211.0/255.255.255.0 +192.67.214.0/255.255.255.0 +192.67.215.0/255.255.255.0 +192.67.216.0/255.255.255.0 +192.67.249.0/255.255.255.0 +192.68.18.0/255.255.255.0 +192.68.31.0/255.255.236.0 +192.68.75.0/255.255.255.0 +192.68.132.0/255.255.255.0 +192.68.154.0/255.255.255.0 +192.68.157.0/255.255.255.0 +192.68.202.0/255.255.255.0 +192.70.75.0/255.255.255.0 +192.70.77.0/255.255.255.0 +192.70.118.0/255.255.255.0 +192.70.119.0/255.255.255.0 +192.70.175.0/255.255.255.0 +192.70.189.0/255.255.254.0 +192.71.128.0/255.255.255.0 +192.72.1.0/255.255.254.0 +192.72.3.0/255.255.6.0 +192.73.22.0/255.255.255.0 +192.73.56.0/255.255.255.0 +192.73.213.0/255.255.255.0 +192.73.214.0/255.255.255.0 +192.73.215.0/255.255.255.0 +192.73.224.0/255.255.255.0 +192.73.229.0/255.255.255.0 +192.75.19.0/255.255.252.0 +192.75.85.0/255.255.253.0 +192.75.91.0/255.255.253.0 +192.75.102.0/255.255.254.0 +192.75.143.0/255.255.255.0 +192.75.183.0/255.255.255.0 +192.75.212.0/255.255.255.0 +192.76.138.0/255.255.255.0 +192.76.148.0/255.255.255.0 +192.77.17.0/255.255.255.0 +192.77.25.0/255.255.255.0 +192.78.1.0/255.255.69.0 +192.78.188.0/255.255.255.0 +192.80.48.0/255.255.255.0 +192.82.113.0/255.255.255.0 +192.82.140.0/255.255.255.0 +192.82.151.0/255.255.255.0 +192.82.238.0/255.255.255.0 +192.83.104.0/255.255.255.0 +192.83.200.0/255.255.255.0 +192.83.236.0/255.255.255.0 +192.83.238.0/255.255.255.0 +192.83.251.0/255.255.255.0 +192.84.74.0/255.255.255.0 +192.84.125.0/255.255.255.0 +192.84.170.0/255.255.255.0 +192.84.171.0/255.255.255.0 +192.84.208.0/255.255.255.0 +192.84.215.0/255.255.255.0 +192.84.220.0/255.255.255.0 +192.84.237.0/255.255.254.0 +192.86.19.0/255.255.252.0 +192.86.24.0/255.255.255.0 +192.86.110.0/255.255.255.0 +192.86.128.0/255.255.255.0 +192.86.140.0/255.255.246.0 +192.86.170.0/255.255.176.0 +192.87.35.0/255.255.255.0 +192.87.77.0/255.255.255.0 +192.87.83.0/255.255.255.0 +192.87.88.0/255.255.255.0 +192.87.198.0/255.255.255.0 +192.87.200.0/255.255.248.0 +192.88.5.0/255.255.255.0 +192.88.51.0/255.255.227.0 +192.88.87.0/255.255.255.0 +192.88.96.0/255.255.255.0 +192.88.136.0/255.255.255.0 +192.89.15.176/255.255.255.240 +192.89.43.128/255.255.255.128 +192.89.214.192/255.255.255.192 +192.91.60.0/255.255.184.0 +192.91.146.0/255.255.226.0 +192.91.250.0/255.255.255.0 +192.92.14.0/255.255.255.0 +192.92.89.0/255.255.255.0 +192.92.91.0/255.255.255.0 +192.92.94.0/255.255.255.0 +192.93.124.0/255.255.255.0 +192.93.140.0/255.255.255.0 +192.93.205.0/255.255.255.0 +192.94.25.0/255.255.255.0 +192.94.42.0/255.255.253.0 +192.94.62.0/255.255.253.0 +192.94.74.0/255.255.255.0 +192.94.81.0/255.255.236.0 +192.94.164.0/255.255.255.0 +192.94.209.0/255.255.255.0 +192.94.219.0/255.255.255.0 +192.100.30.0/255.255.255.0 +192.100.51.0/255.255.255.0 +192.100.69.0/255.255.254.0 +192.100.95.0/255.255.255.0 +192.100.100.0/255.255.255.0 +192.100.145.0/255.255.255.0 +192.100.146.0/255.255.255.0 +192.101.97.0/255.255.255.0 +192.101.100.0/255.255.246.0 +192.101.119.0/255.255.255.0 +192.101.134.0/255.255.255.0 +192.101.169.0/255.255.255.0 +192.101.172.0/255.255.255.0 +192.101.190.0/255.255.255.0 +192.101.193.0/255.255.255.0 +192.101.197.0/255.255.254.0 +192.101.252.0/255.255.255.0 +192.102.86.0/255.255.254.0 +192.102.88.0/255.255.255.0 +192.102.94.0/255.255.255.0 +192.102.182.0/255.255.226.0 +192.102.241.0/255.255.255.0 +192.102.250.0/255.255.254.0 +192.104.19.0/255.255.255.0 +192.104.46.0/255.255.254.0 +192.104.54.0/255.255.255.0 +192.104.158.0/255.255.255.0 +192.106.144.0/255.255.252.0 +192.106.154.0/255.255.255.0 +192.106.196.0/255.255.254.0 +192.107.9.0/255.255.255.0 +192.107.116.0/255.255.255.0 +192.107.165.0/255.255.255.0 +192.107.175.0/255.255.255.0 +192.107.188.0/255.255.255.0 +192.107.221.0/255.255.255.0 +192.107.234.0/255.255.255.0 +192.108.94.0/255.255.255.0 +192.108.115.0/255.255.251.0 +192.108.124.0/255.255.255.0 +192.108.215.0/255.255.255.0 +192.108.231.0/255.255.255.0 +192.108.235.0/255.255.255.0 +192.108.244.0/255.255.255.0 +192.109.36.0/255.255.255.0 +192.109.78.0/255.255.255.0 +192.109.81.0/255.255.255.0 +192.109.206.0/255.255.255.0 +192.109.241.0/255.255.255.0 +192.111.32.0/255.255.255.0 +192.111.52.0/255.255.255.0 +192.111.86.0/255.255.255.0 +192.111.111.0/255.255.255.0 +192.111.123.0/255.255.255.0 +192.111.223.0/255.255.255.0 +192.111.228.0/255.255.255.0 +192.112.68.0/255.255.255.0 +192.112.97.0/255.255.255.0 +192.112.183.0/255.255.255.0 +192.112.211.0/255.255.255.0 +192.114.170.48/255.255.255.240 +192.117.128.64/255.255.255.192 +192.118.44.0/255.255.252.0 +192.120.193.0/255.255.255.0 +192.121.27.0/255.255.255.0 +192.121.30.0/255.255.255.0 +192.121.83.0/255.255.255.0 +192.121.228.0/255.255.255.0 +192.122.176.0/255.255.255.0 +192.122.213.0/255.255.255.0 +192.124.9.0/255.255.255.0 +192.124.33.0/255.255.255.0 +192.124.117.0/255.255.255.0 +192.124.119.0/255.255.255.0 +192.124.142.0/255.255.255.0 +192.124.150.0/255.255.255.0 +192.124.152.0/255.255.255.0 +192.124.164.0/255.255.255.0 +192.124.244.0/255.255.255.0 +192.129.62.0/255.255.255.0 +192.129.63.0/255.255.255.0 +192.129.65.0/255.255.255.0 +192.129.69.0/255.255.255.0 +192.129.86.0/255.255.255.0 +192.129.101.0/255.255.246.0 +192.130.76.0/255.255.255.192 +192.131.1.0/255.255.255.0 +192.131.93.0/255.255.255.0 +192.132.72.0/255.255.252.0 +192.132.79.0/255.255.255.0 +192.132.83.0/255.255.255.0 +192.132.84.0/255.255.255.0 +192.132.88.0/255.255.255.0 +192.132.103.0/255.255.255.0 +192.132.210.0/255.255.255.0 +192.133.41.0/255.255.255.0 +192.133.61.0/255.255.255.0 +192.133.70.0/255.255.255.0 +192.133.125.0/255.255.255.0 +192.134.15.0/255.255.254.0 +192.134.27.0/255.255.255.0 +192.134.100.0/255.255.255.0 +192.134.105.0/255.255.255.0 +192.134.107.0/255.255.255.0 +192.134.113.0/255.255.255.0 +192.134.126.0/255.255.252.0 +192.134.144.0/255.255.255.0 +192.134.146.0/255.255.255.0 +192.134.147.0/255.255.255.0 +192.134.149.0/255.255.255.0 +192.134.150.0/255.255.255.0 +192.134.151.0/255.255.255.0 +192.134.152.0/255.255.255.0 +192.134.153.0/255.255.255.0 +192.134.154.0/255.255.255.0 +192.134.155.0/255.255.255.0 +192.134.156.0/255.255.255.0 +192.134.157.0/255.255.255.0 +192.134.184.0/255.255.255.0 +192.134.208.0/255.255.255.0 +192.134.216.0/255.255.255.0 +192.134.220.0/255.255.253.0 +192.135.67.0/255.255.255.0 +192.135.78.0/255.255.255.0 +192.135.86.0/255.255.253.0 +192.135.122.0/255.255.255.0 +192.135.176.0/255.255.255.0 +192.135.177.0/255.255.255.0 +192.135.182.0/255.255.255.0 +192.136.12.0/255.255.255.0 +192.136.62.0/255.255.255.0 +192.136.126.0/255.255.254.0 +192.136.128.0/255.255.255.0 +192.136.130.0/255.255.255.0 +192.136.134.0/255.255.255.0 +192.137.0.0/255.255.0.0 +192.138.100.0/255.255.255.0 +192.138.118.0/255.255.246.0 +192.138.138.0/255.255.246.0 +192.138.169.0/255.255.255.0 +192.138.181.0/255.255.255.0 +192.139.8.0/255.255.255.0 +192.139.74.0/255.255.255.0 +192.139.209.0/255.255.252.0 +192.139.218.0/255.255.255.0 +192.139.250.0/255.255.255.0 +192.146.103.0/255.255.255.0 +192.146.104.0/255.255.255.0 +192.146.142.0/255.255.255.0 +192.146.205.0/255.255.255.0 +192.146.215.0/255.255.254.0 +192.147.14.0/255.255.254.0 +192.147.82.0/255.255.255.0 +192.147.117.0/255.255.232.0 +192.147.180.0/255.255.242.0 +192.147.195.0/255.255.241.0 +192.147.237.0/255.255.255.0 +192.147.251.0/255.255.255.0 +192.148.172.0/255.255.255.0 +192.148.195.0/255.255.255.0 +192.148.197.0/255.255.255.0 +192.149.16.0/255.255.255.0 +192.149.36.0/255.255.255.0 +192.149.56.0/255.255.255.0 +192.149.120.0/255.255.255.0 +192.149.213.0/255.255.255.0 +192.149.215.0/255.255.252.0 +192.149.229.0/255.255.255.0 +192.150.1.0/255.255.232.0 +192.150.76.0/255.255.255.0 +192.150.107.0/255.255.255.0 +192.150.122.0/255.255.255.0 +192.150.143.0/255.255.255.0 +192.150.202.0/255.255.255.0 +192.150.204.0/255.255.255.0 +192.151.1.0/255.255.172.0 +192.151.100.0/255.255.255.0 +192.151.111.0/255.255.238.0 +192.152.3.0/255.255.255.0 +192.152.7.0/255.255.255.0 +192.152.10.0/255.255.255.0 +192.152.61.0/255.255.255.0 +192.152.63.0/255.255.255.0 +192.152.120.0/255.255.255.0 +192.152.127.0/255.255.255.0 +192.152.139.0/255.255.255.0 +192.152.145.0/255.255.255.0 +192.152.206.0/255.255.255.0 +192.152.220.0/255.255.254.0 +192.152.246.0/255.255.255.0 +192.153.16.0/255.255.255.0 +192.153.133.0/255.255.255.0 +192.153.135.0/255.255.255.0 +192.153.137.0/255.255.255.0 +192.153.140.0/255.255.255.0 +192.153.141.0/255.255.255.0 +192.153.149.0/255.255.255.0 +192.153.221.0/255.255.233.0 +192.154.36.0/255.255.255.0 +192.154.40.0/255.255.255.0 +192.154.54.0/255.255.255.0 +192.155.1.0/255.255.250.0 +192.156.81.0/255.255.255.0 +192.156.82.0/255.255.255.0 +192.156.133.0/255.255.255.0 +192.156.155.0/255.255.254.0 +192.156.198.0/255.255.255.0 +192.156.206.0/255.255.255.0 +192.156.219.0/255.255.254.0 +192.156.222.0/255.255.254.0 +192.157.136.0/255.255.255.0 +192.157.171.0/255.255.255.0 +192.157.176.0/255.255.255.0 +192.157.186.0/255.255.255.0 +192.158.1.0/255.255.254.0 +192.159.11.0/255.255.255.0 +192.160.16.0/255.255.255.0 +192.160.34.0/255.255.255.0 +192.160.40.0/255.255.255.0 +192.160.95.0/255.255.254.0 +192.160.108.0/255.255.255.0 +192.160.110.0/255.255.255.0 +192.163.1.0/255.255.236.0 +192.165.16.0/255.255.255.0 +192.165.17.0/255.255.255.0 +192.165.18.0/255.255.255.0 +192.165.19.0/255.255.255.0 +192.165.20.0/255.255.255.0 +192.165.21.0/255.255.255.0 +192.165.22.0/255.255.254.0 +192.165.24.0/255.255.255.0 +192.165.25.0/255.255.255.0 +192.165.26.0/255.255.255.0 +192.165.67.0/255.255.255.0 +192.165.85.0/255.255.255.0 +192.165.113.0/255.255.255.0 +192.165.127.0/255.255.255.0 +192.165.208.0/255.255.240.0 +192.165.242.0/255.255.255.0 +192.166.84.0/255.255.244.0 +192.166.156.0/255.255.255.0 +192.167.3.0/255.255.255.0 +192.170.0.0/255.255.127.0 +192.171.1.0/255.255.251.0 +192.172.3.0/255.255.255.0 +192.172.4.0/255.255.255.0 +192.172.13.0/255.255.255.0 +192.172.16.0/255.255.255.0 +192.172.17.0/255.255.255.0 +192.175.8.0/255.255.251.0 +192.176.245.0/255.255.255.0 +192.187.138.0/255.255.255.0 +192.188.18.0/255.255.255.0 +192.188.106.0/255.255.255.0 +192.188.114.0/255.255.255.0 +192.188.115.0/255.255.255.0 +192.188.159.0/255.255.251.0 +192.188.186.0/255.255.255.0 +192.189.52.0/255.255.255.0 +192.189.102.0/255.255.255.0 +192.189.188.0/255.255.254.0 +192.189.206.0/255.255.255.0 +192.189.226.0/255.255.255.0 +192.189.234.0/255.255.252.0 +192.190.55.0/255.255.253.0 +192.190.61.0/255.255.255.0 +192.190.116.0/255.255.254.0 +192.190.119.0/255.255.255.0 +192.190.244.0/255.255.255.0 +192.194.225.0/255.255.255.0 +192.195.37.0/255.255.255.0 +192.195.44.0/255.255.244.0 +192.195.63.0/255.255.251.0 +192.195.108.0/255.255.255.0 +192.195.204.0/255.255.255.0 +192.195.246.0/255.255.255.0 +192.197.57.0/255.255.255.0 +192.197.167.0/255.255.255.0 +192.197.215.0/255.255.255.0 +192.197.233.0/255.255.246.0 +192.198.64.0/255.255.241.0 +192.203.43.0/255.255.255.0 +192.203.150.0/255.255.255.0 +192.203.182.0/255.255.252.0 +192.203.207.0/255.255.255.0 +192.203.235.0/255.255.255.0 +192.206.20.0/255.255.255.0 +192.206.38.0/255.255.255.0 +192.206.40.0/255.255.255.0 +192.206.51.0/255.255.255.0 +192.206.109.0/255.255.255.0 +192.206.180.0/255.255.255.0 +192.206.181.0/255.255.255.0 +192.206.184.0/255.255.255.0 +192.207.1.0/255.255.254.0 +192.207.24.0/255.255.255.0 +192.207.33.0/255.255.255.0 +192.207.113.0/255.255.255.0 +192.207.123.0/255.255.255.0 +192.207.156.0/255.255.253.0 +192.207.161.0/255.255.255.0 +192.207.185.0/255.255.255.0 +192.207.189.0/255.255.255.0 +192.207.197.0/255.255.254.0 +192.207.216.0/255.255.255.0 +192.207.240.0/255.255.254.0 +192.208.32.0/255.255.236.0 +192.209.32.0/255.255.226.0 +192.215.175.0/255.255.255.0 +192.215.248.0/255.255.255.0 +192.215.249.0/255.255.255.0 +192.216.166.0/255.255.255.0 +192.216.222.0/255.255.254.0 +192.222.64.0/255.255.234.0 +192.222.86.0/255.255.255.0 +192.222.87.0/255.255.242.0 +192.227.16.0/255.255.240.0 +192.228.64.0/255.255.241.0 +192.228.195.0/255.255.255.0 +192.230.0.0/255.255.240.0 +192.231.8.0/255.255.255.0 +192.231.10.0/255.255.255.0 +192.231.12.0/255.255.254.0 +192.231.17.0/255.255.246.0 +192.231.30.0/255.255.255.0 +192.231.58.0/255.255.255.0 +192.231.59.0/255.255.255.0 +192.231.128.0/255.255.255.0 +192.231.168.0/255.255.255.0 +192.231.212.0/255.255.255.0 +192.233.54.0/255.255.255.0 +192.234.35.0/255.255.255.0 +192.234.53.0/255.255.254.0 +192.234.93.0/255.255.255.0 +192.234.156.0/255.255.255.0 +192.234.163.0/255.255.254.0 +192.234.183.0/255.255.255.0 +192.234.239.0/255.255.255.0 +192.234.246.0/255.255.255.0 +192.239.92.0/255.255.255.0 +192.243.128.0/255.255.171.0 +192.245.37.0/255.255.251.0 +192.245.82.0/255.255.252.0 +192.245.97.0/255.255.255.0 +192.245.138.0/255.255.255.0 +192.245.179.0/255.255.255.0 +192.245.197.0/255.255.246.0 +192.245.210.0/255.255.248.0 +192.245.225.0/255.255.255.0 +192.246.40.0/255.255.255.0 +192.246.59.0/255.255.255.0 +192.246.60.0/255.255.255.0 +192.246.127.0/255.255.254.0 +192.246.136.0/255.255.255.0 +192.246.238.0/255.255.255.0 +192.251.5.0/255.255.254.0 +192.251.43.0/255.255.253.0 +192.251.66.0/255.255.249.0 +192.251.77.0/255.255.255.0 +192.251.92.0/255.255.255.0 +192.251.132.0/255.255.251.0 +192.251.138.0/255.255.255.0 +193.2.218.0/255.255.254.0 +193.2.220.0/255.255.254.0 +193.3.43.0/255.255.255.0 +193.4.142.0/255.255.255.0 +193.5.61.104/255.255.255.248 +193.5.76.0/255.255.252.0 +193.5.88.0/255.255.248.0 +193.5.176.0/255.255.254.0 +193.5.216.0/255.255.248.0 +193.5.240.0/255.255.246.0 +193.6.115.0/255.255.255.0 +193.6.216.0/255.255.254.0 +193.7.224.0/255.255.224.0 +193.8.88.0/255.255.252.0 +193.8.138.0/255.255.255.0 +193.8.197.0/255.255.255.0 +193.9.1.0/255.255.249.0 +193.9.32.0/255.255.240.0 +193.9.128.0/255.255.236.0 +193.12.124.0/255.255.255.0 +193.13.133.0/255.255.255.0 +193.13.229.0/255.255.255.0 +193.15.85.0/255.255.255.128 +193.15.193.64/255.255.255.224 +193.16.3.0/255.255.255.0 +193.16.212.0/255.255.255.0 +193.16.222.0/255.255.254.0 +193.16.228.0/255.255.255.0 +193.16.230.0/255.255.254.0 +193.16.237.0/255.255.255.0 +193.16.248.0/255.255.254.0 +193.16.252.0/255.255.253.0 +193.17.6.0/255.255.255.0 +193.17.72.0/255.255.255.0 +193.17.80.0/255.255.252.0 +193.17.86.0/255.255.246.0 +193.17.176.0/255.255.254.0 +193.17.180.0/255.255.251.0 +193.17.190.0/255.255.254.0 +193.19.32.0/255.255.224.0 +193.22.20.0/255.255.255.0 +193.22.22.0/255.255.250.0 +193.22.112.0/255.255.252.0 +193.22.144.0/255.255.240.0 +193.22.224.0/255.255.238.0 +193.23.252.0/255.255.255.0 +193.24.40.0/255.255.248.0 +193.24.88.0/255.255.248.0 +193.24.128.0/255.255.192.0 +193.25.48.0/255.255.240.0 +193.26.96.0/255.255.240.0 +193.26.130.0/255.255.255.0 +193.26.192.0/255.255.240.0 +193.26.224.0/255.255.240.0 +193.27.18.0/255.255.255.0 +193.27.24.0/255.255.255.0 +193.27.128.0/255.255.192.0 +193.28.1.0/255.255.255.0 +193.28.32.0/255.255.252.0 +193.28.40.0/255.255.254.0 +193.28.64.0/255.255.248.0 +193.28.104.0/255.255.254.0 +193.28.206.0/255.255.255.0 +193.28.240.0/255.255.246.0 +193.29.4.0/255.255.255.0 +193.29.11.0/255.255.251.0 +193.29.24.0/255.255.255.0 +193.29.30.0/255.255.254.0 +193.29.179.0/255.255.255.0 +193.29.228.0/255.255.254.0 +193.30.28.0/255.255.252.0 +193.30.48.0/255.255.240.0 +193.30.80.0/255.255.248.0 +193.30.130.0/255.255.254.0 +193.31.21.0/255.255.255.0 +193.31.64.0/255.255.240.0 +193.31.96.0/255.255.224.0 +193.31.224.0/255.255.240.0 +193.32.6.0/255.255.254.0 +193.32.28.0/255.255.254.0 +193.32.246.0/255.255.252.0 +193.35.13.0/255.255.255.0 +193.35.158.0/255.255.252.0 +193.36.16.0/255.255.240.0 +193.36.170.0/255.255.254.0 +193.36.192.0/255.255.224.0 +193.37.192.0/255.255.224.0 +193.39.141.0/255.255.255.0 +193.41.200.0/255.255.255.0 +193.42.1.0/255.255.255.0 +193.42.15.0/255.255.255.0 +193.42.134.0/255.255.255.0 +193.42.140.0/255.255.254.0 +193.43.14.0/255.255.255.0 +193.43.20.0/255.255.252.0 +193.43.28.0/255.255.255.0 +193.43.76.0/255.255.255.0 +193.43.80.0/255.255.248.0 +193.43.100.0/255.255.255.0 +193.43.101.0/255.255.255.0 +193.43.106.0/255.255.253.0 +193.43.134.0/255.255.255.0 +193.43.137.0/255.255.255.0 +193.45.190.0/255.255.255.0 +193.45.244.0/255.255.255.0 +193.46.250.0/255.255.255.0 +193.47.64.0/255.255.253.0 +193.47.104.0/255.255.224.0 +193.47.168.0/255.255.240.0 +193.47.230.0/255.255.255.0 +193.47.255.0/255.255.255.0 +193.48.0.0/255.255.255.0 +193.48.2.0/255.255.255.0 +193.48.9.0/255.255.254.0 +193.48.11.0/255.255.255.0 +193.48.12.0/255.255.255.0 +193.48.13.0/255.255.255.0 +193.48.14.0/255.255.255.0 +193.48.15.0/255.255.255.0 +193.48.16.0/255.255.255.0 +193.48.17.0/255.255.255.0 +193.48.18.0/255.255.255.0 +193.48.20.0/255.255.255.0 +193.48.21.0/255.255.254.0 +193.48.23.0/255.255.255.0 +193.48.28.0/255.255.255.0 +193.48.42.0/255.255.255.0 +193.48.67.0/255.255.255.0 +193.48.69.0/255.255.255.0 +193.48.104.0/255.255.255.0 +193.48.107.0/255.255.255.0 +193.48.109.0/255.255.253.0 +193.48.120.0/255.255.246.0 +193.48.141.0/255.255.255.0 +193.48.143.0/255.255.255.0 +193.48.163.0/255.255.255.0 +193.48.168.0/255.255.254.0 +193.48.177.0/255.255.255.0 +193.48.178.0/255.255.255.0 +193.48.183.0/255.255.255.128 +193.48.198.0/255.255.255.0 +193.48.203.0/255.255.255.0 +193.48.205.0/255.255.255.0 +193.48.206.0/255.255.255.0 +193.48.207.0/255.255.255.0 +193.48.212.0/255.255.254.0 +193.48.214.0/255.255.254.0 +193.48.220.0/255.255.255.0 +193.48.223.0/255.255.255.0 +193.48.247.0/255.255.255.128 +193.48.248.0/255.255.255.0 +193.48.250.0/255.255.255.0 +193.48.252.0/255.255.255.0 +193.49.5.0/255.255.255.0 +193.49.15.0/255.255.255.0 +193.49.17.0/255.255.255.0 +193.49.24.0/255.255.255.0 +193.49.27.128/255.255.255.128 +193.49.29.0/255.255.255.0 +193.49.36.0/255.255.254.192 +193.49.39.0/255.255.255.128 +193.49.65.0/255.255.255.192 +193.49.68.0/255.255.252.0 +193.49.104.0/255.255.255.0 +193.49.105.0/255.255.255.0 +193.49.106.0/255.255.255.0 +193.49.107.0/255.255.255.0 +193.49.108.0/255.255.255.0 +193.49.111.0/255.255.255.0 +193.49.114.0/255.255.254.0 +193.49.122.0/255.255.255.0 +193.49.128.0/255.255.255.0 +193.49.129.0/255.255.255.0 +193.49.130.0/255.255.255.0 +193.49.131.0/255.255.255.0 +193.49.138.0/255.255.255.0 +193.49.143.0/255.255.255.0 +193.49.152.0/255.255.255.0 +193.49.157.0/255.255.255.0 +193.49.158.0/255.255.255.0 +193.49.159.0/255.255.255.0 +193.49.160.0/255.255.255.0 +193.49.178.0/255.255.255.0 +193.49.206.0/255.255.255.0 +193.49.216.0/255.255.244.255 +193.49.239.0/255.255.255.0 +193.49.251.0/255.255.255.0 +193.50.5.0/255.255.255.0 +193.50.8.0/255.255.255.0 +193.50.10.0/255.255.254.0 +193.50.12.0/255.255.255.0 +193.50.13.0/255.255.255.0 +193.50.14.0/255.255.255.0 +193.50.15.0/255.255.255.0 +193.50.17.0/255.255.255.0 +193.50.18.0/255.255.255.0 +193.50.19.0/255.255.255.128 +193.50.20.0/255.255.255.240 +193.50.20.16/255.255.255.192 +193.50.21.0/255.255.255.0 +193.50.22.0/255.255.255.128 +193.50.23.0/255.255.255.0 +193.50.24.0/255.255.255.0 +193.50.25.0/255.255.255.0 +193.50.30.0/255.255.255.0 +193.50.31.0/255.255.255.0 +193.50.32.0/255.255.255.128 +193.50.33.0/255.255.255.0 +193.50.34.0/255.255.255.0 +193.50.35.0/255.255.255.128 +193.50.36.0/255.255.255.0 +193.50.37.0/255.255.255.0 +193.50.65.0/255.255.255.0 +193.50.79.96/255.255.255.224 +193.50.251.0/255.255.255.0 +193.50.254.0/255.255.255.0 +193.51.1.0/255.255.255.0 +193.51.136.0/255.255.255.0 +193.51.137.0/255.255.255.0 +193.51.140.0/255.255.255.0 +193.51.141.0/255.255.255.0 +193.51.142.0/255.255.255.0 +193.51.143.0/255.255.255.0 +193.51.146.0/255.255.255.0 +193.51.165.0/255.255.255.0 +193.51.166.0/255.255.255.0 +193.51.167.0/255.255.255.0 +193.51.169.0/255.255.255.0 +193.51.170.0/255.255.255.0 +193.51.171.0/255.255.255.0 +193.51.192.0/255.255.255.0 +193.51.193.0/255.255.255.0 +193.51.194.0/255.255.255.0 +193.51.196.0/255.255.255.0 +193.51.197.0/255.255.255.0 +193.51.198.0/255.255.255.0 +193.51.209.0/255.255.255.0 +193.52.4.0/255.255.255.0 +193.52.21.0/255.255.255.192 +193.52.70.0/255.255.255.0 +193.53.37.0/255.255.255.0 +193.53.113.0/255.255.244.0 +193.53.250.0/255.255.255.0 +193.54.17.0/255.255.255.0 +193.54.18.0/255.255.255.0 +193.54.48.0/255.255.255.248 +193.54.56.0/255.255.255.0 +193.54.57.0/255.255.255.0 +193.54.58.0/255.255.255.0 +193.54.59.0/255.255.255.0 +193.54.60.0/255.255.255.0 +193.54.61.0/255.255.255.0 +193.54.62.0/255.255.255.0 +193.54.63.0/255.255.255.0 +193.54.64.0/255.255.255.0 +193.54.65.0/255.255.255.0 +193.54.96.0/255.255.255.0 +193.54.97.0/255.255.255.0 +193.54.98.0/255.255.255.0 +193.54.99.0/255.255.255.0 +193.54.101.0/255.255.255.0 +193.54.102.0/255.255.255.0 +193.54.104.0/255.255.255.0 +193.54.105.0/255.255.255.0 +193.54.106.0/255.255.255.0 +193.54.124.0/255.255.255.0 +193.54.125.0/255.255.255.0 +193.54.126.0/255.255.255.0 +193.54.127.0/255.255.255.0 +193.55.52.0/255.255.255.0 +193.55.55.0/255.255.255.0 +193.55.107.0/255.255.255.0 +193.55.109.0/255.255.255.0 +193.55.152.248/255.255.255.248 +193.55.214.0/255.255.255.0 +193.55.234.0/255.255.254.0 +193.55.237.0/255.255.255.0 +193.55.240.0/255.255.255.0 +193.56.32.0/255.255.244.0 +193.56.44.0/255.255.254.0 +193.56.106.0/255.255.255.0 +193.57.49.0/255.255.255.0 +193.57.51.0/255.255.255.0 +193.57.89.0/255.255.255.0 +193.57.176.0/255.255.252.0 +193.58.92.0/255.255.252.0 +193.58.132.0/255.255.253.0 +193.58.192.0/255.255.250.0 +193.63.54.0/255.255.255.0 +193.63.67.0/255.255.255.0 +193.63.202.0/255.255.255.0 +193.63.240.0/255.255.248.0 +193.64.3.208/255.255.255.248 +193.64.42.104/255.255.255.248 +193.64.205.176/255.255.255.248 +193.64.249.192/255.255.255.224 +193.65.33.80/255.255.255.248 +193.65.83.128/255.255.255.224 +193.65.218.96/255.255.255.240 +193.66.56.192/255.255.255.240 +193.66.186.96/255.255.255.240 +193.67.16.0/255.255.254.0 +193.67.20.0/255.255.253.0 +193.67.48.0/255.255.250.0 +193.67.120.0/255.255.252.0 +193.67.130.0/255.255.255.0 +193.67.246.248/255.255.255.248 +193.69.60.128/255.255.255.248 +193.69.249.40/255.255.255.248 +193.70.12.0/255.255.252.0 +193.70.28.0/255.255.255.0 +193.70.106.16/255.255.255.240 +193.70.121.192/255.255.255.192 +193.70.162.64/255.255.255.224 +193.70.224.0/255.255.255.0 +193.70.238.0/255.255.255.0 +193.71.60.0/255.255.252.0 +193.71.210.0/255.255.250.0 +193.71.216.0/255.255.255.240 +193.72.195.0/255.255.255.0 +193.72.208.0/255.255.255.0 +193.72.224.0/255.255.254.0 +193.73.206.0/255.255.254.0 +193.74.19.0/255.255.255.0 +193.74.118.0/255.255.255.0 +193.74.126.0/255.255.255.0 +193.74.145.128/255.255.255.192 +193.74.145.192/255.255.255.224 +193.74.217.16/255.255.255.240 +193.74.243.0/255.255.255.0 +193.74.248.8/255.255.255.248 +193.74.248.16/255.255.255.240 +193.75.240.0/255.255.255.0 +193.76.87.0/255.255.255.0 +193.76.127.0/255.255.255.0 +193.76.214.0/255.255.255.0 +193.76.218.0/255.255.255.0 +193.76.220.0/255.255.255.0 +193.77.187.0/255.255.255.0 +193.78.24.0/255.255.255.0 +193.78.57.0/255.255.255.0 +193.78.59.0/255.255.255.0 +193.78.188.0/255.255.254.0 +193.78.211.0/255.255.255.0 +193.79.24.0/255.255.252.0 +193.79.133.0/255.255.255.0 +193.79.142.64/255.255.255.248 +193.79.181.80/255.255.255.240 +193.79.214.0/255.255.254.0 +193.80.53.224/255.255.255.248 +193.80.118.24/255.255.255.248 +193.81.2.0/255.255.255.0 +193.81.95.0/255.255.255.0 +193.81.105.0/255.255.255.248 +193.81.191.0/255.255.255.0 +193.81.243.0/255.255.255.0 +193.82.18.224/255.255.255.240 +193.82.57.0/255.255.255.0 +193.82.112.192/255.255.255.240 +193.82.145.128/255.255.255.248 +193.83.85.0/255.255.255.0 +193.84.114.0/255.255.255.0 +193.84.249.0/255.255.255.0 +193.85.112.0/255.255.224.0 +193.85.207.112/255.255.255.248 +193.86.16.0/255.255.240.0 +193.87.75.64/255.255.255.224 +193.88.98.0/255.255.255.0 +193.88.111.0/255.255.255.0 +193.89.103.32/255.255.255.224 +193.89.135.112/255.255.255.240 +193.90.252.0/255.255.255.0 +193.91.96.128/255.255.255.192 +193.91.96.240/255.255.255.248 +193.91.115.0/255.255.255.0 +193.92.13.128/255.255.255.128 +193.92.120.0/255.255.255.192 +193.92.134.64/255.255.255.192 +193.95.145.80/255.255.255.248 +193.95.145.128/255.255.255.224 +193.95.148.128/255.255.255.224 +193.95.168.0/255.255.255.248 +193.96.7.0/255.255.255.0 +193.96.24.0/255.255.255.0 +193.96.27.0/255.255.254.0 +193.96.33.48/255.255.255.248 +193.96.33.96/255.255.255.224 +193.96.33.224/255.255.255.224 +193.96.150.0/255.255.255.0 +193.96.156.0/255.255.254.0 +193.96.165.0/255.255.255.0 +193.96.193.80/255.255.255.240 +193.96.194.128/255.255.255.240 +193.96.195.0/255.255.255.224 +193.96.197.128/255.255.255.128 +193.96.198.128/255.255.255.128 +193.96.219.0/255.255.253.0 +193.96.254.0/255.255.254.0 +193.97.0.0/255.255.128.0 +193.97.129.0/255.255.255.0 +193.97.191.0/255.255.255.0 +193.97.199.192/255.255.255.192 +193.97.202.160/255.255.255.240 +193.97.206.224/255.255.255.224 +193.97.207.128/255.255.255.128 +193.97.228.0/255.255.255.0 +193.97.240.0/255.255.248.0 +193.98.2.0/255.255.255.0 +193.98.46.80/255.255.255.224 +193.98.46.128/255.255.255.128 +193.98.99.0/255.255.255.0 +193.98.101.0/255.255.255.0 +193.98.144.0/255.255.254.0 +193.98.154.0/255.255.255.0 +193.98.159.0/255.255.255.0 +193.98.176.0/255.255.254.0 +193.98.186.192/255.255.255.248 +193.98.217.88/255.255.255.248 +193.98.217.128/255.255.255.128 +193.98.223.0/255.255.255.0 +193.98.227.0/255.255.255.0 +193.98.231.0/255.255.255.0 +193.98.237.240/255.255.255.248 +193.98.238.0/255.255.254.0 +193.98.250.0/255.255.255.0 +193.99.36.224/255.255.255.224 +193.99.47.0/255.255.255.0 +193.99.49.128/255.255.255.208 +193.99.52.0/255.255.254.0 +193.99.57.128/255.255.255.192 +193.99.59.160/255.255.255.224 +193.99.59.240/255.255.255.240 +193.99.61.72/255.255.255.248 +193.99.61.144/255.255.255.240 +193.99.94.0/255.255.255.0 +193.99.116.232/255.255.255.248 +193.99.119.0/255.255.255.224 +193.99.121.16/255.255.255.208 +193.99.124.136/255.255.255.248 +193.99.144.0/255.255.255.185 +193.99.144.72/255.255.254.72 +193.99.156.0/255.255.255.0 +193.99.159.0/255.255.255.0 +193.99.183.0/255.255.255.0 +193.99.192.0/255.255.240.0 +193.99.213.0/255.255.255.0 +193.99.220.0/255.255.255.0 +193.99.224.0/255.255.250.0 +193.99.250.0/255.255.254.0 +193.100.12.0/255.255.255.0 +193.100.116.0/255.255.252.0 +193.100.152.0/255.255.254.0 +193.100.154.160/255.255.255.160 +193.100.163.0/255.255.255.0 +193.100.165.0/255.255.255.0 +193.100.179.0/255.255.255.0 +193.100.209.0/255.255.255.0 +193.100.213.0/255.255.255.0 +193.100.220.0/255.255.254.0 +193.100.228.0/255.255.251.0 +193.100.237.0/255.255.255.0 +193.100.254.0/255.255.254.0 +193.101.11.0/255.255.255.0 +193.101.16.0/255.255.255.0 +193.101.18.0/255.255.255.0 +193.101.37.0/255.255.254.0 +193.101.65.0/255.255.255.0 +193.101.67.0/255.255.255.0 +193.101.69.0/255.255.254.0 +193.101.71.64/255.255.255.224 +193.101.73.0/255.255.255.0 +193.101.75.176/255.255.255.240 +193.101.78.0/255.255.255.0 +193.101.96.72/255.255.255.248 +193.101.99.0/255.255.254.0 +193.101.105.0/255.255.255.0 +193.101.116.0/255.255.254.0 +193.101.124.0/255.255.254.0 +193.101.154.240/255.255.255.248 +193.101.155.0/255.255.255.0 +193.101.160.0/255.255.255.0 +193.101.165.208/255.255.255.240 +193.101.179.0/255.255.255.0 +193.101.184.0/255.255.255.0 +193.101.189.0/255.255.254.0 +193.101.200.0/255.255.248.0 +193.101.214.0/255.255.248.0 +193.101.240.0/255.255.246.0 +193.101.254.0/255.255.255.0 +193.102.6.0/255.255.254.0 +193.102.16.0/255.255.255.0 +193.102.25.0/255.255.255.0 +193.102.28.0/255.255.254.0 +193.102.36.0/255.255.254.0 +193.102.45.0/255.255.255.0 +193.102.52.0/255.255.255.0 +193.102.59.0/255.255.255.0 +193.102.70.0/255.255.254.0 +193.102.74.0/255.255.255.0 +193.102.82.0/255.255.255.0 +193.102.99.0/255.255.255.0 +193.102.110.0/255.255.255.0 +193.102.155.0/255.255.254.0 +193.102.158.0/255.255.254.0 +193.102.160.128/255.255.255.192 +193.102.172.0/255.255.254.0 +193.102.176.0/255.255.254.0 +193.102.186.0/255.255.255.0 +193.102.187.32/255.255.255.224 +193.102.193.104/255.255.255.248 +193.102.199.128/255.255.255.128 +193.102.203.0/255.255.255.0 +193.102.224.0/255.255.255.0 +193.103.131.0/255.255.255.0 +193.103.167.0/255.255.255.0 +193.103.190.0/255.255.255.0 +193.103.208.0/255.255.252.0 +193.103.254.0/255.255.255.0 +193.104.3.0/255.255.255.240 +193.104.122.0/255.255.255.0 +193.104.224.0/255.255.252.0 +193.104.228.0/255.255.255.0 +193.104.229.0/255.255.255.192 +193.106.68.0/255.255.255.0 +193.106.124.0/255.255.255.192 +193.108.8.0/255.255.248.0 +193.110.130.0/255.255.255.0 +193.111.252.0/255.255.252.0 +193.112.255.0/255.255.255.0 +193.113.209.8/255.255.255.238 +193.114.79.200/255.255.255.248 +193.114.92.0/255.255.255.0 +193.114.208.112/255.255.255.240 +193.114.208.176/255.255.255.240 +193.115.130.0/255.255.255.128 +193.115.132.128/255.255.255.128 +193.115.151.128/255.255.255.192 +193.115.229.0/255.255.255.240 +193.115.229.128/255.255.255.240 +193.115.231.0/255.255.255.0 +193.115.246.192/255.255.255.192 +193.116.4.64/255.255.255.192 +193.116.24.192/255.255.255.240 +193.117.106.32/255.255.255.240 +193.119.133.0/255.255.255.240 +193.119.138.128/255.255.255.224 +193.120.46.32/255.255.255.240 +193.120.46.96/255.255.255.240 +193.120.107.240/255.255.255.240 +193.120.126.240/255.255.255.248 +193.120.129.64/255.255.255.248 +193.120.133.40/255.255.255.248 +193.120.135.136/255.255.255.248 +193.120.136.0/255.255.255.248 +193.120.136.192/255.255.255.248 +193.120.140.80/255.255.255.248 +193.120.144.16/255.255.255.248 +193.120.145.200/255.255.255.248 +193.120.149.160/255.255.255.248 +193.120.160.0/255.255.255.0 +193.120.180.0/255.255.255.0 +193.121.1.8/255.255.255.248 +193.121.1.32/255.255.255.240 +193.121.1.192/255.255.255.224 +193.121.1.240/255.255.255.248 +193.121.3.0/255.255.255.0 +193.121.8.0/255.255.255.0 +193.121.13.32/255.255.255.248 +193.121.13.224/255.255.255.240 +193.121.15.0/255.255.255.0 +193.121.18.0/255.255.255.0 +193.121.26.0/255.255.254.0 +193.121.40.0/255.255.255.0 +193.121.42.32/255.255.255.224 +193.121.42.160/255.255.255.224 +193.121.48.192/255.255.255.224 +193.121.50.0/255.255.255.0 +193.121.52.8/255.255.255.248 +193.121.52.64/255.255.255.224 +193.121.52.224/255.255.255.240 +193.121.71.0/255.255.255.0 +193.121.72.0/255.255.255.128 +193.121.74.0/255.255.255.0 +193.121.76.0/255.255.255.0 +193.121.79.0/255.255.255.0 +193.121.80.16/255.255.255.240 +193.121.80.128/255.255.255.224 +193.121.85.16/255.255.255.240 +193.121.85.192/255.255.255.224 +193.121.85.224/255.255.255.240 +193.121.85.240/255.255.255.248 +193.121.87.64/255.255.255.192 +193.121.88.8/255.255.255.248 +193.121.89.160/255.255.255.224 +193.121.89.224/255.255.255.240 +193.121.94.0/255.255.255.0 +193.121.97.128/255.255.255.192 +193.121.99.224/255.255.255.240 +193.121.107.128/255.255.255.192 +193.121.107.192/255.255.255.224 +193.121.115.32/255.255.255.224 +193.121.117.0/255.255.255.0 +193.121.121.0/255.255.255.0 +193.121.132.128/255.255.255.192 +193.121.137.240/255.255.255.248 +193.121.138.8/255.255.255.248 +193.121.138.224/255.255.255.240 +193.121.148.128/255.255.255.192 +193.121.149.8/255.255.255.248 +193.121.150.32/255.255.255.224 +193.121.162.0/255.255.255.0 +193.121.163.0/255.255.255.0 +193.121.165.32/255.255.255.224 +193.121.165.192/255.255.255.224 +193.121.175.32/255.255.255.224 +193.121.175.192/255.255.255.224 +193.121.175.240/255.255.255.248 +193.121.176.8/255.255.255.248 +193.121.176.32/255.255.255.224 +193.121.176.160/255.255.255.224 +193.121.177.0/255.255.255.0 +193.121.186.128/255.255.255.248 +193.121.205.0/255.255.255.0 +193.121.206.128/255.255.255.224 +193.121.206.160/255.255.255.224 +193.121.210.224/255.255.255.240 +193.121.216.0/255.255.255.0 +193.121.217.128/255.255.255.192 +193.121.220.128/255.255.255.192 +193.121.243.32/255.255.255.224 +193.121.244.0/255.255.255.0 +193.121.247.232/255.255.255.248 +193.122.19.160/255.255.255.224 +193.122.26.64/255.255.255.192 +193.122.46.96/255.255.255.224 +193.122.51.0/255.255.255.0 +193.122.147.0/255.255.255.192 +193.122.208.160/255.255.255.248 +193.123.1.176/255.255.255.240 +193.123.80.160/255.255.255.224 +193.123.93.0/255.255.255.192 +193.123.234.160/255.255.255.240 +193.124.33.0/255.255.255.0 +193.124.232.0/255.255.249.0 +193.125.135.0/255.255.255.0 +193.128.1.176/255.255.255.240 +193.128.2.192/255.255.255.240 +193.128.17.176/255.255.255.240 +193.128.24.0/255.255.254.0 +193.128.89.160/255.255.255.240 +193.128.92.0/255.255.254.0 +193.128.104.64/255.255.255.240 +193.128.104.192/255.255.255.224 +193.128.111.144/255.255.255.240 +193.128.114.64/255.255.255.240 +193.128.115.208/255.255.255.240 +193.128.120.192/255.255.255.240 +193.128.123.32/255.255.255.240 +193.128.124.96/255.255.255.240 +193.128.127.48/255.255.255.240 +193.128.128.0/255.255.255.224 +193.128.178.0/255.255.255.0 +193.128.184.0/255.255.252.0 +193.128.233.32/255.255.255.240 +193.129.22.64/255.255.255.240 +193.129.73.0/255.255.255.240 +193.129.86.176/255.255.255.240 +193.129.96.144/255.255.255.240 +193.129.98.176/255.255.255.240 +193.129.100.128/255.255.255.240 +193.129.160.208/255.255.255.240 +193.129.162.0/255.255.255.0 +193.129.187.208/255.255.255.248 +193.129.252.0/255.255.255.224 +193.130.35.208/255.255.255.240 +193.131.2.224/255.255.255.240 +193.132.4.0/255.255.252.0 +193.132.26.0/255.255.255.0 +193.132.151.176/255.255.255.240 +193.132.196.96/255.255.255.240 +193.132.230.0/255.255.255.0 +193.133.17.96/255.255.255.240 +193.133.17.128/255.255.255.128 +193.133.27.112/255.255.255.240 +193.133.100.32/255.255.255.240 +193.133.116.128/255.255.255.128 +193.133.126.176/255.255.255.240 +193.133.192.0/255.255.255.240 +193.134.4.0/255.255.252.0 +193.134.8.0/255.255.232.0 +193.134.240.0/255.255.248.0 +193.135.25.0/255.255.255.0 +193.135.176.0/255.255.224.0 +193.138.66.0/255.255.255.0 +193.138.67.0/255.255.255.0 +193.138.126.0/255.255.255.0 +193.141.17.0/255.255.255.0 +193.141.46.64/255.255.255.240 +193.141.57.0/255.255.255.0 +193.141.66.48/255.255.255.248 +193.141.66.64/255.255.255.248 +193.141.70.0/255.255.255.0 +193.141.74.0/255.255.255.0 +193.141.80.0/255.255.248.0 +193.141.93.64/255.255.255.224 +193.141.98.0/255.255.254.0 +193.141.102.0/255.255.254.0 +193.141.109.0/255.255.255.0 +193.141.117.0/255.255.255.0 +193.141.122.0/255.255.254.0 +193.141.139.0/255.255.255.0 +193.141.177.0/255.255.255.0 +193.141.183.0/255.255.255.0 +193.141.185.0/255.255.255.0 +193.141.188.0/255.255.255.0 +193.141.190.0/255.255.255.0 +193.141.192.0/255.255.224.0 +193.146.152.192/255.255.255.240 +193.148.19.0/255.255.255.0 +193.148.21.0/255.255.255.0 +193.149.32.64/255.255.255.240 +193.149.33.232/255.255.255.248 +193.149.34.0/255.255.255.0 +193.149.37.32/255.255.255.224 +193.149.42.0/255.255.255.0 +193.149.44.128/255.255.255.192 +193.149.57.88/255.255.255.248 +193.149.57.176/255.255.255.240 +193.149.59.176/255.255.255.240 +193.149.60.32/255.255.255.224 +193.149.60.128/255.255.255.224 +193.149.61.0/255.255.255.192 +193.149.61.128/255.255.255.128 +193.150.152.0/255.255.243.0 +193.151.0.0/255.255.252.0 +193.154.60.0/255.255.253.0 +193.154.213.160/255.255.255.240 +193.154.234.0/255.255.255.0 +193.155.0.0/255.255.255.224 +193.155.8.0/255.255.250.0 +193.155.19.0/255.255.255.0 +193.155.25.0/255.255.255.0 +193.155.48.32/255.255.255.216 +193.155.48.80/255.255.255.240 +193.155.63.0/255.255.255.0 +193.155.75.0/255.255.255.0 +193.155.82.0/255.255.254.0 +193.155.86.0/255.255.254.0 +193.155.97.0/255.255.255.0 +193.155.101.0/255.255.255.0 +193.155.111.0/255.255.255.0 +193.155.115.0/255.255.255.0 +193.155.134.0/255.255.254.0 +193.155.141.0/255.255.255.0 +193.155.186.0/255.255.255.0 +193.155.189.0/255.255.255.0 +193.155.192.0/255.255.255.0 +193.155.194.0/255.255.255.224 +193.155.203.0/255.255.255.0 +193.155.225.0/255.255.255.0 +193.155.232.0/255.255.255.0 +193.155.240.0/255.255.253.0 +193.155.244.0/255.255.255.0 +193.155.250.0/255.255.255.0 +193.158.0.0/255.255.255.192 +193.158.3.40/255.255.255.248 +193.158.3.192/255.255.255.248 +193.158.6.0/255.255.255.0 +193.158.10.128/255.255.255.192 +193.158.12.128/255.255.255.192 +193.158.18.0/255.255.255.0 +193.158.29.0/255.255.255.0 +193.158.38.0/255.255.254.0 +193.158.41.232/255.255.255.248 +193.158.41.248/255.255.255.248 +193.158.48.128/255.255.255.128 +193.158.52.192/255.255.255.248 +193.158.54.0/255.255.255.224 +193.158.55.128/255.255.255.128 +193.158.56.32/255.255.255.248 +193.158.56.224/255.255.255.224 +193.158.60.32/255.255.255.248 +193.158.60.128/255.255.255.248 +193.158.61.80/255.255.255.248 +193.158.72.64/255.255.255.224 +193.158.74.192/255.255.255.192 +193.158.77.232/255.255.255.248 +193.158.92.0/255.255.254.192 +193.158.93.128/255.255.255.192 +193.158.95.72/255.255.255.216 +193.158.98.64/255.255.255.184 +193.158.98.248/255.255.255.248 +193.158.99.16/255.255.255.248 +193.158.101.56/255.255.255.184 +193.158.102.208/255.255.255.248 +193.158.102.224/255.255.255.248 +193.158.107.192/255.255.255.232 +193.158.107.240/255.255.255.240 +193.158.109.128/255.255.255.128 +193.158.113.224/255.255.255.224 +193.158.116.128/255.255.255.128 +193.158.117.8/255.255.255.248 +193.158.123.160/255.255.255.160 +193.158.124.0/255.255.254.0 +193.158.234.104/255.255.255.248 +193.158.237.208/255.255.255.248 +193.158.249.128/255.255.255.160 +193.158.249.240/255.255.255.248 +193.158.250.128/255.255.255.248 +193.158.250.160/255.255.255.224 +193.159.160.0/255.255.248.0 +193.159.174.80/255.255.255.248 +193.159.176.144/255.255.255.248 +193.159.184.0/255.255.255.224 +193.159.184.80/255.255.255.248 +193.159.185.0/255.255.255.248 +193.159.185.16/255.255.255.240 +193.159.187.0/255.255.255.224 +193.159.218.0/255.255.254.56 +193.160.156.0/255.255.254.0 +193.162.28.0/255.255.255.0 +193.162.76.0/255.255.254.0 +193.164.187.160/255.255.255.240 +193.164.228.0/255.255.251.160 +193.170.150.0/255.255.255.0 +193.172.69.0/255.255.255.0 +193.172.72.160/255.255.255.240 +193.172.87.80/255.255.255.240 +193.172.114.0/255.255.250.0 +193.172.125.192/255.255.255.240 +193.172.125.224/255.255.255.240 +193.172.159.0/255.255.255.0 +193.172.172.0/255.255.255.0 +193.172.176.0/255.255.254.0 +193.172.246.192/255.255.255.224 +193.173.39.176/255.255.255.240 +193.173.48.240/255.255.255.240 +193.173.59.0/255.255.255.0 +193.173.140.32/255.255.255.240 +193.173.151.208/255.255.255.240 +193.173.195.128/255.255.255.192 +193.174.78.0/255.255.254.0 +193.174.96.0/255.255.252.0 +193.174.160.0/255.255.252.0 +193.174.227.0/255.255.255.0 +193.174.230.0/255.255.254.0 +193.174.249.0/255.255.255.0 +193.174.252.0/255.255.255.0 +193.174.255.0/255.255.255.0 +193.175.82.0/255.255.254.0 +193.175.88.0/255.255.249.0 +193.175.128.0/255.255.254.0 +193.175.170.0/255.255.255.0 +193.175.192.0/255.255.254.0 +193.175.216.0/255.255.255.0 +193.175.220.0/255.255.255.0 +193.175.246.0/255.255.255.0 +193.175.250.0/255.255.255.0 +193.175.254.0/255.255.255.0 +193.176.4.0/255.255.244.0 +193.176.43.0/255.255.255.0 +193.176.222.0/255.255.251.0 +193.176.234.0/255.255.255.0 +193.176.242.0/255.255.253.0 +193.178.1.0/255.255.226.0 +193.178.128.0/255.255.255.0 +193.178.208.0/255.255.255.0 +193.178.212.0/255.255.255.0 +193.178.218.0/255.255.255.0 +193.179.2.208/255.255.255.248 +193.184.41.0/255.255.255.0 +193.184.61.0/255.255.255.0 +193.184.62.0/255.255.255.0 +193.184.63.0/255.255.255.0 +193.184.64.0/255.255.255.0 +193.185.212.0/255.255.255.0 +193.187.3.0/255.255.255.0 +193.189.150.0/255.255.246.0 +193.189.220.0/255.255.255.128 +193.189.224.224/255.255.255.236 +193.189.224.248/255.255.255.248 +193.189.227.0/255.255.254.0 +193.189.231.64/255.255.255.172 +193.189.232.0/255.255.255.0 +193.189.234.0/255.255.251.0 +193.189.241.64/255.255.255.240 +193.189.242.0/255.255.255.0 +193.189.255.144/255.255.255.240 +193.189.255.208/255.255.255.240 +193.190.113.0/255.255.255.0 +193.190.121.0/255.255.255.0 +193.190.122.0/255.255.254.0 +193.190.127.0/255.255.255.0 +193.190.150.0/255.255.254.0 +193.190.152.0/255.255.255.0 +193.190.153.64/255.255.255.192 +193.190.154.0/255.255.255.128 +193.190.156.0/255.255.252.0 +193.190.182.160/255.255.255.240 +193.190.182.176/255.255.255.248 +193.190.182.192/255.255.255.240 +193.190.183.0/255.255.255.128 +193.190.199.0/255.255.255.224 +193.190.203.0/255.255.255.0 +193.190.204.0/255.255.252.0 +193.190.212.0/255.255.255.0 +193.190.215.0/255.255.255.0 +193.190.216.0/255.255.254.0 +193.190.218.0/255.255.255.0 +193.190.219.0/255.255.255.0 +193.190.230.0/255.255.254.0 +193.190.233.0/255.255.255.0 +193.190.235.0/255.255.255.0 +193.190.248.0/255.255.255.0 +193.191.132.48/255.255.255.248 +193.191.132.208/255.255.255.240 +193.191.132.224/255.255.255.224 +193.191.138.0/255.255.255.0 +193.191.208.128/255.255.255.224 +193.191.209.192/255.255.255.240 +193.191.211.0/255.255.255.192 +193.191.211.128/255.255.255.160 +193.191.222.128/255.255.255.192 +193.192.251.0/255.255.254.0 +193.193.75.0/255.255.255.0 +193.193.124.8/255.255.255.248 +193.193.138.216/255.255.255.248 +193.193.142.64/255.255.255.224 +193.193.194.88/255.255.255.248 +193.194.144.0/255.255.254.0 +193.195.87.192/255.255.255.240 +193.195.117.104/255.255.255.248 +193.195.190.120/255.255.255.248 +193.196.153.0/255.255.255.0 +193.196.187.0/255.255.255.0 +193.197.7.0/255.255.255.128 +193.197.42.0/255.255.255.224 +193.197.72.0/255.255.255.232 +193.197.84.0/255.255.255.248 +193.197.144.0/255.255.255.0 +193.197.150.208/255.255.255.240 +193.197.158.0/255.255.255.0 +193.197.165.0/255.255.255.0 +193.197.174.0/255.255.255.0 +193.201.174.0/255.255.255.0 +193.202.1.0/255.255.249.0 +193.202.31.0/255.255.255.0 +193.203.227.0/255.255.255.0 +193.204.0.0/255.253.0.0 +193.207.0.0/255.255.250.0 +193.207.9.0/255.255.255.0 +193.207.13.128/255.255.255.248 +193.207.32.0/255.255.252.0 +193.207.36.0/255.255.255.0 +193.207.37.0/255.255.255.128 +193.207.38.0/255.255.255.128 +193.207.38.128/255.255.255.192 +193.207.39.0/255.255.255.192 +193.207.39.128/255.255.255.128 +193.207.49.0/255.255.255.224 +193.207.49.32/255.255.255.224 +193.207.50.0/255.255.255.0 +193.207.57.0/255.255.255.0 +193.207.60.0/255.255.255.128 +193.207.68.0/255.255.255.224 +193.207.68.96/255.255.255.240 +193.207.82.0/255.255.254.0 +193.207.94.0/255.255.255.224 +193.207.95.0/255.255.255.0 +193.207.113.128/255.255.255.224 +193.207.113.192/255.255.255.224 +193.207.114.160/255.255.255.224 +193.207.118.64/255.255.255.224 +193.207.119.192/255.255.255.224 +193.207.122.48/255.255.255.248 +193.207.122.64/255.255.255.224 +193.207.122.192/255.255.255.224 +193.207.123.208/255.255.255.240 +193.207.123.240/255.255.255.240 +193.209.70.0/255.255.255.0 +193.210.42.0/255.255.255.0 +193.210.149.224/255.255.255.224 +193.211.38.96/255.255.255.240 +193.213.209.160/255.255.255.240 +193.214.114.0/255.255.255.128 +193.215.95.56/255.255.255.248 +193.216.67.208/255.255.255.248 +193.216.190.0/255.255.255.128 +193.216.232.64/255.255.255.192 +193.216.234.136/255.255.255.248 +193.217.13.32/255.255.255.224 +193.218.115.0/255.255.255.0 +193.218.211.80/255.255.255.240 +193.218.213.24/255.255.255.248 +193.218.217.0/255.255.255.192 +193.218.219.96/255.255.255.224 +193.219.0.0/255.255.255.0 +193.219.13.192/255.255.255.224 +193.219.13.224/255.255.255.240 +193.219.57.0/255.255.255.0 +193.222.112.0/255.255.242.0 +193.222.126.0/255.255.255.0 +193.222.127.0/255.255.255.0 +193.224.76.0/255.255.255.0 +193.225.36.0/255.255.255.0 +193.225.51.0/255.255.255.192 +193.225.64.0/255.255.255.0 +193.225.139.0/255.255.255.0 +193.226.44.0/255.255.255.0 +193.227.144.0/255.255.240.0 +193.227.204.0/255.255.254.0 +193.229.199.128/255.255.255.128 +193.230.231.0/255.255.255.0 +193.232.160.0/255.255.255.0 +193.233.188.0/255.255.255.0 +193.235.28.0/255.255.254.0 +193.236.11.0/255.255.255.0 +193.241.0.0/255.255.0.0 +193.246.128.0/255.255.240.0 +193.246.248.184/255.255.255.248 +193.247.0.0/255.255.224.0 +193.247.39.64/255.255.255.240 +193.247.39.96/255.255.255.248 +193.247.107.0/255.255.251.0 +193.247.112.0/255.255.248.0 +193.247.203.0/255.255.255.0 +193.251.137.0/255.255.255.248 +193.252.228.0/255.255.255.0 +193.254.0.128/255.255.255.128 +194.1.224.0/255.255.248.0 +194.2.37.0/255.255.255.0 +194.2.85.0/255.255.255.0 +194.2.88.0/255.255.248.0 +194.2.138.232/255.255.255.248 +194.2.155.0/255.255.255.0 +194.2.163.32/255.255.255.224 +194.2.198.0/255.255.254.0 +194.2.246.0/255.255.255.0 +194.2.250.0/255.255.255.0 +194.3.22.0/255.255.255.0 +194.3.49.179/255.255.255.249 +194.3.65.8/255.255.255.248 +194.3.103.16/255.255.255.240 +194.3.107.0/255.255.255.0 +194.3.117.0/255.255.255.0 +194.3.186.0/255.255.255.0 +194.3.192.0/255.255.255.0 +194.3.209.0/255.255.255.0 +194.3.210.0/255.255.255.0 +194.3.224.0/255.255.232.0 +194.4.224.0/255.255.248.0 +194.5.4.0/255.255.255.0 +194.5.5.0/255.255.255.0 +194.5.6.0/255.255.255.0 +194.5.7.0/255.255.255.0 +194.5.8.0/255.255.255.0 +194.5.9.0/255.255.255.0 +194.5.10.0/255.255.255.0 +194.5.11.0/255.255.255.0 +194.5.12.0/255.255.255.0 +194.5.54.0/255.255.255.0 +194.5.55.0/255.255.255.0 +194.5.79.0/255.255.255.0 +194.5.238.0/255.255.254.0 +194.5.254.0/255.255.254.0 +194.6.3.0/255.255.255.128 +194.6.4.0/255.255.255.248 +194.6.4.208/255.255.255.248 +194.6.23.0/255.255.249.0 +194.6.81.32/255.255.255.248 +194.6.103.248/255.255.255.248 +194.6.105.192/255.255.255.248 +194.6.109.136/255.255.255.248 +194.7.19.72/255.255.255.248 +194.7.27.128/255.255.255.224 +194.7.27.208/255.255.255.240 +194.7.53.0/255.255.255.0 +194.7.89.64/255.255.255.240 +194.7.92.0/255.255.255.0 +194.7.100.64/255.255.255.224 +194.7.101.32/255.255.255.224 +194.7.101.240/255.255.255.240 +194.7.148.0/255.255.255.224 +194.7.149.160/255.255.255.248 +194.7.149.248/255.255.255.248 +194.7.152.208/255.255.255.240 +194.7.157.144/255.255.255.240 +194.7.157.232/255.255.255.248 +194.7.159.144/255.255.255.240 +194.7.161.48/255.255.255.240 +194.7.168.32/255.255.255.240 +194.7.172.16/255.255.255.240 +194.7.175.128/255.255.255.240 +194.7.178.160/255.255.255.240 +194.7.179.208/255.255.255.240 +194.7.183.8/255.255.255.248 +194.7.183.136/255.255.255.248 +194.7.184.224/255.255.255.240 +194.7.188.24/255.255.255.248 +194.7.188.112/255.255.255.240 +194.7.218.0/255.255.255.0 +194.7.221.0/255.255.255.0 +194.7.234.0/255.255.255.0 +194.7.244.128/255.255.255.240 +194.7.246.64/255.255.255.192 +194.7.248.0/255.255.255.240 +194.8.65.128/255.255.255.192 +194.8.84.96/255.255.255.240 +194.8.87.0/255.255.255.0 +194.8.96.0/255.255.224.0 +194.8.181.224/255.255.255.248 +194.8.206.160/255.255.255.224 +194.8.206.224/255.255.255.224 +194.8.213.128/255.255.255.224 +194.8.213.160/255.255.255.160 +194.8.216.80/255.255.255.240 +194.8.216.96/255.255.255.224 +194.8.217.0/255.255.255.0 +194.8.218.224/255.255.255.224 +194.8.223.0/255.255.255.0 +194.10.60.0/255.255.254.0 +194.11.240.0/255.255.254.0 +194.12.192.0/255.255.224.0 +194.13.8.0/255.255.249.0 +194.13.136.0/255.255.254.0 +194.13.139.0/255.255.254.0 +194.15.160.0/255.255.240.0 +194.15.189.0/255.255.255.0 +194.15.213.0/255.255.255.0 +194.15.248.0/255.255.254.0 +194.17.127.0/255.255.255.0 +194.18.73.0/255.255.255.0 +194.19.127.192/255.255.255.224 +194.19.229.208/255.255.255.240 +194.19.232.64/255.255.255.224 +194.20.0.0/255.254.0.0 +194.24.207.16/255.255.255.248 +194.25.14.0/255.255.255.0 +194.25.29.80/255.255.255.248 +194.25.83.216/255.255.255.248 +194.25.85.192/255.255.255.240 +194.25.93.192/255.255.255.192 +194.25.97.0/255.255.255.224 +194.25.111.8/255.255.255.248 +194.25.113.0/255.255.255.128 +194.25.142.184/255.255.255.248 +194.25.143.120/255.255.255.248 +194.25.145.160/255.255.255.224 +194.25.156.0/255.255.255.0 +194.25.159.144/255.255.255.224 +194.25.159.224/255.255.255.224 +194.25.166.136/255.255.255.248 +194.25.170.0/255.255.254.0 +194.25.184.240/255.255.255.248 +194.25.185.208/255.255.255.248 +194.25.187.224/255.255.251.224 +194.25.215.80/255.255.255.240 +194.25.219.144/255.255.255.248 +194.25.229.16/255.255.255.240 +194.25.241.224/255.255.255.248 +194.25.244.0/255.255.252.0 +194.31.0.0/255.255.255.0 +194.31.67.0/255.255.255.0 +194.31.70.0/255.255.254.0 +194.31.194.0/255.255.255.0 +194.31.239.0/255.255.255.0 +194.32.69.0/255.255.255.0 +194.32.218.0/255.255.254.0 +194.34.138.0/255.255.255.0 +194.34.144.0/255.255.248.0 +194.34.198.0/255.255.255.0 +194.34.224.0/255.255.224.0 +194.35.84.0/255.255.252.0 +194.36.32.0/255.255.240.0 +194.36.93.0/255.255.255.0 +194.38.134.200/255.255.255.248 +194.39.149.0/255.255.255.0 +194.39.152.0/255.255.253.0 +194.39.220.0/255.255.252.0 +194.40.128.0/255.255.192.0 +194.41.9.0/255.255.255.0 +194.42.67.0/255.255.255.192 +194.42.76.0/255.255.255.0 +194.42.83.192/255.255.255.160 +194.42.90.208/255.255.255.224 +194.42.91.0/255.255.255.240 +194.45.80.0/255.255.248.0 +194.45.141.0/255.255.255.0 +194.45.182.0/255.255.255.0 +194.45.187.0/255.255.255.0 +194.45.199.0/255.255.255.0 +194.45.225.32/255.255.255.224 +194.45.230.0/255.255.255.0 +194.45.241.0/255.255.255.0 +194.45.247.0/255.255.252.0 +194.45.252.0/255.255.255.0 +194.48.220.0/255.255.254.0 +194.48.222.0/255.255.255.0 +194.48.223.0/255.255.254.0 +194.48.225.0/255.255.255.0 +194.49.8.0/255.255.248.0 +194.49.22.0/255.255.255.0 +194.49.61.0/255.255.255.0 +194.49.82.0/255.255.255.0 +194.49.96.0/255.255.254.0 +194.50.64.0/255.255.252.0 +194.51.10.8/255.255.255.248 +194.51.11.48/255.255.255.248 +194.51.11.152/255.255.255.248 +194.51.44.80/255.255.255.240 +194.51.48.128/255.255.255.248 +194.51.69.0/255.255.255.0 +194.51.87.48/255.255.255.240 +194.51.109.0/255.255.255.240 +194.51.143.0/255.255.255.0 +194.51.180.0/255.255.255.0 +194.51.189.144/255.255.255.248 +194.51.206.32/255.255.255.248 +194.51.206.64/255.255.255.248 +194.53.115.0/255.255.253.0 +194.54.136.0/255.255.252.0 +194.54.152.0/255.255.252.0 +194.55.47.0/255.255.255.0 +194.55.104.0/255.255.254.0 +194.55.140.0/255.255.252.0 +194.57.135.0/255.255.255.0 +194.57.158.0/255.255.252.0 +194.57.173.192/255.255.255.192 +194.57.221.0/255.255.255.0 +194.59.36.0/255.255.252.0 +194.59.46.0/255.255.250.0 +194.59.96.0/255.255.224.0 +194.59.192.0/255.255.237.0 +194.59.246.0/255.255.255.0 +194.60.216.0/255.255.255.0 +194.61.27.0/255.255.255.0 +194.61.128.0/255.255.248.0 +194.61.176.0/255.255.240.0 +194.61.247.0/255.255.251.0 +194.62.22.0/255.255.254.0 +194.62.31.0/255.255.255.0 +194.62.128.0/255.255.240.0 +194.62.192.0/255.255.248.0 +194.64.29.112/255.255.255.240 +194.64.45.0/255.255.255.0 +194.64.71.0/255.255.255.0 +194.64.75.0/255.255.255.0 +194.64.77.0/255.255.255.0 +194.64.96.0/255.255.252.0 +194.64.116.0/255.255.255.0 +194.64.169.224/255.255.255.224 +194.64.186.0/255.255.255.128 +194.64.225.0/255.255.255.224 +194.64.226.112/255.255.255.240 +194.64.231.0/255.255.255.0 +194.64.242.0/255.255.255.0 +194.64.249.0/255.255.255.0 +194.64.251.0/255.255.255.0 +194.64.254.0/255.255.255.0 +194.65.70.96/255.255.255.224 +194.65.108.0/255.255.255.0 +194.65.125.128/255.255.255.128 +194.66.189.0/255.255.255.0 +194.66.254.0/255.255.255.0 +194.67.35.0/255.255.255.0 +194.67.181.192/255.255.255.192 +194.68.215.0/255.255.255.0 +194.69.6.0/255.255.246.0 +194.69.68.72/255.255.255.248 +194.69.181.0/255.255.255.0 +194.70.45.176/255.255.255.248 +194.70.81.0/255.255.255.0 +194.70.146.72/255.255.255.248 +194.71.182.0/255.255.255.0 +194.71.183.0/255.255.255.0 +194.72.70.0/255.255.255.192 +194.72.73.88/255.255.255.248 +194.72.73.240/255.255.255.248 +194.72.81.192/255.255.255.240 +194.72.164.216/255.255.255.248 +194.73.45.208/255.255.255.240 +194.73.59.0/255.255.255.0 +194.73.80.0/255.255.255.0 +194.73.100.192/255.255.255.192 +194.73.113.192/255.255.255.240 +194.73.146.0/255.255.255.128 +194.73.202.0/255.255.255.0 +194.74.50.0/255.255.255.0 +194.74.97.0/255.255.255.224 +194.74.104.64/255.255.255.224 +194.74.206.0/255.255.255.0 +194.74.208.192/255.255.255.192 +194.76.24.0/255.255.254.0 +194.76.38.0/255.255.254.0 +194.76.48.0/255.255.251.0 +194.76.64.0/255.255.224.0 +194.76.110.0/255.255.254.0 +194.76.151.0/255.255.255.0 +194.76.184.0/255.255.254.0 +194.76.190.0/255.255.254.0 +194.76.200.0/255.255.254.0 +194.76.206.0/255.255.254.0 +194.76.232.0/255.255.252.0 +194.76.244.0/255.255.252.0 +194.77.30.0/255.255.255.0 +194.77.40.40/255.255.255.248 +194.77.54.0/255.255.254.0 +194.77.88.0/255.255.255.248 +194.77.103.64/255.255.255.248 +194.77.105.0/255.255.255.0 +194.77.109.16/255.255.255.248 +194.77.156.0/255.255.254.0 +194.77.160.0/255.255.254.0 +194.77.162.48/255.255.255.240 +194.77.162.240/255.255.255.248 +194.77.179.32/255.255.255.248 +194.77.218.0/255.255.255.0 +194.77.219.144/255.255.255.240 +194.78.3.112/255.255.255.240 +194.78.43.224/255.255.255.224 +194.78.83.64/255.255.255.192 +194.78.86.64/255.255.255.224 +194.78.91.128/255.255.255.224 +194.78.99.48/255.255.255.240 +194.79.21.0/255.255.255.0 +194.79.22.0/255.255.255.0 +194.79.155.0/255.255.255.0 +194.79.161.8/255.255.255.248 +194.79.208.0/255.255.255.0 +194.81.24.0/255.255.252.0 +194.84.126.0/255.255.255.0 +194.84.149.0/255.255.255.0 +194.85.148.32/255.255.255.224 +194.88.165.64/255.255.255.224 +194.88.179.192/255.255.255.192 +194.88.186.0/255.255.255.0 +194.88.225.64/255.255.255.192 +194.89.24.0/255.255.254.0 +194.89.205.0/255.255.255.0 +194.90.75.0/255.255.255.0 +194.90.80.208/255.255.255.240 +194.90.145.0/255.255.255.248 +194.90.152.192/255.255.255.224 +194.91.203.0/255.255.255.0 +194.91.255.0/255.255.255.0 +194.93.103.0/255.255.247.0 +194.93.123.0/255.255.255.128 +194.94.19.0/255.255.255.0 +194.94.42.0/255.255.254.0 +194.94.56.0/255.255.242.0 +194.94.100.0/255.255.252.0 +194.94.208.0/255.255.255.0 +194.94.221.0/255.255.255.0 +194.94.238.0/255.255.254.0 +194.95.0.0/255.255.250.0 +194.95.38.0/255.255.254.0 +194.95.58.0/255.255.255.128 +194.95.96.0/255.255.254.0 +194.95.100.0/255.255.252.0 +194.95.110.0/255.255.255.0 +194.95.119.0/255.255.255.0 +194.95.166.0/255.255.255.0 +194.95.176.0/255.255.250.0 +194.95.198.0/255.255.254.0 +194.95.202.0/255.255.252.0 +194.95.212.0/255.255.255.0 +194.95.217.0/255.255.255.0 +194.95.222.0/255.255.255.0 +194.95.250.32/255.255.255.240 +194.95.251.0/255.255.251.0 +194.96.20.160/255.255.255.240 +194.97.1.8/255.255.255.248 +194.97.4.0/255.255.255.240 +194.97.6.64/255.255.255.192 +194.97.8.0/255.255.255.192 +194.97.57.0/255.255.255.0 +194.97.99.0/255.255.255.248 +194.97.99.224/255.255.255.224 +194.97.120.128/255.255.255.216 +194.97.121.64/255.255.255.192 +194.97.132.176/255.255.255.248 +194.97.137.0/255.255.255.0 +194.97.174.0/255.255.255.0 +194.97.178.0/255.255.255.0 +194.97.180.0/255.255.255.0 +194.98.7.64/255.255.255.248 +194.98.13.96/255.255.255.224 +194.98.20.0/255.255.255.0 +194.98.51.32/255.255.255.224 +194.98.58.128/255.255.255.248 +194.98.85.0/255.255.255.0 +194.98.124.0/255.255.255.0 +194.98.147.0/255.255.255.240 +194.98.180.80/255.255.255.240 +194.98.229.0/255.255.255.0 +194.99.38.0/255.255.254.0 +194.99.44.0/255.255.254.0 +194.99.51.0/255.255.255.0 +194.99.75.0/255.255.255.0 +194.99.144.0/255.255.244.0 +194.100.13.176/255.255.255.248 +194.100.14.216/255.255.255.248 +194.100.41.88/255.255.255.248 +194.100.42.0/255.255.255.0 +194.100.51.208/255.255.255.240 +194.100.112.0/255.255.254.0 +194.100.228.0/255.255.255.128 +194.102.210.0/255.255.255.0 +194.104.32.0/255.255.208.0 +194.104.88.0/255.255.254.0 +194.104.91.0/255.255.255.0 +194.104.99.0/255.255.255.0 +194.105.64.0/255.255.224.0 +194.105.176.216/255.255.255.248 +194.105.240.0/255.255.255.0 +194.108.183.64/255.255.255.192 +194.109.86.112/255.255.255.248 +194.109.88.248/255.255.255.248 +194.109.93.224/255.255.255.240 +194.109.114.96/255.255.255.248 +194.109.119.0/255.255.255.224 +194.109.121.0/255.255.255.224 +194.109.212.240/255.255.255.248 +194.109.219.56/255.255.255.248 +194.110.83.0/255.255.255.0 +194.111.115.176/255.255.255.240 +194.112.84.0/255.255.254.0 +194.112.87.0/255.255.255.0 +194.112.100.64/255.255.255.224 +194.112.106.0/255.255.255.0 +194.112.113.48/255.255.255.248 +194.112.123.0/255.255.254.0 +194.113.34.0/255.255.248.0 +194.113.60.0/255.255.255.0 +194.113.84.0/255.255.252.0 +194.113.114.0/255.255.255.0 +194.113.116.0/255.255.255.0 +194.113.154.0/255.255.255.0 +194.113.168.0/255.255.255.0 +194.113.222.0/255.255.255.0 +194.113.247.0/255.255.255.0 +194.115.12.0/255.255.255.0 +194.115.40.0/255.255.252.0 +194.115.49.0/255.255.255.0 +194.115.77.0/255.255.255.0 +194.115.88.0/255.255.248.0 +194.115.182.0/255.255.254.0 +194.115.196.0/255.255.255.0 +194.115.204.0/255.255.254.0 +194.115.248.0/255.255.255.0 +194.116.0.0/255.255.248.0 +194.116.19.0/255.255.255.0 +194.116.20.0/255.255.255.0 +194.116.21.0/255.255.255.0 +194.116.22.0/255.255.255.0 +194.116.23.0/255.255.255.0 +194.116.24.0/255.255.255.0 +194.116.26.0/255.255.255.0 +194.116.29.0/255.255.255.0 +194.116.30.0/255.255.255.0 +194.116.31.0/255.255.255.0 +194.116.61.0/255.255.255.0 +194.116.63.0/255.255.255.0 +194.117.97.188/255.255.255.248 +194.117.99.228/255.255.255.248 +194.117.100.4/255.255.255.248 +194.117.108.112/255.255.255.248 +194.117.111.0/255.255.255.248 +194.117.208.96/255.255.255.224 +194.117.208.128/255.255.255.192 +194.117.208.192/255.255.255.240 +194.117.208.240/255.255.255.240 +194.117.216.32/255.255.255.240 +194.117.219.96/255.255.255.248 +194.117.220.96/255.255.255.240 +194.119.192.0/255.255.255.0 +194.119.193.0/255.255.255.0 +194.119.194.0/255.255.255.0 +194.119.195.0/255.255.255.0 +194.119.196.0/255.255.252.0 +194.119.200.0/255.255.248.0 +194.119.208.0/255.255.255.0 +194.119.209.0/255.255.255.0 +194.119.210.0/255.255.255.0 +194.119.211.0/255.255.255.0 +194.119.212.0/255.255.255.0 +194.119.213.0/255.255.255.0 +194.119.214.0/255.255.255.0 +194.119.215.0/255.255.255.0 +194.119.216.0/255.255.254.0 +194.119.218.0/255.255.255.0 +194.119.219.0/255.255.255.0 +194.119.220.0/255.255.255.0 +194.119.221.0/255.255.255.0 +194.119.245.0/255.255.255.0 +194.119.248.144/255.255.255.248 +194.119.255.32/255.255.255.240 +194.120.19.0/255.255.255.0 +194.120.33.0/255.255.255.0 +194.120.109.0/255.255.255.0 +194.120.122.0/255.255.255.0 +194.120.124.0/255.255.255.0 +194.120.127.0/255.255.255.0 +194.120.175.0/255.255.255.0 +194.120.180.0/255.255.255.224 +194.120.225.0/255.255.255.0 +194.120.248.240/255.255.255.240 +194.120.254.0/255.255.255.0 +194.121.4.0/255.255.255.0 +194.121.10.0/255.255.255.0 +194.121.12.0/255.255.255.0 +194.121.19.0/255.255.254.0 +194.121.23.0/255.255.253.0 +194.121.44.0/255.255.254.0 +194.121.51.0/255.255.255.0 +194.121.80.0/255.255.248.0 +194.121.99.0/255.255.255.128 +194.121.118.0/255.255.255.240 +194.121.220.40/255.255.255.232 +194.121.220.208/255.255.255.240 +194.121.235.0/255.255.255.0 +194.121.238.80/255.255.255.240 +194.121.239.0/255.255.255.0 +194.122.12.192/255.255.255.240 +194.122.21.128/255.255.255.224 +194.122.22.64/255.255.255.240 +194.122.23.56/255.255.255.248 +194.122.45.72/255.255.255.248 +194.122.49.88/255.255.255.232 +194.122.54.64/255.255.255.192 +194.122.59.128/255.255.255.224 +194.122.65.0/255.255.255.0 +194.122.90.248/255.255.255.248 +194.122.91.176/255.255.255.248 +194.122.93.0/255.255.255.0 +194.122.108.0/255.255.255.0 +194.122.146.0/255.255.255.0 +194.122.163.0/255.255.254.0 +194.122.195.96/255.255.255.224 +194.122.215.72/255.255.255.248 +194.123.1.64/255.255.255.240 +194.123.7.144/255.255.255.240 +194.123.17.0/255.255.255.0 +194.123.25.160/255.255.255.248 +194.123.32.0/255.255.255.0 +194.123.51.0/255.255.255.0 +194.123.63.0/255.255.255.0 +194.123.71.0/255.255.254.0 +194.123.113.0/255.255.255.224 +194.123.122.32/255.255.255.224 +194.123.126.24/255.255.255.248 +194.123.126.112/255.255.255.240 +194.123.141.0/255.255.255.0 +194.123.157.120/255.255.255.248 +194.123.163.16/255.255.255.240 +194.123.163.112/255.255.255.248 +194.123.163.128/255.255.255.156 +194.123.168.160/255.255.255.240 +194.123.173.0/255.255.255.0 +194.123.181.240/255.255.255.240 +194.123.185.160/255.255.255.248 +194.123.199.240/255.255.255.240 +194.123.212.0/255.255.255.0 +194.123.217.40/255.255.255.248 +194.123.227.0/255.255.255.0 +194.123.244.0/255.255.255.224 +194.123.248.88/255.255.255.248 +194.123.251.192/255.255.255.240 +194.123.251.240/255.255.255.240 +194.123.253.0/255.255.255.128 +194.123.253.224/255.255.255.240 +194.123.255.192/255.255.255.248 +194.124.78.0/255.255.192.0 +194.125.140.32/255.255.255.224 +194.125.155.0/255.255.255.248 +194.125.209.0/255.255.255.0 +194.127.102.0/255.255.254.0 +194.127.119.0/255.255.255.0 +194.127.140.0/255.255.244.0 +194.127.158.0/255.255.255.0 +194.127.174.0/255.255.255.0 +194.127.180.0/255.255.255.0 +194.127.196.0/255.255.255.0 +194.127.204.0/255.255.254.0 +194.128.85.32/255.255.255.240 +194.128.85.128/255.255.255.192 +194.128.148.112/255.255.255.240 +194.128.160.112/255.255.255.240 +194.128.165.128/255.255.255.192 +194.128.212.0/255.255.255.0 +194.129.73.0/255.255.255.75 +194.129.73.182/255.255.255.182 +194.129.110.24/255.255.255.248 +194.129.173.0/255.255.255.0 +194.129.183.160/255.255.255.240 +194.130.71.0/255.255.255.0 +194.130.102.96/255.255.255.240 +194.131.68.0/255.255.255.0 +194.131.95.0/255.255.255.0 +194.131.98.224/255.255.255.240 +194.131.119.0/255.255.255.0 +194.131.125.88/255.255.255.248 +194.131.125.192/255.255.255.224 +194.131.192.160/255.255.255.224 +194.133.28.0/255.255.254.0 +194.133.62.0/255.255.255.192 +194.134.18.128/255.255.255.248 +194.134.80.232/255.255.255.248 +194.134.90.48/255.255.255.248 +194.134.98.0/255.255.255.0 +194.134.108.112/255.255.255.240 +194.134.234.64/255.255.255.248 +194.137.132.0/255.255.255.240 +194.138.36.0/255.255.254.0 +194.139.3.0/255.255.255.0 +194.139.16.0/255.255.255.0 +194.139.36.0/255.255.254.0 +194.139.40.0/255.255.252.0 +194.139.100.208/255.255.255.240 +194.139.101.0/255.255.255.128 +194.139.106.0/255.255.255.0 +194.139.235.0/255.255.255.0 +194.139.238.0/255.255.254.0 +194.139.250.0/255.255.255.0 +194.140.98.128/255.255.255.224 +194.140.111.0/255.255.255.0 +194.140.126.0/255.255.255.224 +194.141.51.0/255.255.255.0 +194.141.64.0/255.255.254.0 +194.143.45.0/255.255.255.0 +194.143.59.64/255.255.255.240 +194.143.196.0/255.255.255.0 +194.143.232.16/255.255.255.240 +194.144.242.192/255.255.255.192 +194.145.146.0/255.255.255.0 +194.146.62.0/255.255.255.0 +194.146.66.0/255.255.254.0 +194.146.100.0/255.255.255.0 +194.149.92.0/255.255.253.0 +194.151.57.192/255.255.255.240 +194.151.97.176/255.255.255.240 +194.151.115.0/255.255.255.0 +194.151.179.0/255.255.255.0 +194.151.195.192/255.255.255.224 +194.151.199.0/255.255.255.0 +194.151.210.0/255.255.255.0 +194.152.45.0/255.255.255.0 +194.152.91.184/255.255.255.248 +194.152.172.8/255.255.255.248 +194.153.32.0/255.255.216.0 +194.153.104.0/255.255.254.0 +194.153.110.0/255.255.255.0 +194.153.160.0/255.255.248.0 +194.154.134.152/255.255.255.248 +194.154.176.168/255.255.255.248 +194.156.4.0/255.255.253.0 +194.156.181.0/255.255.253.0 +194.156.187.0/255.255.255.0 +194.156.189.0/255.255.255.0 +194.156.216.0/255.255.248.0 +194.158.20.192/255.255.255.192 +194.158.21.64/255.255.255.192 +194.158.162.104/255.255.255.248 +194.161.70.0/255.255.255.0 +194.161.143.0/255.255.255.0 +194.161.150.0/255.255.255.0 +194.162.17.0/255.255.255.0 +194.162.29.0/255.255.255.192 +194.162.29.192/255.255.255.192 +194.162.32.192/255.255.255.248 +194.162.44.0/255.255.254.192 +194.162.65.32/255.255.255.240 +194.162.110.56/255.255.255.248 +194.162.131.0/255.255.255.192 +194.162.144.0/255.255.254.0 +194.162.174.152/255.255.255.248 +194.162.181.0/255.255.255.0 +194.162.188.0/255.255.255.0 +194.162.189.128/255.255.255.224 +194.162.189.192/255.255.255.240 +194.162.238.0/255.255.255.0 +194.162.243.0/255.255.255.248 +194.163.84.0/255.255.255.0 +194.163.134.48/255.255.255.240 +194.163.170.0/255.255.255.0 +194.163.213.0/255.255.255.0 +194.163.216.0/255.255.248.0 +194.163.228.0/255.255.255.0 +194.163.233.0/255.255.249.0 +194.165.136.0/255.255.255.0 +194.167.0.0/255.255.255.0 +194.167.56.0/255.255.255.0 +194.167.65.0/255.255.248.0 +194.167.73.0/255.255.252.0 +194.167.77.0/255.255.254.0 +194.167.92.0/255.255.255.0 +194.167.96.0/255.255.255.0 +194.167.202.0/255.255.254.0 +194.167.204.0/255.255.254.0 +194.167.244.0/255.255.254.0 +194.168.171.128/255.255.255.192 +194.170.206.0/255.255.255.0 +194.170.243.0/255.255.255.0 +194.172.1.144/255.255.255.240 +194.172.45.160/255.255.255.224 +194.172.69.0/255.255.254.0 +194.172.86.0/255.255.255.0 +194.172.101.0/255.255.255.0 +194.172.104.0/255.255.252.0 +194.172.118.0/255.255.254.0 +194.172.125.0/255.255.255.0 +194.172.127.0/255.255.255.0 +194.172.129.0/255.255.255.0 +194.172.144.0/255.255.255.0 +194.172.147.128/255.255.255.248 +194.172.147.160/255.255.255.224 +194.172.149.0/255.255.255.0 +194.172.155.0/255.255.255.0 +194.172.164.0/255.255.255.0 +194.172.188.0/255.255.255.0 +194.172.194.88/255.255.255.248 +194.172.195.0/255.255.255.0 +194.172.198.0/255.255.255.128 +194.172.199.64/255.255.255.192 +194.172.220.64/255.255.255.240 +194.172.220.112/255.255.255.240 +194.173.0.0/255.255.255.0 +194.173.18.0/255.255.253.0 +194.173.29.208/255.255.255.208 +194.173.42.192/255.255.255.240 +194.173.83.224/255.255.255.248 +194.173.84.0/255.255.255.0 +194.173.89.128/255.255.255.176 +194.173.107.0/255.255.255.0 +194.173.127.0/255.255.255.0 +194.173.136.0/255.255.252.0 +194.173.153.0/255.255.255.0 +194.173.160.0/255.255.255.0 +194.173.174.0/255.255.252.0 +194.173.186.64/255.255.255.240 +194.173.190.0/255.255.255.0 +194.173.192.0/255.255.248.0 +194.173.203.128/255.255.255.192 +194.173.230.0/255.255.255.0 +194.173.236.0/255.255.254.0 +194.173.240.0/255.255.248.0 +194.174.10.40/255.255.255.248 +194.174.12.0/255.255.255.0 +194.174.16.0/255.255.240.0 +194.174.39.128/255.255.255.192 +194.174.64.0/255.255.255.0 +194.174.83.128/255.255.255.248 +194.174.95.0/255.255.255.0 +194.174.200.0/255.255.255.0 +194.174.204.0/255.255.253.0 +194.174.230.0/255.255.255.0 +194.174.233.0/255.255.255.0 +194.174.242.128/255.255.255.192 +194.174.242.224/255.255.255.224 +194.174.252.0/255.255.255.0 +194.175.18.160/255.255.255.224 +194.175.19.0/255.255.255.0 +194.175.23.0/255.255.255.0 +194.175.27.64/255.255.255.128 +194.175.41.0/255.255.255.0 +194.175.50.0/255.255.255.0 +194.175.52.192/255.255.255.192 +194.175.68.96/255.255.255.224 +194.175.68.240/255.255.255.240 +194.175.70.16/255.255.255.240 +194.175.75.184/255.255.255.248 +194.175.80.64/255.255.255.240 +194.175.80.104/255.255.255.248 +194.175.85.32/255.255.255.240 +194.175.85.96/255.255.255.240 +194.175.85.160/255.255.255.240 +194.175.89.56/255.255.255.248 +194.175.89.240/255.255.255.248 +194.175.95.32/255.255.255.224 +194.175.98.0/255.255.255.192 +194.175.98.192/255.255.255.248 +194.175.108.192/255.255.255.224 +194.175.112.0/255.255.254.0 +194.175.118.0/255.255.254.0 +194.175.207.0/255.255.255.0 +194.175.221.0/255.255.255.0 +194.175.228.0/255.255.254.192 +194.175.243.96/255.255.255.224 +194.175.249.0/255.255.255.0 +194.176.154.168/255.255.255.248 +194.177.114.208/255.255.255.240 +194.178.27.0/255.255.254.0 +194.178.41.0/255.255.254.0 +194.178.44.0/255.255.255.0 +194.178.84.104/255.255.255.248 +194.178.138.0/255.255.255.0 +194.178.167.0/255.255.252.0 +194.179.107.0/255.255.255.64 +194.180.15.0/255.255.255.0 +194.180.44.0/255.255.251.0 +194.180.51.0/255.255.255.0 +194.180.55.0/255.255.255.0 +194.180.151.0/255.255.255.0 +194.180.175.0/255.255.255.0 +194.180.189.0/255.255.255.0 +194.180.208.16/255.255.255.240 +194.180.210.0/255.255.250.0 +194.180.226.0/255.255.255.224 +194.180.226.128/255.255.255.248 +194.180.226.224/255.255.255.224 +194.180.236.128/255.255.255.128 +194.180.238.0/255.255.255.0 +194.183.7.224/255.255.255.240 +194.183.8.160/255.255.255.224 +194.183.14.0/255.255.255.191 +194.183.14.136/255.255.255.248 +194.183.21.96/255.255.255.240 +194.183.21.176/255.255.255.240 +194.183.220.96/255.255.255.240 +194.183.226.144/255.255.255.248 +194.183.226.192/255.255.255.224 +194.184.14.0/255.255.255.0 +194.184.17.48/255.255.255.240 +194.184.17.128/255.255.255.128 +194.184.23.0/255.255.255.0 +194.184.34.200/255.255.255.248 +194.184.39.64/255.255.255.224 +194.184.53.128/255.255.255.192 +194.184.76.0/255.255.255.0 +194.184.94.0/255.255.255.0 +194.184.97.0/255.255.255.0 +194.184.130.0/255.255.255.0 +194.184.133.248/255.255.255.248 +194.184.156.224/255.255.255.224 +194.184.158.192/255.255.255.192 +194.184.168.128/255.255.255.128 +194.184.171.32/255.255.255.240 +194.184.171.96/255.255.255.224 +194.184.171.240/255.255.255.240 +194.185.96.0/255.255.255.224 +194.185.102.0/255.255.255.0 +194.185.119.32/255.255.255.224 +194.185.158.192/255.255.255.224 +194.185.196.0/255.255.255.192 +194.185.227.0/255.255.255.224 +194.185.231.0/255.255.255.224 +194.186.227.64/255.255.255.240 +194.186.233.0/255.255.254.0 +194.191.170.0/255.255.255.0 +194.192.189.0/255.255.255.0 +194.192.208.184/255.255.255.248 +194.192.241.64/255.255.255.240 +194.193.86.96/255.255.255.224 +194.193.109.0/255.255.255.224 +194.193.109.160/255.255.255.240 +194.193.194.128/255.255.255.240 +194.193.194.224/255.255.255.240 +194.194.52.0/255.255.255.0 +194.194.53.0/255.255.255.0 +194.194.84.144/255.255.255.248 +194.194.99.0/255.255.255.0 +194.194.145.0/255.255.255.0 +194.194.193.0/255.255.255.0 +194.194.240.0/255.255.255.0 +194.194.243.0/255.255.255.0 +194.195.94.0/255.255.255.0 +194.195.157.0/255.255.255.0 +194.195.159.0/255.255.255.0 +194.195.173.0/255.255.255.240 +194.195.180.96/255.255.255.240 +194.195.184.0/255.255.248.0 +194.195.196.0/255.255.254.0 +194.195.198.0/255.255.255.0 +194.195.228.16/255.255.255.240 +194.195.228.128/255.255.255.128 +194.195.244.0/255.255.255.224 +194.195.244.160/255.255.255.224 +194.195.247.0/255.255.255.0 +194.196.9.64/255.255.255.248 +194.196.11.96/255.255.255.248 +194.196.12.0/255.255.255.0 +194.196.13.0/255.255.255.0 +194.196.18.128/255.255.255.240 +194.196.18.192/255.255.255.224 +194.196.23.176/255.255.255.240 +194.196.50.96/255.255.255.224 +194.196.68.0/255.255.255.0 +194.196.72.64/255.255.255.224 +194.196.76.0/255.255.255.0 +194.196.90.0/255.255.255.0 +194.196.95.16/255.255.255.240 +194.196.152.0/255.255.255.0 +194.196.161.112/255.255.255.248 +194.196.182.0/255.255.255.240 +194.196.182.64/255.255.255.192 +194.196.182.160/255.255.255.192 +194.196.184.192/255.255.255.192 +194.196.187.64/255.255.255.192 +194.196.189.0/255.255.255.192 +194.196.189.128/255.255.255.128 +194.196.190.128/255.255.255.224 +194.196.190.224/255.255.255.224 +194.196.192.80/255.255.255.248 +194.196.220.0/255.255.255.192 +194.196.220.80/255.255.255.240 +194.196.232.160/255.255.255.224 +194.196.247.0/255.255.255.0 +194.197.21.0/255.255.255.0 +194.199.16.0/255.255.240.0 +194.199.41.0/255.255.251.0 +194.199.48.0/255.255.255.0 +194.199.78.0/255.255.255.0 +194.199.172.0/255.255.250.0 +194.199.243.0/255.255.251.0 +194.199.253.0/255.255.255.0 +194.200.31.0/255.255.255.224 +194.200.84.0/255.255.255.0 +194.200.180.0/255.255.252.0 +194.200.201.192/255.255.255.192 +194.201.32.16/255.255.255.240 +194.201.44.224/255.255.255.224 +194.201.99.0/255.255.255.240 +194.201.147.112/255.255.255.240 +194.201.166.192/255.255.255.192 +194.201.191.48/255.255.255.240 +194.201.196.96/255.255.255.224 +194.201.209.0/255.255.255.192 +194.201.219.8/255.255.255.248 +194.201.241.96/255.255.255.224 +194.202.136.0/255.255.255.0 +194.202.248.144/255.255.255.240 +194.203.32.192/255.255.255.192 +194.203.67.112/255.255.255.240 +194.203.72.128/255.255.255.224 +194.203.103.0/255.255.255.0 +194.204.184.0/255.255.255.0 +194.204.240.224/255.255.255.224 +194.204.245.64/255.255.255.224 +194.205.47.0/255.255.254.0 +194.205.68.32/255.255.255.236 +194.205.88.0/255.255.255.0 +194.205.123.0/255.255.255.0 +194.205.156.168/255.255.255.248 +194.205.172.232/255.255.255.248 +194.205.185.0/255.255.254.192 +194.205.217.0/255.255.255.240 +194.205.242.0/255.255.255.224 +194.206.39.120/255.255.255.248 +194.206.44.16/255.255.255.248 +194.206.48.192/255.255.255.192 +194.206.51.56/255.255.255.248 +194.206.67.0/255.255.255.128 +194.206.112.24/255.255.255.248 +194.206.209.12/255.255.255.248 +194.206.213.80/255.255.255.248 +194.206.227.16/255.255.255.240 +194.206.235.248/255.255.255.248 +194.206.236.128/255.255.255.128 +194.206.246.208/255.255.255.248 +194.207.134.0/255.255.255.0 +194.209.19.64/255.255.255.224 +194.209.124.112/255.255.255.240 +194.209.135.0/255.255.255.224 +194.209.135.96/255.255.255.224 +194.209.159.0/255.255.255.0 +194.209.250.0/255.255.255.0 +194.209.255.88/255.255.255.248 +194.211.120.0/255.255.255.0 +194.211.172.0/255.255.255.0 +194.212.79.0/255.255.255.0 +194.212.122.72/255.255.255.248 +194.212.228.112/255.255.255.248 +194.212.228.128/255.255.255.128 +194.213.50.224/255.255.255.240 +194.213.54.112/255.255.255.248 +194.213.210.0/255.255.255.0 +194.214.6.0/255.255.253.0 +194.214.9.0/255.255.240.0 +194.214.25.0/255.255.253.0 +194.214.28.0/255.255.254.0 +194.214.32.0/255.255.253.0 +194.214.53.0/255.255.254.0 +194.214.56.32/255.255.255.248 +194.214.56.40/255.255.255.248 +194.214.56.64/255.255.255.224 +194.214.56.120/255.255.255.248 +194.214.56.128/255.255.255.128 +194.214.82.0/255.255.255.0 +194.214.103.0/255.255.255.0 +194.214.141.0/255.255.253.0 +194.214.199.0/255.255.255.128 +194.214.199.128/255.255.255.128 +194.214.222.0/255.255.248.0 +194.214.230.0/255.255.255.0 +194.214.231.0/255.255.255.0 +194.216.47.32/255.255.255.240 +194.216.47.64/255.255.255.224 +194.216.148.0/255.255.255.0 +194.216.172.0/255.255.255.0 +194.216.237.0/255.255.255.192 +194.217.113.8/255.255.255.248 +194.218.101.0/255.255.255.0 +194.219.92.224/255.255.255.248 +194.219.175.16/255.255.255.248 +194.221.0.0/255.255.253.0 +194.221.10.0/255.255.255.0 +194.221.12.0/255.255.255.0 +194.221.20.112/255.255.255.240 +194.221.25.0/255.255.255.0 +194.221.40.0/255.255.255.0 +194.221.51.128/255.255.255.192 +194.221.52.0/255.255.255.0 +194.221.91.0/255.255.255.0 +194.221.117.128/255.255.255.192 +194.221.119.128/255.255.255.224 +194.221.119.192/255.255.255.192 +194.221.129.192/255.255.255.192 +194.221.130.192/255.255.255.224 +194.221.131.192/255.255.255.192 +194.221.139.0/255.255.255.0 +194.221.152.32/255.255.255.160 +194.221.161.0/255.255.255.0 +194.221.177.0/255.255.255.0 +194.221.181.160/255.255.255.192 +194.221.186.0/255.255.255.0 +194.221.193.0/255.255.255.128 +194.221.198.64/255.255.255.192 +194.221.198.240/255.255.255.240 +194.221.205.0/255.255.255.128 +194.221.208.0/255.255.255.0 +194.221.232.0/255.255.255.0 +194.221.240.0/255.255.255.0 +194.221.243.128/255.255.255.128 +194.223.152.192/255.255.255.192 +194.223.200.192/255.255.255.192 +194.223.231.192/255.255.255.224 +194.223.249.0/255.255.255.0 +194.228.94.0/255.255.255.0 +194.228.196.192/255.255.255.240 +194.229.116.0/255.255.255.0 +194.229.190.0/255.255.255.0 +194.229.241.128/255.255.255.248 +194.230.99.0/255.255.255.0 +194.230.110.0/255.255.255.0 +194.231.0.0/255.255.254.0 +194.231.10.0/255.255.255.0 +194.231.15.0/255.255.255.0 +194.231.17.0/255.255.255.0 +194.231.18.96/255.255.255.224 +194.231.36.0/255.255.255.192 +194.231.36.128/255.255.255.224 +194.231.38.8/255.255.255.248 +194.231.41.112/255.255.255.240 +194.231.67.96/255.255.255.224 +194.231.68.0/255.255.255.0 +194.231.72.0/255.255.255.0 +194.231.109.0/255.255.254.0 +194.231.145.248/255.255.255.248 +194.231.150.0/255.255.254.192 +194.231.152.0/255.255.255.248 +194.231.152.224/255.255.255.240 +194.231.152.248/255.255.255.248 +194.231.166.0/255.255.255.0 +194.231.174.0/255.255.255.0 +194.231.176.0/255.255.255.0 +194.231.184.0/255.255.255.0 +194.231.198.0/255.255.255.0 +194.231.201.16/255.255.255.240 +194.231.220.0/255.255.255.0 +194.231.242.96/255.255.255.240 +194.231.247.0/255.255.255.224 +194.231.254.224/255.255.255.224 +194.231.255.128/255.255.255.248 +194.233.100.0/255.255.255.0 +194.233.111.128/255.255.255.208 +194.233.115.0/255.255.255.0 +194.233.126.208/255.255.255.240 +194.233.134.0/255.255.253.0 +194.233.144.128/255.255.255.224 +194.233.155.88/255.255.255.248 +194.233.156.0/255.255.255.248 +194.233.156.192/255.255.255.240 +194.233.156.240/255.255.255.240 +194.233.167.0/255.255.255.0 +194.237.111.152/255.255.255.248 +194.237.235.208/255.255.255.248 +194.243.24.144/255.255.255.240 +194.243.36.0/255.255.255.0 +194.243.50.128/255.255.255.224 +194.243.52.224/255.255.255.224 +194.243.54.0/255.255.255.0 +194.243.58.128/255.255.255.240 +194.243.73.128/255.255.255.128 +194.243.104.160/255.255.255.224 +194.243.105.32/255.255.255.224 +194.243.110.64/255.255.255.192 +194.243.156.128/255.255.255.128 +194.243.196.0/255.255.254.0 +194.243.214.224/255.255.255.224 +194.243.229.0/255.255.255.0 +194.244.0.0/255.255.0.0 +194.246.128.0/255.255.128.0 +194.247.117.144/255.255.255.240 +194.247.119.32/255.255.255.248 +194.247.168.64/255.255.255.248 +194.248.30.0/255.255.255.0 +194.248.70.40/255.255.255.248 +194.248.192.240/255.255.255.240 +194.248.206.32/255.255.255.240 +194.248.234.32/255.255.255.248 +194.250.25.16/255.255.255.240 +194.250.46.232/255.255.255.248 +194.250.48.128/255.255.255.248 +194.250.112.0/255.255.255.192 +194.250.174.128/255.255.255.240 +194.250.228.0/255.255.255.0 +194.253.6.0/255.255.253.0 +194.253.62.80/255.255.255.240 +194.253.102.0/255.255.255.0 +194.253.123.0/255.255.255.0 +194.253.146.32/255.255.255.224 +194.253.146.112/255.255.255.240 +194.254.51.0/255.255.246.0 +194.254.61.0/255.255.255.96 +194.254.61.176/255.255.255.240 +194.254.69.0/255.255.254.0 +194.254.104.0/255.255.252.0 +194.254.111.0/255.255.251.0 +194.254.119.0/255.255.254.0 +194.254.121.0/255.255.253.0 +194.254.140.0/255.255.254.0 +194.254.143.0/255.255.255.0 +194.254.174.0/255.255.255.0 +194.254.175.0/255.255.255.0 +194.254.176.0/255.255.249.0 +194.254.199.0/255.255.255.0 +194.254.200.0/255.255.255.0 +194.254.209.0/255.255.255.0 +194.255.39.32/255.255.255.240 +194.255.107.192/255.255.255.192 +195.0.12.0/255.255.255.0 +195.0.13.0/255.255.255.0 +195.0.45.0/255.255.255.0 +195.0.84.0/255.255.253.0 +195.0.87.0/255.255.255.0 +195.0.89.0/255.255.255.0 +195.0.94.0/255.255.255.0 +195.0.114.0/255.255.255.0 +195.0.120.0/255.255.255.0 +195.1.166.192/255.255.255.224 +195.2.32.0/255.255.224.0 +195.2.187.96/255.255.255.240 +195.4.1.144/255.255.255.248 +195.4.240.0/255.255.255.248 +195.5.219.0/255.255.255.0 +195.6.78.64/255.255.255.192 +195.6.125.176/255.255.255.240 +195.6.126.128/255.255.255.224 +195.6.158.0/255.255.255.0 +195.6.175.160/255.255.255.240 +195.6.183.224/255.255.255.248 +195.6.191.192/255.255.255.240 +195.6.200.0/255.255.255.0 +195.6.224.240/255.255.255.248 +195.6.229.8/255.255.255.248 +195.6.229.96/255.255.255.224 +195.6.251.192/255.255.255.240 +195.7.50.0/255.255.255.224 +195.8.68.0/255.255.243.0 +195.8.182.0/255.255.255.116 +195.8.182.158/255.255.255.158 +195.8.187.16/255.255.255.248 +195.8.190.192/255.255.255.224 +195.10.9.128/255.255.255.224 +195.10.13.16/255.255.255.208 +195.10.60.0/255.255.255.0 +195.10.150.64/255.255.255.192 +195.10.194.192/255.255.255.248 +195.10.197.0/255.255.255.0 +195.12.18.160/255.255.255.240 +195.12.102.32/255.255.255.248 +195.13.197.136/255.255.255.248 +195.14.240.128/255.255.255.224 +195.14.248.64/255.255.255.248 +195.15.12.0/255.255.255.128 +195.18.113.0/255.255.255.0 +195.18.166.0/255.255.255.0 +195.18.195.0/255.255.255.0 +195.19.98.0/255.255.254.0 +195.20.126.0/255.255.254.0 +195.21.13.160/255.255.255.224 +195.21.39.80/255.255.255.240 +195.21.42.0/255.255.255.192 +195.21.54.32/255.255.255.240 +195.21.54.64/255.255.255.240 +195.21.143.128/255.255.255.240 +195.21.205.96/255.255.255.224 +195.22.144.0/255.255.254.0 +195.23.10.64/255.255.255.248 +195.23.241.64/255.255.255.224 +195.24.5.176/255.255.255.240 +195.24.96.200/255.255.255.248 +195.25.33.160/255.255.255.240 +195.25.52.32/255.255.255.224 +195.25.91.32/255.255.255.224 +195.25.121.0/255.255.255.0 +195.25.177.192/255.255.255.224 +195.25.177.224/255.255.255.224 +195.25.191.192/255.255.255.240 +195.25.208.128/255.255.255.192 +195.25.215.192/255.255.255.224 +195.25.217.8/255.255.255.248 +195.25.217.184/255.255.255.248 +195.25.218.200/255.255.255.248 +195.25.218.248/255.255.255.248 +195.25.219.32/255.255.255.248 +195.25.219.240/255.255.255.248 +195.25.223.8/255.255.255.248 +195.25.224.8/255.255.255.248 +195.25.226.240/255.255.255.248 +195.25.227.168/255.255.255.248 +195.25.233.248/255.255.255.248 +195.25.234.0/255.255.255.248 +195.25.235.240/255.255.255.248 +195.25.241.240/255.255.255.248 +195.25.245.16/255.255.255.240 +195.25.245.192/255.255.255.224 +195.25.245.240/255.255.255.248 +195.25.247.224/255.255.255.240 +195.25.249.128/255.255.255.192 +195.27.1.32/255.255.255.192 +195.27.8.0/255.255.255.224 +195.27.92.96/255.255.255.224 +195.27.92.192/255.255.255.240 +195.27.129.128/255.255.255.192 +195.28.71.0/255.255.254.240 +195.30.2.112/255.255.255.242 +195.30.64.16/255.255.255.248 +195.30.64.200/255.255.255.248 +195.30.154.0/255.255.255.0 +195.31.128.0/255.255.255.192 +195.31.128.128/255.255.255.192 +195.31.129.64/255.255.255.224 +195.31.141.128/255.255.255.224 +195.31.141.160/255.255.255.224 +195.31.141.192/255.255.255.224 +195.31.141.224/255.255.255.224 +195.31.167.0/255.255.255.192 +195.31.173.0/255.255.255.224 +195.31.176.64/255.255.255.224 +195.31.180.32/255.255.255.224 +195.31.189.32/255.255.255.224 +195.31.198.224/255.255.255.224 +195.31.240.128/255.255.255.224 +195.31.243.64/255.255.255.224 +195.31.250.192/255.255.255.192 +195.32.116.0/255.255.254.0 +195.33.97.32/255.255.255.240 +195.33.97.168/255.255.255.248 +195.33.99.128/255.255.255.224 +195.33.108.0/255.255.252.0 +195.33.129.0/255.255.255.240 +195.33.129.64/255.255.255.240 +195.33.132.0/255.255.252.0 +195.33.138.0/255.255.254.0 +195.34.138.128/255.255.255.224 +195.34.139.16/255.255.255.240 +195.37.41.0/255.255.255.0 +195.37.51.0/255.255.255.0 +195.37.104.0/255.255.251.0 +195.37.144.0/255.255.255.0 +195.37.181.0/255.255.255.192 +195.37.187.240/255.255.255.240 +195.37.191.32/255.255.255.240 +195.37.192.0/255.255.240.0 +195.37.234.32/255.255.255.240 +195.38.210.96/255.255.255.240 +195.38.210.120/255.255.255.248 +195.40.0.0/255.255.255.6 +195.40.0.251/255.255.255.1 +195.40.39.0/255.255.255.128 +195.40.166.128/255.255.255.192 +195.40.167.0/255.255.255.192 +195.40.188.192/255.255.255.224 +195.41.80.248/255.255.255.248 +195.41.228.32/255.255.255.248 +195.42.192.0/255.255.255.226 +195.42.192.31/255.255.255.31 +195.42.209.144/255.255.255.240 +195.43.2.96/255.255.255.240 +195.44.46.48/255.255.255.240 +195.44.46.80/255.255.255.240 +195.44.57.216/255.255.255.248 +195.44.57.232/255.255.255.248 +195.44.70.0/255.255.255.0 +195.44.71.0/255.255.255.0 +195.46.202.0/255.255.255.240 +195.46.214.144/255.255.255.240 +195.46.216.0/255.255.255.0 +195.47.58.64/255.255.255.248 +195.47.73.48/255.255.255.240 +195.47.89.64/255.255.255.192 +195.47.104.64/255.255.255.240 +195.49.110.144/255.255.255.248 +195.50.193.168/255.255.255.248 +195.51.51.0/255.255.255.0 +195.52.14.0/255.255.255.0 +195.52.68.96/255.255.255.224 +195.52.88.0/255.255.255.0 +195.53.49.144/255.255.255.248 +195.53.108.192/255.255.255.240 +195.54.64.224/255.255.255.240 +195.54.201.64/255.255.255.224 +195.55.201.64/255.255.255.192 +195.56.71.0/255.255.255.128 +195.56.245.32/255.255.255.248 +195.58.125.240/255.255.255.240 +195.59.110.128/255.255.255.192 +195.61.39.0/255.255.255.0 +195.61.203.0/255.255.255.0 +195.62.139.128/255.255.255.224 +195.62.197.48/255.255.255.240 +195.63.181.0/255.255.255.128 +195.64.29.0/255.255.255.224 +195.64.38.0/255.255.255.192 +195.64.59.80/255.255.255.240 +195.64.86.208/255.255.255.248 +195.65.60.0/255.255.255.0 +195.65.77.0/255.255.255.0 +195.65.130.0/255.255.255.0 +195.65.169.0/255.255.255.0 +195.65.216.112/255.255.255.248 +195.67.120.96/255.255.255.224 +195.68.2.192/255.255.255.192 +195.68.19.16/255.255.255.240 +195.68.25.144/255.255.255.240 +195.68.29.0/255.255.255.224 +195.68.31.40/255.255.255.248 +195.68.36.184/255.255.255.248 +195.68.38.192/255.255.255.240 +195.68.50.224/255.255.255.240 +195.68.59.0/255.255.255.248 +195.68.59.208/255.255.255.248 +195.68.61.96/255.255.255.224 +195.68.64.96/255.255.255.240 +195.68.64.128/255.255.255.240 +195.68.73.192/255.255.255.224 +195.68.76.144/255.255.255.240 +195.68.98.112/255.255.255.240 +195.68.100.112/255.255.255.248 +195.68.103.192/255.255.255.240 +195.68.103.208/255.255.255.240 +195.68.108.160/255.255.255.240 +195.68.120.112/255.255.255.248 +195.68.122.208/255.255.255.240 +195.68.153.32/255.255.255.240 +195.68.180.224/255.255.255.240 +195.68.236.0/255.255.254.0 +195.68.254.0/255.255.254.0 +195.70.46.144/255.255.255.240 +195.70.93.0/255.255.255.0 +195.70.228.48/255.255.255.240 +195.71.44.48/255.255.255.240 +195.71.94.64/255.255.255.192 +195.71.104.32/255.255.255.248 +195.71.104.48/255.255.255.248 +195.71.108.128/255.255.255.224 +195.71.110.32/255.255.255.224 +195.71.111.0/255.255.255.0 +195.71.125.16/255.255.255.248 +195.71.125.32/255.255.255.240 +195.71.125.64/255.255.255.224 +195.71.126.0/255.255.255.192 +195.71.127.64/255.255.255.192 +195.71.127.224/255.255.255.224 +195.71.137.0/255.255.255.240 +195.71.138.48/255.255.255.248 +195.71.138.224/255.255.255.224 +195.71.139.64/255.255.255.192 +195.71.139.200/255.255.255.232 +195.71.139.232/255.255.255.240 +195.71.140.0/255.255.255.248 +195.71.140.8/255.255.255.240 +195.71.140.32/255.255.255.232 +195.71.140.64/255.255.255.240 +195.71.140.120/255.255.255.248 +195.71.140.136/255.255.255.240 +195.71.140.160/255.255.255.240 +195.71.140.192/255.255.255.248 +195.71.140.208/255.255.255.240 +195.71.144.144/255.255.255.248 +195.71.145.8/255.255.255.248 +195.71.145.136/255.255.255.136 +195.71.146.48/255.255.255.248 +195.71.146.64/255.255.255.248 +195.71.146.80/255.255.255.128 +195.71.146.216/255.255.255.216 +195.71.152.0/255.255.255.248 +195.71.152.8/255.255.255.232 +195.71.152.128/255.255.255.192 +195.71.153.152/255.255.255.216 +195.71.153.224/255.255.255.248 +195.71.154.56/255.255.255.248 +195.71.155.0/255.255.255.128 +195.71.155.224/255.255.255.240 +195.71.157.224/255.255.255.248 +195.71.160.0/255.255.255.248 +195.71.160.8/255.255.255.248 +195.71.160.128/255.255.255.248 +195.71.163.128/255.255.255.128 +195.71.165.192/255.255.255.192 +195.71.167.88/255.255.255.248 +195.71.167.152/255.255.255.248 +195.71.167.240/255.255.255.248 +195.71.172.8/255.255.255.248 +195.71.175.136/255.255.255.248 +195.71.175.144/255.255.255.248 +195.71.177.32/255.255.255.248 +195.71.180.48/255.255.255.248 +195.71.191.120/255.255.255.248 +195.71.191.168/255.255.255.248 +195.71.192.200/255.255.255.248 +195.71.193.16/255.255.255.248 +195.71.199.248/255.255.255.248 +195.71.207.48/255.255.255.248 +195.71.207.112/255.255.255.248 +195.71.207.136/255.255.255.248 +195.71.207.208/255.255.255.248 +195.71.207.232/255.255.255.248 +195.71.207.240/255.255.255.248 +195.71.214.136/255.255.255.248 +195.71.214.184/255.255.255.248 +195.71.214.192/255.255.255.224 +195.71.214.224/255.255.255.248 +195.71.215.160/255.255.255.248 +195.71.215.168/255.255.255.248 +195.71.217.8/255.255.255.248 +195.71.223.208/255.255.255.248 +195.71.223.216/255.255.255.248 +195.72.64.0/255.255.224.0 +195.72.178.200/255.255.255.248 +195.72.190.112/255.255.255.240 +195.72.198.32/255.255.255.223 +195.75.10.192/255.255.255.192 +195.75.26.144/255.255.255.248 +195.75.27.128/255.255.255.128 +195.75.76.128/255.255.255.192 +195.75.90.0/255.255.255.224 +195.75.90.48/255.255.255.208 +195.75.97.160/255.255.255.224 +195.75.104.0/255.255.255.0 +195.75.106.128/255.255.255.224 +195.75.118.0/255.255.254.0 +195.75.151.0/255.255.255.0 +195.75.178.0/255.255.255.224 +195.75.178.184/255.255.255.248 +195.75.205.240/255.255.255.240 +195.75.240.224/255.255.255.224 +195.75.251.160/255.255.255.248 +195.75.253.192/255.255.255.192 +195.76.142.144/255.255.255.240 +195.76.172.0/255.255.255.0 +195.76.238.0/255.255.255.0 +195.77.71.0/255.255.255.0 +195.77.92.0/255.255.255.248 +195.77.169.0/255.255.255.0 +195.79.104.192/255.255.255.224 +195.80.213.72/255.255.255.248 +195.82.79.208/255.255.255.248 +195.82.84.16/255.255.255.248 +195.83.48.0/255.255.252.255 +195.83.53.0/255.255.254.255 +195.83.70.0/255.255.255.128 +195.83.84.0/255.255.254.0 +195.83.158.0/255.255.255.0 +195.84.9.64/255.255.255.192 +195.85.156.40/255.255.255.248 +195.85.156.144/255.255.255.240 +195.85.186.176/255.255.255.248 +195.85.202.0/255.255.255.0 +195.85.221.0/255.255.255.0 +195.85.223.0/255.255.255.0 +195.85.237.0/255.255.255.0 +195.86.6.208/255.255.255.248 +195.86.44.0/255.255.255.0 +195.86.126.224/255.255.255.240 +195.86.244.128/255.255.255.240 +195.86.246.176/255.255.255.248 +195.86.249.184/255.255.255.248 +195.91.51.16/255.255.255.240 +195.91.162.112/255.255.255.240 +195.92.32.128/255.255.255.192 +195.92.40.192/255.255.255.240 +195.92.44.240/255.255.255.240 +195.92.63.136/255.255.255.248 +195.94.54.160/255.255.255.224 +195.94.66.224/255.255.255.240 +195.94.136.0/255.255.255.0 +195.94.151.0/255.255.254.0 +195.94.176.0/255.255.255.0 +195.94.179.32/255.255.255.224 +195.94.180.0/255.255.255.0 +195.94.197.224/255.255.255.224 +195.95.38.32/255.255.255.224 +195.96.31.0/255.255.255.0 +195.97.73.192/255.255.255.240 +195.97.150.96/255.255.255.248 +195.97.198.32/255.255.255.248 +195.98.205.0/255.255.255.192 +195.98.240.0/255.255.253.0 +195.98.244.0/255.255.254.0 +195.99.170.0/255.255.255.0 +195.99.217.192/255.255.255.240 +195.99.219.224/255.255.255.224 +195.101.0.0/255.255.0.0 +195.102.60.40/255.255.255.245 +195.102.82.64/255.255.255.224 +195.102.85.32/255.255.255.224 +195.102.89.128/255.255.255.192 +195.103.22.192/255.255.255.192 +195.103.29.0/255.255.255.0 +195.103.41.192/255.255.255.224 +195.103.43.192/255.255.255.192 +195.103.47.192/255.255.255.192 +195.103.50.128/255.255.255.224 +195.103.57.0/255.255.255.128 +195.103.75.0/255.255.255.224 +195.103.92.0/255.255.254.0 +195.103.107.64/255.255.255.224 +195.103.131.32/255.255.255.224 +195.103.134.128/255.255.255.192 +195.103.134.192/255.255.255.192 +195.103.135.0/255.255.255.0 +195.103.153.168/255.255.255.248 +195.103.158.128/255.255.255.224 +195.103.178.128/255.255.255.128 +195.103.179.128/255.255.255.240 +195.103.182.0/255.255.254.0 +195.103.195.224/255.255.255.224 +195.103.202.0/255.255.255.0 +195.103.203.192/255.255.255.224 +195.103.204.0/255.255.255.128 +195.103.211.64/255.255.255.224 +195.103.225.64/255.255.255.192 +195.103.227.80/255.255.255.240 +195.103.232.0/255.255.255.0 +195.108.66.64/255.255.255.240 +195.108.131.0/255.255.255.0 +195.108.239.16/255.255.255.248 +195.109.87.0/255.255.255.0 +195.109.128.0/255.255.255.0 +195.109.172.88/255.255.255.248 +195.109.214.0/255.255.254.0 +195.109.225.96/255.255.255.224 +195.109.240.32/255.255.255.224 +195.109.246.136/255.255.255.248 +195.109.249.64/255.255.255.248 +195.110.4.32/255.255.255.192 +195.110.5.64/255.255.255.192 +195.110.95.88/255.255.255.248 +195.110.134.176/255.255.255.248 +195.110.139.16/255.255.255.240 +195.112.6.0/255.255.255.0 +195.112.82.216/255.255.255.248 +195.112.168.40/255.255.255.248 +195.112.176.48/255.255.255.248 +195.114.70.64/255.255.255.240 +195.114.72.208/255.255.255.248 +195.114.80.200/255.255.255.248 +195.114.85.128/255.255.255.128 +195.114.195.208/255.255.255.240 +195.114.200.240/255.255.255.240 +195.114.218.64/255.255.255.224 +195.115.33.8/255.255.255.248 +195.115.34.176/255.255.255.248 +195.115.36.128/255.255.255.224 +195.115.47.16/255.255.255.248 +195.115.47.152/255.255.255.248 +195.115.64.176/255.255.255.240 +195.115.85.208/255.255.255.248 +195.115.87.192/255.255.255.224 +195.115.97.192/255.255.255.224 +195.115.99.128/255.255.255.224 +195.115.99.192/255.255.255.224 +195.115.144.192/255.255.255.192 +195.115.162.0/255.255.255.240 +195.117.18.64/255.255.255.192 +195.117.155.176/255.255.255.240 +195.117.157.128/255.255.255.128 +195.118.100.64/255.255.255.64 +195.118.137.0/255.255.255.0 +195.120.8.128/255.255.255.192 +195.120.87.0/255.255.255.224 +195.120.87.64/255.255.255.224 +195.120.87.160/255.255.255.224 +195.120.106.0/255.255.254.0 +195.120.108.0/255.255.255.0 +195.120.113.160/255.255.255.224 +195.120.141.0/255.255.255.0 +195.120.153.0/255.255.255.0 +195.120.173.192/255.255.255.224 +195.120.173.224/255.255.255.240 +195.120.185.32/255.255.255.240 +195.120.198.0/255.255.255.224 +195.120.202.128/255.255.255.192 +195.120.221.128/255.255.255.224 +195.120.232.0/255.255.255.0 +195.120.252.0/255.255.255.192 +195.122.169.128/255.255.255.192 +195.122.170.0/255.255.255.192 +195.122.170.128/255.255.255.192 +195.122.175.240/255.255.255.240 +195.122.180.224/255.255.255.240 +195.122.187.160/255.255.255.224 +195.124.16.0/255.255.255.0 +195.124.32.0/255.255.255.0 +195.124.55.32/255.255.255.232 +195.124.84.0/255.255.254.0 +195.124.123.0/255.255.255.0 +195.124.128.0/255.255.255.0 +195.124.130.0/255.255.255.0 +195.124.138.0/255.255.255.0 +195.124.154.0/255.255.255.0 +195.124.159.160/255.255.255.224 +195.124.175.0/255.255.255.0 +195.124.183.0/255.255.255.0 +195.124.191.0/255.255.255.0 +195.124.198.160/255.255.255.224 +195.125.6.0/255.255.254.0 +195.125.11.32/255.255.255.240 +195.125.43.0/255.255.255.0 +195.125.163.0/255.255.255.0 +195.125.164.128/255.255.255.128 +195.125.190.0/255.255.254.128 +195.125.201.32/255.255.255.248 +195.125.201.40/255.255.255.248 +195.125.219.96/255.255.255.248 +195.125.241.64/255.255.255.224 +195.125.241.128/255.255.255.240 +195.125.253.168/255.255.255.248 +195.126.19.208/255.255.255.248 +195.126.69.40/255.255.255.248 +195.126.85.128/255.255.255.128 +195.126.100.24/255.255.255.248 +195.126.101.112/255.255.255.240 +195.126.102.0/255.255.255.192 +195.126.109.96/255.255.255.224 +195.126.172.96/255.255.255.224 +195.126.214.96/255.255.255.224 +195.126.223.200/255.255.255.248 +195.126.227.120/255.255.255.248 +195.126.249.104/255.255.255.248 +195.127.3.144/255.255.255.240 +195.127.19.16/255.255.255.240 +195.127.24.96/255.255.255.240 +195.127.25.96/255.255.255.224 +195.127.35.88/255.255.255.248 +195.127.40.96/255.255.255.240 +195.127.75.128/255.255.255.128 +195.127.107.40/255.255.255.248 +195.127.154.232/255.255.255.248 +195.127.154.240/255.255.255.224 +195.127.165.64/255.255.255.192 +195.127.182.16/255.255.255.240 +195.127.235.32/255.255.255.248 +195.127.235.40/255.255.255.248 +195.127.235.56/255.255.255.248 +195.127.235.160/255.255.255.248 +195.127.235.168/255.255.255.248 +195.127.235.192/255.255.255.240 +195.127.235.224/255.255.255.224 +195.127.238.64/255.255.255.224 +195.128.92.168/255.255.255.248 +195.128.95.152/255.255.255.248 +195.129.26.0/255.255.254.0 +195.130.74.0/255.255.254.0 +195.130.195.224/255.255.255.240 +195.130.196.176/255.255.255.240 +195.130.204.0/255.255.255.192 +195.131.63.24/255.255.255.248 +195.134.213.64/255.255.255.224 +195.135.74.24/255.255.255.248 +195.135.134.160/255.255.255.224 +195.135.159.32/255.255.255.224 +195.138.48.0/255.255.252.0 +195.141.3.80/255.255.255.248 +195.141.3.184/255.255.255.248 +195.141.72.192/255.255.255.224 +195.141.88.36/255.255.255.248 +195.141.102.32/255.255.255.240 +195.141.211.96/255.255.255.224 +195.142.192.0/255.255.255.0 +195.143.92.132/255.255.255.199 +195.143.116.192/255.255.255.248 +195.143.179.0/255.255.255.0 +195.143.194.16/255.255.255.248 +195.143.211.48/255.255.255.240 +195.143.236.248/255.255.255.248 +195.143.241.160/255.255.255.240 +195.143.242.96/255.255.255.248 +195.143.249.32/255.255.255.248 +195.143.249.64/255.255.255.240 +195.143.250.104/255.255.255.248 +195.144.39.120/255.255.255.248 +195.144.76.40/255.255.255.248 +195.144.77.72/255.255.255.248 +195.144.77.112/255.255.255.248 +195.144.128.0/255.255.255.248 +195.144.133.64/255.255.255.192 +195.144.226.96/255.255.255.240 +195.145.17.128/255.255.255.192 +195.145.18.32/255.255.255.224 +195.145.23.112/255.255.255.240 +195.145.29.16/255.255.255.240 +195.145.29.32/255.255.255.248 +195.145.30.176/255.255.255.248 +195.145.32.24/255.255.255.248 +195.145.34.96/255.255.255.240 +195.145.51.0/255.255.255.248 +195.145.57.128/255.255.255.248 +195.145.57.160/255.255.255.240 +195.145.89.240/255.255.255.248 +195.145.99.208/255.255.255.248 +195.145.102.0/255.255.255.248 +195.145.103.8/255.255.255.248 +195.145.109.0/255.255.255.0 +195.145.132.16/255.255.255.248 +195.145.209.240/255.255.255.248 +195.145.210.200/255.255.255.248 +195.145.214.112/255.255.255.248 +195.145.234.8/255.255.255.248 +195.145.235.240/255.255.255.248 +195.145.245.0/255.255.255.0 +195.147.25.32/255.255.255.248 +195.147.35.24/255.255.255.248 +195.147.39.0/255.255.255.248 +195.147.80.184/255.255.255.248 +195.147.85.56/255.255.255.248 +195.147.106.24/255.255.255.248 +195.147.109.8/255.255.255.248 +195.147.117.240/255.255.255.248 +195.147.119.72/255.255.255.248 +195.147.143.72/255.255.255.248 +195.147.143.232/255.255.255.248 +195.147.145.56/255.255.255.248 +195.147.149.176/255.255.255.248 +195.147.183.64/255.255.255.224 +195.147.188.96/255.255.255.248 +195.147.190.152/255.255.255.248 +195.148.240.0/255.255.252.0 +195.149.39.0/255.255.255.0 +195.149.128.64/255.255.255.192 +195.151.45.224/255.255.255.240 +195.152.233.208/255.255.255.240 +195.153.38.208/255.255.255.240 +195.153.45.248/255.255.255.248 +195.153.62.128/255.255.255.128 +195.153.101.160/255.255.255.224 +195.153.172.240/255.255.255.240 +195.153.203.32/255.255.255.224 +195.153.205.192/255.255.255.192 +195.154.72.0/255.255.255.0 +195.154.91.0/255.255.255.224 +195.154.103.168/255.255.255.248 +195.154.160.0/255.255.255.248 +195.154.183.96/255.255.255.248 +195.154.197.80/255.255.255.240 +195.154.199.224/255.255.255.240 +195.154.202.32/255.255.255.240 +195.154.204.128/255.255.255.224 +195.154.218.64/255.255.255.240 +195.154.233.192/255.255.255.192 +195.155.160.96/255.255.255.224 +195.157.58.144/255.255.255.240 +195.157.96.128/255.255.255.192 +195.157.98.16/255.255.255.248 +195.157.98.176/255.255.255.240 +195.157.129.32/255.255.255.240 +195.157.141.208/255.255.255.240 +195.157.145.128/255.255.255.128 +195.157.149.0/255.255.255.224 +195.157.150.56/255.255.255.248 +195.157.153.16/255.255.255.248 +195.157.153.72/255.255.255.248 +195.157.169.193/255.255.255.240 +195.157.179.72/255.255.255.240 +195.157.195.144/255.255.255.248 +195.157.200.184/255.255.255.248 +195.157.204.240/255.255.255.248 +195.157.217.120/255.255.255.248 +195.157.222.88/255.255.255.248 +195.157.223.80/255.255.255.248 +195.158.141.112/255.255.255.240 +195.158.157.64/255.255.255.192 +195.158.183.32/255.255.255.240 +195.158.184.96/255.255.255.240 +195.159.37.0/255.255.255.0 +195.159.73.192/255.255.255.192 +195.159.161.208/255.255.255.240 +195.159.209.128/255.255.255.128 +195.162.99.0/255.255.255.128 +195.162.194.128/255.255.255.248 +195.162.203.0/255.255.255.248 +195.167.64.224/255.255.255.224 +195.169.99.0/255.255.255.0 +195.170.130.0/255.255.255.224 +195.171.27.96/255.255.255.224 +195.171.73.96/255.255.255.224 +195.171.79.192/255.255.255.240 +195.171.114.160/255.255.255.224 +195.171.132.160/255.255.255.240 +195.171.143.0/255.255.255.128 +195.171.169.64/255.255.255.224 +195.171.189.0/255.255.255.128 +195.171.191.0/255.255.255.192 +195.172.63.24/255.255.255.248 +195.172.67.168/255.255.255.248 +195.172.92.224/255.255.255.248 +195.172.110.96/255.255.255.224 +195.172.131.216/255.255.255.248 +195.172.150.0/255.255.255.240 +195.172.154.56/255.255.255.248 +195.172.160.176/255.255.255.248 +195.172.213.200/255.255.255.248 +195.172.228.160/255.255.255.248 +195.172.247.88/255.255.255.248 +195.173.10.192/255.255.255.192 +195.173.172.0/255.255.255.240 +195.173.172.16/255.255.255.240 +195.176.204.0/255.255.252.0 +195.176.216.0/255.255.254.0 +195.176.225.0/255.255.254.0 +195.176.237.0/255.255.255.0 +195.178.223.0/255.255.255.0 +195.179.22.0/255.255.255.0 +195.182.72.240/255.255.255.248 +195.183.122.0/255.255.255.0 +195.183.160.224/255.255.255.224 +195.183.190.128/255.255.255.128 +195.184.115.64/255.255.255.192 +195.184.159.0/255.255.255.224 +195.187.80.0/255.255.255.0 +195.187.136.0/255.255.252.0 +195.188.16.160/255.255.255.224 +195.188.164.176/255.255.255.240 +195.188.195.224/255.255.255.240 +195.190.95.0/255.255.255.0 +195.191.38.24/255.255.255.248 +195.191.53.128/255.255.255.128 +195.191.142.0/255.255.255.224 +195.191.143.8/255.255.255.248 +195.193.35.0/255.255.255.248 +195.193.170.0/255.255.255.0 +195.193.172.0/255.255.255.0 +195.193.200.168/255.255.255.248 +195.193.215.248/255.255.255.248 +195.193.234.56/255.255.255.248 +195.197.189.128/255.255.255.248 +195.197.219.192/255.255.255.224 +195.199.20.32/255.255.255.240 +195.199.22.32/255.255.255.240 +195.199.33.160/255.255.255.240 +195.199.50.112/255.255.255.240 +195.199.60.240/255.255.255.240 +195.199.73.240/255.255.255.240 +195.202.65.96/255.255.255.224 +195.202.72.96/255.255.255.248 +195.204.47.0/255.255.255.224 +195.204.204.32/255.255.255.224 +195.205.46.0/255.255.255.128 +195.205.163.16/255.255.255.248 +195.205.248.128/255.255.255.128 +195.206.128.0/255.255.255.192 +195.207.71.8/255.255.255.248 +195.207.71.32/255.255.255.224 +195.207.71.64/255.255.255.192 +195.207.77.224/255.255.255.232 +195.207.93.40/255.255.255.248 +195.207.102.0/255.255.255.0 +195.207.153.64/255.255.255.192 +195.207.163.0/255.255.255.0 +195.210.129.0/255.255.255.0 +195.212.2.112/255.255.255.240 +195.212.4.0/255.255.255.0 +195.212.6.240/255.255.255.248 +195.212.10.16/255.255.255.240 +195.212.13.80/255.255.255.240 +195.212.15.0/255.255.255.0 +195.212.19.64/255.255.255.248 +195.212.23.104/255.255.255.248 +195.212.27.32/255.255.255.240 +195.212.32.128/255.255.255.224 +195.212.40.240/255.255.255.240 +195.212.45.32/255.255.255.224 +195.212.49.16/255.255.255.248 +195.212.61.192/255.255.255.192 +195.212.69.176/255.255.255.248 +195.212.88.0/255.255.255.224 +195.212.88.96/255.255.255.224 +195.212.89.32/255.255.255.224 +195.212.92.32/255.255.255.224 +195.212.105.0/255.255.255.0 +195.212.120.0/255.255.255.0 +195.212.154.160/255.255.255.240 +195.212.155.112/255.255.255.248 +195.212.169.64/255.255.255.224 +195.212.184.64/255.255.255.192 +195.212.185.0/255.255.255.0 +195.213.54.32/255.255.255.224 +195.213.55.240/255.255.255.240 +195.213.71.64/255.255.255.224 +195.213.93.64/255.255.255.224 +195.213.117.0/255.255.255.128 +195.213.119.0/255.255.255.0 +195.213.123.0/255.255.255.0 +195.213.180.0/255.255.255.0 +195.213.182.120/255.255.255.248 +195.213.218.128/255.255.255.128 +195.215.60.80/255.255.255.248 +195.216.69.0/255.255.255.224 +195.217.52.40/255.255.255.248 +195.217.130.128/255.255.255.128 +195.217.159.224/255.255.255.224 +195.217.212.176/255.255.255.240 +195.217.237.144/255.255.255.240 +195.220.63.0/255.255.255.0 +195.220.88.0/255.255.254.0 +195.220.90.0/255.255.255.0 +195.220.91.0/255.255.255.0 +195.220.95.0/255.255.255.0 +195.220.103.0/255.255.253.0 +195.220.107.0/255.255.255.0 +195.220.117.0/255.255.248.0 +195.220.170.0/255.255.248.0 +195.220.197.0/255.255.253.0 +195.220.209.0/255.255.248.0 +195.220.231.0/255.255.251.0 +195.221.14.0/255.255.253.0 +195.221.20.0/255.255.246.0 +195.221.30.0/255.255.255.0 +195.221.31.0/255.255.255.0 +195.221.32.0/255.255.255.0 +195.221.33.0/255.255.255.0 +195.221.34.0/255.255.255.0 +195.221.35.0/255.255.255.0 +195.221.36.0/255.255.255.0 +195.221.37.0/255.255.255.0 +195.221.84.216/255.255.255.248 +195.221.125.0/255.255.253.0 +195.221.138.0/255.255.254.128 +195.221.201.0/255.255.255.0 +195.221.232.0/255.255.255.0 +195.221.246.0/255.255.254.0 +195.222.252.0/255.255.255.128 +195.223.12.160/255.255.255.224 +195.223.22.128/255.255.255.224 +195.223.27.0/255.255.255.224 +195.223.27.64/255.255.255.224 +195.223.49.0/255.255.255.0 +195.223.64.0/255.255.255.240 +195.223.70.0/255.255.255.0 +195.223.91.96/255.255.255.248 +195.223.94.128/255.255.255.192 +195.223.109.200/255.255.255.248 +195.223.131.0/255.255.255.0 +195.223.135.0/255.255.252.0 +195.223.142.0/255.255.255.0 +195.223.154.0/255.255.255.0 +195.223.160.192/255.255.255.192 +195.223.168.0/255.255.255.0 +195.223.193.0/255.255.255.128 +195.223.203.128/255.255.255.192 +195.223.214.0/255.255.255.128 +195.223.220.0/255.255.255.0 +195.223.222.200/255.255.255.248 +195.223.222.224/255.255.255.224 +195.223.226.128/255.255.255.192 +195.223.239.64/255.255.255.240 +195.223.244.128/255.255.255.224 +195.223.245.64/255.255.255.224 +195.223.245.128/255.255.255.224 +195.223.249.128/255.255.255.192 +195.224.14.0/255.255.255.192 +195.224.34.0/255.255.255.0 +195.224.74.128/255.255.255.128 +195.224.106.160/255.255.255.248 +195.224.201.0/255.255.255.128 +195.224.206.0/255.255.255.0 +195.224.231.128/255.255.255.192 +195.224.238.64/255.255.255.192 +195.226.105.0/255.255.255.248 +195.226.114.192/255.255.255.192 +195.226.160.160/255.255.255.240 +195.226.168.224/255.255.255.224 +195.226.187.176/255.255.255.240 +195.226.188.0/255.255.255.0 +195.227.81.160/255.255.255.240 +195.227.89.120/255.255.255.248 +195.227.159.192/255.255.255.192 +195.228.48.0/255.255.255.0 +195.228.146.136/255.255.255.248 +195.229.35.88/255.255.255.248 +195.229.35.168/255.255.255.248 +195.229.101.0/255.255.255.128 +195.229.121.64/255.255.255.240 +195.229.123.0/255.255.255.192 +195.229.127.128/255.255.255.128 +195.229.153.16/255.255.255.240 +195.229.168.176/255.255.255.240 +195.229.225.80/255.255.255.240 +195.229.230.24/255.255.255.248 +195.229.231.208/255.255.255.240 +195.230.39.160/255.255.255.240 +195.230.58.104/255.255.255.248 +195.230.66.0/255.255.255.0 +195.230.75.192/255.255.255.224 +195.232.82.96/255.255.255.240 +195.233.64.0/255.255.255.240 +195.234.153.0/255.255.255.0 +195.238.238.240/255.255.255.240 +195.239.59.0/255.255.255.192 +195.239.137.96/255.255.255.240 +195.242.44.160/255.255.255.240 +195.242.53.88/255.255.255.248 +195.242.53.120/255.255.255.248 +195.242.54.176/255.255.255.240 +195.242.59.128/255.255.255.224 +195.242.162.208/255.255.255.240 +195.243.57.80/255.255.255.80 +195.243.74.40/255.255.255.248 +195.243.81.0/255.255.255.248 +195.243.131.104/255.255.255.248 +195.243.135.144/255.255.255.248 +195.243.139.144/255.255.255.248 +195.243.150.32/255.255.255.224 +195.243.162.0/255.255.255.0 +195.243.198.96/255.255.255.240 +195.243.199.208/255.255.255.240 +195.243.201.240/255.255.255.248 +195.243.216.192/255.255.255.192 +195.243.219.128/255.255.255.248 +195.243.238.192/255.255.255.240 +195.243.243.24/255.255.255.248 +195.243.248.64/255.255.255.224 +195.244.96.88/255.255.255.248 +195.244.107.224/255.255.255.224 +195.244.119.192/255.255.255.248 +195.244.127.232/255.255.255.248 +195.244.234.96/255.255.255.240 +195.247.58.0/255.255.255.0 +195.247.176.24/255.255.255.248 +195.248.7.96/255.255.255.240 +195.248.49.0/255.255.255.128 +195.249.67.200/255.255.255.248 +195.250.0.0/255.255.254.192 +195.250.16.0/255.255.255.128 +195.250.158.232/255.255.255.248 +195.250.232.0/255.255.255.0 +195.250.252.48/255.255.255.248 +195.251.0.0/255.255.254.0 +195.252.214.240/255.255.255.240 +196.1.68.0/255.255.255.0 +196.22.32.0/255.255.240.0 +196.25.161.0/255.255.255.127 +196.27.13.16/255.255.255.240 +196.27.13.160/255.255.255.248 +196.27.13.176/255.255.255.240 +196.27.17.0/255.255.255.240 +196.40.9.136/255.255.255.248 +196.40.76.96/255.255.255.248 +198.3.221.0/255.255.255.0 +198.4.83.0/255.255.255.0 +198.4.144.0/255.255.240.0 +198.5.143.0/255.255.255.0 +198.6.32.0/255.255.224.0 +198.7.8.0/255.255.248.0 +198.7.64.0/255.255.224.0 +198.8.32.0/255.255.231.0 +198.17.17.0/255.255.255.0 +198.17.46.0/255.255.254.0 +198.17.54.0/255.255.253.0 +198.17.59.0/255.255.255.0 +198.17.76.0/255.255.255.0 +198.17.99.0/255.255.255.0 +198.17.101.0/255.255.255.0 +198.17.113.0/255.255.253.0 +198.17.117.0/255.255.255.0 +198.17.122.0/255.255.254.0 +198.17.129.0/255.255.255.0 +198.17.144.0/255.255.255.0 +198.17.147.0/255.255.255.0 +198.17.152.0/255.255.254.0 +198.17.175.0/255.255.255.0 +198.17.180.0/255.255.253.0 +198.17.206.0/255.255.255.0 +198.17.209.0/255.255.255.0 +198.17.213.0/255.255.255.0 +198.17.236.0/255.255.254.0 +198.22.11.0/255.255.251.0 +198.22.27.0/255.255.253.0 +198.22.43.0/255.255.255.0 +198.22.44.0/255.255.255.0 +198.22.53.0/255.255.252.0 +198.22.59.0/255.255.255.0 +198.22.68.0/255.255.254.0 +198.22.77.0/255.255.255.0 +198.22.101.0/255.255.255.0 +198.22.114.0/255.255.254.0 +198.22.119.0/255.255.255.0 +198.22.125.0/255.255.254.0 +198.22.127.0/255.255.255.0 +198.22.132.0/255.255.253.0 +198.22.152.0/255.255.255.0 +198.22.162.0/255.255.255.0 +198.22.177.0/255.255.255.0 +198.22.184.0/255.255.255.0 +198.22.189.0/255.255.254.0 +198.22.196.0/255.255.255.0 +198.24.16.0/255.255.240.0 +198.27.16.0/255.255.244.0 +198.35.0.0/255.255.240.0 +198.35.128.0/255.255.128.0 +198.36.196.0/255.255.252.0 +198.40.32.0/255.255.244.0 +198.45.64.0/255.255.206.0 +198.46.32.0/255.255.240.0 +198.47.16.0/255.255.241.0 +198.48.4.0/255.255.252.0 +198.49.31.0/255.255.247.0 +198.49.105.0/255.255.255.0 +198.49.149.0/255.255.255.0 +198.49.171.0/255.255.255.0 +198.49.176.0/255.255.255.0 +198.49.183.0/255.255.244.0 +198.49.198.0/255.255.254.0 +198.49.220.0/255.255.255.0 +198.49.246.0/255.255.254.0 +198.49.249.0/255.255.255.0 +198.50.0.0/255.255.248.0 +198.51.3.0/255.255.255.0 +198.51.11.0/255.255.255.0 +198.51.25.0/255.255.246.0 +198.51.46.0/255.255.253.0 +198.51.90.0/255.255.255.0 +198.51.118.0/255.255.254.0 +198.51.142.0/255.255.255.0 +198.51.153.0/255.255.254.0 +198.51.167.0/255.255.255.0 +198.51.170.0/255.255.252.0 +198.51.207.0/255.255.255.0 +198.51.211.0/255.255.255.0 +198.51.213.0/255.255.254.0 +198.51.238.0/255.255.253.0 +198.51.245.0/255.255.255.0 +198.55.0.0/255.255.248.0 +198.55.32.0/255.255.246.0 +198.56.32.0/255.255.236.0 +198.59.128.0/255.255.255.0 +198.59.168.0/255.255.255.0 +198.61.8.0/255.255.248.0 +198.62.11.0/255.255.251.0 +198.62.69.0/255.255.255.0 +198.62.89.0/255.255.255.0 +198.62.109.0/255.255.254.0 +198.62.115.0/255.255.255.0 +198.62.143.0/255.255.252.0 +198.62.158.0/255.255.254.0 +198.62.169.0/255.255.255.0 +198.62.179.0/255.255.255.0 +198.62.189.0/255.255.255.0 +198.62.216.0/255.255.255.0 +198.62.221.0/255.255.255.0 +198.62.224.0/255.255.255.0 +198.62.236.0/255.255.255.0 +198.62.251.0/255.255.252.0 +198.68.186.0/255.255.255.0 +198.69.82.0/255.255.255.0 +198.69.217.0/255.255.255.0 +198.69.231.0/255.255.255.0 +198.70.0.0/255.255.255.248 +198.70.8.8/255.255.255.248 +198.70.24.128/255.255.255.128 +198.70.114.0/255.255.255.0 +198.71.0.0/255.255.250.0 +198.71.64.0/255.255.244.0 +198.72.16.0/255.255.248.0 +198.72.32.0/255.255.246.0 +198.72.64.0/255.255.242.0 +198.73.83.0/255.255.251.0 +198.73.119.0/255.255.253.0 +198.73.151.0/255.255.246.0 +198.74.32.0/255.255.246.0 +198.74.64.0/255.255.246.0 +198.76.32.0/255.255.253.0 +198.76.65.0/255.255.255.0 +198.76.84.0/255.255.255.0 +198.76.128.0/255.255.224.0 +198.77.71.0/255.255.255.0 +198.77.76.0/255.255.255.0 +198.77.163.0/255.255.255.0 +198.77.181.0/255.255.255.0 +198.77.203.0/255.255.255.0 +198.78.72.0/255.255.248.0 +198.78.160.0/255.255.248.0 +198.81.193.0/255.255.255.0 +198.81.230.0/255.255.255.0 +198.83.176.0/255.255.252.0 +198.90.16.0/255.255.252.0 +198.91.16.0/255.255.251.0 +198.91.32.0/255.255.246.0 +198.96.2.0/255.255.254.0 +198.96.64.0/255.255.244.0 +198.96.114.0/255.255.250.0 +198.97.35.0/255.255.255.0 +198.97.63.0/255.255.255.0 +198.97.65.0/255.255.252.0 +198.97.207.0/255.255.252.0 +198.97.240.0/255.255.255.0 +198.97.243.0/255.255.255.0 +198.98.0.0/255.255.249.0 +198.98.8.0/255.255.251.0 +198.98.16.0/255.255.250.0 +198.98.32.0/255.255.240.0 +198.99.0.0/255.255.252.0 +198.99.69.0/255.255.252.0 +198.99.100.0/255.255.253.0 +198.99.126.0/255.255.255.0 +198.99.162.0/255.255.253.0 +198.99.171.0/255.255.255.0 +198.99.175.0/255.255.255.0 +198.99.185.0/255.255.255.0 +198.99.216.0/255.255.255.0 +198.99.229.0/255.255.255.0 +198.99.246.0/255.255.252.0 +198.100.16.0/255.255.250.0 +198.101.0.0/255.255.249.0 +198.102.32.0/255.255.224.0 +198.102.83.0/255.255.254.0 +198.102.100.0/255.255.254.0 +198.102.112.0/255.255.241.0 +198.102.151.0/255.255.251.0 +198.102.159.0/255.255.255.0 +198.102.218.0/255.255.254.0 +198.102.223.0/255.255.255.0 +198.103.134.0/255.255.254.0 +198.103.140.0/255.255.255.0 +198.103.145.0/255.255.255.0 +198.103.161.0/255.255.255.0 +198.105.128.0/255.255.226.0 +198.113.44.0/255.255.255.0 +198.113.48.0/255.255.255.0 +198.114.180.0/255.255.255.0 +198.115.182.0/255.255.255.0 +198.115.225.0/255.255.252.0 +198.115.230.0/255.255.252.0 +198.133.16.0/255.255.254.0 +198.133.19.0/255.255.254.0 +198.133.22.0/255.255.254.0 +198.133.25.0/255.255.254.0 +198.133.28.0/255.255.254.0 +198.133.31.0/255.255.254.0 +198.133.63.0/255.255.255.0 +198.133.120.0/255.255.255.0 +198.133.129.0/255.255.254.0 +198.133.146.0/255.255.255.0 +198.133.152.0/255.255.253.0 +198.133.198.0/255.255.255.0 +198.133.210.0/255.255.255.0 +198.133.224.0/255.255.254.0 +198.133.241.0/255.255.255.0 +198.133.249.0/255.255.250.0 +198.134.64.0/255.255.216.0 +198.134.137.0/255.255.255.0 +198.134.139.0/255.255.255.0 +198.135.65.0/255.255.254.0 +198.135.73.0/255.255.255.0 +198.135.121.0/255.255.255.0 +198.135.199.0/255.255.255.0 +198.135.220.0/255.255.255.0 +198.135.224.0/255.255.255.0 +198.136.32.0/255.255.246.0 +198.136.136.0/255.255.251.0 +198.136.157.0/255.255.255.0 +198.136.187.0/255.255.252.0 +198.136.248.0/255.255.254.0 +198.137.0.0/255.255.248.0 +198.137.141.0/255.255.255.0 +198.137.157.0/255.255.255.0 +198.137.189.0/255.255.252.0 +198.137.203.0/255.255.255.0 +198.137.234.0/255.255.254.0 +198.137.240.0/255.255.254.0 +198.137.251.0/255.255.255.0 +198.140.32.0/255.255.174.0 +198.140.130.0/255.255.255.0 +198.140.148.0/255.255.255.0 +198.140.226.0/255.255.254.0 +198.140.239.0/255.255.253.0 +198.147.64.0/255.255.192.0 +198.147.134.0/255.255.255.0 +198.147.153.0/255.255.255.0 +198.147.170.0/255.255.251.0 +198.147.177.0/255.255.253.0 +198.147.220.0/255.255.255.0 +198.147.229.0/255.255.255.0 +198.147.237.0/255.255.250.0 +198.147.246.0/255.255.255.0 +198.148.151.0/255.255.255.0 +198.148.172.0/255.255.255.0 +198.148.179.0/255.255.255.0 +198.148.199.0/255.255.255.0 +198.148.207.0/255.255.255.0 +198.148.211.0/255.255.255.0 +198.148.251.0/255.255.252.0 +198.151.129.0/255.255.255.0 +198.151.134.0/255.255.255.0 +198.151.150.0/255.255.254.0 +198.151.162.0/255.255.255.0 +198.151.168.0/255.255.252.0 +198.151.173.0/255.255.255.0 +198.151.185.0/255.255.254.0 +198.151.215.0/255.255.255.0 +198.151.229.0/255.255.255.0 +198.151.235.0/255.255.252.0 +198.151.250.0/255.255.255.0 +198.153.150.0/255.255.255.0 +198.154.8.0/255.255.248.0 +198.154.32.0/255.255.255.0 +198.155.0.0/255.255.0.0 +198.160.137.0/255.255.255.0 +198.160.141.0/255.255.255.0 +198.160.161.0/255.255.255.0 +198.160.192.0/255.255.253.0 +198.160.203.0/255.255.252.0 +198.160.210.0/255.255.255.0 +198.160.237.0/255.255.249.0 +198.161.21.0/255.255.255.0 +198.161.23.0/255.255.251.0 +198.161.193.0/255.255.255.0 +198.161.239.0/255.255.255.0 +198.162.2.0/255.255.255.0 +198.162.9.0/255.255.255.0 +198.162.84.0/255.255.253.0 +198.162.124.0/255.255.253.0 +198.163.8.0/255.255.232.0 +198.163.72.0/255.255.236.0 +198.163.93.0/255.255.254.0 +198.163.96.0/255.255.241.0 +198.163.112.0/255.255.254.0 +198.163.128.0/255.255.240.0 +198.163.152.0/255.255.255.0 +198.163.154.0/255.255.255.0 +198.163.156.0/255.255.255.0 +198.163.160.0/255.255.240.0 +198.163.208.0/255.255.252.0 +198.165.21.64/255.255.255.240 +198.167.33.0/255.255.161.0 +198.168.6.0/255.255.255.0 +198.168.8.0/255.255.254.0 +198.168.12.0/255.255.252.0 +198.169.0.0/255.255.255.0 +198.169.28.0/255.255.223.0 +198.169.100.0/255.255.231.0 +198.169.129.0/255.255.255.0 +198.169.131.0/255.255.255.0 +198.169.202.0/255.255.254.0 +198.169.241.0/255.255.251.0 +198.174.0.0/255.254.248.0 +198.175.64.0/255.255.196.0 +198.175.145.0/255.255.255.0 +198.175.149.0/255.255.255.0 +198.175.159.0/255.255.255.0 +198.175.161.0/255.255.255.0 +198.175.192.0/255.255.255.0 +198.175.200.0/255.255.255.0 +198.175.218.0/255.255.251.0 +198.176.0.0/255.255.240.0 +198.176.32.0/255.255.245.0 +198.176.138.0/255.255.255.0 +198.176.174.0/255.255.255.0 +198.176.198.0/255.255.255.0 +198.176.200.0/255.255.255.0 +198.176.208.0/255.255.252.0 +198.176.229.0/255.255.254.0 +198.176.252.0/255.255.255.0 +198.177.8.0/255.255.236.0 +198.177.128.0/255.255.246.0 +198.177.153.0/255.255.255.0 +198.177.238.0/255.255.253.0 +198.177.248.0/255.255.253.0 +198.178.16.0/255.255.244.0 +198.178.146.0/255.255.255.0 +198.178.150.0/255.255.255.0 +198.178.160.0/255.255.255.0 +198.178.168.0/255.255.253.0 +198.178.187.0/255.255.253.0 +198.178.200.0/255.255.254.0 +198.178.252.0/255.255.254.0 +198.179.0.0/255.255.251.0 +198.179.20.0/255.255.254.0 +198.179.32.0/255.255.236.0 +198.179.160.0/255.255.255.0 +198.179.174.0/255.255.254.0 +198.179.199.0/255.255.255.0 +198.179.213.0/255.255.255.0 +198.179.233.0/255.255.255.0 +198.179.246.0/255.255.255.0 +198.179.249.0/255.255.255.0 +198.180.4.0/255.255.252.0 +198.180.147.0/255.255.255.0 +198.180.188.0/255.255.255.0 +198.180.192.0/255.255.255.0 +198.180.193.0/255.255.254.0 +198.180.195.0/255.255.255.0 +198.180.197.0/255.255.254.0 +198.180.207.0/255.255.255.0 +198.180.211.0/255.255.255.0 +198.180.227.0/255.255.255.0 +198.180.232.0/255.255.255.0 +198.180.240.0/255.255.254.0 +198.181.16.0/255.255.240.0 +198.181.128.0/255.255.254.0 +198.181.151.0/255.255.255.0 +198.181.179.0/255.255.255.0 +198.181.223.0/255.255.252.0 +198.181.231.0/255.255.255.0 +198.181.237.0/255.255.255.0 +198.181.251.0/255.255.251.0 +198.182.140.0/255.255.255.0 +198.182.143.0/255.255.255.0 +198.182.161.0/255.255.253.0 +198.182.173.0/255.255.255.0 +198.182.199.0/255.255.253.0 +198.182.223.0/255.255.254.0 +198.182.235.0/255.255.255.0 +198.182.237.0/255.255.255.0 +198.182.248.0/255.255.255.0 +198.183.128.0/255.255.252.0 +198.183.146.0/255.255.254.0 +198.183.153.0/255.255.255.0 +198.183.196.0/255.255.255.0 +198.184.32.0/255.255.226.0 +198.184.128.0/255.255.255.0 +198.184.131.0/255.255.255.0 +198.184.139.0/255.255.255.0 +198.184.155.0/255.255.252.0 +198.184.170.0/255.255.255.0 +198.184.177.0/255.255.255.0 +198.184.180.0/255.255.252.0 +198.184.200.0/255.255.255.0 +198.184.209.0/255.255.255.0 +198.184.210.0/255.255.255.0 +198.184.221.0/255.255.255.0 +198.184.224.0/255.255.255.0 +198.185.142.0/255.255.255.0 +198.185.167.0/255.255.255.0 +198.185.208.0/255.255.252.0 +198.185.250.0/255.255.250.0 +198.186.32.0/255.255.224.0 +198.186.139.0/255.255.255.0 +198.186.170.0/255.255.253.0 +198.186.199.0/255.255.255.0 +198.186.218.0/255.255.252.0 +198.186.229.0/255.255.255.0 +198.187.0.0/255.255.240.0 +198.187.160.0/255.255.254.0 +198.187.189.0/255.255.254.0 +198.187.220.0/255.255.253.0 +198.187.254.0/255.255.255.0 +198.190.145.0/255.255.254.0 +198.190.161.0/255.255.255.0 +198.190.165.0/255.255.255.0 +198.190.170.0/255.255.255.0 +198.190.173.0/255.255.252.0 +198.190.185.0/255.255.255.0 +198.190.190.0/255.255.255.0 +198.190.209.0/255.255.255.0 +198.190.224.0/255.255.254.0 +198.190.227.0/255.255.255.0 +198.190.230.0/255.255.255.0 +198.190.235.0/255.255.251.0 +198.199.0.0/255.255.252.0 +198.199.8.0/255.255.250.0 +198.199.16.0/255.255.240.0 +198.199.131.0/255.255.254.0 +198.199.142.0/255.255.255.0 +198.199.151.0/255.255.253.0 +198.199.181.0/255.255.255.0 +198.199.199.0/255.255.255.0 +198.199.247.0/255.255.255.0 +198.200.132.0/255.255.254.0 +198.200.137.0/255.255.255.0 +198.200.152.0/255.255.254.0 +198.200.155.0/255.255.255.0 +198.200.186.0/255.255.254.0 +198.200.201.0/255.255.255.0 +198.200.235.0/255.255.255.0 +198.200.248.0/255.255.255.0 +198.200.252.0/255.254.244.0 +198.202.8.0/255.255.254.0 +198.202.64.0/255.255.192.0 +198.202.146.0/255.255.254.0 +198.202.154.0/255.255.255.0 +198.202.178.0/255.255.252.0 +198.202.186.0/255.255.255.0 +198.202.208.0/255.255.255.0 +198.202.222.0/255.255.255.0 +198.202.227.0/255.255.252.0 +198.202.233.0/255.255.255.0 +198.202.239.0/255.255.255.0 +198.203.135.0/255.255.255.0 +198.203.166.0/255.255.255.0 +198.203.168.0/255.255.255.0 +198.203.170.0/255.255.252.0 +198.203.183.0/255.255.255.0 +198.203.186.0/255.255.254.0 +198.203.190.0/255.255.255.0 +198.203.216.0/255.255.255.0 +198.203.237.0/255.255.251.0 +198.203.246.0/255.255.252.0 +198.204.97.0/255.255.255.0 +198.204.100.0/255.255.252.0 +198.204.124.0/255.255.255.0 +198.206.157.0/255.255.252.0 +198.206.194.0/255.255.255.0 +198.206.210.0/255.255.252.0 +198.206.218.0/255.255.250.0 +198.207.130.0/255.255.250.0 +198.207.158.0/255.255.255.0 +198.207.176.0/255.255.255.0 +198.207.237.0/255.255.252.0 +198.207.243.0/255.255.255.0 +198.207.252.0/255.255.254.0 +198.212.135.0/255.255.250.0 +198.212.143.0/255.255.255.0 +198.212.164.0/255.255.254.0 +198.212.199.0/255.255.255.0 +198.212.203.0/255.255.255.0 +198.212.208.0/255.255.251.0 +198.212.250.0/255.255.255.0 +198.217.8.0/255.255.240.0 +198.218.0.0/255.251.0.0 +198.231.16.0/255.255.246.0 +198.232.137.0/255.255.254.0 +198.232.172.0/255.255.252.0 +198.232.178.0/255.255.255.0 +198.232.198.0/255.255.250.0 +198.232.205.0/255.255.251.0 +198.232.211.0/255.255.255.0 +198.232.253.0/255.255.254.0 +198.235.63.0/255.255.255.0 +198.236.0.0/255.252.0.0 +198.240.8.0/255.255.232.0 +198.244.16.0/255.255.240.0 +198.245.128.0/255.255.247.0 +198.245.139.0/255.255.255.0 +198.245.141.0/255.255.255.0 +198.245.159.0/255.255.255.0 +198.245.181.0/255.255.254.0 +198.245.186.0/255.255.252.0 +198.245.244.0/255.255.255.0 +198.246.32.0/255.255.244.0 +198.246.64.0/255.255.192.0 +198.246.135.0/255.255.251.0 +198.246.159.0/255.255.255.0 +198.246.196.0/255.255.255.0 +198.248.0.0/255.255.0.0 +198.249.103.0/255.255.255.0 +198.251.0.0/255.255.248.0 +198.252.0.0/255.255.248.0 +198.252.143.0/255.255.255.0 +198.252.211.0/255.255.255.0 +198.252.231.0/255.255.255.0 +199.2.109.0/255.255.255.0 +199.4.67.0/255.255.255.0 +199.4.128.0/255.255.255.0 +199.4.159.0/255.255.254.0 +199.4.193.0/255.255.255.0 +199.4.250.0/255.255.254.0 +199.5.64.0/255.255.192.0 +199.5.133.0/255.255.255.0 +199.5.146.0/255.255.255.0 +199.5.252.0/255.255.255.0 +199.5.253.0/255.255.255.0 +199.6.35.0/255.255.255.0 +199.6.73.0/255.255.253.0 +199.9.11.0/255.255.255.0 +199.9.32.0/255.255.231.0 +199.10.16.0/255.255.246.0 +199.10.36.0/255.255.250.0 +199.10.44.0/255.255.255.0 +199.10.45.0/255.255.255.0 +199.10.46.0/255.255.255.0 +199.10.48.0/255.255.255.0 +199.10.50.0/255.255.255.0 +199.10.55.0/255.255.255.0 +199.10.58.0/255.255.255.0 +199.10.63.0/255.255.255.0 +199.10.93.0/255.255.255.0 +199.10.122.0/255.255.255.0 +199.10.148.0/255.255.255.0 +199.10.160.0/255.255.255.0 +199.10.174.0/255.255.255.0 +199.10.198.0/255.255.255.0 +199.10.204.0/255.255.254.0 +199.10.212.0/255.255.254.0 +199.10.214.0/255.255.255.0 +199.10.215.0/255.255.254.0 +199.10.237.0/255.255.254.0 +199.10.244.0/255.255.255.0 +199.15.0.0/255.255.248.0 +199.20.8.0/255.255.248.0 +199.20.64.0/255.255.192.0 +199.20.128.0/255.255.128.0 +199.26.158.0/255.255.255.0 +199.26.187.0/255.255.253.0 +199.26.226.0/255.255.254.0 +199.26.240.0/255.255.255.0 +199.26.249.0/255.255.255.0 +199.32.16.0/255.255.241.0 +199.33.0.0/255.255.248.0 +199.33.183.0/255.255.255.0 +199.33.194.0/255.255.255.0 +199.33.196.0/255.255.255.0 +199.33.216.0/255.255.255.0 +199.35.105.0/255.255.252.0 +199.38.8.0/255.255.248.0 +199.44.204.0/255.255.255.0 +199.47.32.0/255.255.251.0 +199.48.32.0/255.255.240.0 +199.60.64.0/255.255.224.0 +199.60.128.0/255.255.240.0 +199.71.1.0/255.255.255.0 +199.71.208.0/255.255.255.0 +199.72.36.0/255.255.255.0 +199.72.78.48/255.255.255.240 +199.72.98.136/255.255.255.248 +199.72.138.128/255.255.255.224 +199.74.0.0/255.255.248.0 +199.74.170.0/255.255.255.0 +199.75.96.0/255.255.244.0 +199.75.162.0/255.255.254.0 +199.75.176.0/255.255.240.0 +199.75.235.0/255.255.255.0 +199.79.0.0/255.255.240.0 +199.79.174.0/255.255.255.0 +199.79.204.0/255.255.255.0 +199.88.185.0/255.255.254.0 +199.88.194.0/255.255.253.0 +199.88.216.0/255.255.240.0 +199.89.188.0/255.255.255.0 +199.89.199.0/255.255.255.0 +199.89.208.0/255.255.255.0 +199.89.233.0/255.255.254.0 +199.90.0.0/255.255.0.0 +199.94.21.0/255.255.255.0 +199.95.157.0/255.255.255.0 +199.95.248.0/255.255.255.0 +199.95.249.0/255.255.255.0 +199.97.0.0/255.252.0.0 +199.103.88.0/255.255.255.0 +199.105.173.144/255.255.255.240 +199.105.240.0/255.255.255.0 +199.106.209.0/255.255.255.128 +199.106.214.0/255.255.255.0 +199.107.65.224/255.255.255.224 +199.107.69.64/255.255.255.192 +199.107.70.72/255.255.255.248 +199.108.0.0/255.255.240.0 +199.108.77.64/255.255.255.240 +199.108.192.0/255.255.240.0 +199.115.8.0/255.255.248.0 +199.120.166.0/255.255.254.0 +199.120.175.0/255.255.255.0 +199.120.182.0/255.255.255.0 +199.122.0.0/255.255.253.0 +199.122.128.0/255.255.128.0 +199.123.4.0/255.255.252.0 +199.123.78.0/255.255.255.0 +199.123.79.0/255.255.255.0 +199.123.80.0/255.255.255.0 +199.123.84.0/255.255.255.0 +199.124.4.0/255.255.254.0 +199.124.8.0/255.255.248.0 +199.124.16.0/255.255.247.0 +199.125.76.0/255.255.255.0 +199.128.0.0/255.224.0.0 +199.164.0.0/255.255.248.0 +199.164.141.0/255.255.254.0 +199.164.176.0/255.255.253.0 +199.165.143.0/255.255.255.0 +199.165.243.0/255.255.255.0 +199.166.200.0/255.255.252.0 +199.166.208.0/255.255.255.0 +199.169.0.0/255.255.0.0 +199.171.55.0/255.255.255.0 +199.173.152.0/255.255.255.0 +199.173.154.0/255.255.254.0 +199.173.224.0/255.255.248.0 +199.174.60.152/255.255.255.248 +199.174.62.248/255.255.255.248 +199.174.70.16/255.255.255.248 +199.174.71.168/255.255.255.248 +199.174.74.208/255.255.255.248 +199.174.74.248/255.255.255.248 +199.174.84.168/255.255.255.248 +199.174.89.0/255.255.255.248 +199.174.129.200/255.255.255.248 +199.174.152.80/255.255.255.248 +199.174.155.48/255.255.255.248 +199.174.155.144/255.255.255.248 +199.174.155.224/255.255.255.248 +199.174.181.0/255.255.255.248 +199.174.188.88/255.255.255.248 +199.174.195.192/255.255.255.248 +199.181.129.0/255.255.249.0 +199.181.219.0/255.255.255.0 +199.184.108.0/255.255.255.0 +199.188.0.0/255.255.251.0 +199.190.128.0/255.255.254.0 +199.192.0.0/255.255.244.0 +199.196.16.0/255.255.240.0 +199.201.190.0/255.255.255.0 +199.201.204.0/255.255.255.0 +199.201.214.0/255.255.255.0 +199.201.219.0/255.255.255.0 +199.201.236.0/255.255.254.0 +199.202.44.0/255.255.252.0 +199.203.176.80/255.255.255.240 +199.212.16.0/255.255.250.0 +199.212.48.0/255.255.252.0 +199.212.148.0/255.255.252.0 +199.212.192.0/255.255.231.0 +199.221.14.0/255.255.255.0 +199.222.58.0/255.255.254.0 +199.227.159.64/255.255.255.224 +199.227.223.240/255.255.255.248 +199.232.0.0/255.255.0.0 +199.233.16.0/255.255.246.0 +199.233.64.0/255.255.255.0 +199.233.109.0/255.255.255.0 +199.233.128.0/255.255.255.0 +199.233.205.0/255.255.255.0 +199.233.217.0/255.255.255.0 +199.242.64.0/255.255.192.0 +199.242.141.0/255.255.255.0 +199.242.182.0/255.255.246.0 +199.242.211.0/255.255.255.0 +199.242.240.0/255.255.254.0 +199.243.105.128/255.255.255.248 +199.243.130.104/255.255.255.248 +199.243.142.224/255.255.255.248 +199.243.201.136/255.255.255.248 +199.243.255.88/255.255.255.248 +199.244.131.0/255.255.255.0 +199.244.155.0/255.255.255.0 +199.244.156.0/255.255.255.0 +199.244.238.0/255.255.254.0 +199.245.181.0/255.255.255.0 +199.245.250.0/255.255.255.0 +199.246.118.0/255.255.254.0 +199.247.16.0/255.255.240.0 +199.247.60.0/255.255.252.0 +199.247.96.0/255.255.240.0 +199.248.147.0/255.255.255.0 +199.248.181.0/255.255.255.0 +199.248.197.0/255.255.255.0 +199.248.238.0/255.255.255.0 +199.250.0.0/255.255.248.0 +199.250.16.0/255.255.240.0 +199.254.173.0/255.255.255.0 +199.254.202.0/255.255.255.0 +199.254.244.0/255.255.255.0 +200.1.116.0/255.255.255.0 +200.10.160.0/255.255.255.0 +200.26.110.0/255.255.255.128 +200.32.64.16/255.255.255.240 +200.32.69.32/255.255.255.224 +200.32.84.128/255.255.255.192 +200.32.86.112/255.255.255.248 +200.41.39.56/255.255.255.248 +200.41.39.128/255.255.255.248 +200.41.39.224/255.255.255.232 +200.50.69.0/255.255.255.224 +200.58.21.32/255.255.255.224 +200.58.21.128/255.255.255.192 +200.58.50.160/255.255.255.240 +200.254.142.0/255.255.255.191 +202.0.98.0/255.255.255.0 +202.0.108.0/255.255.254.0 +202.0.156.0/255.255.252.0 +202.1.195.16/255.255.255.241 +202.2.133.0/255.255.255.0 +202.2.176.128/255.255.255.224 +202.3.162.96/255.255.255.240 +202.3.162.112/255.255.255.240 +202.5.12.0/255.255.252.0 +202.6.8.0/255.255.248.0 +202.6.82.0/255.255.255.0 +202.6.83.0/255.255.255.0 +202.6.91.0/255.255.255.0 +202.7.16.48/255.255.255.248 +202.7.82.56/255.255.255.248 +202.7.82.112/255.255.255.248 +202.7.90.48/255.255.255.248 +202.7.90.184/255.255.255.248 +202.8.32.0/255.255.248.0 +202.9.0.0/255.255.240.0 +202.10.3.0/255.255.255.224 +202.12.69.0/255.255.255.0 +202.12.120.0/255.255.255.0 +202.12.121.0/255.255.255.0 +202.14.0.0/255.255.252.0 +202.14.4.0/255.255.252.0 +202.14.130.0/255.255.254.0 +202.14.133.0/255.255.255.0 +202.14.138.0/255.255.254.0 +202.14.186.0/255.255.255.0 +202.15.48.0/255.255.240.0 +202.15.254.0/255.255.255.0 +202.17.192.0/255.255.248.0 +202.21.149.0/255.255.255.0 +202.24.66.0/255.255.250.0 +202.28.16.0/255.255.255.0 +202.28.84.0/255.255.252.0 +202.32.0.128/255.255.255.128 +202.32.5.144/255.255.255.248 +202.32.14.96/255.255.255.240 +202.32.45.144/255.255.255.248 +202.32.93.128/255.255.255.240 +202.32.93.224/255.255.255.240 +202.32.103.112/255.255.255.240 +202.32.143.32/255.255.255.240 +202.32.161.0/255.255.255.0 +202.32.194.96/255.255.255.240 +202.32.215.112/255.255.255.240 +202.32.242.0/255.255.255.0 +202.32.245.160/255.255.255.248 +202.32.249.208/255.255.255.248 +202.33.8.64/255.255.255.248 +202.33.16.64/255.255.255.192 +202.33.115.64/255.255.255.224 +202.33.132.240/255.255.255.240 +202.33.141.176/255.255.255.240 +202.33.153.0/255.255.255.0 +202.33.177.160/255.255.255.224 +202.36.47.0/255.255.255.0 +202.37.22.0/255.255.255.0 +202.37.100.0/255.255.255.0 +202.37.252.0/255.255.255.0 +202.39.48.0/255.255.255.0 +202.39.246.0/255.255.255.0 +202.40.7.0/255.255.255.0 +202.40.155.0/255.255.255.0 +202.42.34.16/255.255.255.240 +202.42.34.32/255.255.255.240 +202.42.39.80/255.255.255.248 +202.42.65.64/255.255.255.192 +202.42.133.72/255.255.255.248 +202.42.154.0/255.255.255.0 +202.42.179.8/255.255.255.248 +202.42.179.24/255.255.255.248 +202.42.179.32/255.255.255.248 +202.42.179.120/255.255.255.248 +202.42.180.48/255.255.255.248 +202.42.184.56/255.255.255.248 +202.42.185.192/255.255.255.248 +202.42.188.56/255.255.255.248 +202.42.189.32/255.255.255.248 +202.42.189.64/255.255.255.248 +202.42.189.136/255.255.255.248 +202.42.189.144/255.255.255.248 +202.42.189.152/255.255.255.248 +202.42.228.96/255.255.255.240 +202.42.234.160/255.255.255.222 +202.43.71.224/255.255.255.248 +202.43.116.64/255.255.255.248 +202.44.16.0/255.255.240.0 +202.44.72.0/255.255.254.0 +202.44.132.0/255.255.254.0 +202.44.164.176/255.255.255.240 +202.45.30.0/255.255.254.0 +202.46.10.0/255.255.255.0 +202.47.125.0/255.255.255.0 +202.47.140.0/255.255.254.0 +202.51.150.144/255.255.255.248 +202.52.99.0/255.255.255.224 +202.52.103.0/255.255.255.192 +202.53.52.0/255.255.255.0 +202.53.59.8/255.255.255.248 +202.54.26.0/255.255.255.224 +202.54.38.192/255.255.255.240 +202.54.83.128/255.255.255.192 +202.54.101.112/255.255.255.240 +202.56.140.56/255.255.255.248 +202.56.245.80/255.255.255.240 +202.56.247.160/255.255.255.248 +202.57.75.184/255.255.255.248 +202.57.76.56/255.255.255.248 +202.57.78.0/255.255.255.0 +202.57.85.248/255.255.255.248 +202.57.92.64/255.255.255.248 +202.58.98.64/255.255.255.192 +202.62.112.0/255.255.252.0 +202.64.48.0/255.255.255.128 +202.64.51.192/255.255.255.240 +202.64.56.16/255.255.255.248 +202.64.64.128/255.255.255.224 +202.64.130.200/255.255.255.248 +202.64.137.24/255.255.255.248 +202.64.155.32/255.255.255.240 +202.64.157.224/255.255.255.224 +202.64.161.192/255.255.255.208 +202.64.170.192/255.255.255.192 +202.64.171.0/255.255.255.0 +202.64.182.128/255.255.255.240 +202.64.210.104/255.255.255.248 +202.65.192.128/255.255.255.128 +202.67.247.160/255.255.255.224 +202.67.249.64/255.255.255.192 +202.69.163.0/255.255.255.0 +202.73.170.128/255.255.255.240 +202.73.176.8/255.255.255.248 +202.74.99.64/255.255.255.240 +202.76.49.0/255.255.255.0 +202.78.71.0/255.255.255.240 +202.79.104.16/255.255.255.240 +202.79.205.0/255.255.255.192 +202.79.223.192/255.255.255.192 +202.82.21.72/255.255.255.248 +202.82.124.32/255.255.255.248 +202.82.141.0/255.255.255.0 +202.82.146.176/255.255.255.248 +202.83.94.144/255.255.255.248 +202.83.201.128/255.255.255.192 +202.83.202.32/255.255.255.240 +202.85.23.128/255.255.255.128 +202.85.26.0/255.255.255.0 +202.85.40.224/255.255.255.224 +202.85.42.192/255.255.255.240 +202.85.78.0/255.255.255.0 +202.85.104.0/255.255.255.224 +202.85.109.0/255.255.255.0 +202.85.121.64/255.255.255.224 +202.85.255.128/255.255.255.128 +202.88.118.192/255.255.255.192 +202.88.125.64/255.255.255.192 +202.89.96.0/255.255.224.0 +202.90.128.0/255.255.224.0 +202.92.68.12/255.255.255.248 +202.92.73.168/255.255.255.248 +202.92.120.248/255.255.255.248 +202.94.128.0/255.255.224.0 +202.95.84.128/255.255.255.240 +202.95.88.96/255.255.255.224 +202.95.127.48/255.255.255.248 +202.95.159.208/255.255.255.240 +202.96.19.48/255.255.255.240 +202.96.46.0/255.255.255.0 +202.96.65.64/255.255.255.248 +202.96.66.224/255.255.255.248 +202.96.104.144/255.255.255.240 +202.96.123.128/255.255.255.248 +202.96.150.128/255.255.255.240 +202.96.167.0/255.255.255.240 +202.96.211.16/255.255.255.240 +202.96.224.224/255.255.255.240 +202.96.225.208/255.255.255.240 +202.96.226.40/255.255.255.248 +202.96.227.32/255.255.255.240 +202.96.233.64/255.255.255.240 +202.96.240.0/255.255.255.224 +202.97.163.220/255.255.255.248 +202.97.168.144/255.255.255.240 +202.97.169.64/255.255.255.240 +202.97.169.192/255.255.255.240 +202.97.170.96/255.255.255.248 +202.97.170.224/255.255.255.248 +202.97.172.144/255.255.255.240 +202.97.173.96/255.255.255.240 +202.97.173.112/255.255.255.240 +202.97.195.208/255.255.255.240 +202.97.227.224/255.255.255.224 +202.97.236.184/255.255.255.248 +202.98.12.64/255.255.255.248 +202.98.47.48/255.255.255.248 +202.98.125.32/255.255.255.240 +202.98.150.192/255.255.255.192 +202.98.185.64/255.255.255.240 +202.98.185.192/255.255.255.192 +202.98.187.112/255.255.255.240 +202.99.4.192/255.255.255.192 +202.99.27.0/255.255.255.192 +202.99.30.96/255.255.255.240 +202.99.60.224/255.255.255.240 +202.99.99.224/255.255.255.240 +202.99.190.64/255.255.255.224 +202.99.190.128/255.255.255.192 +202.99.228.176/255.255.255.240 +202.100.14.128/255.255.255.240 +202.100.202.112/255.255.255.240 +202.100.230.112/255.255.255.240 +202.101.8.192/255.255.255.192 +202.101.9.144/255.255.255.240 +202.101.97.108/255.255.255.220 +202.101.111.208/255.255.255.240 +202.101.113.240/255.255.255.240 +202.101.115.16/255.255.255.248 +202.101.126.48/255.255.255.248 +202.101.141.32/255.255.255.192 +202.101.142.48/255.255.255.248 +202.101.149.136/255.255.255.248 +202.101.165.192/255.255.255.192 +202.102.157.112/255.255.255.248 +202.102.187.160/255.255.255.240 +202.102.195.176/255.255.255.240 +202.102.238.80/255.255.255.240 +202.102.239.216/255.255.255.248 +202.102.242.240/255.255.255.248 +202.103.31.0/255.255.255.224 +202.103.38.224/255.255.255.240 +202.103.49.32/255.255.255.240 +202.103.49.160/255.255.255.240 +202.103.179.32/255.255.255.240 +202.103.208.200/255.255.255.248 +202.104.81.32/255.255.255.224 +202.104.199.192/255.255.255.248 +202.104.254.0/255.255.255.248 +202.104.254.96/255.255.255.240 +202.105.10.80/255.255.255.240 +202.105.16.136/255.255.255.248 +202.105.191.176/255.255.255.240 +202.105.207.32/255.255.255.224 +202.106.142.0/255.255.255.0 +202.107.74.0/255.255.255.248 +202.107.78.168/255.255.255.248 +202.107.222.40/255.255.255.248 +202.107.229.8/255.255.255.248 +202.108.83.64/255.255.255.224 +202.108.87.0/255.255.255.192 +202.108.93.96/255.255.255.240 +202.108.225.32/255.255.255.224 +202.109.76.192/255.255.255.224 +202.109.101.224/255.255.255.224 +202.109.103.64/255.255.255.240 +202.109.131.128/255.255.255.128 +202.109.213.32/255.255.255.224 +202.109.217.0/255.255.255.184 +202.109.229.200/255.255.255.248 +202.109.230.24/255.255.254.248 +202.110.49.88/255.255.255.248 +202.110.54.0/255.255.255.248 +202.110.54.136/255.255.255.248 +202.110.234.192/255.255.255.248 +202.111.152.216/255.255.255.248 +202.111.155.64/255.255.255.240 +202.111.165.112/255.255.255.240 +202.111.169.224/255.255.255.224 +202.111.177.64/255.255.255.224 +202.111.184.96/255.255.255.224 +202.111.186.128/255.255.255.224 +202.111.188.192/255.255.255.248 +202.123.30.64/255.255.255.248 +202.124.133.0/255.255.255.128 +202.125.0.0/255.255.240.0 +202.126.137.112/255.255.255.240 +202.126.138.0/255.255.255.224 +202.126.138.128/255.255.255.224 +202.129.255.64/255.255.255.192 +202.130.190.96/255.255.255.240 +202.130.191.80/255.255.255.248 +202.134.99.240/255.255.255.248 +202.134.103.176/255.255.255.240 +202.134.108.160/255.255.255.240 +202.134.115.64/255.255.255.248 +202.134.122.128/255.255.255.192 +202.135.18.160/255.255.255.240 +202.135.136.48/255.255.255.240 +202.135.136.224/255.255.255.224 +202.135.169.0/255.255.255.128 +202.139.187.0/255.255.255.224 +202.139.187.128/255.255.255.192 +202.139.224.0/255.255.247.185 +202.139.232.72/255.255.232.72 +202.140.134.8/255.255.255.248 +202.140.134.208/255.255.255.248 +202.140.143.80/255.255.255.248 +202.140.143.240/255.255.255.248 +202.142.64.0/255.255.192.0 +202.144.43.0/255.255.255.248 +202.144.43.192/255.255.255.248 +202.145.114.64/255.255.255.224 +202.145.118.0/255.255.255.128 +202.147.20.176/255.255.255.240 +202.147.27.80/255.255.255.240 +202.147.27.96/255.255.255.240 +202.147.37.64/255.255.255.240 +202.147.43.80/255.255.255.240 +202.154.31.160/255.255.255.224 +202.155.33.144/255.255.255.240 +202.155.131.64/255.255.255.240 +202.158.21.240/255.255.255.240 +202.158.36.16/255.255.255.240 +202.158.88.48/255.255.255.240 +202.159.192.0/255.255.192.0 +202.160.83.64/255.255.255.192 +202.160.225.56/255.255.255.248 +202.160.225.144/255.255.255.248 +202.160.225.224/255.255.255.248 +202.161.117.128/255.255.255.248 +202.163.175.32/255.255.255.240 +202.163.175.48/255.255.255.240 +202.163.175.128/255.255.255.240 +202.163.175.192/255.255.255.192 +202.163.201.248/255.255.255.248 +202.163.203.80/255.255.255.248 +202.163.223.32/255.255.255.248 +202.163.228.248/255.255.255.248 +202.163.248.72/255.255.255.248 +202.165.140.16/255.255.255.248 +202.165.141.80/255.255.255.240 +202.166.227.64/255.255.255.224 +202.167.74.128/255.255.255.240 +202.167.111.56/255.255.255.248 +202.168.29.136/255.255.255.248 +202.171.13.32/255.255.255.240 +202.172.255.0/255.255.255.0 +202.175.123.56/255.255.255.248 +202.180.175.152/255.255.255.248 +202.181.41.64/255.255.255.240 +202.181.41.136/255.255.255.248 +202.182.224.0/255.255.254.0 +202.184.249.128/255.255.255.224 +202.186.11.0/255.255.255.248 +202.186.14.0/255.255.255.224 +202.186.42.0/255.255.255.224 +202.186.149.96/255.255.255.240 +202.186.177.8/255.255.255.248 +202.187.27.128/255.255.255.192 +202.188.20.96/255.255.255.240 +202.188.137.112/255.255.255.240 +202.189.8.0/255.255.255.224 +202.190.68.128/255.255.255.224 +202.192.176.0/255.255.252.0 +202.209.107.0/255.255.255.0 +202.211.200.80/255.255.255.248 +202.211.204.128/255.255.255.192 +202.211.205.0/255.255.255.128 +202.211.207.160/255.255.255.224 +202.211.208.8/255.255.255.248 +202.212.240.208/255.255.255.240 +202.213.192.0/255.255.192.0 +202.214.0.0/255.255.255.192 +202.214.0.64/255.255.255.192 +202.214.107.16/255.255.255.248 +202.214.241.240/255.255.255.240 +202.214.254.16/255.255.255.248 +202.216.31.0/255.255.255.240 +202.216.242.96/255.255.255.240 +202.218.6.128/255.255.255.128 +202.219.90.96/255.255.255.224 +202.221.30.224/255.255.255.240 +202.221.139.48/255.255.255.240 +202.221.178.240/255.255.255.248 +202.221.233.112/255.255.255.240 +202.221.244.0/255.255.255.128 +202.221.244.160/255.255.255.224 +202.222.142.176/255.255.255.240 +202.222.144.0/255.255.255.0 +202.224.97.64/255.255.255.248 +202.224.196.216/255.255.255.248 +202.224.202.0/255.255.255.248 +202.224.209.144/255.255.255.248 +202.224.224.240/255.255.255.248 +202.224.235.216/255.255.255.248 +202.226.131.72/255.255.255.248 +202.226.224.96/255.255.255.248 +202.226.225.128/255.255.255.248 +202.229.47.144/255.255.255.240 +202.229.47.192/255.255.255.240 +202.232.97.128/255.255.255.248 +202.232.97.168/255.255.255.248 +202.232.131.16/255.255.255.240 +202.232.164.32/255.255.255.248 +202.232.232.0/255.255.255.0 +202.238.76.0/255.255.254.0 +202.247.3.0/255.255.255.0 +203.0.88.0/255.255.255.0 +203.0.100.0/255.255.255.0 +203.0.101.0/255.255.255.0 +203.0.142.0/255.255.255.0 +203.1.72.0/255.255.252.0 +203.2.136.0/255.255.252.0 +203.2.149.0/255.255.255.0 +203.2.181.0/255.255.255.0 +203.2.208.0/255.255.255.0 +203.2.236.0/255.255.255.0 +203.3.137.0/255.255.255.0 +203.3.176.0/255.255.240.0 +203.3.192.0/255.255.192.0 +203.4.229.0/255.255.255.0 +203.5.10.0/255.255.255.0 +203.5.23.0/255.255.255.0 +203.5.104.0/255.255.247.0 +203.5.114.0/255.255.255.0 +203.5.121.0/255.255.254.0 +203.6.135.0/255.255.255.0 +203.6.160.0/255.255.224.0 +203.6.254.0/255.255.254.0 +203.7.128.0/255.255.255.0 +203.7.153.0/255.255.255.0 +203.7.170.0/255.255.255.0 +203.8.174.0/255.255.255.0 +203.8.196.0/255.255.255.0 +203.9.144.0/255.255.252.0 +203.9.158.0/255.255.255.0 +203.9.192.0/255.255.224.0 +203.10.16.0/255.255.248.0 +203.10.32.0/255.255.255.0 +203.10.112.0/255.255.247.0 +203.11.118.0/255.255.254.0 +203.11.142.0/255.255.254.0 +203.12.20.0/255.255.254.0 +203.12.40.0/255.255.254.0 +203.12.192.0/255.255.240.0 +203.13.0.0/255.255.240.0 +203.13.26.0/255.255.254.0 +203.14.35.0/255.255.253.0 +203.14.59.0/255.255.255.0 +203.14.184.0/255.255.248.0 +203.15.20.0/255.255.255.0 +203.15.71.0/255.255.251.0 +203.15.78.0/255.255.250.0 +203.15.86.0/255.255.255.0 +203.16.196.0/255.255.255.0 +203.16.216.0/255.255.248.0 +203.17.11.0/255.255.255.0 +203.17.67.0/255.255.255.0 +203.17.120.0/255.255.255.0 +203.17.255.0/255.255.255.0 +203.18.12.0/255.255.254.0 +203.18.55.0/255.255.255.0 +203.18.60.0/255.255.254.0 +203.18.110.0/255.255.254.0 +203.18.184.0/255.255.254.0 +203.19.26.0/255.255.255.0 +203.19.57.0/255.255.255.0 +203.19.133.0/255.255.255.0 +203.19.142.0/255.255.254.0 +203.20.123.0/255.255.255.0 +203.21.87.0/255.255.255.0 +203.21.224.0/255.255.206.0 +203.22.194.0/255.255.255.0 +203.22.196.0/255.255.255.0 +203.22.207.0/255.255.255.0 +203.23.4.0/255.255.255.0 +203.23.18.0/255.255.255.0 +203.23.19.0/255.255.255.0 +203.23.85.0/255.255.255.0 +203.23.174.0/255.255.255.0 +203.23.224.0/255.255.255.0 +203.25.0.0/255.255.240.0 +203.25.92.0/255.255.252.0 +203.25.230.0/255.255.254.0 +203.26.119.0/255.255.255.0 +203.26.120.0/255.255.252.0 +203.26.132.0/255.255.254.0 +203.28.36.0/255.255.255.0 +203.28.198.0/255.255.255.0 +203.28.199.0/255.255.255.0 +203.28.237.0/255.255.255.0 +203.28.239.0/255.255.255.0 +203.29.89.0/255.255.255.0 +203.30.156.0/255.255.255.0 +203.30.186.0/255.255.255.0 +203.31.219.0/255.255.255.0 +203.32.218.0/255.255.255.0 +203.33.39.0/255.255.255.0 +203.34.4.0/255.255.255.0 +203.34.85.0/255.255.255.0 +203.35.155.240/255.255.255.248 +203.35.255.248/255.255.255.248 +203.41.22.160/255.255.255.224 +203.41.127.160/255.255.255.224 +203.41.195.128/255.255.255.128 +203.43.68.80/255.255.255.240 +203.55.139.0/255.255.255.0 +203.55.182.0/255.255.254.0 +203.55.239.0/255.255.255.0 +203.56.6.0/255.255.255.0 +203.56.118.0/255.255.254.0 +203.57.202.0/255.255.255.0 +203.61.24.0/255.255.255.0 +203.65.169.0/255.255.255.0 +203.76.6.0/255.255.255.224 +203.77.15.128/255.255.255.192 +203.77.51.128/255.255.255.192 +203.80.94.240/255.255.255.240 +203.80.118.32/255.255.255.248 +203.80.247.8/255.255.255.248 +203.85.188.0/255.255.255.0 +203.86.132.144/255.255.255.248 +203.87.138.96/255.255.255.248 +203.87.150.160/255.255.255.248 +203.87.152.136/255.255.255.248 +203.87.154.152/255.255.255.248 +203.87.155.24/255.255.255.248 +203.89.192.224/255.255.255.240 +203.89.193.192/255.255.255.224 +203.89.230.80/255.255.255.240 +203.89.255.96/255.255.255.224 +203.89.255.240/255.255.255.240 +203.90.88.176/255.255.255.248 +203.90.110.64/255.255.255.248 +203.92.233.0/255.255.255.0 +203.93.88.128/255.255.255.128 +203.93.106.0/255.255.255.0 +203.94.67.168/255.255.255.248 +203.94.73.80/255.255.255.248 +203.94.78.128/255.255.255.248 +203.94.130.200/255.255.255.248 +203.94.172.64/255.255.255.192 +203.97.62.160/255.255.255.240 +203.97.237.136/255.255.255.248 +203.99.128.0/255.255.192.0 +203.101.119.224/255.255.255.224 +203.101.159.192/255.255.255.248 +203.102.38.112/255.255.255.248 +203.102.38.192/255.255.255.224 +203.102.77.128/255.255.255.248 +203.102.85.120/255.255.255.248 +203.102.85.248/255.255.255.248 +203.102.102.64/255.255.255.192 +203.102.138.104/255.255.255.248 +203.102.144.16/255.255.255.248 +203.102.146.96/255.255.255.224 +203.102.153.192/255.255.255.224 +203.103.46.32/255.255.255.248 +203.103.92.136/255.255.255.248 +203.103.139.56/255.255.255.248 +203.103.145.160/255.255.255.224 +203.103.174.192/255.255.255.248 +203.103.180.32/255.255.255.224 +203.103.183.0/255.255.255.0 +203.103.231.128/255.255.255.128 +203.103.233.0/255.255.255.0 +203.103.234.32/255.255.255.224 +203.103.234.248/255.255.255.248 +203.103.235.0/255.255.255.0 +203.103.237.192/255.255.255.224 +203.106.232.208/255.255.255.240 +203.107.191.32/255.255.255.224 +203.107.247.48/255.255.255.248 +203.108.88.232/255.255.255.248 +203.108.131.96/255.255.255.239 +203.108.134.8/255.255.255.248 +203.108.178.32/255.255.255.248 +203.108.178.56/255.255.255.248 +203.108.184.224/255.255.255.224 +203.108.211.200/255.255.255.248 +203.108.241.176/255.255.255.240 +203.108.242.88/255.255.255.248 +203.108.243.16/255.255.255.247 +203.108.243.224/255.255.255.240 +203.108.244.144/255.255.255.240 +203.108.246.160/255.255.255.223 +203.108.246.224/255.255.255.224 +203.108.249.224/255.255.255.240 +203.110.129.64/255.255.255.225 +203.110.129.136/255.255.255.249 +203.110.141.96/255.255.255.249 +203.110.144.32/255.255.255.249 +203.112.23.232/255.255.255.248 +203.113.130.128/255.255.255.248 +203.115.23.240/255.255.255.248 +203.115.24.224/255.255.255.248 +203.115.195.240/255.255.255.248 +203.116.11.144/255.255.255.248 +203.116.46.112/255.255.255.240 +203.116.47.0/255.255.255.0 +203.116.75.0/255.255.255.240 +203.117.14.64/255.255.255.192 +203.117.18.64/255.255.255.192 +203.117.101.0/255.255.255.240 +203.117.129.0/255.255.255.0 +203.117.135.0/255.255.255.0 +203.120.5.0/255.255.255.224 +203.120.148.0/255.255.255.0 +203.120.218.16/255.255.255.240 +203.122.11.128/255.255.255.192 +203.122.14.0/255.255.255.240 +203.124.157.136/255.255.255.248 +203.125.94.64/255.255.255.224 +203.125.104.160/255.255.255.224 +203.125.111.144/255.255.255.240 +203.125.121.224/255.255.255.224 +203.125.137.168/255.255.255.248 +203.125.140.128/255.255.255.248 +203.125.153.128/255.255.255.248 +203.125.153.152/255.255.255.248 +203.125.176.32/255.255.255.224 +203.125.180.160/255.255.255.224 +203.125.200.0/255.255.255.192 +203.125.202.240/255.255.255.240 +203.125.209.208/255.255.255.248 +203.125.234.208/255.255.255.248 +203.125.249.24/255.255.255.248 +203.126.17.0/255.255.255.128 +203.126.22.64/255.255.255.224 +203.126.33.208/255.255.255.240 +203.126.34.224/255.255.255.224 +203.126.49.192/255.255.255.224 +203.126.50.64/255.255.255.224 +203.126.58.0/255.255.255.240 +203.126.79.64/255.255.255.224 +203.126.87.224/255.255.255.240 +203.126.96.96/255.255.255.224 +203.126.100.32/255.255.255.224 +203.126.107.160/255.255.255.224 +203.126.114.192/255.255.255.240 +203.126.118.128/255.255.255.240 +203.126.165.48/255.255.255.240 +203.126.176.40/255.255.255.248 +203.126.176.216/255.255.255.248 +203.126.183.0/255.255.255.224 +203.126.213.1/255.255.255.1 +203.126.216.0/255.255.255.240 +203.126.218.128/255.255.255.224 +203.126.226.0/255.255.255.240 +203.126.239.72/255.255.255.248 +203.127.5.224/255.255.255.224 +203.127.7.48/255.255.255.240 +203.127.9.64/255.255.255.240 +203.127.9.80/255.255.255.240 +203.127.119.176/255.255.255.240 +203.127.120.0/255.255.255.224 +203.127.153.0/255.255.255.192 +203.127.229.128/255.255.255.224 +203.130.142.0/255.255.255.0 +203.131.69.160/255.255.255.248 +203.131.80.16/255.255.255.248 +203.131.84.8/255.255.255.248 +203.131.84.176/255.255.255.248 +203.131.97.40/255.255.255.248 +203.131.98.160/255.255.255.248 +203.131.100.72/255.255.255.248 +203.131.104.48/255.255.255.248 +203.131.113.200/255.255.255.248 +203.131.125.192/255.255.255.248 +203.131.127.160/255.255.255.248 +203.131.127.216/255.255.255.248 +203.134.128.112/255.255.255.248 +203.143.237.200/255.255.255.248 +203.144.37.192/255.255.255.248 +203.144.136.0/255.255.255.0 +203.144.151.96/255.255.255.248 +203.144.227.136/255.255.255.248 +203.144.227.144/255.255.255.240 +203.144.233.0/255.255.255.192 +203.144.236.224/255.255.255.240 +203.146.11.96/255.255.255.224 +203.146.50.128/255.255.255.192 +203.146.78.64/255.255.255.192 +203.146.80.64/255.255.255.192 +203.146.80.216/255.255.255.248 +203.146.100.224/255.255.255.240 +203.146.112.48/255.255.255.240 +203.146.129.0/255.255.255.0 +203.146.146.128/255.255.255.240 +203.146.186.16/255.255.255.240 +203.146.217.96/255.255.255.240 +203.147.5.0/255.255.255.192 +203.147.38.8/255.255.255.248 +203.147.43.64/255.255.255.192 +203.147.51.0/255.255.255.192 +203.147.144.0/255.255.240.0 +203.147.160.0/255.255.224.0 +203.147.224.0/255.255.224.0 +203.148.253.32/255.255.255.224 +203.149.13.168/255.255.255.248 +203.149.248.128/255.255.255.192 +203.154.23.0/255.255.255.0 +203.154.25.0/255.255.255.0 +203.154.26.0/255.255.255.0 +203.154.74.128/255.255.255.128 +203.154.151.128/255.255.255.240 +203.155.5.192/255.255.255.192 +203.155.6.32/255.255.255.224 +203.155.137.224/255.255.255.224 +203.155.198.96/255.255.255.224 +203.162.41.40/255.255.255.248 +203.162.48.128/255.255.255.248 +203.162.91.48/255.255.255.240 +203.162.105.168/255.255.255.248 +203.162.203.80/255.255.255.248 +203.162.247.192/255.255.255.248 +203.163.61.16/255.255.255.240 +203.163.68.160/255.255.255.224 +203.163.96.208/255.255.255.240 +203.163.117.56/255.255.255.240 +203.167.80.128/255.255.255.248 +203.167.116.192/255.255.255.192 +203.167.211.192/255.255.255.224 +203.167.247.144/255.255.255.240 +203.169.122.24/255.255.255.248 +203.169.142.224/255.255.255.240 +203.171.128.176/255.255.255.240 +203.171.146.0/255.255.254.0 +203.172.7.128/255.255.255.224 +203.172.24.112/255.255.255.240 +203.176.22.64/255.255.255.224 +203.176.128.0/255.255.192.0 +203.176.192.0/255.255.192.0 +203.177.33.200/255.255.255.248 +203.177.41.88/255.255.255.248 +203.177.64.176/255.255.255.248 +203.177.103.1/255.255.255.1 +203.179.80.0/255.255.240.0 +203.184.184.0/255.255.255.192 +203.184.255.64/255.255.255.240 +203.185.28.160/255.255.255.224 +203.185.151.0/255.255.255.0 +203.186.72.136/255.255.255.248 +203.186.112.128/255.255.255.248 +203.192.148.192/255.255.255.192 +203.193.55.48/255.255.255.240 +203.193.122.96/255.255.255.240 +203.194.25.144/255.255.255.248 +203.194.25.248/255.255.255.248 +203.194.77.96/255.255.255.224 +203.194.145.195/255.255.255.248 +203.194.152.16/255.255.255.240 +203.194.202.33/255.255.255.248 +203.194.244.0/255.255.255.0 +203.196.144.136/255.255.255.248 +203.196.144.168/255.255.255.248 +203.196.148.64/255.255.255.240 +203.196.155.32/255.255.255.240 +203.196.178.8/255.255.255.248 +203.197.22.96/255.255.255.240 +203.197.254.128/255.255.255.224 +203.198.42.248/255.255.255.248 +203.198.59.104/255.255.255.248 +203.198.59.120/255.255.255.248 +203.198.65.64/255.255.255.248 +203.198.65.96/255.255.255.248 +203.198.67.80/255.255.255.248 +203.198.76.248/255.255.255.248 +203.198.159.184/255.255.255.248 +203.198.192.160/255.255.255.248 +203.198.200.200/255.255.255.248 +203.198.201.112/255.255.255.240 +203.198.210.0/255.255.255.240 +203.198.217.32/255.255.255.224 +203.198.219.200/255.255.255.248 +203.199.40.32/255.255.255.240 +203.199.48.176/255.255.255.240 +203.199.66.160/255.255.255.224 +203.199.72.0/255.255.255.192 +203.200.20.160/255.255.255.224 +203.200.33.64/255.255.255.224 +203.200.38.224/255.255.255.224 +203.200.103.224/255.255.255.224 +203.200.197.0/255.255.255.0 +203.200.199.128/255.255.255.192 +203.201.213.80/255.255.255.236 +203.201.213.104/255.255.255.248 +203.201.214.64/255.255.255.192 +203.208.136.128/255.255.255.128 +203.208.225.96/255.255.255.240 +203.208.225.192/255.255.255.248 +203.208.226.128/255.255.255.192 +203.208.227.0/255.255.255.240 +203.208.236.64/255.255.255.240 +203.208.240.192/255.255.255.192 +203.208.251.128/255.255.255.224 +203.217.192.0/255.255.192.0 +203.220.37.96/255.255.255.240 +203.220.76.232/255.255.255.248 +203.221.51.224/255.255.255.248 +203.221.61.232/255.255.255.248 +203.221.61.240/255.255.255.248 +203.221.61.248/255.255.255.248 +203.221.148.104/255.255.255.248 +203.221.148.120/255.255.255.248 +203.221.148.208/255.255.255.248 +203.221.206.16/255.255.255.248 +203.221.217.80/255.255.255.248 +203.221.223.144/255.255.255.248 +203.221.237.8/255.255.255.248 +203.222.44.64/255.255.255.232 +203.222.52.80/255.255.255.248 +203.222.54.0/255.255.255.200 +203.222.63.176/255.255.255.248 +203.222.172.0/255.255.255.248 +203.222.172.128/255.255.255.240 +203.233.86.0/255.255.255.0 +203.242.167.0/255.255.255.0 +203.242.169.0/255.255.252.0 +203.242.174.0/255.255.255.0 +204.4.27.0/255.255.255.0 +204.9.116.0/255.255.252.0 +204.17.116.216/255.255.255.248 +204.17.164.0/255.255.255.0 +204.17.221.0/255.255.255.0 +204.17.228.0/255.255.255.0 +204.27.137.0/255.255.255.0 +204.27.152.0/255.255.255.0 +204.27.241.0/255.255.255.0 +204.29.131.0/255.255.255.0 +204.29.192.0/255.255.255.0 +204.40.0.0/255.254.0.0 +204.44.64.0/255.255.192.0 +204.44.128.0/255.255.246.0 +204.46.0.0/255.254.0.0 +204.50.86.0/255.255.255.0 +204.50.135.0/255.255.255.0 +204.50.147.112/255.255.255.240 +204.50.150.32/255.255.255.240 +204.50.161.0/255.255.255.0 +204.52.200.0/255.255.255.0 +204.52.255.0/255.255.255.0 +204.57.78.176/255.255.255.240 +204.57.101.128/255.255.255.192 +204.57.116.0/255.255.255.240 +204.58.32.0/255.255.226.0 +204.58.240.0/255.255.252.0 +204.61.16.0/255.255.242.0 +204.62.16.0/255.255.244.0 +204.62.213.0/255.255.255.0 +204.64.0.0/255.252.0.0 +204.68.149.0/255.255.255.0 +204.68.176.0/255.255.255.0 +204.68.209.0/255.255.255.0 +204.68.243.0/255.255.253.0 +204.69.135.0/255.255.255.0 +204.69.150.0/255.255.255.0 +204.69.237.0/255.255.254.0 +204.69.249.0/255.255.252.0 +204.71.154.0/255.255.255.0 +204.73.176.0/255.255.255.0 +204.75.167.0/255.255.255.0 +204.75.213.0/255.255.255.0 +204.75.215.0/255.255.255.0 +204.75.243.0/255.255.254.0 +204.75.246.0/255.255.255.0 +204.76.206.0/255.255.251.0 +204.77.32.0/255.255.224.0 +204.79.190.0/255.255.255.0 +204.80.32.0/255.255.224.0 +204.80.134.0/255.255.255.0 +204.80.195.0/255.255.255.0 +204.80.231.0/255.255.255.0 +204.80.250.0/255.255.250.0 +204.83.37.0/255.255.255.0 +204.87.0.0/255.255.224.0 +204.87.64.0/255.255.192.0 +204.87.129.0/255.255.255.0 +204.87.172.0/255.255.255.0 +204.87.179.0/255.255.255.0 +204.87.208.0/255.255.255.0 +204.88.96.0/255.255.224.0 +204.89.64.0/255.255.192.0 +204.89.170.0/255.255.255.0 +204.89.230.0/255.255.255.0 +204.90.16.0/255.255.240.0 +204.90.94.0/255.255.255.0 +204.90.116.0/255.255.255.0 +204.91.138.0/255.255.255.0 +204.92.3.24/255.255.255.248 +204.92.40.72/255.255.255.248 +204.92.70.0/255.255.255.0 +204.92.95.64/255.255.255.224 +204.92.95.192/255.255.255.224 +204.92.244.0/255.255.255.0 +204.94.0.0/255.255.224.0 +204.94.162.176/255.255.255.248 +204.96.7.128/255.255.255.128 +204.97.104.0/255.255.255.0 +204.97.246.0/255.255.255.0 +204.97.248.0/255.255.255.0 +204.101.45.0/255.255.255.0 +204.101.59.104/255.255.255.248 +204.101.119.128/255.255.255.248 +204.101.222.96/255.255.255.247 +204.102.78.0/255.255.255.0 +204.107.100.0/255.255.254.0 +204.107.111.0/255.255.255.0 +204.107.158.0/255.255.255.0 +204.107.159.0/255.255.255.0 +204.107.160.0/255.255.255.0 +204.107.161.0/255.255.255.0 +204.107.203.0/255.255.255.0 +204.108.0.0/255.255.245.0 +204.110.112.0/255.255.240.0 +204.114.0.0/255.255.247.0 +204.115.32.0/255.255.226.0 +204.115.184.0/255.255.250.0 +204.115.232.0/255.255.248.0 +204.117.119.0/255.255.255.0 +204.117.182.32/255.255.255.224 +204.117.215.0/255.255.255.128 +204.119.179.0/255.255.255.0 +204.121.0.0/255.255.0.0 +204.123.0.0/255.255.0.0 +204.124.24.0/255.255.252.0 +204.124.92.0/255.255.253.0 +204.124.120.0/255.255.252.0 +204.124.200.0/255.255.253.0 +204.124.228.0/255.255.252.0 +204.126.126.0/255.255.254.0 +204.126.138.0/255.255.254.0 +204.126.144.0/255.255.254.0 +204.126.152.0/255.255.254.0 +204.126.162.0/255.255.254.0 +204.126.184.0/255.255.254.0 +204.126.206.0/255.255.250.0 +204.126.216.0/255.255.254.0 +204.128.141.0/255.255.255.0 +204.128.162.0/255.255.255.0 +204.128.192.0/255.255.255.0 +204.128.193.0/255.255.255.0 +204.128.216.0/255.255.255.0 +204.128.230.0/255.255.255.0 +204.128.245.0/255.255.255.0 +204.130.0.0/255.255.248.0 +204.130.128.0/255.255.255.0 +204.130.253.0/255.255.255.0 +204.131.0.0/255.252.0.0 +204.136.64.0/255.255.192.0 +204.138.80.0/255.255.248.0 +204.138.114.0/255.255.255.0 +204.139.0.0/255.255.248.0 +204.140.0.0/255.255.240.0 +204.140.128.0/255.255.128.0 +204.144.66.0/255.255.255.0 +204.144.67.0/255.255.255.0 +204.144.70.0/255.255.255.0 +204.144.89.0/255.255.255.0 +204.144.94.0/255.255.255.0 +204.144.102.0/255.255.255.0 +204.144.103.0/255.255.255.0 +204.144.110.0/255.255.255.0 +204.144.114.0/255.255.255.0 +204.144.184.80/255.255.255.240 +204.144.247.0/255.255.255.0 +204.145.16.0/255.255.240.0 +204.145.169.0/255.255.255.0 +204.145.172.0/255.255.255.0 +204.145.179.0/255.255.254.0 +204.145.182.0/255.255.255.0 +204.145.183.0/255.255.255.0 +204.145.186.0/255.255.255.0 +204.146.0.0/255.255.237.0 +204.146.49.0/255.255.255.0 +204.147.177.0/255.255.255.0 +204.148.57.0/255.255.251.0 +204.149.48.0/255.255.252.0 +204.149.176.0/255.255.240.0 +204.151.32.0/255.255.255.0 +204.151.111.0/255.255.255.0 +204.151.168.96/255.255.255.240 +204.151.179.0/255.255.251.0 +204.152.2.0/255.255.254.0 +204.152.16.0/255.255.254.0 +204.152.26.0/255.255.254.0 +204.152.40.0/255.255.254.0 +204.152.44.0/255.255.254.0 +204.152.46.0/255.255.254.0 +204.152.56.0/255.255.254.0 +204.152.58.0/255.255.254.0 +204.152.106.0/255.255.254.0 +204.152.116.0/255.255.254.0 +204.152.184.0/255.255.248.0 +204.153.60.0/255.255.252.0 +204.153.120.0/255.255.253.0 +204.153.132.0/255.255.254.0 +204.153.134.0/255.255.255.0 +204.153.148.0/255.255.252.0 +204.153.188.0/255.255.252.0 +204.153.228.0/255.255.252.0 +204.153.240.0/255.255.252.0 +204.154.160.0/255.255.248.0 +204.155.0.0/255.255.240.0 +204.155.64.0/255.255.240.0 +204.155.148.0/255.255.255.0 +204.156.224.0/255.255.224.0 +204.162.129.0/255.255.255.0 +204.168.16.0/255.255.240.0 +204.168.248.0/255.255.248.0 +204.176.52.0/255.255.240.0 +204.176.165.0/255.255.255.0 +204.176.175.0/255.255.255.0 +204.178.59.0/255.255.255.0 +204.178.109.0/255.255.255.0 +204.178.110.224/255.255.255.224 +204.181.64.144/255.255.255.240 +204.187.70.0/255.255.250.0 +204.187.92.0/255.255.255.0 +204.188.74.128/255.255.255.128 +204.188.142.160/255.255.255.224 +204.188.160.96/255.255.255.224 +204.188.185.128/255.255.255.192 +204.188.192.0/255.255.192.0 +204.189.33.0/255.255.255.128 +204.189.48.56/255.255.255.248 +204.193.139.128/255.255.255.128 +204.193.140.104/255.255.255.248 +204.193.140.112/255.255.255.240 +204.193.160.0/255.255.224.0 +204.193.224.0/255.255.224.0 +204.194.72.0/255.255.248.0 +204.196.0.0/255.255.0.0 +204.209.28.0/255.255.254.0 +204.211.0.0/255.255.0.0 +204.213.60.0/255.255.255.0 +204.215.134.224/255.255.255.248 +204.220.0.0/255.255.254.0 +204.225.65.0/255.255.250.0 +204.225.100.0/255.255.254.0 +204.225.142.0/255.255.255.0 +204.225.254.0/255.255.255.0 +204.227.96.0/255.255.224.0 +204.234.0.0/255.255.0.0 +204.235.48.0/255.255.244.0 +204.235.112.0/255.255.246.0 +204.238.19.0/255.255.255.0 +204.238.28.0/255.255.254.0 +204.238.46.0/255.255.255.0 +204.238.146.0/255.255.255.0 +204.238.173.0/255.255.255.0 +204.238.201.0/255.255.255.0 +204.238.204.0/255.255.255.0 +204.238.207.0/255.255.255.0 +204.238.220.0/255.255.255.0 +204.238.242.0/255.255.255.0 +204.239.142.0/255.255.255.0 +204.239.147.0/255.255.255.0 +204.239.240.0/255.255.255.0 +204.239.242.0/255.255.255.0 +204.244.50.0/255.255.255.192 +204.244.50.128/255.255.255.192 +204.245.88.0/255.255.251.0 +204.246.130.0/255.255.252.0 +204.250.57.0/255.255.255.0 +204.250.118.192/255.255.255.224 +204.251.75.0/255.255.255.0 +204.253.88.0/255.255.248.0 +204.253.110.0/255.255.255.0 +204.253.132.0/255.255.254.0 +204.254.112.0/255.255.254.0 +204.254.235.0/255.255.255.0 +204.255.125.32/255.255.255.224 +204.255.176.0/255.255.240.0 +204.255.234.64/255.255.255.192 +205.128.0.32/255.255.255.248 +205.128.5.224/255.255.255.248 +205.128.24.64/255.255.255.192 +205.128.215.0/255.255.255.0 +205.130.224.0/255.255.240.0 +205.132.120.0/255.255.248.0 +205.132.200.0/255.255.248.0 +205.137.16.0/255.255.240.0 +205.138.12.0/255.255.88.0 +205.138.200.32/255.255.255.224 +205.138.201.48/255.255.255.224 +205.139.9.240/255.255.255.248 +205.140.18.0/255.255.255.0 +205.140.20.160/255.255.255.240 +205.140.23.0/255.255.255.224 +205.140.190.64/255.255.255.224 +205.142.100.0/255.255.252.0 +205.142.128.0/255.255.252.0 +205.142.168.0/255.255.252.0 +205.142.220.0/255.255.252.0 +205.143.64.0/255.255.248.0 +205.143.88.0/255.255.248.0 +205.143.224.0/255.255.248.0 +205.143.240.0/255.255.248.0 +205.147.28.64/255.255.255.224 +205.147.60.0/255.255.255.0 +205.150.75.0/255.255.255.0 +205.150.125.128/255.255.255.128 +205.150.169.224/255.255.255.248 +205.150.214.224/255.255.255.248 +205.151.188.0/255.255.255.0 +205.151.201.0/255.255.255.0 +205.153.24.0/255.255.252.0 +205.153.144.0/255.255.252.0 +205.153.148.0/255.255.252.0 +205.156.0.0/255.255.192.0 +205.159.0.0/255.255.255.0 +205.159.34.0/255.255.255.0 +205.159.50.0/255.255.254.0 +205.159.75.0/255.255.255.0 +205.159.108.0/255.255.255.0 +205.159.115.0/255.255.255.0 +205.159.118.0/255.255.255.0 +205.159.188.0/255.255.255.0 +205.160.80.0/255.255.252.0 +205.160.88.0/255.255.255.0 +205.160.199.0/255.255.255.0 +205.166.16.0/255.255.255.0 +205.166.17.0/255.255.255.0 +205.166.76.0/255.255.255.0 +205.166.105.0/255.255.255.0 +205.166.139.0/255.255.255.0 +205.166.180.0/255.255.255.0 +205.166.228.0/255.255.255.0 +205.167.24.0/255.255.254.0 +205.167.32.0/255.255.254.0 +205.167.64.0/255.255.254.0 +205.167.192.0/255.255.254.0 +205.167.204.0/255.255.254.0 +205.167.244.0/255.255.254.0 +205.168.77.0/255.255.246.0 +205.168.226.0/255.255.255.0 +205.170.26.0/255.255.255.0 +205.172.12.0/255.255.252.0 +205.172.19.160/255.255.255.248 +205.172.72.0/255.255.220.0 +205.172.172.0/255.255.252.0 +205.173.0.0/255.255.248.0 +205.173.8.0/255.255.248.0 +205.173.48.0/255.255.248.0 +205.173.136.0/255.255.248.0 +205.173.200.0/255.255.248.0 +205.176.0.0/255.255.0.0 +205.180.98.0/255.255.255.0 +205.180.190.0/255.255.255.0 +205.180.243.0/255.255.255.0 +205.181.164.0/255.255.254.0 +205.183.31.0/255.255.255.0 +205.185.23.0/255.255.255.0 +205.189.124.0/255.255.255.0 +205.190.22.0/255.255.255.0 +205.190.69.0/255.255.255.0 +205.200.157.0/255.255.255.0 +205.202.0.0/255.255.0.0 +205.204.128.0/255.255.128.0 +205.205.204.192/255.255.255.240 +205.205.217.128/255.255.255.192 +205.207.70.0/255.255.255.0 +205.207.205.0/255.255.255.0 +205.208.140.0/255.255.255.0 +205.210.58.0/255.255.255.0 +205.210.60.0/255.255.255.0 +205.210.188.0/255.255.252.0 +205.213.0.0/255.255.0.0 +205.219.50.0/255.255.255.240 +205.219.69.144/255.255.255.248 +205.219.70.48/255.255.255.240 +205.219.79.48/255.255.255.224 +205.219.87.32/255.255.255.224 +205.219.92.16/255.255.255.240 +205.219.198.0/255.255.254.0 +205.219.211.0/255.255.255.0 +205.223.16.0/255.255.240.0 +205.225.128.0/255.255.128.0 +205.229.233.0/255.255.255.0 +205.231.187.0/255.255.255.0 +205.232.158.0/255.255.254.0 +205.233.116.0/255.255.255.0 +205.233.144.0/255.255.255.0 +205.235.192.0/255.255.240.0 +205.236.130.0/255.255.255.0 +205.237.23.0/255.255.255.0 +205.240.80.0/255.255.252.0 +205.242.119.0/255.255.255.192 +205.242.218.56/255.255.255.248 +205.243.76.0/255.255.255.0 +205.247.47.0/255.255.255.128 +205.253.218.192/255.255.255.224 +205.254.128.0/255.255.224.0 +206.7.81.0/255.255.255.0 +206.10.224.0/255.255.252.0 +206.13.62.0/255.255.255.0 +206.13.64.0/255.255.240.0 +206.13.84.128/255.255.255.224 +206.13.84.176/255.255.255.248 +206.15.96.0/255.255.224.0 +206.15.224.0/255.255.224.0 +206.16.196.112/255.255.255.224 +206.16.196.176/255.255.255.176 +206.16.198.32/255.255.255.224 +206.16.198.144/255.255.255.248 +206.16.198.168/255.255.255.248 +206.16.199.0/255.255.255.224 +206.16.199.32/255.255.255.224 +206.16.199.80/255.255.255.248 +206.16.199.88/255.255.255.248 +206.17.72.0/255.255.255.0 +206.17.74.160/255.255.255.240 +206.17.227.0/255.255.251.0 +206.17.233.0/255.255.255.0 +206.18.203.128/255.255.255.240 +206.18.212.16/255.255.255.240 +206.18.215.192/255.255.255.192 +206.19.110.0/255.255.255.0 +206.20.170.0/255.255.255.0 +206.22.255.0/255.255.255.0 +206.25.196.208/255.255.255.240 +206.25.198.224/255.255.255.240 +206.27.66.0/255.255.254.0 +206.28.64.32/255.255.255.224 +206.28.64.224/255.255.255.224 +206.28.146.0/255.255.254.0 +206.29.48.0/255.255.254.0 +206.29.145.192/255.255.255.240 +206.31.10.0/255.255.254.0 +206.31.216.0/255.255.253.0 +206.34.123.0/255.255.255.0 +206.40.133.0/255.255.255.0 +206.47.20.0/255.255.254.0 +206.47.124.224/255.255.255.224 +206.51.26.0/255.255.255.0 +206.55.131.0/255.255.255.0 +206.57.128.0/255.255.128.0 +206.63.158.0/255.255.255.0 +206.65.173.192/255.255.255.192 +206.66.66.0/255.255.255.0 +206.71.32.0/255.255.240.0 +206.73.59.16/255.255.255.240 +206.73.194.192/255.255.255.224 +206.74.128.0/255.255.224.0 +206.78.0.0/255.255.0.0 +206.80.189.0/255.255.255.0 +206.81.17.0/255.255.251.0 +206.81.28.0/255.255.255.0 +206.93.244.0/255.255.255.0 +206.96.168.0/255.255.255.0 +206.96.191.32/255.255.255.224 +206.98.219.0/255.255.255.0 +206.99.122.80/255.255.255.240 +206.99.238.0/255.255.255.0 +206.99.250.0/255.255.254.0 +206.100.92.0/255.255.255.0 +206.100.168.0/255.255.254.0 +206.103.228.128/255.255.255.224 +206.105.114.0/255.255.255.0 +206.105.221.0/255.255.255.0 +206.105.222.0/255.255.255.0 +206.112.128.0/255.255.224.0 +206.114.201.32/255.255.255.224 +206.118.0.0/255.255.0.0 +206.129.0.0/255.255.254.0 +206.129.112.0/255.255.255.0 +206.130.8.0/255.255.255.0 +206.130.86.0/255.255.255.0 +206.130.180.0/255.255.255.0 +206.130.241.0/255.255.255.0 +206.131.224.0/255.255.224.0 +206.132.30.192/255.255.255.224 +206.135.0.0/255.255.167.0 +206.135.90.0/255.255.135.176 +206.135.210.83/255.255.210.83 +206.136.96.200/255.255.255.248 +206.136.101.0/255.255.255.128 +206.139.27.0/255.255.255.0 +206.142.206.0/255.255.254.0 +206.143.128.0/255.255.128.0 +206.144.56.0/255.255.248.0 +206.144.96.0/255.255.224.0 +206.150.144.160/255.255.255.224 +206.151.48.208/255.255.255.240 +206.151.52.80/255.255.255.240 +206.151.55.16/255.255.255.240 +206.151.86.0/255.255.255.0 +206.152.17.0/255.255.255.0 +206.152.116.128/255.255.255.128 +206.154.88.0/255.255.255.240 +206.154.108.0/255.255.255.0 +206.154.171.0/255.255.255.0 +206.154.231.16/255.255.255.240 +206.154.231.64/255.255.255.192 +206.155.31.8/255.255.255.248 +206.156.1.0/255.255.255.0 +206.156.48.0/255.255.255.0 +206.156.96.176/255.255.255.240 +206.156.254.0/255.255.255.0 +206.161.193.0/255.255.255.0 +206.166.254.0/255.255.255.0 +206.167.148.0/255.255.255.0 +206.168.114.32/255.255.255.248 +206.169.132.88/255.255.255.248 +206.170.104.0/255.255.248.0 +206.171.73.88/255.255.255.248 +206.171.95.112/255.255.255.240 +206.171.192.0/255.255.240.0 +206.172.31.160/255.255.255.224 +206.175.71.152/255.255.255.248 +206.176.0.0/255.255.128.0 +206.177.0.0/255.254.0.0 +206.181.98.0/255.255.254.0 +206.181.220.0/255.255.252.0 +206.183.1.0/255.255.255.0 +206.183.2.0/255.255.255.0 +206.189.29.0/255.255.255.0 +206.189.62.0/255.255.254.0 +206.189.80.0/255.255.240.0 +206.191.0.0/255.255.192.0 +206.194.192.0/255.255.192.0 +206.195.96.0/255.255.224.0 +206.196.137.0/255.255.255.0 +206.197.82.0/255.255.255.0 +206.197.85.0/255.255.255.0 +206.197.89.0/255.255.255.0 +206.197.113.0/255.255.255.0 +206.197.145.0/255.255.255.0 +206.197.160.0/255.255.255.0 +206.197.198.0/255.255.255.0 +206.197.206.0/255.255.255.0 +206.197.213.0/255.255.255.0 +206.197.238.0/255.255.255.0 +206.197.242.0/255.255.255.0 +206.197.246.0/255.255.255.0 +206.204.10.192/255.255.255.224 +206.205.30.0/255.255.255.0 +206.208.64.0/255.255.248.0 +206.208.176.0/255.255.240.0 +206.212.128.0/255.255.160.0 +206.213.128.0/255.255.192.0 +206.217.227.0/255.255.255.0 +206.220.40.0/255.255.252.0 +206.220.52.0/255.255.252.0 +206.222.217.0/255.255.255.0 +206.223.11.0/255.255.255.0 +206.224.0.0/255.255.224.0 +206.224.32.0/255.255.224.0 +206.228.8.0/255.255.252.0 +206.229.18.128/255.255.255.240 +206.241.30.0/255.255.254.0 +206.245.64.0/255.255.191.0 +206.245.161.96/255.255.255.248 +206.246.73.64/255.255.255.192 +206.253.11.128/255.255.255.192 +206.253.14.64/255.255.255.224 +206.254.96.0/255.255.248.0 +207.1.18.48/255.255.255.240 +207.1.60.0/255.255.252.0 +207.2.57.0/255.255.255.0 +207.2.249.0/255.255.255.192 +207.4.0.0/255.255.0.0 +207.8.74.200/255.255.255.248 +207.10.33.96/255.255.255.224 +207.10.58.0/255.255.254.0 +207.13.123.64/255.255.255.240 +207.14.96.0/255.255.240.0 +207.16.34.136/255.255.255.248 +207.16.139.0/255.255.255.0 +207.18.239.0/255.255.255.0 +207.19.252.0/255.255.255.0 +207.21.192.0/255.255.192.0 +207.24.85.0/255.255.255.0 +207.25.71.0/255.255.255.0 +207.25.79.0/255.255.255.0 +207.28.234.0/255.255.252.0 +207.29.0.0/255.255.64.0 +207.29.200.16/255.255.255.248 +207.29.200.128/255.255.255.224 +207.29.202.112/255.255.255.248 +207.29.207.64/255.255.255.248 +207.29.207.80/255.255.255.248 +207.30.114.0/255.255.255.128 +207.31.0.0/255.255.192.0 +207.31.128.0/255.255.192.0 +207.35.148.128/255.255.255.224 +207.35.164.192/255.255.255.192 +207.35.217.216/255.255.255.248 +207.35.253.192/255.255.255.224 +207.38.0.0/255.255.254.0 +207.38.39.128/255.255.255.248 +207.38.119.224/255.255.255.224 +207.38.125.80/255.255.255.240 +207.41.14.0/255.255.250.0 +207.42.6.64/255.255.255.192 +207.42.136.0/255.255.248.0 +207.43.0.32/255.255.255.240 +207.43.55.0/255.255.255.0 +207.50.8.0/255.255.255.240 +207.50.133.128/255.255.255.240 +207.50.216.0/255.255.255.240 +207.50.228.224/255.255.255.248 +207.52.54.0/255.255.255.192 +207.52.96.192/255.255.255.192 +207.52.180.64/255.255.255.192 +207.54.137.0/255.255.255.0 +207.59.26.224/255.255.255.240 +207.59.61.104/255.255.255.248 +207.59.130.64/255.255.255.224 +207.60.0.0/255.255.0.0 +207.61.10.176/255.255.255.240 +207.61.17.192/255.255.255.224 +207.61.34.88/255.255.255.248 +207.61.38.104/255.255.255.248 +207.61.39.80/255.255.255.248 +207.61.40.128/255.255.255.224 +207.61.76.48/255.255.255.248 +207.61.111.48/255.255.255.248 +207.61.145.128/255.255.255.128 +207.64.0.0/255.255.0.0 +207.66.0.0/255.255.255.0 +207.66.155.192/255.255.255.240 +207.66.231.0/255.255.255.0 +207.67.99.0/255.255.255.0 +207.68.36.16/255.255.255.240 +207.68.36.208/255.255.255.240 +207.70.0.0/255.255.253.0 +207.70.16.0/255.255.255.0 +207.76.218.0/255.255.255.0 +207.77.57.32/255.255.255.240 +207.77.76.0/255.255.255.0 +207.78.30.0/255.255.255.0 +207.78.98.0/255.255.255.0 +207.78.113.0/255.255.255.0 +207.79.65.0/255.255.255.0 +207.83.96.128/255.255.255.128 +207.86.66.192/255.255.255.224 +207.93.119.0/255.255.255.0 +207.95.32.0/255.255.240.0 +207.96.50.34/255.255.255.193 +207.96.101.160/255.255.255.240 +207.96.196.192/255.255.255.224 +207.98.204.104/255.255.255.248 +207.98.244.192/255.255.255.248 +207.99.128.0/255.255.128.0 +207.103.208.0/255.255.255.192 +207.104.92.0/255.255.255.0 +207.104.96.128/255.255.255.192 +207.105.150.80/255.255.255.248 +207.105.150.128/255.255.255.128 +207.105.222.0/255.255.255.0 +207.107.10.16/255.255.255.240 +207.107.11.0/255.255.255.0 +207.108.136.0/255.255.255.0 +207.108.252.48/255.255.255.240 +207.109.59.0/255.255.255.0 +207.113.57.0/255.255.255.0 +207.114.172.56/255.255.255.240 +207.115.234.0/255.255.255.0 +207.117.9.0/255.255.253.0 +207.117.52.0/255.255.255.0 +207.120.185.0/255.255.255.0 +207.121.112.0/255.255.255.0 +207.121.115.0/255.255.255.0 +207.122.110.0/255.255.254.0 +207.122.189.0/255.255.255.0 +207.123.128.0/255.255.248.0 +207.123.147.0/255.255.254.0 +207.123.193.0/255.255.255.0 +207.125.0.0/255.255.0.0 +207.134.99.96/255.255.255.248 +207.136.78.160/255.255.255.224 +207.138.102.128/255.255.255.192 +207.139.2.24/255.255.255.248 +207.139.69.0/255.255.255.0 +207.139.96.192/255.255.255.224 +207.139.98.112/255.255.255.240 +207.139.108.192/255.255.255.224 +207.148.76.0/255.255.248.0 +207.149.188.0/255.255.255.224 +207.150.224.0/255.255.240.0 +207.151.0.0/255.255.0.0 +207.152.54.0/255.255.255.0 +207.153.3.96/255.255.255.248 +207.153.9.128/255.255.255.248 +207.154.0.0/255.255.192.0 +207.156.8.0/255.255.254.0 +207.158.19.96/255.255.255.240 +207.158.21.224/255.255.255.224 +207.158.101.0/255.255.255.128 +207.159.94.192/255.255.255.192 +207.164.17.96/255.255.255.224 +207.164.57.224/255.255.255.224 +207.164.85.104/255.255.255.248 +207.164.122.0/255.255.255.0 +207.164.131.88/255.255.255.240 +207.166.0.0/255.255.192.0 +207.168.9.0/255.255.255.0 +207.168.29.128/255.255.255.248 +207.168.46.0/255.255.255.192 +207.168.171.0/255.255.255.0 +207.168.187.64/255.255.255.240 +207.168.250.0/255.255.255.0 +207.171.34.0/255.255.255.0 +207.171.64.0/255.255.192.0 +207.173.80.0/255.255.255.0 +207.173.220.64/255.255.255.192 +207.178.134.203/255.255.225.248 +207.178.171.0/255.255.255.192 +207.182.246.192/255.255.255.224 +207.188.0.0/255.255.224.0 +207.191.85.240/255.255.255.248 +207.191.119.232/255.255.255.248 +207.192.0.0/255.255.192.0 +207.193.59.0/255.255.255.192 +207.194.153.0/255.255.255.224 +207.195.51.0/255.255.255.0 +207.198.109.134/255.255.255.245 +207.200.14.32/255.255.255.224 +207.200.30.0/255.255.255.0 +207.200.41.64/255.255.255.224 +207.201.64.0/255.255.192.0 +207.202.100.0/255.255.255.224 +207.202.145.32/255.255.255.248 +207.202.213.0/255.255.255.0 +207.209.0.0/255.255.253.0 +207.209.124.128/255.255.255.128 +207.211.207.64/255.255.255.192 +207.212.106.0/255.255.255.0 +207.212.129.64/255.255.255.224 +207.212.235.0/255.255.255.128 +207.213.45.32/255.255.255.224 +207.213.110.224/255.255.255.240 +207.213.111.128/255.255.255.248 +207.214.50.208/255.255.255.248 +207.214.85.8/255.255.255.248 +207.214.247.128/255.255.255.224 +207.215.9.88/255.255.255.248 +207.215.250.176/255.255.255.248 +207.217.18.0/255.255.255.0 +207.217.37.48/255.255.255.248 +207.217.232.0/255.255.255.128 +207.219.18.0/255.255.255.0 +207.219.88.192/255.255.255.224 +207.219.159.64/255.255.255.192 +207.220.121.0/255.255.253.0 +207.224.222.96/255.255.255.248 +207.225.25.0/255.255.255.0 +207.225.162.0/255.255.255.0 +207.229.11.192/255.255.255.192 +207.229.176.144/255.255.255.240 +207.232.3.0/255.255.255.240 +207.232.12.0/255.255.255.0 +207.232.128.0/255.255.128.0 +207.234.37.64/255.255.255.240 +207.234.106.192/255.255.255.240 +207.234.185.0/255.255.255.0 +207.234.187.0/255.255.255.0 +207.236.164.32/255.255.255.224 +207.236.193.128/255.255.255.224 +207.236.203.64/255.255.255.224 +207.236.203.128/255.255.255.224 +207.237.166.96/255.255.255.224 +207.237.166.128/255.255.255.192 +207.239.240.184/255.255.255.248 +207.240.0.0/255.255.248.0 +207.240.17.0/255.255.251.0 +207.240.39.0/255.255.255.0 +207.242.54.0/255.255.255.0 +207.242.126.0/255.255.255.0 +207.243.213.0/255.255.255.0 +207.244.75.48/255.255.255.248 +207.244.77.0/255.255.255.0 +207.244.92.24/255.255.255.248 +207.245.28.40/255.255.255.248 +207.245.160.0/255.255.224.0 +207.246.158.17/255.255.255.205 +207.252.135.0/255.255.255.0 +207.252.218.240/255.255.255.240 +208.1.59.64/255.255.255.192 +208.2.159.144/255.255.255.240 +208.2.162.0/255.255.254.0 +208.2.250.0/255.255.254.0 +208.3.255.0/255.255.255.0 +208.9.198.24/255.255.255.248 +208.11.127.160/255.255.255.240 +208.11.145.128/255.255.255.192 +208.11.244.0/255.255.252.0 +208.18.125.80/255.255.255.240 +208.24.195.80/255.255.255.240 +208.25.208.0/255.255.255.0 +208.28.122.0/255.255.253.0 +208.28.133.0/255.255.255.0 +208.30.188.0/255.255.255.0 +208.31.171.0/255.255.255.0 +208.32.12.0/255.255.255.0 +208.32.217.64/255.255.255.240 +208.33.250.64/255.255.255.224 +208.34.184.0/255.255.255.0 +208.35.62.64/255.255.255.192 +208.35.198.176/255.255.255.240 +208.35.212.0/255.255.255.0 +208.38.13.128/255.255.255.192 +208.39.46.0/255.255.255.241 +208.39.46.25/255.255.255.25 +208.39.151.240/255.255.255.240 +208.39.154.192/255.255.255.224 +208.39.197.152/255.255.255.248 +208.41.38.32/255.255.255.224 +208.41.67.0/255.255.255.224 +208.41.79.96/255.255.255.224 +208.41.110.80/255.255.255.248 +208.41.121.32/255.255.255.224 +208.41.127.192/255.255.255.224 +208.41.144.192/255.255.255.224 +208.41.154.40/255.255.255.248 +208.41.155.224/255.255.255.224 +208.41.189.0/255.255.255.224 +208.41.230.0/255.255.255.0 +208.42.117.192/255.255.255.248 +208.44.17.0/255.255.255.0 +208.44.129.192/255.255.255.224 +208.44.181.64/255.255.255.224 +208.44.236.64/255.255.255.224 +208.45.2.232/255.255.255.248 +208.45.106.0/255.255.255.240 +208.45.140.224/255.255.255.224 +208.45.143.0/255.255.255.128 +208.45.156.160/255.255.255.224 +208.46.138.0/255.255.255.224 +208.46.243.0/255.255.255.224 +208.46.255.16/255.255.255.248 +208.47.160.96/255.255.255.224 +208.47.212.16/255.255.255.248 +208.47.255.184/255.255.255.248 +208.48.64.0/255.255.255.0 +208.49.164.0/255.255.255.0 +208.50.66.224/255.255.255.224 +208.57.14.240/255.255.255.248 +208.57.57.96/255.255.255.240 +208.57.69.88/255.255.255.248 +208.57.238.16/255.255.255.248 +208.58.161.48/255.255.255.240 +208.58.186.0/255.255.255.240 +208.59.2.64/255.255.255.224 +208.59.15.48/255.255.255.240 +208.59.41.216/255.255.255.248 +208.128.168.80/255.255.255.240 +208.129.137.255/255.255.253.255 +208.129.201.0/255.255.255.0 +208.130.57.0/255.255.255.0 +208.131.50.0/255.255.255.0 +208.131.68.0/255.255.255.0 +208.132.37.0/255.255.255.0 +208.132.168.96/255.255.255.224 +208.132.238.0/255.255.255.0 +208.132.250.0/255.255.255.0 +208.134.115.0/255.255.255.0 +208.134.193.0/255.255.255.0 +208.135.192.96/255.255.255.224 +208.136.50.0/255.255.255.0 +208.136.102.0/255.255.255.0 +208.137.135.0/255.255.255.0 +208.138.34.80/255.255.255.248 +208.138.161.0/255.255.255.240 +208.138.169.240/255.255.255.240 +208.138.170.176/255.255.255.248 +208.139.27.0/255.255.255.0 +208.139.37.0/255.255.255.0 +208.139.64.224/255.255.255.240 +208.140.8.96/255.255.255.224 +208.140.16.32/255.255.255.224 +208.140.92.0/255.255.255.0 +208.141.5.64/255.255.255.192 +208.141.47.192/255.255.255.224 +208.141.82.0/255.255.255.0 +208.142.3.128/255.255.255.224 +208.142.84.64/255.255.255.224 +208.142.154.64/255.255.255.192 +208.143.7.64/255.255.255.192 +208.143.193.0/255.255.255.0 +208.143.210.192/255.255.255.192 +208.144.34.160/255.255.255.240 +208.144.232.0/255.255.255.240 +208.145.129.0/255.255.255.0 +208.145.149.0/255.255.255.0 +208.146.103.32/255.255.255.224 +208.146.241.192/255.255.253.192 +208.147.8.0/255.255.255.0 +208.147.40.0/255.255.255.208 +208.147.53.128/255.255.255.224 +208.147.53.224/255.255.255.224 +208.147.65.0/255.255.255.0 +208.147.88.0/255.255.248.0 +208.153.117.0/255.255.255.0 +208.155.8.16/255.255.255.240 +208.155.82.48/255.255.255.240 +208.155.144.0/255.255.248.0 +208.155.183.0/255.255.255.0 +208.155.188.0/255.255.255.0 +208.156.96.176/255.255.255.240 +208.156.118.0/255.255.255.240 +208.156.118.240/255.255.255.240 +208.157.76.0/255.255.254.0 +208.157.217.128/255.255.255.128 +208.158.117.16/255.255.255.240 +208.158.117.240/255.255.255.240 +208.158.122.0/255.255.255.0 +208.160.46.176/255.255.255.240 +208.160.46.208/255.255.255.240 +208.161.5.128/255.255.255.224 +208.162.170.0/255.255.255.0 +208.162.171.160/255.255.255.240 +208.162.216.0/255.255.252.0 +208.162.223.0/255.255.255.0 +208.164.6.144/255.255.255.240 +208.164.25.0/255.255.255.0 +208.165.227.32/255.255.255.240 +208.165.251.0/255.255.255.0 +208.166.224.128/255.255.255.128 +208.167.116.80/255.255.255.240 +208.167.203.80/255.255.255.240 +208.168.72.0/255.255.254.0 +208.168.208.0/255.255.254.0 +208.171.163.32/255.255.255.224 +208.179.2.192/255.255.255.248 +208.179.2.208/255.255.255.240 +208.181.129.200/255.255.255.248 +208.181.224.0/255.255.255.0 +208.182.0.0/255.254.0.0 +208.184.183.192/255.255.255.240 +208.185.139.208/255.255.255.240 +208.185.166.0/255.255.255.192 +208.185.182.240/255.255.255.240 +208.185.254.64/255.255.255.224 +208.186.152.0/255.255.255.0 +208.187.191.136/255.255.255.248 +208.188.60.176/255.255.255.248 +208.188.81.64/255.255.255.224 +208.188.135.176/255.255.255.248 +208.188.198.40/255.255.255.248 +208.189.2.192/255.255.255.192 +208.189.11.80/255.255.255.240 +208.189.82.56/255.255.255.248 +208.189.88.64/255.255.255.248 +208.189.96.24/255.255.255.248 +208.189.96.160/255.255.255.224 +208.189.96.224/255.255.255.248 +208.189.136.104/255.255.255.248 +208.189.179.176/255.255.255.248 +208.189.196.160/255.255.255.240 +208.190.93.32/255.255.255.240 +208.190.96.144/255.255.255.248 +208.191.41.56/255.255.255.248 +208.192.0.0/255.255.0.0 +208.193.167.128/255.255.255.192 +208.194.116.0/255.255.255.0 +208.194.152.0/255.255.255.0 +208.194.184.0/255.255.255.0 +208.195.253.16/255.255.255.248 +208.196.3.32/255.255.255.248 +208.196.166.0/255.255.255.0 +208.197.9.64/255.255.255.240 +208.197.34.0/255.255.255.128 +208.198.198.0/255.255.255.0 +208.199.134.0/255.255.255.0 +208.200.56.0/255.255.248.0 +208.200.104.0/255.255.255.0 +208.200.124.0/255.255.255.0 +208.203.14.0/255.255.255.0 +208.204.246.16/255.255.255.240 +208.205.18.16/255.255.255.248 +208.205.21.0/255.255.255.0 +208.205.186.128/255.255.255.192 +208.206.212.16/255.255.255.248 +208.206.234.0/255.255.255.0 +208.207.43.0/255.255.255.0 +208.208.221.0/255.255.255.192 +208.209.205.0/255.255.255.0 +208.210.54.0/255.255.255.0 +208.211.42.64/255.255.255.224 +208.211.140.8/255.255.255.248 +208.212.7.0/255.255.255.0 +208.213.119.0/255.255.255.0 +208.213.242.0/255.255.255.0 +208.214.154.0/255.255.255.0 +208.215.160.64/255.255.255.192 +208.215.208.0/255.255.254.0 +208.216.52.0/255.255.255.0 +208.216.53.0/255.255.255.0 +208.216.54.0/255.255.255.0 +208.216.55.0/255.255.255.0 +208.216.85.192/255.255.255.224 +208.216.90.0/255.255.255.0 +208.217.63.0/255.255.255.0 +208.218.4.0/255.255.255.0 +208.218.80.0/255.255.255.0 +208.219.64.0/255.255.255.0 +208.219.81.0/255.255.255.0 +208.219.167.0/255.255.255.0 +208.219.174.0/255.255.255.0 +208.219.187.0/255.255.255.0 +208.220.77.0/255.255.255.0 +208.221.241.0/255.255.255.0 +208.222.110.0/255.255.255.0 +208.223.102.0/255.255.255.0 +208.223.167.0/255.255.255.0 +208.224.75.96/255.255.255.224 +208.225.90.0/255.255.255.0 +208.225.180.0/255.255.255.0 +208.225.218.240/255.255.255.240 +208.226.184.160/255.255.255.224 +208.226.208.0/255.255.248.0 +208.228.123.128/255.255.255.192 +208.229.79.0/255.255.255.0 +208.229.225.240/255.255.255.240 +208.231.4.144/255.255.255.248 +208.231.29.32/255.255.255.240 +208.231.90.224/255.255.255.245 +208.231.90.236/255.255.255.236 +208.231.162.0/255.255.255.0 +208.233.155.0/255.255.255.0 +208.234.148.192/255.255.255.192 +208.236.44.0/255.255.254.0 +208.237.188.0/255.255.255.0 +208.237.220.0/255.255.254.0 +208.238.15.0/255.255.255.0 +208.238.98.0/255.255.255.0 +208.240.214.128/255.255.255.128 +208.240.244.64/255.255.255.240 +208.243.58.0/255.255.254.0 +208.243.219.0/255.255.255.128 +208.244.73.0/255.255.255.128 +208.244.116.0/255.255.254.0 +208.244.233.0/255.255.255.0 +208.244.251.224/255.255.255.248 +208.245.40.192/255.255.255.248 +208.246.29.0/255.255.255.128 +208.246.34.32/255.255.255.248 +208.246.35.0/255.255.255.0 +208.246.39.120/255.255.255.248 +208.246.95.56/255.255.255.248 +208.246.114.176/255.255.255.240 +208.247.15.0/255.255.255.0 +208.248.174.192/255.255.255.192 +208.251.126.96/255.255.255.240 +208.251.137.0/255.255.255.0 +208.251.175.240/255.255.255.248 +208.251.200.128/255.255.255.240 +208.252.11.32/255.255.255.240 +208.252.18.16/255.255.255.240 +208.252.39.0/255.255.255.0 +208.252.81.16/255.255.255.240 +208.252.102.0/255.255.255.0 +208.252.173.240/255.255.255.240 +208.252.227.112/255.255.255.248 +208.252.239.0/255.255.255.128 +208.253.51.168/255.255.255.248 +208.253.62.16/255.255.255.248 +208.253.65.32/255.255.255.224 +208.253.155.0/255.255.255.0 +208.254.63.0/255.255.255.0 +209.3.152.32/255.255.255.224 +209.3.205.48/255.255.255.240 +209.5.110.176/255.255.255.240 +209.10.102.128/255.255.255.224 +209.10.145.208/255.255.255.240 +209.10.163.128/255.255.255.240 +209.10.173.184/255.255.255.248 +209.10.202.176/255.255.255.240 +209.10.202.224/255.255.255.224 +209.10.215.0/255.255.255.192 +209.10.227.160/255.255.255.248 +209.10.227.208/255.255.255.192 +209.11.5.96/255.255.255.240 +209.11.24.64/255.255.255.240 +209.11.40.0/255.255.255.192 +209.11.41.224/255.255.255.240 +209.11.89.16/255.255.255.240 +209.11.120.64/255.255.255.240 +209.11.126.0/255.255.255.0 +209.11.134.0/255.255.255.0 +209.12.92.64/255.255.255.224 +209.12.135.240/255.255.255.240 +209.17.129.96/255.255.255.224 +209.17.152.0/255.255.255.192 +209.17.174.128/255.255.255.192 +209.19.117.16/255.255.255.248 +209.19.124.224/255.255.255.240 +209.20.177.104/255.255.255.248 +209.21.102.120/255.255.255.248 +209.21.106.160/255.255.255.240 +209.25.84.128/255.255.255.224 +209.25.84.192/255.255.255.224 +209.25.153.174/255.255.255.246 +209.26.80.192/255.255.255.192 +209.26.144.0/255.255.255.192 +209.26.188.0/255.255.255.224 +209.28.87.16/255.255.255.240 +209.28.166.0/255.255.255.0 +209.29.119.56/255.255.255.248 +209.31.0.0/255.255.0.0 +209.34.72.48/255.255.255.208 +209.34.72.192/255.255.255.192 +209.34.75.0/255.255.255.0 +209.34.146.112/255.255.255.240 +209.34.147.0/255.255.255.128 +209.34.154.176/255.255.255.248 +209.43.21.224/255.255.255.224 +209.44.33.0/255.255.255.224 +209.47.84.128/255.255.255.192 +209.47.190.192/255.255.255.240 +209.47.215.80/255.255.255.240 +209.51.16.0/255.255.240.0 +209.52.126.64/255.255.255.224 +209.54.188.0/255.255.255.0 +209.56.0.0/255.255.252.0 +209.56.156.0/255.255.254.0 +209.58.5.128/255.255.255.224 +209.58.93.96/255.255.255.224 +209.58.184.136/255.255.255.248 +209.61.10.0/255.255.255.240 +209.61.120.0/255.255.255.0 +209.61.178.96/255.255.255.240 +209.62.61.0/255.255.255.0 +209.62.62.0/255.255.255.0 +209.63.134.128/255.255.255.128 +209.66.192.0/255.255.224.0 +209.67.69.160/255.255.255.224 +209.68.4.0/255.255.255.0 +209.68.128.0/255.255.224.0 +209.71.127.0/255.255.255.240 +209.71.140.96/255.255.255.240 +209.71.239.64/255.255.255.192 +209.74.192.0/255.255.224.0 +209.76.123.128/255.255.255.128 +209.76.164.64/255.255.255.224 +209.77.58.32/255.255.255.224 +209.77.219.128/255.255.255.224 +209.78.62.0/255.255.255.0 +209.78.104.128/255.255.255.224 +209.78.120.128/255.255.255.224 +209.78.184.120/255.255.255.248 +209.78.188.224/255.255.255.224 +209.78.194.0/255.255.255.0 +209.78.203.0/255.255.255.0 +209.79.237.128/255.255.255.128 +209.81.58.112/255.255.255.240 +209.81.136.0/255.255.255.0 +209.83.206.64/255.255.255.224 +209.85.26.192/255.255.255.224 +209.85.96.0/255.255.252.0 +209.85.147.0/255.255.255.128 +209.85.160.0/255.255.248.0 +209.85.206.0/255.255.255.0 +209.85.239.64/255.255.255.192 +209.87.238.32/255.255.255.240 +209.92.36.192/255.255.255.224 +209.92.132.240/255.255.255.240 +209.93.232.0/255.255.254.0 +209.98.62.48/255.255.255.240 +209.101.132.128/255.255.255.192 +209.101.186.64/255.255.255.224 +209.102.119.64/255.255.255.192 +209.110.94.0/255.255.255.0 +209.113.210.72/255.255.255.248 +209.113.254.88/255.255.255.248 +209.120.34.16/255.255.255.240 +209.120.115.0/255.255.255.0 +209.121.207.192/255.255.255.224 +209.122.24.24/255.255.255.248 +209.122.74.0/255.255.255.0 +209.122.109.208/255.255.255.240 +209.122.130.0/255.255.255.0 +209.122.167.208/255.255.255.240 +209.123.110.64/255.255.255.225 +209.124.0.0/255.255.224.0 +209.125.45.0/255.255.255.0 +209.125.153.192/255.255.255.240 +209.125.159.96/255.255.255.224 +209.127.23.128/255.255.255.224 +209.128.66.144/255.255.255.240 +209.128.66.192/255.255.255.224 +209.128.67.88/255.255.255.248 +209.128.67.160/255.255.255.248 +209.128.68.64/255.255.255.192 +209.128.75.32/255.255.255.240 +209.128.75.64/255.255.255.240 +209.128.75.160/255.255.255.224 +209.128.78.224/255.255.255.248 +209.128.78.240/255.255.255.248 +209.128.81.16/255.255.255.240 +209.128.81.64/255.255.255.240 +209.128.88.160/255.255.255.248 +209.128.91.72/255.255.255.248 +209.128.91.88/255.255.255.248 +209.128.91.176/255.255.255.248 +209.131.128.0/255.255.192.0 +209.132.98.0/255.255.255.112 +209.132.98.145/255.255.254.145 +209.132.203.192/255.255.255.192 +209.132.254.0/255.255.254.0 +209.133.42.0/255.255.255.0 +209.133.128.0/255.255.192.0 +209.133.224.0/255.255.224.0 +209.134.18.192/255.255.255.224 +209.134.159.240/255.255.255.240 +209.135.0.64/255.255.255.240 +209.137.96.0/255.255.251.0 +209.137.147.0/255.255.255.192 +209.141.176.24/255.255.255.248 +209.142.112.120/255.255.255.120 +209.142.123.56/255.255.255.247 +209.143.226.0/255.255.255.0 +209.146.37.0/255.255.255.0 +209.146.89.128/255.255.255.224 +209.152.214.8/255.255.255.248 +209.152.214.216/255.255.255.248 +209.153.208.128/255.255.255.128 +209.155.236.0/255.255.255.224 +209.163.246.176/255.255.255.248 +209.166.3.200/255.255.255.248 +209.166.42.48/255.255.255.240 +209.166.42.208/255.255.255.248 +209.166.49.176/255.255.255.240 +209.167.115.0/255.255.255.0 +209.167.132.208/255.255.255.240 +209.167.159.0/255.255.255.224 +209.167.192.16/255.255.255.240 +209.167.202.56/255.255.255.248 +209.167.245.64/255.255.255.192 +209.176.191.192/255.255.255.225 +209.176.232.0/255.255.248.0 +209.178.32.0/255.255.255.224 +209.178.69.0/255.255.255.0 +209.178.72.112/255.255.255.240 +209.178.92.0/255.255.255.224 +209.178.92.128/255.255.255.224 +209.178.193.64/255.255.255.240 +209.179.64.0/255.255.253.0 +209.179.73.0/255.255.255.128 +209.179.94.0/255.255.255.240 +209.179.103.0/255.255.255.192 +209.179.113.64/255.255.255.224 +209.180.118.240/255.255.255.248 +209.180.151.0/255.255.255.0 +209.180.154.144/255.255.255.248 +209.180.175.176/255.255.255.248 +209.180.202.128/255.255.255.248 +209.181.53.16/255.255.255.248 +209.181.73.168/255.255.255.248 +209.181.113.192/255.255.255.248 +209.181.188.128/255.255.255.128 +209.182.108.72/255.255.255.248 +209.184.7.128/255.255.255.248 +209.184.77.128/255.255.255.128 +209.184.98.192/255.255.255.208 +209.184.105.96/255.255.255.240 +209.184.141.96/255.255.255.224 +209.187.227.0/255.255.255.0 +209.187.233.208/255.255.255.248 +209.190.197.128/255.255.255.128 +209.191.49.160/255.255.255.240 +209.191.90.144/255.255.255.240 +209.191.132.240/255.255.255.240 +209.191.148.32/255.255.255.224 +209.191.148.96/255.255.255.224 +209.191.156.0/255.255.255.192 +209.191.163.0/255.255.255.0 +209.192.62.0/255.255.255.0 +209.192.115.0/255.255.253.0 +209.192.156.16/255.255.255.248 +209.192.166.96/255.255.255.224 +209.196.87.64/255.255.255.240 +209.197.33.136/255.255.255.248 +209.198.176.0/255.255.240.0 +209.202.82.136/255.255.255.248 +209.203.64.0/255.255.192.0 +209.208.140.136/255.255.255.248 +209.208.140.240/255.255.255.240 +209.208.162.16/255.255.255.240 +209.208.171.96/255.255.255.224 +209.208.192.0/255.255.255.192 +209.208.196.160/255.255.255.224 +209.208.200.224/255.255.255.240 +209.208.239.0/255.255.255.224 +209.209.10.48/255.255.255.248 +209.209.57.216/255.255.255.248 +209.209.58.24/255.255.255.248 +209.210.4.192/255.255.255.192 +209.210.120.0/255.255.248.0 +209.210.129.224/255.255.255.224 +209.210.138.0/255.255.255.0 +209.210.228.0/255.255.252.0 +209.211.20.0/255.255.255.0 +209.211.170.160/255.255.255.224 +209.212.164.24/255.255.255.248 +209.212.167.0/255.255.255.248 +209.212.180.224/255.255.255.224 +209.212.184.160/255.255.255.224 +209.212.186.192/255.255.255.224 +209.212.188.120/255.255.255.248 +209.213.206.0/255.255.255.224 +209.213.206.128/255.255.255.192 +209.216.72.16/255.255.255.240 +209.216.74.8/255.255.255.248 +209.217.5.32/255.255.255.240 +209.217.8.128/255.255.255.128 +209.217.88.128/255.255.255.192 +209.218.10.96/255.255.255.240 +209.218.170.0/255.255.255.128 +209.219.39.0/255.255.255.128 +209.219.75.0/255.255.255.248 +209.219.82.96/255.255.255.240 +209.219.93.192/255.255.255.240 +209.219.215.1/255.255.255.1 +209.221.129.0/255.255.255.128 +209.221.132.0/255.255.255.248 +209.221.134.24/255.255.255.248 +209.221.134.104/255.255.255.248 +209.221.134.136/255.255.255.248 +209.221.134.160/255.255.255.248 +209.221.142.128/255.255.255.192 +209.221.170.0/255.255.255.0 +209.221.177.0/255.255.253.0 +209.223.86.64/255.255.255.224 +209.223.92.224/255.255.255.240 +209.223.113.0/255.255.255.0 +209.223.161.192/255.255.255.192 +209.223.167.0/255.255.255.0 +209.223.190.0/255.255.255.192 +209.224.51.224/255.255.255.240 +209.224.54.32/255.255.255.248 +209.224.54.112/255.255.255.240 +209.224.54.192/255.255.255.192 +209.226.41.128/255.255.255.224 +209.226.79.128/255.255.255.224 +209.226.81.192/255.255.255.224 +209.226.227.32/255.255.255.224 +209.232.121.160/255.255.255.224 +209.232.174.16/255.255.255.248 +209.232.184.32/255.255.255.248 +209.232.184.224/255.255.255.248 +209.239.174.48/255.255.255.248 +209.241.200.0/255.255.255.64 +209.242.138.0/255.255.255.0 +209.249.118.248/255.255.255.248 +209.249.219.0/255.255.255.0 +209.250.117.192/255.255.255.224 +209.250.121.144/255.255.255.240 +209.250.123.32/255.255.255.224 +209.250.126.192/255.255.255.224 +209.251.192.0/255.255.224.0 +209.254.208.96/255.255.255.248 +210.0.70.224/255.255.255.248 +210.0.73.80/255.255.255.248 +210.0.75.96/255.255.255.240 +210.4.145.0/255.255.255.128 +210.7.69.112/255.255.255.248 +210.7.112.16/255.255.255.248 +210.7.113.0/255.255.255.192 +210.7.128.144/255.255.255.240 +210.7.159.216/255.255.255.248 +210.8.51.112/255.255.255.248 +210.8.148.0/255.255.255.0 +210.8.167.0/255.255.255.0 +210.8.184.0/255.255.255.192 +210.11.26.0/255.255.255.0 +210.12.39.128/255.255.255.192 +210.12.77.56/255.255.255.248 +210.12.225.32/255.255.255.224 +210.12.241.8/255.255.255.248 +210.15.199.32/255.255.255.224 +210.15.214.84/255.255.255.248 +210.15.223.48/255.255.255.240 +210.17.176.192/255.255.255.240 +210.23.104.8/255.255.255.248 +210.23.108.128/255.255.255.240 +210.23.116.8/255.255.255.248 +210.23.230.64/255.255.255.224 +210.24.160.216/255.255.255.248 +210.50.131.96/255.255.255.248 +210.54.216.208/255.255.255.248 +210.54.237.24/255.255.255.248 +210.54.237.136/255.255.255.248 +210.55.175.80/255.255.255.248 +210.55.193.16/255.255.255.240 +210.55.193.112/255.255.255.240 +210.55.197.0/255.255.255.0 +210.55.245.88/255.255.255.248 +210.55.245.192/255.255.255.240 +210.56.0.0/255.255.224.0 +210.58.96.32/255.255.255.224 +210.58.98.100/255.255.255.248 +210.58.102.64/255.255.255.248 +210.58.109.160/255.255.255.224 +210.62.27.0/255.255.255.0 +210.62.42.128/255.255.255.192 +210.69.23.128/255.255.255.192 +210.69.28.128/255.255.255.128 +210.69.29.0/255.255.255.192 +210.69.29.64/255.255.255.128 +210.69.82.0/255.255.255.0 +210.69.105.0/255.255.254.0 +210.69.118.0/255.255.255.0 +210.69.210.0/255.255.254.0 +210.75.36.224/255.255.255.224 +210.76.47.0/255.255.255.0 +210.77.155.0/255.255.252.0 +210.80.79.196/255.255.255.248 +210.81.4.32/255.255.255.240 +210.81.136.32/255.255.255.240 +210.81.192.0/255.255.248.0 +210.81.232.0/255.255.252.0 +210.82.62.0/255.255.255.224 +210.86.13.144/255.255.255.248 +210.87.12.48/255.255.255.248 +210.88.209.224/255.255.255.248 +210.89.128.72/255.255.255.248 +210.90.93.0/255.255.255.128 +210.90.108.0/255.255.255.192 +210.90.155.0/255.255.255.128 +210.90.156.128/255.255.255.192 +210.90.156.192/255.255.255.192 +210.90.157.192/255.255.255.192 +210.90.175.160/255.255.255.224 +210.90.217.128/255.255.255.128 +210.90.232.0/255.255.254.0 +210.90.237.240/255.255.255.240 +210.92.229.16/255.255.255.240 +210.95.50.64/255.255.255.192 +210.95.62.192/255.255.255.192 +210.95.73.0/255.255.255.128 +210.95.76.128/255.255.255.128 +210.95.80.0/255.255.255.0 +210.95.127.160/255.255.255.224 +210.95.155.0/255.255.255.0 +210.95.183.0/255.255.255.0 +210.95.188.128/255.255.255.192 +210.95.232.192/255.255.255.192 +210.96.1.128/255.255.255.128 +210.96.2.128/255.255.255.128 +210.96.20.128/255.255.255.192 +210.96.39.0/255.255.255.0 +210.96.58.0/255.255.255.128 +210.96.75.192/255.255.255.192 +210.96.183.224/255.255.255.224 +210.97.28.0/255.255.255.0 +210.97.100.0/255.255.255.192 +210.97.100.128/255.255.255.128 +210.98.171.240/255.255.255.240 +210.99.69.0/255.255.255.0 +210.99.99.0/255.255.255.0 +210.100.168.0/255.255.255.0 +210.101.146.0/255.255.254.0 +210.103.110.0/255.255.255.0 +210.103.176.0/255.255.255.0 +210.104.16.0/255.255.255.0 +210.104.44.0/255.255.255.0 +210.104.55.0/255.255.255.192 +210.104.58.128/255.255.255.192 +210.104.118.0/255.255.254.0 +210.104.121.128/255.255.255.128 +210.104.196.64/255.255.255.192 +210.104.242.128/255.255.255.128 +210.104.251.128/255.255.255.128 +210.106.102.224/255.255.255.224 +210.106.243.160/255.255.255.224 +210.111.138.128/255.255.255.192 +210.124.172.64/255.255.255.192 +210.124.183.128/255.255.255.192 +210.124.214.160/255.255.255.224 +210.127.239.0/255.255.255.0 +210.137.20.0/255.255.254.0 +210.139.128.0/255.255.128.0 +210.160.94.192/255.255.255.248 +210.169.235.216/255.255.255.248 +210.172.0.0/255.255.224.0 +210.175.240.0/255.255.240.0 +210.176.24.152/255.255.255.248 +210.176.53.128/255.255.255.192 +210.176.106.128/255.255.255.128 +210.176.162.248/255.255.255.248 +210.176.186.0/255.255.255.248 +210.176.201.32/255.255.255.224 +210.176.209.128/255.255.255.192 +210.177.15.64/255.255.255.224 +210.177.16.144/255.255.255.240 +210.177.56.48/255.255.255.240 +210.177.68.0/255.255.255.224 +210.177.72.224/255.255.255.224 +210.177.96.224/255.255.255.224 +210.177.100.240/255.255.255.240 +210.177.133.200/255.255.255.248 +210.177.140.192/255.255.255.240 +210.177.141.0/255.255.255.240 +210.177.154.144/255.255.255.240 +210.177.164.48/255.255.255.248 +210.177.170.112/255.255.255.240 +210.177.170.144/255.255.255.240 +210.177.170.192/255.255.255.240 +210.177.170.224/255.255.255.224 +210.178.122.192/255.255.255.192 +210.179.127.0/255.255.255.0 +210.179.140.0/255.255.254.0 +210.179.164.96/255.255.255.224 +210.179.188.192/255.255.255.192 +210.179.194.64/255.255.255.224 +210.179.251.0/255.255.255.192 +210.182.53.0/255.255.255.192 +210.182.123.192/255.255.255.192 +210.182.162.64/255.255.255.192 +210.187.70.128/255.255.255.192 +210.193.225.224/255.255.255.249 +210.196.108.216/255.255.255.248 +210.201.34.0/255.255.255.192 +210.201.47.24/255.255.255.248 +210.202.18.32/255.255.255.240 +210.202.54.0/255.255.255.224 +210.202.113.248/255.255.255.248 +210.202.116.200/255.255.255.240 +210.202.191.248/255.255.255.248 +210.204.2.0/255.255.255.128 +210.204.62.0/255.255.255.128 +210.204.80.0/255.255.255.224 +210.204.82.128/255.255.255.240 +210.204.82.144/255.255.255.208 +210.204.99.128/255.255.255.128 +210.204.126.0/255.255.255.96 +210.204.177.224/255.255.255.224 +210.204.204.0/255.255.255.0 +210.204.234.128/255.255.255.128 +210.206.30.192/255.255.255.192 +210.206.48.160/255.255.255.224 +210.208.43.128/255.255.255.128 +210.208.52.0/255.255.255.128 +210.208.54.0/255.255.255.128 +210.208.54.128/255.255.255.128 +210.208.55.0/255.255.255.128 +210.208.58.128/255.255.255.128 +210.208.80.0/255.255.240.0 +210.209.55.0/255.255.255.0 +210.210.78.20/255.255.255.244 +210.212.204.160/255.255.255.248 +210.212.216.160/255.255.255.248 +210.212.216.176/255.255.255.248 +210.219.222.192/255.255.255.192 +210.245.26.144/255.255.255.240 +210.251.240.0/255.255.240.0 +211.9.32.0/255.255.228.108 +211.9.59.150/255.255.251.150 +211.26.53.20/255.255.255.248 +211.32.165.64/255.255.255.192 +211.32.165.192/255.255.255.192 +211.34.80.0/255.255.254.0 +211.34.88.224/255.255.255.224 +211.34.107.224/255.255.255.224 +211.34.108.0/255.255.254.0 +211.34.192.160/255.255.255.160 +211.36.235.192/255.255.255.224 +211.36.243.128/255.255.255.192 +211.40.36.64/255.255.255.192 +211.40.37.128/255.255.255.192 +211.41.54.64/255.255.255.192 +211.41.165.160/255.255.255.224 +211.42.28.192/255.255.255.192 +211.42.46.192/255.255.255.192 +211.42.230.0/255.255.255.192 +211.42.233.96/255.255.255.224 +211.43.235.192/255.255.255.192 +211.44.215.0/255.255.255.192 +211.45.196.128/255.255.255.192 +211.45.197.160/255.255.255.224 +211.45.199.160/255.255.255.224 +211.45.203.32/255.255.255.224 +211.46.15.192/255.255.255.192 +211.46.81.0/255.255.255.0 +211.46.150.0/255.255.255.192 +211.46.197.192/255.255.255.192 +211.47.186.128/255.255.255.128 +211.47.227.112/255.255.255.240 +211.50.37.192/255.255.255.224 +211.50.74.192/255.255.255.240 +211.53.53.0/255.255.255.192 +211.53.66.240/255.255.255.240 +211.53.91.224/255.255.255.224 +211.60.47.64/255.255.255.192 +211.60.65.128/255.255.255.192 +211.60.73.128/255.255.255.224 +211.60.75.96/255.255.255.224 +211.60.128.128/255.255.255.192 +211.63.47.128/255.255.255.192 +211.76.176.0/255.255.240.0 +211.91.80.32/255.255.255.248 +211.91.149.80/255.255.255.248 +211.93.53.16/255.255.255.240 +211.93.108.80/255.255.255.240 +211.93.108.128/255.255.255.240 +211.96.12.40/255.255.255.248 +211.96.197.96/255.255.255.248 +211.98.29.0/255.255.255.224 +211.98.30.112/255.255.255.240 +211.98.49.32/255.255.255.224 +211.98.51.0/255.255.255.192 +211.98.54.128/255.255.255.224 +211.98.72.128/255.255.255.224 +211.98.75.192/255.255.255.224 +211.98.104.160/255.255.255.224 +211.98.120.128/255.255.255.240 +211.104.237.96/255.255.255.224 +211.111.117.0/255.255.255.0 +211.113.149.0/255.255.255.192 +211.114.72.0/255.255.255.0 +211.114.101.0/255.255.255.0 +211.116.6.224/255.255.255.240 +211.116.227.192/255.255.255.224 +211.116.250.192/255.255.255.224 +211.118.13.0/255.255.255.128 +211.118.14.128/255.255.255.192 +211.118.38.192/255.255.255.224 +211.118.172.128/255.255.255.192 +211.118.175.0/255.255.255.192 +211.132.7.224/255.255.255.224 +211.138.142.64/255.255.255.248 +211.138.143.8/255.255.255.248 +211.138.151.208/255.255.255.248 +211.139.167.144/255.255.255.248 +211.140.103.16/255.255.255.248 +211.140.103.96/255.255.255.248 +211.141.115.8/255.255.255.248 +211.141.126.128/255.255.255.192 +211.141.130.215/255.255.255.240 +211.141.162.152/255.255.255.248 +211.141.228.240/255.255.255.248 +211.148.160.0/255.255.224.0 +211.155.63.0/255.255.255.0 +211.157.127.0/255.255.255.240 +211.168.74.64/255.255.255.192 +211.168.235.128/255.255.255.192 +211.169.93.0/255.255.255.192 +211.170.78.64/255.255.255.192 +211.170.98.64/255.255.255.192 +211.170.208.192/255.255.255.192 +211.170.209.128/255.255.255.192 +211.171.179.128/255.255.255.192 +211.180.159.80/255.255.255.240 +211.181.82.0/255.255.255.0 +211.181.93.128/255.255.255.192 +211.181.101.128/255.255.255.128 +211.184.18.96/255.255.255.224 +211.184.50.0/255.255.255.0 +211.200.5.0/255.255.255.192 +211.204.76.0/255.255.255.0 +211.210.105.0/255.255.255.0 +211.214.89.0/255.255.255.0 +211.222.11.224/255.255.255.224 +211.232.108.32/255.255.255.224 +211.241.205.160/255.255.255.224 +211.250.74.128/255.255.255.224 +211.250.107.96/255.255.255.240 +211.252.124.192/255.255.255.248 +211.252.178.192/255.255.255.224 +211.252.178.224/255.255.255.224 +212.0.119.160/255.255.255.248 +212.0.145.216/255.255.255.248 +212.0.245.192/255.255.255.224 +212.1.32.160/255.255.255.224 +212.1.40.0/255.255.255.128 +212.1.42.24/255.255.255.248 +212.1.49.0/255.255.255.224 +212.4.13.192/255.255.255.224 +212.6.175.0/255.255.255.192 +212.9.178.128/255.255.255.240 +212.9.184.160/255.255.255.240 +212.10.15.208/255.255.255.248 +212.11.6.40/255.255.255.248 +212.11.25.120/255.255.255.248 +212.11.28.128/255.255.255.248 +212.11.29.32/255.255.255.224 +212.11.40.128/255.255.255.224 +212.11.45.240/255.255.255.240 +212.11.51.224/255.255.255.224 +212.12.60.0/255.255.255.248 +212.13.247.192/255.255.255.224 +212.14.65.0/255.255.255.0 +212.14.71.240/255.255.255.245 +212.14.82.144/255.255.255.248 +212.14.84.208/255.255.255.240 +212.16.239.0/255.255.255.224 +212.17.232.192/255.255.255.192 +212.18.232.32/255.255.255.240 +212.19.34.16/255.255.255.248 +212.20.129.56/255.255.255.248 +212.20.246.224/255.255.255.240 +212.21.2.240/255.255.255.248 +212.23.12.24/255.255.255.248 +212.23.22.88/255.255.255.248 +212.23.25.56/255.255.255.248 +212.23.29.32/255.255.255.248 +212.23.61.0/255.255.255.128 +212.23.129.192/255.255.255.248 +212.23.129.232/255.255.255.248 +212.23.137.64/255.255.255.248 +212.23.137.232/255.255.255.248 +212.23.139.248/255.255.255.248 +212.23.155.128/255.255.255.224 +212.23.156.24/255.255.255.248 +212.23.156.48/255.255.255.248 +212.23.228.88/255.255.255.248 +212.23.235.160/255.255.255.240 +212.23.245.16/255.255.255.240 +212.23.245.40/255.255.255.248 +212.24.34.64/255.255.255.224 +212.24.144.64/255.255.255.192 +212.24.154.80/255.255.255.248 +212.24.188.48/255.255.255.248 +212.27.33.0/255.255.255.0 +212.27.100.80/255.255.255.240 +212.27.168.128/255.255.255.224 +212.27.191.112/255.255.255.240 +212.28.207.144/255.255.255.240 +212.28.215.64/255.255.255.192 +212.30.92.160/255.255.255.224 +212.30.199.40/255.255.255.248 +212.31.196.232/255.255.255.248 +212.31.237.16/255.255.255.248 +212.35.100.0/255.255.255.192 +212.35.100.128/255.255.255.192 +212.35.101.216/255.255.255.248 +212.35.105.176/255.255.255.248 +212.35.133.64/255.255.255.192 +212.35.236.208/255.255.255.240 +212.35.243.240/255.255.255.248 +212.36.147.192/255.255.255.224 +212.37.45.0/255.255.255.240 +212.38.130.48/255.255.255.240 +212.41.237.200/255.255.255.240 +212.41.237.240/255.255.255.248 +212.41.247.40/255.255.255.248 +212.42.10.32/255.255.255.240 +212.42.77.48/255.255.255.248 +212.42.86.128/255.255.255.192 +212.42.227.0/255.255.255.224 +212.43.72.192/255.255.255.244 +212.44.135.0/255.255.255.128 +212.44.166.224/255.255.255.224 +212.44.228.0/255.255.255.0 +212.44.229.0/255.255.255.0 +212.44.233.0/255.255.255.63 +212.47.174.64/255.255.255.240 +212.47.190.160/255.255.255.240 +212.48.143.136/255.255.255.248 +212.49.165.0/255.255.255.0 +212.49.185.0/255.255.255.0 +212.50.185.0/255.255.255.224 +212.52.133.0/255.255.255.128 +212.54.72.224/255.255.255.240 +212.55.156.0/255.255.255.0 +212.55.208.64/255.255.255.248 +212.55.212.248/255.255.255.248 +212.56.68.48/255.255.255.240 +212.56.97.152/255.255.255.248 +212.56.162.64/255.255.255.192 +212.57.133.0/255.255.255.0 +212.57.179.0/255.255.255.0 +212.60.12.128/255.255.255.240 +212.60.212.96/255.255.255.248 +212.60.216.0/255.255.255.128 +212.60.226.40/255.255.255.248 +212.61.44.144/255.255.255.248 +212.61.57.176/255.255.255.240 +212.61.72.32/255.255.255.248 +212.61.75.96/255.255.255.248 +212.61.255.24/255.255.255.248 +212.62.7.0/255.255.255.128 +212.62.14.80/255.255.255.240 +212.62.21.192/255.255.255.240 +212.62.26.64/255.255.255.224 +212.62.26.240/255.255.255.240 +212.62.229.224/255.255.255.240 +212.62.253.136/255.255.255.248 +212.63.34.232/255.255.255.248 +212.63.77.64/255.255.255.240 +212.63.80.72/255.255.255.248 +212.63.80.88/255.255.255.248 +212.63.86.0/255.255.255.248 +212.64.209.16/255.255.255.248 +212.64.212.208/255.255.255.248 +212.65.219.32/255.255.255.248 +212.66.101.32/255.255.255.240 +212.66.101.48/255.255.255.240 +212.66.101.64/255.255.255.240 +212.67.227.48/255.255.255.248 +212.67.239.104/255.255.255.248 +212.67.239.200/255.255.255.248 +212.69.96.0/255.255.255.224 +212.71.72.128/255.255.255.224 +212.72.39.32/255.255.255.224 +212.73.134.88/255.255.255.248 +212.73.134.192/255.255.255.240 +212.74.14.0/255.255.255.128 +212.74.15.128/255.255.255.240 +212.74.136.0/255.255.255.0 +212.74.152.64/255.255.255.248 +212.74.160.96/255.255.255.248 +212.75.37.8/255.255.255.240 +212.75.86.160/255.255.255.240 +212.77.68.112/255.255.255.240 +212.77.168.64/255.255.255.192 +212.78.97.192/255.255.255.224 +212.78.161.112/255.255.255.240 +212.78.172.0/255.255.255.0 +212.78.179.240/255.255.255.240 +212.79.15.48/255.255.255.248 +212.79.56.128/255.255.255.196 +212.80.166.184/255.255.255.248 +212.80.196.248/255.255.255.248 +212.81.78.200/255.255.255.248 +212.81.100.192/255.255.255.192 +212.81.122.144/255.255.255.240 +212.82.172.128/255.255.255.192 +212.82.216.248/255.255.255.248 +212.83.216.240/255.255.255.248 +212.84.243.32/255.255.255.224 +212.85.4.176/255.255.255.240 +212.86.210.192/255.255.255.248 +212.87.65.8/255.255.255.248 +212.87.66.96/255.255.255.224 +212.87.72.160/255.255.255.240 +212.87.84.72/255.255.255.248 +212.87.85.160/255.255.255.240 +212.88.41.0/255.255.255.0 +212.88.58.0/255.255.255.240 +212.88.146.0/255.255.254.0 +212.90.197.128/255.255.255.240 +212.90.204.216/255.255.255.248 +212.91.209.32/255.255.255.224 +212.91.227.216/255.255.255.248 +212.94.128.0/255.255.224.0 +212.94.224.32/255.255.255.224 +212.94.231.0/255.255.255.240 +212.94.239.16/255.255.255.240 +212.95.7.16/255.255.255.240 +212.95.68.64/255.255.255.248 +212.95.117.128/255.255.255.192 +212.95.126.192/255.255.255.192 +212.98.233.192/255.255.255.248 +212.98.253.0/255.255.255.0 +212.99.136.192/255.255.255.248 +212.99.155.64/255.255.255.248 +212.100.1.0/255.255.248.0 +212.100.9.0/255.255.248.0 +212.100.17.0/255.255.248.0 +212.100.228.248/255.255.255.248 +212.100.233.104/255.255.255.240 +212.103.106.128/255.255.255.240 +212.103.155.128/255.255.255.240 +212.103.236.56/255.255.255.248 +212.103.251.128/255.255.255.192 +212.104.156.208/255.255.255.248 +212.104.202.0/255.255.255.192 +212.105.97.160/255.255.255.240 +212.107.75.240/255.255.255.240 +212.107.102.104/255.255.255.248 +212.109.53.120/255.255.255.248 +212.109.57.192/255.255.255.248 +212.109.62.144/255.255.255.248 +212.109.62.216/255.255.255.248 +212.110.6.208/255.255.255.248 +212.110.39.128/255.255.255.192 +212.110.101.0/255.255.255.128 +212.110.103.128/255.255.255.192 +212.110.123.64/255.255.255.224 +212.111.49.0/255.255.255.192 +212.111.240.0/255.255.255.128 +212.113.194.128/255.255.255.248 +212.114.131.32/255.255.255.224 +212.114.204.0/255.255.255.240 +212.115.183.96/255.255.255.240 +212.117.137.32/255.255.255.224 +212.117.242.0/255.255.255.224 +212.118.250.112/255.255.255.240 +212.119.1.96/255.255.255.240 +212.119.7.72/255.255.255.248 +212.119.7.216/255.255.255.232 +212.119.11.200/255.255.255.248 +212.120.150.128/255.255.255.128 +212.121.135.224/255.255.255.224 +212.121.137.100/255.255.255.248 +212.122.233.0/255.255.255.224 +212.123.28.0/255.255.255.0 +212.123.108.0/255.255.254.0 +212.123.200.216/255.255.255.248 +212.123.201.192/255.255.255.224 +212.123.217.64/255.255.255.224 +212.123.224.160/255.255.255.224 +212.123.224.240/255.255.255.248 +212.123.227.64/255.255.255.248 +212.123.233.224/255.255.255.224 +212.124.43.0/255.255.255.215 +212.124.133.64/255.255.255.240 +212.124.226.48/255.255.255.240 +212.125.38.48/255.255.255.240 +212.126.22.0/255.255.255.128 +212.126.164.128/255.255.255.248 +212.126.220.48/255.255.255.240 +212.127.18.96/255.255.255.248 +212.127.20.0/255.255.255.192 +212.127.21.0/255.255.255.0 +212.129.233.224/255.255.255.248 +212.130.55.96/255.255.255.240 +212.130.65.120/255.255.255.248 +212.131.141.32/255.255.255.224 +212.131.150.0/255.255.255.224 +212.131.165.192/255.255.255.192 +212.131.177.64/255.255.255.224 +212.131.184.192/255.255.255.192 +212.131.187.208/255.255.255.240 +212.131.188.112/255.255.255.240 +212.131.201.8/255.255.255.248 +212.131.201.32/255.255.255.224 +212.131.215.160/255.255.255.224 +212.131.224.64/255.255.255.192 +212.131.225.0/255.255.255.128 +212.131.228.0/255.255.255.128 +212.131.231.64/255.255.255.192 +212.131.240.32/255.255.255.224 +212.131.253.168/255.255.255.248 +212.133.17.0/255.255.255.0 +212.133.20.192/255.255.255.224 +212.133.30.64/255.255.255.192 +212.133.30.192/255.255.255.192 +212.133.53.192/255.255.255.224 +212.134.53.96/255.255.255.224 +212.134.90.240/255.255.255.248 +212.134.113.0/255.255.255.192 +212.134.114.160/255.255.255.248 +212.134.144.32/255.255.255.224 +212.134.174.0/255.255.255.192 +212.134.191.0/255.255.255.0 +212.134.195.64/255.255.255.240 +212.134.196.0/255.255.255.0 +212.134.204.0/255.255.255.0 +212.134.214.16/255.255.255.240 +212.135.70.0/255.255.255.192 +212.135.73.192/255.255.255.192 +212.135.75.64/255.255.255.224 +212.135.82.192/255.255.255.192 +212.135.112.16/255.255.255.240 +212.135.116.64/255.255.255.192 +212.135.133.240/255.255.255.248 +212.135.137.192/255.255.255.224 +212.135.140.32/255.255.255.224 +212.135.141.32/255.255.255.224 +212.135.164.184/255.255.255.248 +212.135.166.208/255.255.255.240 +212.135.177.112/255.255.255.240 +212.135.184.160/255.255.255.240 +212.135.184.208/255.255.255.248 +212.135.187.216/255.255.255.248 +212.135.190.136/255.255.255.248 +212.135.197.32/255.255.255.240 +212.135.197.88/255.255.255.248 +212.135.212.144/255.255.255.240 +212.135.215.0/255.255.255.240 +212.135.216.208/255.255.255.240 +212.135.226.208/255.255.255.240 +212.135.232.96/255.255.255.240 +212.136.9.0/255.255.255.0 +212.136.31.0/255.255.255.0 +212.136.193.200/255.255.255.248 +212.136.193.216/255.255.255.248 +212.136.198.64/255.255.255.248 +212.136.208.72/255.255.255.248 +212.136.211.0/255.255.255.248 +212.136.219.112/255.255.255.248 +212.136.227.240/255.255.255.248 +212.137.16.56/255.255.255.248 +212.137.29.0/255.255.255.248 +212.137.52.176/255.255.255.248 +212.137.52.184/255.255.255.248 +212.137.74.104/255.255.255.248 +212.137.74.128/255.255.255.248 +212.137.74.136/255.255.255.248 +212.137.74.144/255.255.255.248 +212.141.188.192/255.255.255.224 +212.141.224.64/255.255.255.224 +212.142.48.200/255.255.255.248 +212.143.21.184/255.255.255.248 +212.143.28.128/255.255.255.248 +212.143.153.0/255.255.255.0 +212.144.119.0/255.255.255.0 +212.147.70.64/255.255.255.240 +212.150.69.64/255.255.255.224 +212.150.184.0/255.255.253.0 +212.152.174.0/255.255.255.128 +212.152.174.160/255.255.255.240 +212.152.254.216/255.255.255.248 +212.153.69.0/255.255.255.0 +212.153.175.96/255.255.255.240 +212.153.190.40/255.255.255.248 +212.153.238.128/255.255.255.128 +212.153.241.16/255.255.255.248 +212.154.162.160/255.255.255.248 +212.155.116.128/255.255.255.192 +212.155.192.64/255.255.255.224 +212.155.219.144/255.255.255.248 +212.155.229.0/255.255.255.0 +212.155.230.224/255.255.255.224 +212.157.110.32/255.255.255.224 +212.157.152.32/255.255.255.224 +212.157.158.32/255.255.255.224 +212.157.168.224/255.255.255.248 +212.157.200.128/255.255.255.128 +212.158.12.0/255.255.255.0 +212.158.26.160/255.255.255.240 +212.158.91.192/255.255.255.224 +212.158.97.32/255.255.255.224 +212.158.117.192/255.255.255.224 +212.158.199.176/255.255.255.248 +212.158.209.64/255.255.255.248 +212.158.214.176/255.255.255.248 +212.158.216.48/255.255.255.240 +212.158.219.24/255.255.255.248 +212.158.228.136/255.255.255.248 +212.158.230.232/255.255.255.248 +212.158.252.24/255.255.255.248 +212.160.240.64/255.255.255.224 +212.161.6.0/255.255.255.0 +212.161.60.0/255.255.255.0 +212.161.81.144/255.255.255.240 +212.161.82.0/255.255.254.0 +212.162.64.0/255.255.192.0 +212.162.209.128/255.255.255.128 +212.162.212.0/255.255.255.0 +212.162.234.128/255.255.255.192 +212.162.236.64/255.255.255.192 +212.162.240.0/255.255.240.0 +212.163.213.32/255.255.255.224 +212.163.215.224/255.255.255.240 +212.166.27.176/255.255.255.240 +212.170.234.0/255.255.255.192 +212.174.43.0/255.255.255.192 +212.176.62.224/255.255.255.240 +212.177.1.224/255.255.255.240 +212.177.2.240/255.255.255.240 +212.177.7.240/255.255.255.248 +212.177.60.88/255.255.255.248 +212.177.104.0/255.255.255.0 +212.177.105.32/255.255.255.248 +212.177.105.48/255.255.255.240 +212.177.108.112/255.255.255.248 +212.177.113.176/255.255.255.240 +212.177.120.240/255.255.255.240 +212.177.126.0/255.255.254.0 +212.177.132.32/255.255.255.248 +212.177.134.80/255.255.255.248 +212.177.138.32/255.255.255.240 +212.177.139.224/255.255.255.248 +212.177.140.96/255.255.255.240 +212.177.157.40/255.255.255.248 +212.179.16.96/255.255.255.248 +212.180.18.248/255.255.255.248 +212.180.26.104/255.255.255.248 +212.180.37.48/255.255.255.248 +212.180.45.240/255.255.255.240 +212.180.65.104/255.255.255.248 +212.180.90.0/255.255.255.240 +212.180.91.128/255.255.255.248 +212.180.123.80/255.255.255.240 +212.181.14.8/255.255.255.248 +212.182.90.0/255.255.255.128 +212.182.114.48/255.255.255.240 +212.184.122.216/255.255.255.248 +212.184.191.224/255.255.255.240 +212.184.199.144/255.255.255.208 +212.184.215.152/255.255.255.248 +212.185.43.64/255.255.255.248 +212.185.108.0/255.255.255.248 +212.185.120.48/255.255.255.248 +212.185.170.40/255.255.255.248 +212.185.171.0/255.255.255.0 +212.187.188.128/255.255.255.224 +212.188.38.0/255.255.255.0 +212.190.0.0/255.255.0.0 +212.197.204.0/255.255.255.240 +212.197.218.48/255.255.255.240 +212.199.58.0/255.255.255.128 +212.199.66.96/255.255.255.192 +212.199.67.192/255.255.255.192 +212.199.91.0/255.255.244.0 +212.202.1.0/255.255.255.0 +212.202.97.0/255.255.255.224 +212.202.99.96/255.255.255.248 +212.202.109.104/255.255.255.248 +212.202.139.152/255.255.255.248 +212.202.153.88/255.255.255.248 +212.202.158.160/255.255.255.248 +212.202.161.192/255.255.255.248 +212.202.162.200/255.255.255.248 +212.202.224.128/255.255.255.224 +212.202.228.40/255.255.255.248 +212.202.236.136/255.255.255.248 +212.202.238.56/255.255.255.248 +212.202.247.104/255.255.255.248 +212.202.252.120/255.255.255.248 +212.203.70.0/255.255.255.0 +212.204.120.16/255.255.255.240 +212.204.249.81/255.255.255.236 +212.204.249.101/255.255.255.246 +212.204.249.111/255.255.255.236 +212.204.252.21/255.255.255.246 +212.206.208.56/255.255.255.248 +212.206.237.232/255.255.255.248 +212.208.102.0/255.255.255.128 +212.208.157.0/255.255.255.128 +212.208.158.16/255.255.255.240 +212.208.163.208/255.255.255.240 +212.208.183.224/255.255.255.240 +212.209.3.64/255.255.255.240 +212.209.9.176/255.255.255.240 +212.209.14.0/255.255.255.224 +212.209.39.192/255.255.255.224 +212.209.61.128/255.255.255.240 +212.209.106.0/255.255.255.240 +212.209.111.144/255.255.255.240 +212.209.133.0/255.255.255.240 +212.209.174.16/255.255.255.240 +212.209.183.0/255.255.255.0 +212.209.195.144/255.255.255.240 +212.210.12.88/255.255.255.248 +212.210.14.128/255.255.255.192 +212.210.42.128/255.255.255.128 +212.210.46.192/255.255.255.224 +212.210.47.0/255.255.255.128 +212.210.47.160/255.255.255.224 +212.210.52.160/255.255.255.224 +212.210.54.224/255.255.255.224 +212.210.57.128/255.255.255.224 +212.210.77.192/255.255.255.224 +212.210.82.32/255.255.255.224 +212.210.83.192/255.255.255.192 +212.210.89.0/255.255.255.0 +212.210.110.192/255.255.255.224 +212.210.110.224/255.255.255.240 +212.210.111.0/255.255.255.224 +212.210.133.160/255.255.255.224 +212.210.147.0/255.255.255.0 +212.210.148.192/255.255.255.224 +212.210.153.0/255.255.255.0 +212.210.154.160/255.255.255.248 +212.210.154.192/255.255.255.224 +212.210.158.192/255.255.255.224 +212.210.167.112/255.255.255.240 +212.210.167.160/255.255.255.248 +212.210.178.96/255.255.255.224 +212.210.187.32/255.255.255.224 +212.210.191.224/255.255.255.224 +212.210.200.0/255.255.255.0 +212.210.217.128/255.255.255.192 +212.210.225.0/255.255.255.128 +212.210.235.64/255.255.255.224 +212.210.235.128/255.255.255.192 +212.210.235.192/255.255.255.224 +212.210.242.208/255.255.255.240 +212.212.160.192/255.255.255.192 +212.212.163.112/255.255.255.240 +212.214.1.48/255.255.255.240 +212.214.85.208/255.255.255.248 +212.214.117.144/255.255.255.240 +212.214.191.128/255.255.255.192 +212.215.2.112/255.255.255.240 +212.215.3.64/255.255.255.240 +212.217.35.16/255.255.255.240 +212.217.74.192/255.255.255.240 +212.219.59.0/255.255.255.224 +212.219.118.192/255.255.255.192 +212.221.0.0/255.255.128.0 +212.222.11.224/255.255.255.224 +212.222.37.192/255.255.255.192 +212.222.40.32/255.255.255.224 +212.222.40.160/255.255.255.224 +212.222.54.128/255.255.255.240 +212.222.59.0/255.255.255.192 +212.222.60.32/255.255.255.224 +212.222.67.128/255.255.255.128 +212.222.78.128/255.255.255.192 +212.222.90.224/255.255.255.224 +212.222.116.192/255.255.255.192 +212.222.128.0/255.255.255.0 +212.222.132.192/255.255.255.240 +212.222.134.224/255.255.255.224 +212.222.164.0/255.255.255.0 +212.222.166.192/255.255.255.192 +212.222.172.64/255.255.255.192 +212.222.199.0/255.255.255.240 +212.222.199.32/255.255.255.224 +212.222.205.56/255.255.255.248 +212.222.236.0/255.255.255.240 +212.222.236.32/255.255.255.240 +212.222.247.192/255.255.255.192 +212.222.248.80/255.255.255.240 +212.222.249.64/255.255.255.240 +212.223.3.224/255.255.255.224 +212.223.10.96/255.255.255.224 +212.224.26.80/255.255.255.248 +212.224.59.16/255.255.255.248 +212.226.130.152/255.255.255.248 +212.226.132.176/255.255.255.248 +212.226.136.16/255.255.255.248 +212.234.7.0/255.255.255.0 +212.234.8.0/255.255.255.240 +212.234.16.216/255.255.255.248 +212.234.18.64/255.255.255.192 +212.234.18.160/255.255.255.248 +212.234.19.88/255.255.255.248 +212.234.19.224/255.255.255.248 +212.234.21.96/255.255.255.248 +212.234.21.240/255.255.255.248 +212.234.25.208/255.255.255.240 +212.234.34.0/255.255.255.0 +212.234.37.224/255.255.255.248 +212.234.40.0/255.255.255.240 +212.234.50.8/255.255.255.248 +212.234.50.88/255.255.255.248 +212.234.65.128/255.255.255.224 +212.234.82.104/255.255.255.248 +212.234.85.48/255.255.255.248 +212.234.85.136/255.255.255.248 +212.234.85.168/255.255.255.248 +212.234.86.224/255.255.255.224 +212.234.100.32/255.255.255.248 +212.234.106.240/255.255.255.240 +212.234.110.0/255.255.255.0 +212.234.113.32/255.255.255.248 +212.234.114.0/255.255.255.0 +212.234.122.192/255.255.255.192 +212.234.123.32/255.255.255.240 +212.234.135.64/255.255.255.248 +212.234.138.192/255.255.255.224 +212.234.147.192/255.255.255.192 +212.234.148.0/255.255.255.240 +212.234.149.0/255.255.255.0 +212.234.150.16/255.255.255.248 +212.234.154.32/255.255.255.240 +212.234.165.224/255.255.255.240 +212.234.172.8/255.255.255.248 +212.234.172.144/255.255.255.240 +212.234.176.208/255.255.255.240 +212.234.193.64/255.255.255.224 +212.234.211.48/255.255.255.240 +212.234.219.128/255.255.255.240 +212.234.228.40/255.255.255.248 +212.234.237.200/255.255.255.248 +212.234.239.64/255.255.255.240 +212.234.239.216/255.255.255.248 +212.236.37.240/255.255.255.240 +212.236.50.128/255.255.255.192 +212.239.0.0/255.255.128.0 +212.240.35.56/255.255.255.248 +212.240.152.64/255.255.255.224 +212.240.153.128/255.255.255.192 +212.240.197.176/255.255.255.248 +212.240.243.160/255.255.255.224 +212.241.48.0/255.255.255.128 +212.241.147.144/255.255.255.240 +212.241.164.104/255.255.255.248 +212.242.73.0/255.255.255.0 +212.243.136.40/255.255.255.248 +212.243.136.80/255.255.255.248 +212.243.136.168/255.255.255.248 +212.243.164.64/255.255.255.64 +212.244.52.160/255.255.255.224 +212.244.242.192/255.255.255.224 +212.247.15.80/255.255.255.240 +212.247.22.64/255.255.255.248 +212.247.94.48/255.255.255.240 +212.247.169.96/255.255.255.224 +212.248.9.32/255.255.255.224 +212.248.23.120/255.255.255.248 +212.248.193.64/255.255.255.224 +212.248.237.0/255.255.255.240 +212.249.45.224/255.255.255.224 +212.250.16.0/255.255.255.0 +212.251.10.0/255.255.255.0 +212.251.72.0/255.255.255.224 +212.254.25.144/255.255.255.240 +212.254.190.160/255.255.255.240 +212.254.195.72/255.255.255.248 +212.255.72.144/255.255.255.248 +212.255.75.0/255.255.255.240 +213.1.251.48/255.255.255.240 +213.1.252.0/255.255.255.128 +213.4.64.0/255.255.240.0 +213.5.232.24/255.255.255.248 +213.8.71.224/255.255.255.224 +213.8.111.0/255.255.255.0 +213.9.129.0/255.255.255.0 +213.9.180.64/255.255.255.192 +213.9.195.0/255.255.255.0 +213.11.11.56/255.255.255.248 +213.11.28.160/255.255.255.240 +213.11.34.24/255.255.255.248 +213.11.44.176/255.255.255.248 +213.11.47.112/255.255.255.248 +213.11.61.112/255.255.255.240 +213.11.62.216/255.255.255.248 +213.11.65.48/255.255.255.248 +213.11.67.0/255.255.255.192 +213.11.77.64/255.255.255.224 +213.11.80.240/255.255.255.248 +213.11.82.48/255.255.255.240 +213.13.159.0/255.255.255.0 +213.16.133.64/255.255.255.192 +213.17.139.0/255.255.255.248 +213.17.170.232/255.255.255.248 +213.17.203.16/255.255.255.248 +213.17.225.240/255.255.255.240 +213.20.240.192/255.255.255.224 +213.23.97.176/255.255.255.240 +213.23.101.0/255.255.255.0 +213.23.127.80/255.255.255.240 +213.24.16.0/255.255.255.192 +213.24.17.232/255.255.255.248 +213.24.76.0/255.255.254.0 +213.24.182.0/255.255.255.0 +213.24.252.48/255.255.255.248 +213.25.108.160/255.255.255.224 +213.25.179.80/255.255.255.240 +213.26.0.104/255.255.255.248 +213.26.9.128/255.255.255.192 +213.26.13.16/255.255.255.240 +213.26.21.128/255.255.255.128 +213.26.30.96/255.255.255.224 +213.26.34.208/255.255.255.240 +213.26.36.0/255.255.255.192 +213.26.36.64/255.255.255.240 +213.26.36.80/255.255.255.240 +213.26.62.64/255.255.255.192 +213.26.67.96/255.255.255.240 +213.26.67.136/255.255.255.248 +213.26.67.160/255.255.255.224 +213.26.76.128/255.255.255.224 +213.26.76.160/255.255.255.224 +213.26.94.96/255.255.255.240 +213.26.102.32/255.255.255.248 +213.26.102.40/255.255.255.248 +213.26.106.0/255.255.255.248 +213.26.109.56/255.255.255.248 +213.26.110.0/255.255.255.224 +213.26.117.160/255.255.255.224 +213.26.131.128/255.255.255.224 +213.26.132.128/255.255.255.240 +213.26.132.144/255.255.255.240 +213.26.136.96/255.255.255.224 +213.26.140.224/255.255.255.192 +213.26.144.0/255.255.255.224 +213.26.146.32/255.255.255.248 +213.26.152.32/255.255.255.224 +213.26.152.128/255.255.255.128 +213.26.154.32/255.255.255.240 +213.26.154.64/255.255.255.192 +213.26.154.208/255.255.255.248 +213.26.154.216/255.255.255.248 +213.26.172.96/255.255.255.240 +213.26.175.128/255.255.255.128 +213.26.178.32/255.255.255.224 +213.26.183.160/255.255.255.224 +213.26.214.128/255.255.255.224 +213.26.218.192/255.255.255.224 +213.26.223.192/255.255.255.224 +213.26.232.32/255.255.255.224 +213.26.237.128/255.255.255.224 +213.26.237.192/255.255.255.224 +213.26.237.224/255.255.255.240 +213.26.239.224/255.255.255.224 +213.26.240.192/255.255.255.224 +213.26.246.0/255.255.255.224 +213.26.251.0/255.255.255.0 +213.26.253.192/255.255.255.240 +213.27.139.224/255.255.255.224 +213.28.20.240/255.255.255.248 +213.28.57.192/255.255.255.192 +213.30.134.208/255.255.255.248 +213.30.134.216/255.255.255.248 +213.30.136.224/255.255.255.240 +213.30.153.64/255.255.255.248 +213.30.155.128/255.255.255.248 +213.30.155.136/255.255.255.248 +213.30.168.64/255.255.255.248 +213.30.172.176/255.255.255.232 +213.30.173.120/255.255.255.248 +213.30.183.128/255.255.255.248 +213.30.254.72/255.255.255.248 +213.31.232.88/255.255.255.248 +213.31.234.0/255.255.255.240 +213.31.234.192/255.255.255.240 +213.33.147.32/255.255.255.240 +213.37.108.8/255.255.255.248 +213.38.32.88/255.255.255.248 +213.38.69.112/255.255.255.240 +213.38.72.0/255.255.255.192 +213.38.86.0/255.255.255.0 +213.38.94.248/255.255.255.248 +213.38.112.80/255.255.255.240 +213.38.170.192/255.255.255.192 +213.38.199.64/255.255.255.224 +213.38.212.0/255.255.255.128 +213.39.12.48/255.255.255.240 +213.39.34.192/255.255.255.192 +213.39.69.128/255.255.255.192 +213.39.234.128/255.255.255.240 +213.39.242.112/255.255.255.248 +213.39.244.80/255.255.255.248 +213.39.247.144/255.255.255.248 +213.39.250.120/255.255.255.248 +213.39.254.88/255.255.255.248 +213.41.19.128/255.255.255.224 +213.41.82.72/255.255.255.248 +213.41.82.224/255.255.255.248 +213.41.83.144/255.255.255.248 +213.41.86.176/255.255.255.240 +213.41.98.16/255.255.255.240 +213.41.98.192/255.255.255.240 +213.41.99.80/255.255.255.240 +213.41.101.96/255.255.255.240 +213.41.105.176/255.255.255.248 +213.41.105.248/255.255.255.248 +213.41.116.192/255.255.255.240 +213.41.118.48/255.255.255.240 +213.41.122.0/255.255.255.248 +213.42.59.80/255.255.255.240 +213.42.71.160/255.255.255.240 +213.42.137.144/255.255.255.240 +213.42.176.16/255.255.255.240 +213.42.176.192/255.255.255.240 +213.42.190.0/255.255.255.128 +213.42.235.96/255.255.255.240 +213.48.26.128/255.255.255.192 +213.48.53.0/255.255.255.0 +213.48.195.64/255.255.255.192 +213.52.136.208/255.255.255.240 +213.52.140.160/255.255.255.224 +213.52.142.144/255.255.255.240 +213.52.145.0/255.255.255.0 +213.52.162.80/255.255.255.240 +213.52.162.144/255.255.255.240 +213.52.162.192/255.255.255.240 +213.52.163.224/255.255.255.240 +213.52.165.144/255.255.255.240 +213.52.168.16/255.255.255.240 +213.52.171.208/255.255.255.240 +213.52.199.144/255.255.255.240 +213.52.205.128/255.255.255.240 +213.53.76.184/255.255.255.248 +213.53.90.184/255.255.255.248 +213.53.133.248/255.255.255.248 +213.53.146.88/255.255.255.248 +213.53.199.0/255.255.255.248 +213.53.199.24/255.255.255.248 +213.56.38.216/255.255.255.248 +213.56.39.24/255.255.255.248 +213.56.39.64/255.255.255.248 +213.56.64.64/255.255.255.224 +213.56.67.88/255.255.255.248 +213.56.71.184/255.255.255.248 +213.56.77.240/255.255.255.248 +213.56.80.200/255.255.255.248 +213.56.82.80/255.255.255.248 +213.56.88.208/255.255.255.248 +213.56.96.64/255.255.255.224 +213.56.97.232/255.255.255.248 +213.56.100.176/255.255.255.248 +213.56.103.192/255.255.255.240 +213.56.149.248/255.255.255.248 +213.56.152.0/255.255.254.0 +213.56.160.144/255.255.255.248 +213.56.160.184/255.255.255.248 +213.56.160.200/255.255.255.248 +213.56.168.208/255.255.255.248 +213.56.168.240/255.255.255.248 +213.56.179.192/255.255.255.224 +213.56.180.32/255.255.255.248 +213.56.182.128/255.255.255.192 +213.56.189.0/255.255.255.96 +213.56.190.32/255.255.255.224 +213.56.190.128/255.255.255.224 +213.56.204.192/255.255.255.224 +213.56.212.16/255.255.255.240 +213.56.230.225/255.255.255.246 +213.61.18.0/255.255.255.0 +213.61.58.208/255.255.255.248 +213.61.69.136/255.255.255.248 +213.61.76.32/255.255.255.224 +213.61.77.224/255.255.255.248 +213.61.104.0/255.255.255.240 +213.61.128.0/255.255.255.240 +213.61.128.48/255.255.255.248 +213.61.130.224/255.255.255.240 +213.61.134.16/255.255.255.248 +213.61.139.208/255.255.255.240 +213.61.148.0/255.255.255.0 +213.61.157.128/255.255.255.128 +213.61.162.112/255.255.255.240 +213.61.163.32/255.255.255.224 +213.61.168.88/255.255.255.248 +213.61.168.96/255.255.255.248 +213.61.173.32/255.255.255.240 +213.61.174.32/255.255.255.248 +213.61.181.176/255.255.255.240 +213.61.190.128/255.255.255.248 +213.61.225.200/255.255.255.248 +213.61.227.240/255.255.255.248 +213.61.228.48/255.255.255.248 +213.61.228.80/255.255.255.248 +213.61.228.216/255.255.255.248 +213.61.246.112/255.255.255.248 +213.62.69.64/255.255.255.224 +213.62.69.248/255.255.255.248 +213.62.71.0/255.255.255.224 +213.62.97.0/255.255.255.0 +213.62.98.208/255.255.255.240 +213.62.99.160/255.255.255.240 +213.62.112.0/255.255.255.224 +213.68.1.144/255.255.255.240 +213.68.22.176/255.255.255.240 +213.68.57.176/255.255.255.240 +213.68.73.16/255.255.255.240 +213.68.84.64/255.255.255.128 +213.68.85.176/255.255.255.240 +213.68.88.0/255.255.254.0 +213.68.134.128/255.255.255.224 +213.68.146.0/255.255.255.192 +213.68.153.192/255.255.255.240 +213.68.155.0/255.255.255.0 +213.68.157.224/255.255.255.224 +213.68.235.144/255.255.255.240 +213.69.30.112/255.255.255.248 +213.69.81.0/255.255.255.248 +213.69.81.16/255.255.255.240 +213.69.111.48/255.255.255.240 +213.69.119.160/255.255.255.224 +213.69.134.128/255.255.255.192 +213.69.142.168/255.255.255.248 +213.69.144.160/255.255.255.224 +213.69.170.0/255.255.255.224 +213.69.184.232/255.255.255.248 +213.69.188.160/255.255.255.240 +213.69.232.192/255.255.255.240 +213.69.247.32/255.255.255.240 +213.70.30.32/255.255.255.248 +213.70.32.96/255.255.255.248 +213.70.48.80/255.255.255.248 +213.70.54.128/255.255.255.240 +213.70.61.96/255.255.255.224 +213.70.101.224/255.255.255.240 +213.70.122.0/255.255.255.128 +213.70.175.224/255.255.255.240 +213.77.28.80/255.255.255.240 +213.80.32.192/255.255.255.224 +213.80.61.192/255.255.255.248 +213.80.61.224/255.255.255.232 +213.80.64.8/255.255.255.248 +213.80.64.80/255.255.255.240 +213.80.72.136/255.255.255.248 +213.82.11.96/255.255.255.224 +213.82.24.0/255.255.255.224 +213.82.24.168/255.255.255.248 +213.82.26.144/255.255.255.240 +213.82.27.128/255.255.255.192 +213.82.28.160/255.255.255.224 +213.82.40.128/255.255.255.192 +213.82.49.32/255.255.255.224 +213.82.53.96/255.255.255.224 +213.82.55.192/255.255.255.248 +213.82.79.176/255.255.255.240 +213.82.90.160/255.255.255.224 +213.82.90.192/255.255.255.224 +213.82.107.192/255.255.255.192 +213.82.110.248/255.255.255.248 +213.82.111.64/255.255.255.192 +213.82.111.152/255.255.255.248 +213.82.111.176/255.255.255.240 +213.82.136.128/255.255.255.240 +213.82.136.144/255.255.255.240 +213.82.136.160/255.255.255.240 +213.82.140.96/255.255.255.224 +213.82.145.128/255.255.255.224 +213.82.146.160/255.255.255.240 +213.82.146.176/255.255.255.240 +213.82.151.96/255.255.255.224 +213.82.166.0/255.255.255.224 +213.82.166.192/255.255.255.224 +213.82.170.40/255.255.255.248 +213.82.170.128/255.255.255.224 +213.82.171.160/255.255.255.224 +213.82.184.128/255.255.255.240 +213.82.208.96/255.255.255.248 +213.82.208.104/255.255.255.248 +213.82.208.112/255.255.255.248 +213.82.208.120/255.255.255.248 +213.82.208.224/255.255.255.240 +213.82.208.240/255.255.255.240 +213.82.210.144/255.255.255.240 +213.82.210.160/255.255.255.240 +213.82.210.176/255.255.255.240 +213.82.210.192/255.255.255.240 +213.82.212.176/255.255.255.240 +213.82.214.160/255.255.255.224 +213.82.214.208/255.255.255.240 +213.82.215.128/255.255.255.224 +213.82.215.160/255.255.255.224 +213.82.216.0/255.255.255.224 +213.82.216.32/255.255.255.224 +213.82.216.176/255.255.255.248 +213.82.217.0/255.255.255.192 +213.82.217.128/255.255.255.240 +213.82.218.80/255.255.255.240 +213.82.219.224/255.255.255.240 +213.82.220.64/255.255.255.224 +213.82.221.208/255.255.255.240 +213.82.221.232/255.255.255.248 +213.82.223.160/255.255.255.224 +213.82.231.64/255.255.255.224 +213.82.231.224/255.255.255.224 +213.82.232.64/255.255.255.240 +213.82.236.192/255.255.255.224 +213.82.236.224/255.255.255.240 +213.82.241.96/255.255.255.224 +213.82.241.224/255.255.255.224 +213.82.244.176/255.255.255.240 +213.82.248.0/255.255.255.248 +213.82.248.8/255.255.255.248 +213.82.248.16/255.255.255.248 +213.82.248.24/255.255.255.248 +213.82.249.128/255.255.255.248 +213.82.249.136/255.255.255.248 +213.82.249.144/255.255.255.248 +213.82.250.160/255.255.255.224 +213.82.250.224/255.255.255.224 +213.82.251.96/255.255.255.240 +213.82.251.128/255.255.255.248 +213.82.254.0/255.255.255.240 +213.82.254.96/255.255.255.224 +213.82.254.128/255.255.255.224 +213.83.4.208/255.255.255.248 +213.83.55.0/255.255.255.248 +213.85.70.32/255.255.255.224 +213.86.0.224/255.255.255.240 +213.86.10.0/255.255.255.0 +213.86.19.48/255.255.255.248 +213.86.22.96/255.255.255.248 +213.86.34.0/255.255.255.240 +213.86.35.192/255.255.255.224 +213.86.46.128/255.255.255.192 +213.86.53.160/255.255.255.224 +213.86.56.64/255.255.255.192 +213.86.60.0/255.255.255.224 +213.86.60.64/255.255.255.224 +213.86.60.160/255.255.255.224 +213.86.77.0/255.255.254.0 +213.86.99.96/255.255.255.248 +213.86.99.224/255.255.255.248 +213.86.104.80/255.255.255.216 +213.86.104.232/255.255.255.248 +213.86.112.0/255.255.255.240 +213.86.117.8/255.255.255.248 +213.86.119.80/255.255.255.240 +213.86.132.80/255.255.255.240 +213.86.141.0/255.255.255.0 +213.86.166.112/255.255.255.240 +213.86.167.0/255.255.255.248 +213.86.169.144/255.255.255.248 +213.86.229.192/255.255.255.224 +213.88.133.112/255.255.255.248 +213.88.223.208/255.255.255.224 +213.88.223.240/255.255.255.240 +213.88.238.160/255.255.255.248 +213.90.140.160/255.255.255.248 +213.91.208.192/255.255.255.224 +213.92.1.0/255.255.249.0 +213.92.20.0/255.255.255.0 +213.92.32.0/255.255.248.0 +213.92.64.0/255.255.244.0 +213.92.76.80/255.255.255.240 +213.92.92.240/255.255.255.240 +213.92.94.8/255.255.255.248 +213.92.96.56/255.255.255.248 +213.92.120.0/255.255.255.0 +213.95.4.0/255.255.255.240 +213.95.14.0/255.255.255.0 +213.105.192.0/255.255.255.248 +213.106.251.192/255.255.255.240 +213.115.149.16/255.255.255.240 +213.115.151.48/255.255.255.240 +213.115.152.168/255.255.255.248 +213.115.153.104/255.255.255.248 +213.120.81.0/255.255.255.224 +213.120.92.192/255.255.255.192 +213.120.95.64/255.255.255.240 +213.121.161.0/255.255.255.224 +213.121.165.160/255.255.255.224 +213.121.166.160/255.255.255.248 +213.121.168.48/255.255.255.240 +213.121.203.144/255.255.255.240 +213.121.205.32/255.255.255.224 +213.121.253.64/255.255.255.224 +213.123.158.192/255.255.255.248 +213.128.33.240/255.255.255.248 +213.128.100.96/255.255.255.248 +213.128.143.128/255.255.255.191 +213.129.24.68/255.255.255.236 +213.129.25.0/255.255.255.0 +213.129.27.16/255.255.255.248 +213.129.227.224/255.255.255.240 +213.129.242.40/255.255.255.248 +213.129.247.0/255.255.255.224 +213.129.248.176/255.255.255.240 +213.130.55.176/255.255.255.244 +213.131.165.56/255.255.255.248 +213.131.166.64/255.255.255.192 +213.131.172.16/255.255.255.248 +213.131.172.96/255.255.255.248 +213.131.178.56/255.255.255.248 +213.131.248.0/255.255.255.0 +213.132.36.176/255.255.255.240 +213.132.61.152/255.255.255.248 +213.132.70.0/255.255.255.0 +213.134.205.64/255.255.255.240 +213.135.112.208/255.255.255.248 +213.139.24.176/255.255.255.248 +213.139.27.48/255.255.255.240 +213.139.28.8/255.255.255.248 +213.139.29.32/255.255.255.224 +213.139.130.160/255.255.255.224 +213.139.134.0/255.255.255.224 +213.139.136.32/255.255.255.240 +213.139.144.80/255.255.255.240 +213.139.144.224/255.255.255.224 +213.139.146.236/255.255.255.244 +213.139.147.112/255.255.255.208 +213.139.151.32/255.255.255.240 +213.140.8.120/255.255.255.248 +213.140.23.208/255.255.255.248 +213.141.165.120/255.255.255.248 +213.142.7.16/255.255.255.240 +213.143.6.0/255.255.255.127 +213.144.12.0/255.255.255.192 +213.144.19.0/255.255.255.0 +213.144.20.192/255.255.255.240 +213.144.24.0/255.255.255.192 +213.144.132.192/255.255.255.248 +213.144.143.32/255.255.255.248 +213.147.105.64/255.255.255.192 +213.147.107.0/255.255.255.192 +213.148.39.44/255.255.255.248 +213.150.36.128/255.255.255.128 +213.150.39.64/255.255.255.248 +213.150.42.0/255.255.255.192 +213.150.52.176/255.255.255.248 +213.150.57.240/255.255.255.240 +213.150.62.128/255.255.255.224 +213.150.154.160/255.255.255.248 +213.150.156.160/255.255.255.224 +213.150.161.0/255.255.255.0 +213.150.177.0/255.255.254.0 +213.150.190.0/255.255.255.0 +213.152.248.128/255.255.255.208 +213.153.177.64/255.255.255.240 +213.156.48.192/255.255.255.224 +213.156.54.224/255.255.255.240 +213.156.160.0/255.255.224.0 +213.157.6.0/255.255.255.0 +213.160.5.40/255.255.255.248 +213.160.5.72/255.255.255.248 +213.160.23.16/255.255.255.248 +213.160.24.208/255.255.255.248 +213.160.25.216/255.255.255.248 +213.160.199.8/255.255.255.248 +213.161.76.80/255.255.255.240 +213.163.39.64/255.255.255.192 +213.163.41.32/255.255.255.248 +213.164.4.32/255.255.255.248 +213.164.5.16/255.255.255.240 +213.164.5.48/255.255.255.240 +213.164.88.32/255.255.255.240 +213.168.192.16/255.255.255.240 +213.168.200.144/255.255.255.240 +213.168.226.0/255.255.255.0 +213.170.58.32/255.255.255.240 +213.172.114.128/255.255.255.248 +213.173.145.176/255.255.255.240 +213.173.163.192/255.255.255.248 +213.173.164.0/255.255.255.0 +213.173.177.0/255.255.254.0 +213.173.183.192/255.255.255.224 +213.173.222.168/255.255.255.248 +213.173.245.80/255.255.255.240 +213.174.78.128/255.255.255.192 +213.174.78.192/255.255.255.192 +213.175.10.64/255.255.255.192 +213.175.13.0/255.255.255.224 +213.175.13.192/255.255.255.224 +213.175.15.0/255.255.255.224 +213.175.17.144/255.255.255.248 +213.175.17.192/255.255.255.224 +213.180.13.96/255.255.255.240 +213.180.176.208/255.255.255.248 +213.180.176.232/255.255.255.248 +213.180.177.152/255.255.255.248 +213.180.191.224/255.255.255.248 +213.182.7.232/255.255.255.248 +213.183.182.0/255.255.255.248 +213.183.227.160/255.255.255.240 +213.183.233.64/255.255.255.224 +213.184.19.32/255.255.255.224 +213.184.23.0/255.255.255.192 +213.185.13.0/255.255.255.0 +213.185.131.64/255.255.255.224 +213.187.165.112/255.255.255.248 +213.187.166.80/255.255.255.240 +213.187.170.200/255.255.255.248 +213.188.82.72/255.255.255.248 +213.189.150.0/255.255.255.248 +213.189.199.128/255.255.255.240 +213.190.84.0/255.255.255.191 +213.190.128.128/255.255.255.192 +213.190.145.224/255.255.255.248 +213.190.147.16/255.255.255.240 +213.190.149.32/255.255.255.240 +213.190.156.128/255.255.255.248 +213.191.85.104/255.255.255.248 +213.193.108.128/255.255.255.192 +213.194.33.192/255.255.255.192 +213.197.243.176/255.255.255.240 +213.199.144.0/255.255.240.0 +213.200.100.128/255.255.255.192 +213.200.112.0/255.255.240.0 +213.200.240.0/255.255.255.248 +213.201.50.0/255.255.255.0 +213.201.135.184/255.255.255.248 +213.201.170.160/255.255.255.248 +213.203.13.16/255.255.255.240 +213.203.47.192/255.255.255.224 +213.203.53.0/255.255.255.0 +213.203.209.112/255.255.255.240 +213.203.248.192/255.255.255.224 +213.204.177.64/255.255.255.192 +213.205.110.0/255.255.255.0 +213.205.149.112/255.255.255.248 +213.206.7.0/255.255.255.0 +213.206.133.24/255.255.255.248 +213.206.133.160/255.255.255.248 +213.206.133.176/255.255.255.248 +213.208.2.80/255.255.255.248 +213.208.6.48/255.255.255.240 +213.208.6.128/255.255.255.240 +213.208.70.128/255.255.255.224 +213.208.84.168/255.255.255.248 +213.208.90.112/255.255.255.248 +213.208.91.136/255.255.255.248 +213.208.96.0/255.255.255.224 +213.208.98.240/255.255.255.248 +213.208.99.240/255.255.255.248 +213.208.102.40/255.255.255.248 +213.208.102.208/255.255.255.248 +213.210.18.0/255.255.255.0 +213.210.20.0/255.255.255.248 +213.213.71.192/255.255.255.224 +213.217.87.240/255.255.255.248 +213.217.103.184/255.255.255.248 +213.217.139.80/255.255.255.248 +213.217.159.96/255.255.255.224 +213.219.6.32/255.255.255.240 +213.219.25.224/255.255.255.224 +213.219.28.64/255.255.255.224 +213.219.36.16/255.255.255.240 +213.219.39.64/255.255.255.224 +213.219.49.64/255.255.255.240 +213.219.49.160/255.255.255.224 +213.219.58.0/255.255.255.240 +213.221.116.136/255.255.255.248 +213.222.9.16/255.255.255.248 +213.223.16.24/255.255.255.248 +213.223.50.0/255.255.255.224 +213.223.64.48/255.255.255.240 +213.225.61.0/255.255.255.0 +213.225.62.184/255.255.255.248 +213.225.63.16/255.255.255.240 +213.225.63.32/255.255.255.224 +213.225.63.104/255.255.255.248 +213.225.127.0/255.255.255.248 +213.225.127.8/255.255.255.248 +213.229.0.48/255.255.255.248 +213.229.14.64/255.255.255.192 +213.229.130.16/255.255.255.248 +213.229.141.64/255.255.255.192 +213.229.162.0/255.255.255.240 +213.230.20.0/255.255.255.0 +213.233.120.192/255.255.255.224 +213.233.122.160/255.255.255.224 +213.235.230.64/255.255.255.248 +213.236.65.160/255.255.255.224 +213.236.217.32/255.255.255.248 +213.237.51.0/255.255.255.240 +213.237.179.64/255.255.255.192 +213.237.182.224/255.255.255.224 +213.239.78.128/255.255.255.192 +213.241.132.24/255.255.255.248 +213.241.157.64/255.255.255.192 +213.243.127.224/255.255.255.248 +213.244.30.208/255.255.255.248 +213.244.160.0/255.255.255.0 +213.244.233.144/255.255.255.240 +213.246.135.64/255.255.255.192 +213.246.159.128/255.255.255.224 +213.246.172.88/255.255.255.248 +213.246.172.136/255.255.255.248 +213.246.172.144/255.255.255.240 +213.246.173.248/255.255.255.248 +213.246.193.224/255.255.255.224 +213.246.196.128/255.255.255.224 +213.247.197.128/255.255.255.192 +213.249.54.176/255.255.255.240 +213.249.138.0/255.255.255.248 +213.249.138.104/255.255.255.248 +213.249.148.0/255.255.255.192 +213.249.231.104/255.255.255.248 +213.251.1.112/255.255.255.240 +213.253.26.16/255.255.255.240 +213.253.62.160/255.255.255.224 +213.253.63.48/255.255.255.240 +213.253.136.0/255.255.255.0 +213.254.4.0/255.255.255.224 +213.254.4.224/255.255.255.224 +213.254.6.160/255.255.255.224 +213.254.6.208/255.255.255.248 +213.254.174.40/255.255.255.248 +213.255.42.160/255.255.255.224 +213.255.49.0/255.255.255.128 +213.255.103.152/255.255.255.248 +216.0.220.64/255.255.255.224 +216.5.194.216/255.255.255.248 +216.6.43.192/255.255.255.192 +216.7.13.192/255.255.255.224 +216.9.240.0/255.255.240.0 +216.10.192.0/255.255.240.0 +216.10.208.0/255.255.240.0 +216.13.171.0/255.255.255.0 +216.15.153.114/255.255.255.248 +216.15.159.192/255.255.255.224 +216.15.176.0/255.255.255.128 +216.17.37.128/255.255.255.240 +216.17.37.176/255.255.255.240 +216.17.155.184/255.255.255.248 +216.19.160.96/255.255.255.224 +216.19.160.128/255.255.255.224 +216.21.151.0/255.255.255.248 +216.21.157.192/255.255.255.224 +216.22.7.0/255.255.254.0 +216.22.30.0/255.255.255.127 +216.22.69.112/255.255.255.248 +216.22.145.118/255.255.255.247 +216.22.173.112/255.255.255.248 +216.22.173.184/255.255.255.248 +216.22.208.120/255.255.255.248 +216.22.210.64/255.255.255.224 +216.22.214.160/255.255.255.248 +216.23.1.64/255.255.255.248 +216.23.7.248/255.255.255.248 +216.23.12.32/255.255.255.248 +216.23.13.24/255.255.255.248 +216.23.22.0/255.255.255.0 +216.23.23.0/255.255.255.240 +216.26.224.0/255.255.224.0 +216.27.22.32/255.255.255.224 +216.27.25.64/255.255.255.192 +216.27.42.128/255.255.255.128 +216.27.43.128/255.255.255.128 +216.27.58.192/255.255.255.192 +216.27.157.80/255.255.255.240 +216.27.186.96/255.255.255.248 +216.27.189.72/255.255.255.240 +216.28.201.32/255.255.255.248 +216.29.23.0/255.255.255.240 +216.29.61.0/255.255.255.0 +216.30.16.64/255.255.255.240 +216.30.23.0/255.255.255.248 +216.30.23.96/255.255.255.248 +216.30.23.208/255.255.255.240 +216.30.30.64/255.255.255.224 +216.30.41.128/255.255.255.240 +216.30.197.64/255.255.255.248 +216.30.197.80/255.255.255.248 +216.30.197.88/255.255.255.248 +216.30.204.40/255.255.255.248 +216.30.232.40/255.255.255.248 +216.31.8.0/255.255.252.0 +216.35.64.160/255.255.255.224 +216.35.71.0/255.255.255.0 +216.35.73.128/255.255.255.224 +216.35.74.224/255.255.255.224 +216.37.144.0/255.255.255.0 +216.37.158.0/255.255.255.0 +216.37.171.0/255.255.255.0 +216.37.193.64/255.255.255.192 +216.38.3.72/255.255.255.248 +216.39.149.240/255.255.255.248 +216.41.87.80/255.255.255.248 +216.41.107.0/255.255.255.0 +216.43.24.0/255.255.255.128 +216.43.55.48/255.255.255.240 +216.43.198.32/255.255.255.248 +216.43.198.64/255.255.255.248 +216.46.11.128/255.255.255.248 +216.46.14.48/255.255.255.240 +216.46.16.216/255.255.255.248 +216.48.37.128/255.255.255.224 +216.49.0.0/255.255.192.0 +216.49.80.0/255.255.247.244 +216.49.88.13/255.255.255.238 +216.49.88.32/255.255.255.188 +216.49.88.101/255.255.255.239 +216.49.88.119/255.255.255.232 +216.49.88.144/255.255.248.144 +216.49.131.192/255.255.255.248 +216.49.137.248/255.255.255.248 +216.52.3.56/255.255.255.248 +216.52.22.0/255.255.254.0 +216.52.28.0/255.255.255.0 +216.52.44.32/255.255.255.224 +216.52.47.0/255.255.255.0 +216.52.56.24/255.255.255.248 +216.52.88.16/255.255.255.240 +216.52.88.80/255.255.255.240 +216.52.88.96/255.255.255.224 +216.52.102.0/255.255.255.112 +216.52.119.128/255.255.255.224 +216.52.159.224/255.255.255.224 +216.52.163.16/255.255.255.240 +216.52.167.128/255.255.255.192 +216.52.184.224/255.255.255.224 +216.52.195.128/255.255.255.192 +216.52.209.0/255.255.255.0 +216.52.212.0/255.255.254.0 +216.52.229.0/255.255.255.0 +216.52.232.64/255.255.255.240 +216.52.232.80/255.255.255.240 +216.52.238.0/255.255.255.0 +216.52.242.0/255.255.255.0 +216.52.244.32/255.255.255.240 +216.52.244.64/255.255.255.228 +216.54.20.192/255.255.255.240 +216.54.26.232/255.255.255.248 +216.54.96.48/255.255.255.240 +216.54.117.0/255.255.255.192 +216.54.131.1/255.255.255.1 +216.55.67.16/255.255.255.248 +216.57.219.0/255.255.255.0 +216.60.222.0/255.255.255.0 +216.61.39.200/255.255.255.248 +216.61.132.32/255.255.255.248 +216.61.133.72/255.255.255.248 +216.62.132.248/255.255.255.248 +216.62.182.176/255.255.255.240 +216.62.187.184/255.255.255.248 +216.62.203.112/255.255.255.248 +216.62.233.144/255.255.255.248 +216.62.240.96/255.255.255.248 +216.62.247.200/255.255.255.248 +216.63.21.160/255.255.255.248 +216.63.76.88/255.255.255.248 +216.63.122.64/255.255.255.248 +216.63.176.224/255.255.255.224 +216.63.177.128/255.255.255.224 +216.63.246.0/255.255.254.0 +216.64.169.0/255.255.255.0 +216.64.190.0/255.255.255.0 +216.65.4.80/255.255.255.240 +216.65.62.248/255.255.255.248 +216.65.64.192/255.255.255.240 +216.65.78.0/255.255.255.0 +216.65.103.80/255.255.255.240 +216.65.123.16/255.255.255.240 +216.65.211.208/255.255.255.240 +216.66.208.0/255.255.240.0 +216.69.112.0/255.255.240.0 +216.70.137.232/255.255.255.248 +216.70.162.24/255.255.255.248 +216.70.162.40/255.255.255.248 +216.70.241.0/255.255.255.128 +216.73.30.160/255.255.255.224 +216.74.57.197/255.255.255.236 +216.74.130.0/255.255.254.224 +216.74.134.128/255.255.255.224 +216.74.135.160/255.255.255.224 +216.74.143.64/255.255.255.224 +216.74.159.64/255.255.255.224 +216.74.164.192/255.255.255.224 +216.74.169.96/255.255.255.224 +216.74.172.0/255.255.255.0 +216.75.65.144/255.255.255.248 +216.75.67.168/255.255.255.248 +216.75.75.192/255.255.255.240 +216.75.80.96/255.255.255.240 +216.75.80.144/255.255.255.240 +216.75.82.248/255.255.255.248 +216.75.86.96/255.255.255.248 +216.80.23.64/255.255.255.248 +216.80.41.0/255.255.255.192 +216.83.6.0/255.255.255.0 +216.84.96.0/255.255.255.0 +216.84.130.176/255.255.255.240 +216.84.136.64/255.255.255.240 +216.85.27.232/255.255.255.248 +216.85.201.192/255.255.255.248 +216.86.111.0/255.255.255.192 +216.86.111.224/255.255.255.224 +216.86.240.0/255.255.240.0 +216.88.34.48/255.255.255.240 +216.90.199.0/255.255.251.0 +216.90.241.0/255.255.255.0 +216.91.70.0/255.255.255.0 +216.91.121.0/255.255.255.0 +216.91.187.160/255.255.255.224 +216.91.250.192/255.255.255.192 +216.93.160.0/255.255.224.0 +216.94.11.120/255.255.255.248 +216.94.12.0/255.255.255.128 +216.94.44.72/255.255.255.248 +216.94.87.80/255.255.255.240 +216.94.102.96/255.255.255.240 +216.94.103.192/255.255.255.224 +216.94.116.128/255.255.255.128 +216.94.153.48/255.255.255.240 +216.94.244.128/255.255.255.128 +216.95.175.96/255.255.255.224 +216.95.205.0/255.255.255.0 +216.95.235.32/255.255.255.240 +216.98.48.0/255.255.240.0 +216.98.70.0/255.255.255.224 +216.99.58.224/255.255.255.224 +216.100.14.0/255.255.255.224 +216.100.35.120/255.255.255.248 +216.100.53.96/255.255.255.224 +216.100.231.96/255.255.255.224 +216.101.22.176/255.255.255.248 +216.101.33.160/255.255.255.224 +216.101.48.104/255.255.255.248 +216.101.65.0/255.255.255.224 +216.101.68.32/255.255.255.224 +216.101.71.128/255.255.255.224 +216.101.73.160/255.255.255.224 +216.101.73.192/255.255.255.224 +216.101.76.0/255.255.255.128 +216.101.81.0/255.255.255.192 +216.101.81.192/255.255.255.224 +216.101.82.96/255.255.255.240 +216.101.88.0/255.255.255.0 +216.101.93.0/255.255.255.0 +216.101.140.40/255.255.255.248 +216.101.166.176/255.255.255.248 +216.101.197.168/255.255.255.248 +216.101.254.0/255.255.255.0 +216.102.71.208/255.255.255.248 +216.102.72.0/255.255.244.0 +216.102.128.0/255.255.255.248 +216.102.132.160/255.255.255.248 +216.102.134.248/255.255.255.248 +216.102.219.144/255.255.255.248 +216.102.221.104/255.255.255.248 +216.102.229.216/255.255.255.248 +216.102.237.208/255.255.255.248 +216.102.239.56/255.255.255.248 +216.102.247.128/255.255.255.240 +216.103.5.80/255.255.255.248 +216.103.35.104/255.255.255.248 +216.103.35.224/255.255.255.224 +216.103.37.56/255.255.255.248 +216.103.39.48/255.255.255.248 +216.103.41.80/255.255.255.248 +216.103.47.208/255.255.255.248 +216.103.60.176/255.255.255.248 +216.103.64.80/255.255.255.248 +216.103.67.192/255.255.255.224 +216.103.69.16/255.255.255.248 +216.103.69.168/255.255.255.248 +216.103.69.224/255.255.255.248 +216.103.98.192/255.255.255.240 +216.103.108.144/255.255.255.248 +216.103.123.208/255.255.255.248 +216.103.124.0/255.255.255.248 +216.103.178.96/255.255.255.224 +216.103.225.192/255.255.255.248 +216.103.248.0/255.255.255.224 +216.103.249.0/255.255.255.224 +216.104.43.1/255.255.255.2 +216.104.208.0/255.255.240.0 +216.105.76.40/255.255.255.248 +216.108.28.0/255.255.254.0 +216.108.34.0/255.255.255.48 +216.108.35.160/255.255.255.216 +216.108.37.0/255.255.254.112 +216.108.40.0/255.255.255.208 +216.108.41.128/255.255.255.224 +216.108.42.128/255.255.255.240 +216.108.42.160/255.255.255.224 +216.108.43.0/255.255.255.224 +216.108.44.0/255.255.255.0 +216.108.45.192/255.255.255.224 +216.108.46.128/255.255.255.192 +216.108.47.128/255.255.255.208 +216.108.48.0/255.255.255.0 +216.108.50.0/255.255.255.96 +216.108.53.0/255.255.254.112 +216.108.56.0/255.255.255.192 +216.108.57.0/255.255.255.176 +216.108.58.128/255.255.255.176 +216.108.59.128/255.255.255.224 +216.108.61.0/255.255.255.192 +216.108.64.0/255.255.255.209 +216.108.65.0/255.255.255.224 +216.108.65.48/255.255.255.240 +216.108.66.0/255.255.255.209 +216.108.67.0/255.255.255.176 +216.108.68.0/255.255.255.224 +216.108.69.0/255.255.255.208 +216.108.70.0/255.255.255.16 +216.108.71.0/255.255.255.240 +216.108.71.64/255.255.255.224 +216.108.71.128/255.255.255.224 +216.108.71.192/255.255.255.176 +216.108.73.0/255.255.255.240 +216.108.74.0/255.255.255.128 +216.108.75.0/255.255.255.240 +216.108.75.32/255.255.255.160 +216.108.76.0/255.255.255.160 +216.108.76.192/255.255.255.192 +216.108.77.128/255.255.255.240 +216.108.78.0/255.255.255.224 +216.108.79.0/255.255.255.192 +216.108.83.128/255.255.255.240 +216.108.87.0/255.255.255.240 +216.108.89.128/255.255.255.224 +216.108.90.128/255.255.255.224 +216.108.91.0/255.255.255.176 +216.108.94.128/255.255.255.192 +216.108.97.0/255.255.255.224 +216.108.98.128/255.255.255.176 +216.108.100.128/255.255.255.224 +216.108.102.64/255.255.255.240 +216.108.102.192/255.255.255.240 +216.108.103.128/255.255.255.240 +216.108.106.128/255.255.255.224 +216.108.107.0/255.255.255.192 +216.108.108.144/255.255.255.224 +216.108.110.128/255.255.255.224 +216.108.111.128/255.255.255.224 +216.108.113.192/255.255.255.224 +216.108.114.128/255.255.255.224 +216.108.115.128/255.255.255.224 +216.108.116.192/255.255.255.240 +216.108.117.192/255.255.255.240 +216.108.118.128/255.255.255.224 +216.108.119.0/255.255.255.128 +216.109.0.0/255.255.192.0 +216.109.240.0/255.255.240.0 +216.110.6.80/255.255.255.240 +216.110.34.184/255.255.255.240 +216.110.41.160/255.255.255.240 +216.111.2.0/255.255.255.224 +216.111.88.224/255.255.255.224 +216.111.91.192/255.255.255.224 +216.111.115.0/255.255.255.128 +216.111.137.128/255.255.255.224 +216.111.159.0/255.255.255.0 +216.111.212.96/255.255.255.224 +216.113.58.0/255.255.255.0 +216.117.16.24/255.255.255.248 +216.117.42.208/255.255.255.248 +216.118.66.0/255.255.255.11 +216.118.66.246/255.255.255.246 +216.119.144.240/255.255.255.240 +216.120.0.0/255.255.128.0 +216.123.8.0/255.255.252.0 +216.123.25.224/255.255.255.224 +216.123.43.32/255.255.255.240 +216.126.98.168/255.255.255.248 +216.127.253.64/255.255.255.192 +216.128.4.16/255.255.255.240 +216.129.6.0/255.255.255.224 +216.129.34.0/255.255.255.240 +216.129.35.224/255.255.255.248 +216.129.205.0/255.255.255.248 +216.130.33.0/255.255.255.248 +216.130.33.8/255.255.255.248 +216.132.49.0/255.255.255.224 +216.132.49.224/255.255.255.224 +216.132.68.32/255.255.255.224 +216.132.86.0/255.255.255.0 +216.132.91.160/255.255.255.224 +216.132.111.32/255.255.255.224 +216.132.243.32/255.255.255.224 +216.133.193.0/255.255.255.0 +216.133.204.224/255.255.255.224 +216.133.221.0/255.255.255.0 +216.133.240.128/255.255.255.248 +216.133.250.112/255.255.255.240 +216.136.25.192/255.255.255.224 +216.136.33.0/255.255.255.240 +216.136.96.224/255.255.255.240 +216.136.102.64/255.255.255.240 +216.139.179.128/255.255.255.128 +216.140.36.216/255.255.255.248 +216.140.104.0/255.255.255.0 +216.140.123.64/255.255.255.192 +216.140.212.224/255.255.255.240 +216.141.80.0/255.255.255.0 +216.141.118.64/255.255.255.224 +216.141.140.0/255.255.255.224 +216.141.160.80/255.255.255.240 +216.141.161.192/255.255.255.240 +216.141.174.0/255.255.254.0 +216.141.177.224/255.255.255.224 +216.141.198.0/255.255.255.0 +216.141.210.128/255.255.255.128 +216.141.211.128/255.255.255.128 +216.142.66.96/255.255.255.224 +216.142.131.192/255.255.255.224 +216.143.20.0/255.255.255.0 +216.143.179.160/255.255.255.224 +216.143.233.0/255.255.255.224 +216.144.70.0/255.255.255.0 +216.144.71.0/255.255.255.0 +216.144.128.0/255.255.144.0 +216.146.75.80/255.255.255.240 +216.146.85.224/255.255.255.224 +216.148.0.0/255.255.254.0 +216.148.234.216/255.255.255.248 +216.153.31.0/255.255.255.0 +216.153.199.176/255.255.255.244 +216.154.196.64/255.255.255.192 +216.154.228.0/255.255.255.0 +216.160.37.0/255.255.255.248 +216.160.43.0/255.255.255.248 +216.160.66.112/255.255.255.248 +216.160.68.200/255.255.255.248 +216.160.76.120/255.255.255.248 +216.160.174.8/255.255.255.248 +216.160.202.0/255.255.255.0 +216.160.239.96/255.255.255.248 +216.160.251.32/255.255.255.248 +216.161.47.32/255.255.255.248 +216.161.118.8/255.255.255.248 +216.161.127.128/255.255.255.248 +216.161.127.248/255.255.255.248 +216.161.155.8/255.255.255.248 +216.161.175.152/255.255.255.248 +216.161.180.120/255.255.255.248 +216.161.202.24/255.255.255.248 +216.161.203.192/255.255.255.248 +216.161.203.248/255.255.255.248 +216.163.49.136/255.255.255.240 +216.163.128.0/255.255.240.0 +216.164.75.224/255.255.255.239 +216.164.95.96/255.255.255.224 +216.165.169.176/255.255.255.248 +216.165.173.64/255.255.255.224 +216.165.174.192/255.255.255.192 +216.166.2.64/255.255.255.192 +216.169.144.0/255.255.240.0 +216.170.177.0/255.255.255.248 +216.171.13.32/255.255.255.240 +216.171.50.104/255.255.255.248 +216.171.57.128/255.255.255.248 +216.172.108.80/255.255.255.240 +216.172.116.16/255.255.255.248 +216.172.204.192/255.255.255.192 +216.173.2.120/255.255.255.248 +216.173.12.112/255.255.255.240 +216.173.46.0/255.255.255.240 +216.173.46.32/255.255.255.224 +216.173.46.176/255.255.255.208 +216.173.224.0/255.255.224.0 +216.175.151.192/255.255.255.224 +216.175.153.240/255.255.255.240 +216.175.155.160/255.255.255.240 +216.175.156.152/255.255.255.248 +216.175.158.64/255.255.255.192 +216.175.165.192/255.255.255.192 +216.175.168.32/255.255.255.240 +216.175.168.112/255.255.255.240 +216.175.180.224/255.255.255.240 +216.175.196.192/255.255.255.224 +216.175.198.128/255.255.255.192 +216.175.201.0/255.255.255.224 +216.175.227.128/255.255.255.240 +216.175.238.32/255.255.255.240 +216.177.36.0/255.255.255.0 +216.177.38.16/255.255.255.248 +216.177.38.64/255.255.255.240 +216.177.38.192/255.255.255.248 +216.177.72.96/255.255.255.224 +216.178.248.112/255.255.255.248 +216.178.251.32/255.255.255.248 +216.179.214.32/255.255.255.240 +216.180.38.192/255.255.255.240 +216.180.110.96/255.255.255.224 +216.180.161.0/255.255.255.239 +216.181.12.112/255.255.255.240 +216.181.17.96/255.255.255.224 +216.181.51.0/255.255.255.0 +216.181.68.96/255.255.255.240 +216.181.68.176/255.255.255.240 +216.181.70.48/255.255.255.240 +216.181.76.0/255.255.255.224 +216.181.78.224/255.255.255.224 +216.181.82.128/255.255.255.192 +216.181.103.192/255.255.255.192 +216.181.148.16/255.255.255.224 +216.181.148.56/255.255.255.232 +216.181.153.128/255.255.255.224 +216.181.167.160/255.255.255.224 +216.181.170.64/255.255.255.192 +216.181.171.192/255.255.255.240 +216.181.175.88/255.255.255.248 +216.181.192.32/255.255.255.224 +216.181.193.0/255.255.255.240 +216.181.193.16/255.255.255.240 +216.181.201.192/255.255.255.192 +216.181.209.80/255.255.255.240 +216.181.212.200/255.255.255.248 +216.181.225.96/255.255.255.240 +216.181.231.0/255.255.255.0 +216.181.237.96/255.255.255.248 +216.181.241.128/255.255.255.192 +216.182.162.64/255.255.255.224 +216.182.196.160/255.255.255.224 +216.183.106.144/255.255.255.240 +216.184.137.80/255.255.255.240 +216.184.137.192/255.255.255.224 +216.184.144.32/255.255.255.224 +216.184.148.224/255.255.255.224 +216.184.153.192/255.255.255.224 +216.184.153.224/255.255.255.224 +216.184.157.64/255.255.255.248 +216.184.157.128/255.255.255.224 +216.184.163.96/255.255.255.224 +216.184.163.160/255.255.255.224 +216.184.163.208/255.255.255.240 +216.184.165.96/255.255.255.224 +216.184.174.0/255.255.255.224 +216.184.174.96/255.255.255.224 +216.184.186.64/255.255.255.224 +216.184.194.0/255.255.255.0 +216.184.199.160/255.255.255.224 +216.184.200.0/255.255.255.0 +216.184.202.208/255.255.255.240 +216.184.220.0/255.255.255.0 +216.184.222.96/255.255.255.224 +216.184.227.32/255.255.255.240 +216.184.229.0/255.255.255.248 +216.184.234.96/255.255.255.224 +216.184.237.128/255.255.255.224 +216.184.239.160/255.255.255.224 +216.184.247.32/255.255.255.224 +216.184.247.112/255.255.255.240 +216.186.143.40/255.255.255.224 +216.186.149.0/255.255.255.248 +216.186.152.232/255.255.255.248 +216.186.153.16/255.255.255.240 +216.186.153.64/255.255.255.240 +216.186.153.144/255.255.255.240 +216.186.156.136/255.255.255.248 +216.186.159.160/255.255.255.224 +216.186.160.0/255.255.255.240 +216.186.160.232/255.255.255.248 +216.186.164.96/255.255.255.248 +216.186.180.224/255.255.255.240 +216.186.195.208/255.255.255.248 +216.186.203.48/255.255.255.248 +216.186.203.248/255.255.255.248 +216.186.208.80/255.255.255.248 +216.186.217.168/255.255.255.248 +216.186.220.48/255.255.255.240 +216.186.226.168/255.255.255.248 +216.186.228.16/255.255.255.240 +216.186.231.40/255.255.255.248 +216.186.238.40/255.255.255.248 +216.186.238.96/255.255.255.248 +216.186.239.112/255.255.255.240 +216.186.240.0/255.255.255.248 +216.186.248.16/255.255.255.240 +216.187.69.96/255.255.255.224 +216.188.27.208/255.255.255.240 +216.190.0.0/255.255.255.0 +216.190.56.0/255.255.252.0 +216.190.100.0/255.255.255.0 +216.190.169.0/255.255.255.0 +216.190.210.0/255.255.254.0 +216.190.255.48/255.255.255.248 +216.193.194.0/255.255.255.0 +216.194.192.0/255.255.192.0 +216.197.96.0/255.255.224.0 +216.198.90.88/255.255.255.232 +216.198.91.144/255.255.255.240 +216.198.218.0/255.255.255.128 +216.199.12.192/255.255.255.224 +216.199.34.192/255.255.255.248 +216.199.91.224/255.255.255.248 +216.199.251.64/255.255.255.248 +216.201.183.176/255.255.255.240 +216.201.202.48/255.255.255.240 +216.203.2.80/255.255.255.248 +216.204.31.192/255.255.255.192 +216.204.34.120/255.255.255.248 +216.204.56.0/255.255.255.128 +216.205.94.0/255.255.255.174 +216.205.94.83/255.255.255.83 +216.205.224.0/255.255.224.0 +216.206.216.0/255.255.255.0 +216.206.242.192/255.255.255.192 +216.207.221.32/255.255.255.224 +216.207.222.0/255.255.255.0 +216.208.1.0/255.255.255.224 +216.208.8.32/255.255.255.224 +216.208.27.128/255.255.255.224 +216.208.34.128/255.255.255.224 +216.208.34.192/255.255.255.224 +216.208.35.32/255.255.255.224 +216.208.35.96/255.255.255.224 +216.208.35.160/255.255.255.224 +216.208.39.192/255.255.255.192 +216.208.71.32/255.255.255.224 +216.208.95.224/255.255.255.224 +216.208.98.96/255.255.255.224 +216.208.123.0/255.255.255.0 +216.208.226.160/255.255.255.224 +216.209.86.192/255.255.255.248 +216.210.206.64/255.255.255.248 +216.210.239.96/255.255.255.248 +216.211.201.192/255.255.255.192 +216.212.60.96/255.255.255.248 +216.212.104.200/255.255.255.248 +216.212.105.168/255.255.255.248 +216.213.99.56/255.255.255.248 +216.216.41.16/255.255.255.240 +216.216.41.96/255.255.255.240 +216.216.48.16/255.255.255.240 +216.216.192.16/255.255.255.240 +216.217.6.144/255.255.255.240 +216.217.22.200/255.255.255.248 +216.217.23.64/255.255.255.192 +216.217.71.64/255.255.255.192 +216.217.71.216/255.255.255.248 +216.217.72.64/255.255.255.192 +216.217.156.240/255.255.255.248 +216.217.179.120/255.255.255.248 +216.217.212.128/255.255.255.224 +216.217.245.192/255.255.255.224 +216.218.132.16/255.255.255.248 +216.218.139.208/255.255.255.240 +216.218.152.128/255.255.255.128 +216.218.162.0/255.255.255.0 +216.218.196.64/255.255.255.224 +216.218.196.176/255.255.255.248 +216.218.200.72/255.255.255.248 +216.218.207.0/255.255.255.192 +216.219.57.96/255.255.255.240 +216.220.100.160/255.255.255.192 +216.220.176.0/255.255.240.0 +216.220.225.64/255.255.255.224 +216.223.34.0/255.255.255.0 +216.224.8.136/255.255.255.248 +216.224.8.176/255.255.255.240 +216.224.32.192/255.255.255.240 +216.224.44.176/255.255.255.240 +216.224.59.192/255.255.255.240 +216.226.176.0/255.255.240.0 +216.228.0.0/255.255.224.0 +216.230.65.96/255.255.255.241 +216.230.91.64/255.255.255.192 +216.231.40.96/255.255.255.224 +216.233.8.160/255.255.255.248 +216.233.8.176/255.255.255.240 +216.233.10.128/255.255.255.224 +216.233.10.176/255.255.255.240 +216.233.12.120/255.255.255.248 +216.233.44.216/255.255.255.248 +216.233.69.0/255.255.255.192 +216.233.76.32/255.255.255.248 +216.233.86.0/255.255.255.240 +216.233.99.72/255.255.255.248 +216.233.103.144/255.255.255.240 +216.233.116.96/255.255.255.240 +216.233.117.136/255.255.255.248 +216.233.129.120/255.255.255.248 +216.233.130.112/255.255.255.176 +216.233.131.8/255.255.255.248 +216.233.133.192/255.255.255.192 +216.233.146.128/255.255.255.224 +216.233.150.32/255.255.255.224 +216.233.162.64/255.255.255.248 +216.233.191.16/255.255.255.248 +216.233.191.192/255.255.255.240 +216.233.229.192/255.255.255.240 +216.233.248.200/255.255.255.248 +216.233.252.0/255.255.255.0 +216.234.160.0/255.255.224.0 +216.236.134.168/255.255.255.248 +216.236.223.0/255.255.255.0 +216.238.0.0/255.255.0.0 +216.241.165.32/255.255.255.240 +216.241.187.16/255.255.255.248 +216.243.178.160/255.255.255.240 +216.244.76.0/255.255.255.248 +216.246.5.128/255.255.255.224 +216.246.7.128/255.255.255.224 +216.246.7.240/255.255.255.240 +216.246.17.0/255.255.255.224 +216.246.87.0/255.255.255.0 +216.246.91.0/255.255.255.224 +216.246.96.0/255.255.255.0 +216.248.12.96/255.255.255.240 +216.248.61.64/255.255.255.192 +216.248.139.96/255.255.255.224 +216.248.142.96/255.255.255.224 +216.248.149.176/255.255.255.248 +216.250.66.240/255.255.255.248 +216.250.87.192/255.255.255.224 +216.250.192.0/255.255.255.0 +216.251.233.0/255.255.255.0 +216.251.239.80/255.255.255.248 +216.251.239.96/255.255.255.224 +216.253.88.160/255.255.255.240 +216.253.166.224/255.255.255.224 +216.253.191.80/255.255.255.248 +216.253.218.224/255.255.255.224 +216.253.232.64/255.255.255.192 +216.253.251.208/255.255.255.248 +216.254.61.136/255.255.255.248 +216.254.93.32/255.255.255.224 +216.254.94.0/255.255.255.128 +216.255.127.128/255.255.255.224 +217.5.153.0/255.255.255.0 +217.5.156.64/255.255.255.248 +217.5.200.224/255.255.255.240 +217.5.215.48/255.255.255.248 +217.5.219.112/255.255.255.240 +217.6.0.112/255.255.255.248 +217.6.8.112/255.255.255.240 +217.6.8.216/255.255.255.248 +217.6.20.128/255.255.255.248 +217.6.33.176/255.255.255.248 +217.6.73.72/255.255.255.248 +217.6.87.192/255.255.255.248 +217.6.130.48/255.255.255.248 +217.6.136.192/255.255.255.240 +217.6.160.160/255.255.255.248 +217.6.160.192/255.255.255.192 +217.6.186.48/255.255.255.248 +217.6.219.88/255.255.255.248 +217.6.229.184/255.255.255.248 +217.7.3.104/255.255.255.248 +217.7.11.224/255.255.255.248 +217.7.17.0/255.255.255.0 +217.7.65.168/255.255.255.248 +217.7.96.24/255.255.255.248 +217.7.97.0/255.255.255.0 +217.7.114.248/255.255.255.248 +217.7.125.192/255.255.255.248 +217.7.128.112/255.255.255.248 +217.7.147.112/255.255.255.248 +217.7.147.216/255.255.255.248 +217.7.171.112/255.255.255.248 +217.8.156.208/255.255.255.240 +217.8.164.176/255.255.255.240 +217.8.175.0/255.255.255.0 +217.9.97.16/255.255.255.240 +217.9.126.56/255.255.255.248 +217.10.12.160/255.255.255.240 +217.10.79.248/255.255.255.248 +217.10.221.224/255.255.255.224 +217.11.39.32/255.255.255.248 +217.11.144.56/255.255.255.248 +217.13.31.168/255.255.255.248 +217.13.140.112/255.255.255.248 +217.13.143.240/255.255.255.248 +217.13.144.8/255.255.255.248 +217.14.217.104/255.255.255.248 +217.14.217.160/255.255.255.248 +217.15.224.0/255.255.240.0 +217.17.32.0/255.255.253.0 +217.17.46.216/255.255.255.248 +217.17.196.96/255.255.255.240 +217.18.16.0/255.255.240.0 +217.19.69.0/255.255.255.240 +217.19.170.128/255.255.255.224 +217.19.187.0/255.255.255.240 +217.19.187.64/255.255.255.216 +217.19.189.136/255.255.255.248 +217.23.55.48/255.255.255.240 +217.23.171.80/255.255.255.224 +217.23.185.40/255.255.255.240 +217.24.12.48/255.255.255.248 +217.26.79.0/255.255.255.224 +217.27.95.208/255.255.255.248 +217.31.72.48/255.255.255.248 +217.31.172.96/255.255.255.248 +217.32.201.64/255.255.255.224 +217.32.202.176/255.255.255.240 +217.32.204.128/255.255.255.224 +217.33.0.16/255.255.255.240 +217.33.5.0/255.255.255.0 +217.33.25.176/255.255.255.248 +217.33.30.32/255.255.255.240 +217.33.73.112/255.255.255.240 +217.33.73.224/255.255.255.224 +217.33.96.160/255.255.255.248 +217.33.193.144/255.255.255.240 +217.33.197.32/255.255.255.224 +217.33.199.0/255.255.254.112 +217.33.219.192/255.255.255.224 +217.33.232.168/255.255.255.248 +217.33.252.128/255.255.255.128 +217.33.255.0/255.255.255.0 +217.35.119.208/255.255.255.240 +217.37.50.72/255.255.255.248 +217.37.151.16/255.255.255.248 +217.37.153.112/255.255.255.240 +217.37.192.32/255.255.255.248 +217.40.79.232/255.255.255.248 +217.40.95.216/255.255.255.248 +217.40.103.24/255.255.255.248 +217.41.240.224/255.255.255.224 +217.41.242.160/255.255.255.224 +217.45.225.96/255.255.255.248 +217.46.164.120/255.255.255.248 +217.46.192.200/255.255.255.248 +217.56.1.144/255.255.255.248 +217.56.1.160/255.255.255.224 +217.56.1.192/255.255.255.224 +217.56.5.0/255.255.255.248 +217.56.16.144/255.255.255.240 +217.56.23.200/255.255.255.248 +217.56.25.80/255.255.255.248 +217.56.29.192/255.255.255.224 +217.56.32.32/255.255.255.224 +217.56.32.160/255.255.255.248 +217.56.44.24/255.255.255.248 +217.56.44.96/255.255.255.224 +217.56.44.224/255.255.255.224 +217.56.46.32/255.255.255.224 +217.56.49.48/255.255.255.248 +217.56.51.192/255.255.255.224 +217.56.55.96/255.255.255.224 +217.56.66.32/255.255.255.224 +217.56.67.168/255.255.255.248 +217.56.73.136/255.255.255.248 +217.56.77.16/255.255.255.248 +217.56.77.24/255.255.255.248 +217.56.77.32/255.255.255.224 +217.56.77.64/255.255.255.248 +217.56.77.72/255.255.255.248 +217.56.77.80/255.255.255.248 +217.56.77.88/255.255.255.248 +217.56.77.96/255.255.255.248 +217.56.77.104/255.255.255.248 +217.56.77.128/255.255.255.248 +217.56.77.136/255.255.255.248 +217.56.77.144/255.255.255.248 +217.56.77.152/255.255.255.248 +217.56.77.160/255.255.255.248 +217.56.77.168/255.255.255.248 +217.56.77.200/255.255.255.248 +217.56.78.224/255.255.255.224 +217.56.84.248/255.255.255.248 +217.56.87.160/255.255.255.240 +217.56.87.184/255.255.255.248 +217.56.89.56/255.255.255.248 +217.56.95.224/255.255.255.248 +217.56.102.160/255.255.255.248 +217.56.104.0/255.255.255.240 +217.56.104.80/255.255.255.240 +217.56.109.192/255.255.255.240 +217.56.111.192/255.255.255.248 +217.56.114.112/255.255.255.248 +217.56.200.144/255.255.255.240 +217.56.207.16/255.255.255.240 +217.56.211.96/255.255.255.240 +217.56.223.232/255.255.255.248 +217.56.227.192/255.255.255.240 +217.56.228.192/255.255.255.224 +217.56.229.120/255.255.255.240 +217.56.229.136/255.255.255.248 +217.56.229.200/255.255.255.248 +217.56.229.208/255.255.255.248 +217.56.229.216/255.255.255.248 +217.56.230.224/255.255.255.248 +217.56.234.48/255.255.255.248 +217.57.2.64/255.255.255.248 +217.57.2.72/255.255.255.248 +217.57.2.80/255.255.255.248 +217.57.2.152/255.255.255.248 +217.57.4.156/255.255.255.244 +217.57.8.176/255.255.255.248 +217.57.10.16/255.255.255.248 +217.57.18.56/255.255.255.248 +217.57.20.8/255.255.255.248 +217.57.23.184/255.255.255.248 +217.57.23.192/255.255.255.248 +217.57.26.56/255.255.255.248 +217.57.27.160/255.255.255.224 +217.57.30.104/255.255.255.248 +217.57.31.64/255.255.255.192 +217.57.31.184/255.255.255.248 +217.57.39.48/255.255.255.248 +217.57.39.56/255.255.255.248 +217.57.43.0/255.255.255.240 +217.57.45.128/255.255.255.240 +217.57.47.0/255.255.255.192 +217.57.47.64/255.255.255.240 +217.57.47.208/255.255.255.240 +217.57.48.160/255.255.255.248 +217.57.61.208/255.255.255.240 +217.57.66.120/255.255.255.248 +217.57.110.192/255.255.255.244 +217.57.113.160/255.255.255.240 +217.57.114.208/255.255.255.248 +217.57.139.8/255.255.255.248 +217.57.144.144/255.255.255.248 +217.57.147.64/255.255.255.224 +217.57.147.96/255.255.255.240 +217.57.148.32/255.255.255.224 +217.57.158.216/255.255.255.248 +217.57.164.48/255.255.255.240 +217.57.166.88/255.255.255.248 +217.57.166.96/255.255.255.248 +217.57.166.104/255.255.255.248 +217.57.166.112/255.255.255.248 +217.57.166.120/255.255.255.248 +217.58.1.224/255.255.255.248 +217.58.4.48/255.255.255.248 +217.58.19.96/255.255.255.240 +217.58.23.48/255.255.255.248 +217.58.23.64/255.255.255.224 +217.58.23.96/255.255.255.248 +217.58.27.48/255.255.255.248 +217.58.37.216/255.255.255.248 +217.58.39.80/255.255.255.240 +217.58.41.128/255.255.255.248 +217.58.50.128/255.255.255.248 +217.58.64.56/255.255.255.248 +217.58.72.152/255.255.255.248 +217.58.90.0/255.255.255.248 +217.58.129.104/255.255.255.248 +217.58.129.216/255.255.255.248 +217.58.132.16/255.255.255.248 +217.58.132.192/255.255.255.224 +217.58.141.192/255.255.255.224 +217.58.145.24/255.255.255.248 +217.58.145.32/255.255.255.248 +217.58.146.80/255.255.255.248 +217.58.152.192/255.255.255.224 +217.58.160.40/255.255.255.240 +217.58.160.160/255.255.255.224 +217.58.163.32/255.255.255.224 +217.58.163.96/255.255.255.224 +217.58.163.128/255.255.255.224 +217.58.167.96/255.255.255.224 +217.58.169.0/255.255.255.200 +217.58.192.152/255.255.255.248 +217.58.193.176/255.255.255.240 +217.58.193.224/255.255.255.248 +217.58.193.232/255.255.255.248 +217.58.193.248/255.255.255.248 +217.58.199.128/255.255.255.240 +217.58.199.176/255.255.255.240 +217.58.200.128/255.255.255.224 +217.58.201.8/255.255.255.248 +217.58.201.48/255.255.255.248 +217.58.202.0/255.255.255.224 +217.58.202.32/255.255.255.248 +217.58.203.64/255.255.255.192 +217.58.204.0/255.255.255.240 +217.58.204.16/255.255.255.248 +217.58.204.24/255.255.255.248 +217.58.204.32/255.255.255.224 +217.58.204.64/255.255.255.248 +217.58.204.120/255.255.255.248 +217.58.204.128/255.255.255.248 +217.58.205.144/255.255.255.240 +217.58.205.248/255.255.255.248 +217.58.207.80/255.255.255.240 +217.58.207.160/255.255.255.224 +217.58.211.0/255.255.255.248 +217.58.211.8/255.255.255.248 +217.58.211.16/255.255.255.248 +217.58.211.24/255.255.255.248 +217.58.211.32/255.255.255.248 +217.58.211.40/255.255.255.248 +217.58.211.48/255.255.255.248 +217.58.211.56/255.255.255.248 +217.58.211.64/255.255.255.248 +217.58.211.72/255.255.255.248 +217.58.211.112/255.255.255.248 +217.58.213.56/255.255.255.248 +217.58.214.0/255.255.255.248 +217.58.214.8/255.255.255.248 +217.58.214.16/255.255.255.248 +217.58.214.24/255.255.255.248 +217.58.214.32/255.255.255.248 +217.58.214.56/255.255.255.248 +217.58.214.96/255.255.255.240 +217.58.214.112/255.255.255.248 +217.58.214.160/255.255.255.224 +217.58.214.224/255.255.255.240 +217.58.215.160/255.255.255.224 +217.58.215.240/255.255.255.248 +217.58.217.144/255.255.255.240 +217.58.223.0/255.255.255.28 +217.59.3.144/255.255.255.248 +217.59.3.152/255.255.255.248 +217.59.3.192/255.255.255.248 +217.59.5.192/255.255.255.224 +217.59.10.48/255.255.255.248 +217.59.11.64/255.255.255.248 +217.59.13.160/255.255.255.240 +217.59.13.176/255.255.255.240 +217.59.14.128/255.255.255.240 +217.59.15.240/255.255.255.248 +217.59.17.56/255.255.255.248 +217.59.18.32/255.255.255.224 +217.59.18.192/255.255.255.248 +217.59.19.0/255.255.255.240 +217.59.21.24/255.255.255.248 +217.59.22.144/255.255.255.248 +217.59.24.80/255.255.255.240 +217.59.24.96/255.255.255.224 +217.59.26.96/255.255.255.240 +217.59.28.56/255.255.255.248 +217.59.30.48/255.255.255.248 +217.59.31.96/255.255.255.240 +217.59.32.128/255.255.255.232 +217.59.32.176/255.255.255.240 +217.59.32.192/255.255.255.248 +217.59.32.200/255.255.255.248 +217.59.32.208/255.255.255.248 +217.59.32.216/255.255.255.248 +217.59.36.0/255.255.255.248 +217.59.41.0/255.255.255.224 +217.59.43.224/255.255.255.248 +217.59.44.96/255.255.255.240 +217.59.44.224/255.255.255.224 +217.59.45.48/255.255.255.248 +217.59.45.56/255.255.255.248 +217.59.49.192/255.255.255.248 +217.59.49.224/255.255.255.224 +217.59.54.24/255.255.255.248 +217.59.54.32/255.255.255.248 +217.59.54.40/255.255.255.248 +217.59.54.64/255.255.255.224 +217.59.54.112/255.255.255.248 +217.59.54.128/255.255.255.240 +217.59.56.192/255.255.255.224 +217.59.59.96/255.255.255.224 +217.59.63.0/255.255.255.248 +217.59.63.8/255.255.255.248 +217.59.63.16/255.255.255.248 +217.59.64.96/255.255.255.240 +217.59.65.16/255.255.255.248 +217.59.67.112/255.255.255.240 +217.59.70.72/255.255.255.244 +217.59.71.104/255.255.255.248 +217.59.77.48/255.255.255.248 +217.59.77.64/255.255.255.224 +217.59.78.192/255.255.255.240 +217.59.80.120/255.255.255.248 +217.59.105.204/255.255.255.244 +217.59.128.32/255.255.255.224 +217.59.128.128/255.255.255.240 +217.59.130.160/255.255.255.240 +217.59.130.176/255.255.255.240 +217.59.130.192/255.255.255.224 +217.59.130.224/255.255.255.248 +217.59.131.0/255.255.255.224 +217.59.131.32/255.255.255.248 +217.59.134.48/255.255.255.240 +217.59.134.96/255.255.255.240 +217.59.134.136/255.255.255.248 +217.59.134.192/255.255.255.224 +217.59.135.96/255.255.255.224 +217.59.135.128/255.255.255.248 +217.59.135.160/255.255.255.224 +217.59.136.144/255.255.255.240 +217.59.138.216/255.255.255.248 +217.59.138.224/255.255.255.224 +217.59.139.128/255.255.255.240 +217.59.140.144/255.255.255.240 +217.59.141.96/255.255.255.240 +217.59.145.96/255.255.255.224 +217.59.145.224/255.255.255.224 +217.59.146.0/255.255.255.224 +217.59.146.32/255.255.255.240 +217.59.148.8/255.255.255.248 +217.59.148.16/255.255.255.240 +217.59.148.72/255.255.255.248 +217.59.148.96/255.255.255.224 +217.59.148.240/255.255.255.240 +217.59.149.184/255.255.255.248 +217.59.149.192/255.255.255.248 +217.59.149.200/255.255.255.248 +217.59.149.208/255.255.255.240 +217.59.149.224/255.255.255.224 +217.59.150.40/255.255.255.248 +217.59.150.128/255.255.255.224 +217.59.151.0/255.255.255.224 +217.59.151.144/255.255.255.240 +217.59.152.32/255.255.255.224 +217.59.152.72/255.255.255.248 +217.59.152.96/255.255.255.224 +217.59.152.128/255.255.255.224 +217.59.153.0/255.255.255.248 +217.59.153.8/255.255.255.248 +217.59.153.16/255.255.255.248 +217.59.153.248/255.255.255.248 +217.59.154.0/255.255.255.240 +217.59.154.16/255.255.255.240 +217.59.154.32/255.255.255.248 +217.59.154.48/255.255.255.240 +217.59.155.16/255.255.255.248 +217.59.155.32/255.255.255.240 +217.59.157.0/255.255.255.240 +217.59.157.160/255.255.255.248 +217.59.157.168/255.255.255.248 +217.59.157.176/255.255.255.248 +217.59.157.184/255.255.255.248 +217.59.159.112/255.255.255.240 +217.59.159.160/255.255.255.224 +217.59.160.8/255.255.255.248 +217.59.160.192/255.255.255.192 +217.59.161.0/255.255.255.224 +217.59.161.32/255.255.255.248 +217.59.161.64/255.255.255.248 +217.59.161.160/255.255.255.224 +217.59.161.192/255.255.255.224 +217.59.162.176/255.255.255.248 +217.59.162.184/255.255.255.248 +217.59.162.192/255.255.255.248 +217.59.162.200/255.255.255.248 +217.59.162.208/255.255.255.248 +217.59.163.16/255.255.255.240 +217.59.163.64/255.255.255.224 +217.59.163.160/255.255.255.224 +217.59.163.208/255.255.255.248 +217.59.165.128/255.255.255.240 +217.59.165.144/255.255.255.224 +217.59.165.176/255.255.255.240 +217.59.166.16/255.255.255.248 +217.59.166.32/255.255.255.224 +217.59.167.144/255.255.255.248 +217.59.168.48/255.255.255.240 +217.59.168.184/255.255.255.248 +217.59.168.192/255.255.255.192 +217.59.169.160/255.255.255.240 +217.59.169.176/255.255.255.248 +217.59.170.128/255.255.255.224 +217.59.170.160/255.255.255.248 +217.59.170.168/255.255.255.248 +217.59.170.176/255.255.255.240 +217.59.170.192/255.255.255.224 +217.59.172.192/255.255.255.224 +217.59.172.224/255.255.255.240 +217.59.172.240/255.255.255.240 +217.59.178.248/255.255.255.248 +217.59.179.0/255.255.255.0 +217.59.181.0/255.255.255.248 +217.59.181.8/255.255.255.248 +217.59.181.16/255.255.255.248 +217.59.181.24/255.255.255.248 +217.59.181.32/255.255.255.248 +217.59.181.40/255.255.255.248 +217.59.181.64/255.255.255.192 +217.59.192.64/255.255.255.224 +217.59.197.232/255.255.255.248 +217.59.197.248/255.255.255.248 +217.59.198.128/255.255.255.240 +217.59.200.56/255.255.255.248 +217.59.201.0/255.255.255.224 +217.59.201.48/255.255.255.240 +217.59.201.80/255.255.255.240 +217.59.201.96/255.255.255.224 +217.59.202.32/255.255.255.224 +217.59.203.32/255.255.255.248 +217.59.204.32/255.255.255.224 +217.59.204.184/255.255.255.248 +217.59.204.192/255.255.255.224 +217.59.206.128/255.255.255.240 +217.59.207.32/255.255.255.248 +217.59.207.40/255.255.255.248 +217.59.210.96/255.255.255.244 +217.64.113.0/255.255.255.240 +217.64.169.208/255.255.255.248 +217.64.230.216/255.255.255.248 +217.67.199.176/255.255.255.240 +217.68.16.0/255.255.255.0 +217.69.246.0/255.255.255.0 +217.75.74.224/255.255.255.248 +217.75.98.208/255.255.255.240 +217.76.100.32/255.255.255.224 +217.89.66.8/255.255.255.248 +217.89.74.88/255.255.255.248 +217.89.88.192/255.255.255.224 +217.89.94.192/255.255.255.248 +217.89.132.56/255.255.255.248 +217.89.135.200/255.255.255.248 +217.89.138.0/255.255.254.248 +217.89.141.208/255.255.255.248 +217.96.24.144/255.255.255.240 +217.97.164.0/255.255.255.128 +217.101.168.224/255.255.255.224 +217.109.146.128/255.255.255.192 +217.109.147.168/255.255.255.248 +217.109.155.64/255.255.255.192 +217.109.190.0/255.255.254.0 +217.110.5.80/255.255.255.248 +217.110.5.176/255.255.255.248 +217.110.5.192/255.255.255.248 +217.110.12.224/255.255.255.248 +217.110.14.168/255.255.255.248 +217.110.18.208/255.255.255.248 +217.110.21.224/255.255.255.248 +217.110.29.32/255.255.255.248 +217.110.29.232/255.255.255.248 +217.110.30.216/255.255.255.248 +217.110.31.0/255.255.255.240 +217.110.40.184/255.255.255.248 +217.110.45.96/255.255.255.248 +217.110.52.0/255.255.255.0 +217.110.83.48/255.255.255.240 +217.110.104.32/255.255.255.240 +217.110.107.24/255.255.255.248 +217.110.109.64/255.255.255.240 +217.110.123.32/255.255.255.240 +217.110.124.120/255.255.255.248 +217.110.154.96/255.255.255.224 +217.110.197.56/255.255.255.248 +217.110.198.216/255.255.255.248 +217.110.199.96/255.255.255.248 +217.110.199.176/255.255.255.248 +217.110.201.32/255.255.255.248 +217.110.208.152/255.255.255.248 +217.110.209.160/255.255.255.248 +217.110.223.40/255.255.255.248 +217.110.228.152/255.255.255.248 +217.111.5.160/255.255.255.224 +217.111.37.64/255.255.255.248 +217.111.37.88/255.255.255.248 +217.111.48.0/255.255.255.240 +217.111.49.0/255.255.255.0 +217.111.50.48/255.255.255.240 +217.113.38.176/255.255.255.248 +217.113.38.184/255.255.255.248 +217.113.177.48/255.255.255.248 +217.115.132.72/255.255.255.248 +217.115.132.104/255.255.255.248 +217.115.155.224/255.255.255.240 +217.115.158.176/255.255.255.248 +217.116.8.112/255.255.255.248 +217.117.146.0/255.255.255.240 +217.118.227.128/255.255.255.208 +217.118.230.176/255.255.255.248 +217.141.59.72/255.255.255.248 +217.141.144.128/255.255.255.240 +217.141.144.240/255.255.255.248 +217.141.146.72/255.255.255.244 +217.141.151.144/255.255.255.248 +217.141.180.16/255.255.255.248 +217.146.142.16/255.255.255.240 +217.146.142.128/255.255.255.248 +217.147.100.80/255.255.255.248 +217.147.100.152/255.255.255.216 +217.147.130.128/255.255.255.248 +217.149.34.192/255.255.255.240 +217.149.34.224/255.255.255.224 +217.149.36.16/255.255.255.240 +217.149.224.0/255.255.240.0 +217.153.34.160/255.255.255.248 +217.153.90.208/255.255.255.240 +217.153.132.48/255.255.255.240 +217.154.24.192/255.255.255.240 +217.154.56.48/255.255.255.248 +217.154.90.184/255.255.255.248 +217.154.94.144/255.255.255.248 +217.154.95.136/255.255.255.248 +217.154.103.128/255.255.255.192 +217.154.104.200/255.255.255.248 +217.154.108.224/255.255.255.224 +217.154.110.88/255.255.255.248 +217.154.110.240/255.255.255.248 +217.154.125.96/255.255.255.224 +217.154.136.96/255.255.255.248 +217.154.136.184/255.255.255.248 +217.154.142.0/255.255.255.0 +217.154.145.32/255.255.255.248 +217.154.151.160/255.255.255.248 +217.154.176.8/255.255.255.248 +217.154.192.56/255.255.255.248 +217.154.194.192/255.255.255.248 +217.154.195.120/255.255.255.248 +217.154.204.24/255.255.255.248 +217.154.204.32/255.255.255.248 +217.154.205.160/255.255.255.240 +217.154.210.184/255.255.255.240 +217.154.218.72/255.255.255.248 +217.154.220.200/255.255.255.248 +217.154.229.136/255.255.255.248 +217.154.238.144/255.255.255.248 +217.154.239.224/255.255.255.248 +217.155.0.80/255.255.255.248 +217.155.73.56/255.255.255.248 +217.155.113.184/255.255.255.248 +217.155.119.64/255.255.255.248 +217.155.120.192/255.255.255.224 +217.155.156.136/255.255.255.248 +217.155.184.184/255.255.255.248 +217.155.221.248/255.255.255.248 +217.155.227.144/255.255.255.248 +217.157.43.216/255.255.255.248 +217.158.45.144/255.255.255.240 +217.158.72.64/255.255.255.240 +217.158.95.0/255.255.255.240 +217.158.98.48/255.255.255.240 +217.158.112.224/255.255.255.224 +217.158.152.16/255.255.255.240 +217.158.164.16/255.255.255.240 +217.158.169.0/255.255.255.0 +217.158.178.224/255.255.255.240 +217.158.194.176/255.255.255.240 +217.161.1.192/255.255.255.240 +217.161.87.240/255.255.255.248 +217.166.34.0/255.255.255.0 +217.166.52.64/255.255.255.240 +217.166.89.24/255.255.255.248 +217.166.100.192/255.255.255.248 +217.166.124.240/255.255.255.248 +217.166.133.56/255.255.255.232 +217.167.0.16/255.255.255.248 +217.167.1.24/255.255.255.248 +217.167.17.72/255.255.255.248 +217.167.27.224/255.255.255.248 +217.167.41.184/255.255.255.248 +217.167.43.152/255.255.255.216 +217.167.48.56/255.255.255.248 +217.167.50.8/255.255.255.248 +217.167.120.16/255.255.255.232 +217.167.182.1/255.255.255.1 +217.167.201.96/255.255.255.224 +217.167.211.24/255.255.255.248 +217.168.235.0/255.255.255.248 +217.169.4.160/255.255.255.240 +217.169.10.112/255.255.255.240 +217.169.11.224/255.255.255.240 +217.169.25.64/255.255.255.248 +217.169.31.96/255.255.255.224 +217.169.34.216/255.255.255.248 +217.169.42.128/255.255.255.224 +217.173.135.208/255.255.255.240 +217.174.199.80/255.255.255.240 +217.174.220.0/255.255.255.128 +217.175.243.128/255.255.255.192 +217.192.230.0/255.255.254.0 +217.193.131.232/255.255.255.248 +217.193.140.224/255.255.255.248 +217.193.145.120/255.255.255.248 +217.193.145.184/255.255.255.248 +217.194.79.32/255.255.255.224 +217.196.229.168/255.255.255.248 +217.196.229.184/255.255.255.248 +217.196.235.72/255.255.255.248 +217.196.238.208/255.255.255.240 +217.196.239.0/255.255.255.248 +217.196.239.80/255.255.255.248 +217.196.240.112/255.255.255.248 +217.197.166.80/255.255.255.248 +217.199.32.32/255.255.255.248 +217.199.145.40/255.255.255.248 +217.199.155.0/255.255.255.128 +217.199.167.16/255.255.255.240 +217.199.180.64/255.255.255.240 +217.199.180.224/255.255.255.224 +217.204.1.64/255.255.255.248 +217.204.1.96/255.255.255.248 +217.204.2.240/255.255.255.240 +217.204.3.0/255.255.255.240 +217.204.5.192/255.255.255.240 +217.204.69.208/255.255.255.240 +217.204.75.48/255.255.255.240 +217.204.75.96/255.255.255.240 +217.204.75.112/255.255.255.240 +217.204.88.160/255.255.255.240 +217.204.112.0/255.255.255.128 +217.204.114.248/255.255.255.248 +217.204.160.192/255.255.255.240 +217.204.165.232/255.255.255.248 +217.204.167.64/255.255.255.248 +217.204.171.224/255.255.255.240 +217.204.194.144/255.255.255.240 +217.204.199.144/255.255.255.240 +217.204.217.160/255.255.255.248 +217.204.242.32/255.255.255.240 +217.205.36.192/255.255.255.240 +217.205.45.48/255.255.255.240 +217.205.86.40/255.255.255.248 +217.205.87.144/255.255.255.240 +217.205.102.224/255.255.255.240 +217.205.104.240/255.255.255.248 +217.205.108.120/255.255.255.248 +217.205.109.48/255.255.255.240 +217.205.109.64/255.255.255.248 +217.205.146.88/255.255.255.248 +217.205.162.192/255.255.255.224 +217.206.32.160/255.255.255.240 +217.206.36.160/255.255.255.240 +217.206.38.192/255.255.255.248 +217.206.40.48/255.255.255.248 +217.206.43.112/255.255.255.240 +217.206.45.176/255.255.255.248 +217.206.47.112/255.255.255.240 +217.206.50.48/255.255.255.240 +217.206.86.208/255.255.255.240 +217.206.87.56/255.255.255.248 +217.206.98.160/255.255.255.248 +217.206.120.176/255.255.255.240 +217.206.142.192/255.255.255.240 +217.206.144.128/255.255.255.240 +217.206.160.48/255.255.255.240 +217.206.161.80/255.255.255.240 +217.206.162.224/255.255.255.224 +217.206.164.176/255.255.255.248 +217.206.166.160/255.255.255.224 +217.206.185.184/255.255.255.248 +217.206.194.24/255.255.255.248 +217.206.197.64/255.255.255.248 +217.206.199.24/255.255.255.248 +217.206.208.176/255.255.255.240 +217.206.221.208/255.255.255.240 +217.207.13.144/255.255.255.240 +217.207.17.240/255.255.255.240 +217.207.20.64/255.255.255.248 +217.207.33.0/255.255.255.240 +217.207.33.200/255.255.255.248 +217.207.34.192/255.255.255.240 +217.207.37.176/255.255.255.240 +217.207.80.112/255.255.255.248 +217.207.80.128/255.255.255.240 +217.207.82.160/255.255.255.248 +217.207.84.8/255.255.255.248 +217.207.84.192/255.255.255.240 +217.207.102.80/255.255.255.240 +217.207.114.176/255.255.255.240 +217.207.130.96/255.255.255.248 +217.207.144.176/255.255.255.240 +217.207.148.144/255.255.255.248 +217.207.161.176/255.255.255.240 +217.207.162.32/255.255.255.248 +217.207.164.128/255.255.255.240 +217.207.169.128/255.255.255.192 +217.207.176.144/255.255.255.240 +217.207.177.176/255.255.255.240 +217.207.188.136/255.255.255.248 +217.207.190.32/255.255.255.240 +217.207.190.80/255.255.255.240 +217.207.192.192/255.255.255.240 +217.207.198.168/255.255.255.248 +217.207.206.144/255.255.255.240 +217.207.210.144/255.255.255.240 +217.207.236.128/255.255.255.240 +217.207.237.232/255.255.255.248 +217.207.240.192/255.255.255.248 +217.207.241.152/255.255.255.248 +217.207.242.96/255.255.255.240 +217.207.242.216/255.255.255.232 +217.207.244.0/255.255.255.248 +217.207.246.96/255.255.255.248 +217.207.246.192/255.255.255.240 +217.207.247.232/255.255.255.248 +217.207.253.96/255.255.255.248 +217.220.5.224/255.255.255.224 +217.220.105.176/255.255.255.248 +217.220.106.200/255.255.255.248 +217.220.147.32/255.255.255.240 +217.220.152.144/255.255.255.216 +217.220.154.40/255.255.255.232 +217.220.240.240/255.255.255.248 +217.220.244.136/255.255.255.248 +217.221.36.128/255.255.255.248 +217.222.23.232/255.255.255.248 +217.222.63.64/255.255.255.240 +217.222.158.112/255.255.255.232 +217.222.159.96/255.255.255.248 +217.222.159.120/255.255.255.248 +217.222.195.40/255.255.255.248 +217.222.208.224/255.255.255.248 +217.223.33.56/255.255.255.248 +217.223.33.144/255.255.255.248 +217.223.42.224/255.255.255.248 +217.223.68.200/255.255.255.248 +217.223.72.48/255.255.255.248 +217.223.72.208/255.255.255.248 +217.223.90.0/255.255.255.248 +217.223.91.0/255.255.255.224 +217.223.158.120/255.255.255.248 +217.223.158.152/255.255.255.248 +217.223.171.128/255.255.255.248 +217.223.198.48/255.255.255.248 +217.223.201.56/255.255.255.248 +217.223.213.16/255.255.255.248 +217.223.227.96/255.255.255.240 +217.237.171.144/255.255.255.248 +217.237.177.64/255.255.255.248 +217.243.175.72/255.255.255.248 +218.1.118.168/255.255.255.248 +218.2.112.152/255.255.255.248 +218.3.20.80/255.255.255.240 +218.3.74.192/255.255.255.192 +218.3.78.224/255.255.255.240 +218.3.91.48/255.255.255.240 +218.3.95.32/255.255.255.240 +218.3.95.48/255.255.255.240 +218.3.95.128/255.255.255.240 +218.3.96.128/255.255.255.224 +218.3.114.96/255.255.255.224 +218.3.141.192/255.255.255.240 +218.4.90.240/255.255.255.248 +218.4.203.56/255.255.255.248 +218.4.204.0/255.255.255.224 +218.4.236.0/255.255.255.240 +218.5.83.160/255.255.255.240 +218.5.85.64/255.255.255.240 +218.5.98.120/255.255.255.248 +218.7.28.0/255.255.255.248 +218.7.75.0/255.255.255.0 +218.7.229.128/255.255.255.128 +218.10.230.0/255.255.255.192 +218.10.230.192/255.255.255.192 +218.10.239.0/255.255.255.0 +218.15.26.32/255.255.255.248 +218.15.95.96/255.255.255.224 +218.21.32.248/255.255.255.248 +218.26.225.160/255.255.255.248 +218.28.0.72/255.255.255.248 +218.28.0.208/255.255.255.240 +218.28.16.144/255.255.255.240 +218.28.22.48/255.255.255.240 +218.28.25.48/255.255.255.240 +218.28.43.16/255.255.255.240 +218.28.51.48/255.255.255.248 +218.28.138.32/255.255.255.240 +218.31.21.24/255.255.255.248 +218.31.35.120/255.255.255.248 +218.31.43.24/255.255.255.248 +218.31.43.40/255.255.255.248 +218.31.95.48/255.255.255.240 +218.31.124.224/255.255.255.248 +218.36.48.192/255.255.255.192 +218.36.98.0/255.255.255.192 +218.38.249.64/255.255.255.192 +218.42.144.0/255.255.240.0 +218.54.132.0/255.255.255.0 +218.55.21.0/255.255.255.192 +218.55.27.0/255.255.255.128 +218.56.158.192/255.255.255.224 +218.57.131.136/255.255.255.248 +218.57.141.0/255.255.255.248 +218.57.176.0/255.255.255.248 +218.57.236.40/255.255.255.240 +218.62.14.72/255.255.255.248 +218.63.194.64/255.255.255.192 +218.63.195.0/255.255.255.192 +218.63.195.128/255.255.255.192 +218.63.243.24/255.255.255.248 +218.67.78.80/255.255.255.240 +218.69.93.80/255.255.255.240 +218.75.11.160/255.255.255.248 +218.75.19.192/255.255.255.248 +218.75.24.192/255.255.255.248 +218.75.34.40/255.255.255.248 +218.75.51.40/255.255.255.248 +218.75.61.248/255.255.255.248 +218.75.70.184/255.255.255.248 +218.75.104.224/255.255.255.240 +218.78.208.0/255.255.255.128 +218.80.225.68/255.255.255.248 +218.85.129.200/255.255.255.248 +218.85.131.48/255.255.255.248 +218.86.63.56/255.255.255.248 +218.90.166.72/255.255.255.248 +218.90.213.136/255.255.255.248 +218.90.239.240/255.255.255.248 +218.91.99.120/255.255.255.248 +218.91.210.0/255.255.255.224 +218.92.9.0/255.255.255.192 +218.92.200.192/255.255.255.224 +218.93.11.224/255.255.255.248 +218.93.17.16/255.255.255.240 +218.94.31.104/255.255.255.248 +218.97.164.48/255.255.255.240 +218.97.180.224/255.255.255.224 +218.103.16.184/255.255.255.248 +218.103.30.56/255.255.255.248 +218.103.71.216/255.255.255.248 +218.103.74.96/255.255.255.224 +218.103.94.208/255.255.255.248 +218.108.16.176/255.255.255.248 +218.108.18.64/255.255.255.248 +218.108.18.80/255.255.255.240 +218.108.18.128/255.255.255.248 +218.108.18.192/255.255.255.248 +218.108.25.168/255.255.255.248 +218.108.37.16/255.255.255.240 +218.108.39.32/255.255.255.240 +218.108.39.64/255.255.255.240 +218.108.39.80/255.255.255.240 +218.108.88.104/255.255.255.248 +218.110.0.0/255.255.0.0 +218.185.85.0/255.255.255.0 +218.185.127.40/255.255.255.248 +218.192.8.0/255.255.252.0 +218.202.158.128/255.255.255.248 +218.216.64.0/255.255.240.0 +218.232.228.192/255.255.255.192 +218.244.40.96/255.255.255.224 +218.246.117.64/255.255.255.192 +219.76.202.208/255.255.255.248 +219.76.229.248/255.255.255.248 +219.76.231.208/255.255.255.248 +219.88.107.64/255.255.255.240 +219.97.233.176/255.255.255.248 +219.101.32.0/255.255.240.0 +219.101.51.128/255.255.255.192 +219.106.0.0/255.255.128.0 +219.106.224.0/255.255.224.0 +219.118.160.0/255.255.224.0 +219.129.141.200/255.255.255.248 +219.163.181.8/255.255.255.248 +219.253.144.0/255.255.255.0 +219.253.152.0/255.255.255.0 +219.253.154.128/255.255.255.128 +220.64.136.128/255.255.255.128 +220.65.237.0/255.255.255.128 +220.156.0.0/255.255.160.0 +221.117.39.160/255.255.255.248 +221.129.0.0/255.255.0.0 +222.88.0.0/255.254.0.0 +222.123.0.0/255.255.0.0 diff -r 000000000000 -r d39e1d0d75b6 depcomp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/depcomp Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,479 @@ +#! /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 diff -r 000000000000 -r d39e1d0d75b6 gnutella.spec --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gnutella.spec Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,44 @@ +%define RELEASE 1 + +Summary: Gnutella plugin for giFT +Name: gift-gnutella +Version: 0.0.11 +Release: 1 +Copyright: GPL +Group: Applications/Internet +URL: http://gift.sourceforge.net/ +Source0: %{name}-%{version}.tar.gz +Buildroot: %_tmppath/%{name}-%{version}-root +Prefix: %{_prefix} +Requires: libgift >= 0.11.4 , libgiftproto >= 0.11.4 + +%description +Use this package to connect to Gnutella networks using giFT + +%prep +%setup -q + +%build +%configure +%__make + +%install +%makeinstall + +%clean +make clean +[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf "$RPM_BUILD_ROOT" + +%files +%defattr(-,root,root) +%_libdir/giFT/* +%_datadir/giFT/* + +%changelog +* Sat Feb 14 2004 Craig Barnes +- use %configure macro which should work properly now +- use %makeinstall macro +- remove build root when finished + +* Sun Sep 07 2003 Franco Catrin L. +- updated to official package distribution diff -r 000000000000 -r d39e1d0d75b6 gnutella.spec.in --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gnutella.spec.in Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,44 @@ +%define RELEASE 1 + +Summary: Gnutella plugin for giFT +Name: @PACKAGE@ +Version: @VERSION@ +Release: 1 +Copyright: GPL +Group: Applications/Internet +URL: http://gift.sourceforge.net/ +Source0: %{name}-%{version}.tar.gz +Buildroot: %_tmppath/%{name}-%{version}-root +Prefix: %{_prefix} +Requires: libgift >= 0.11.4 , libgiftproto >= 0.11.4 + +%description +Use this package to connect to Gnutella networks using giFT + +%prep +%setup -q + +%build +%configure +%__make + +%install +%makeinstall + +%clean +make clean +[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf "$RPM_BUILD_ROOT" + +%files +%defattr(-,root,root) +%_libdir/giFT/* +%_datadir/giFT/* + +%changelog +* Sat Feb 14 2004 Craig Barnes +- use %configure macro which should work properly now +- use %makeinstall macro +- remove build root when finished + +* Sun Sep 07 2003 Franco Catrin L. +- updated to official package distribution diff -r 000000000000 -r d39e1d0d75b6 install-sh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/install-sh Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,294 @@ +#!/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 +} diff -r 000000000000 -r d39e1d0d75b6 ltmain.sh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ltmain.sh Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,6871 @@ +# 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, 2004, 2005 +# 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 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. + +basename="s,^.*/,,g" + +# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh +# is ksh but when the shell is invoked as "sh" and the current value of +# the _XPG environment variable is not equal to 1 (one), the special +# positional parameter $0, within a function call, is the name of the +# function. +progpath="$0" + +# The name of this program: +progname=`echo "$progpath" | $SED $basename` +modename="$progname" + +# Global variables: +EXIT_SUCCESS=0 +EXIT_FAILURE=1 + +PROGRAM=ltmain.sh +PACKAGE=libtool +VERSION="1.5.22 Debian 1.5.22-2" +TIMESTAMP=" (1.1220.2.365 2005/12/18 22:14:06)" + +# See if we are running on zsh, and set the options which allow our +# commands through without removal of \ escapes. +if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST +fi + +# 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 "$progpath" --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 $EXIT_FAILURE +fi + +# Global variables. +mode=$default_mode +nonopt= +prev= +prevopt= +run= +show="$echo" +show_help= +execute_dlfiles= +duplicate_deps=no +preserve_args= +lo2o="s/\\.lo\$/.${objext}/" +o2lo="s/\\.${objext}\$/.lo/" + +##################################### +# Shell function definitions: +# This seems to be the best place for them + +# func_mktempdir [string] +# Make a temporary directory that won't clash with other running +# libtool processes, and avoids race conditions if possible. If +# given, STRING is the basename for that directory. +func_mktempdir () +{ + my_template="${TMPDIR-/tmp}/${1-$progname}" + + if test "$run" = ":"; then + # Return a directory name, but don't create it in dry-run mode + my_tmpdir="${my_template}-$$" + else + + # If mktemp works, use that first and foremost + my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` + + if test ! -d "$my_tmpdir"; then + # Failing that, at least try and use $RANDOM to avoid a race + my_tmpdir="${my_template}-${RANDOM-0}$$" + + save_mktempdir_umask=`umask` + umask 0077 + $mkdir "$my_tmpdir" + umask $save_mktempdir_umask + fi + + # If we're not in dry-run mode, bomb out on failure + test -d "$my_tmpdir" || { + $echo "cannot create temporary directory \`$my_tmpdir'" 1>&2 + exit $EXIT_FAILURE + } + fi + + $echo "X$my_tmpdir" | $Xsed +} + + +# func_win32_libid arg +# return the library type of file 'arg' +# +# 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. +func_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 | \ + $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then + win32_nmres=`eval $NM -f posix -A $1 | \ + $SED -n -e '1,100{/ I /{s,.*,import,;p;q;};}'` + case $win32_nmres in + import*) win32_libid_type="x86 archive import";; + *) win32_libid_type="x86 archive static";; + esac + 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 +} + + +# func_infer_tag arg +# 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. +# arg is usually of the form 'gcc ...' +func_infer_tag () +{ + if test -n "$available_tags" && test -z "$tagname"; then + CC_quoted= + for arg in $CC; do + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + CC_quoted="$CC_quoted $arg" + done + case $@ 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` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) ;; + # 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$" < "$progpath" > /dev/null; then + # Evaluate the configuration. + eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" + CC_quoted= + for arg in $CC; do + # Double-quote args containing other shell metacharacters. + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + CC_quoted="$CC_quoted $arg" + done + case "$@ " in + " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) + # 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 $EXIT_FAILURE +# else +# $echo "$modename: using $tagname tagged configuration" + fi + ;; + esac + fi +} + + +# func_extract_an_archive dir oldlib +func_extract_an_archive () +{ + f_ex_an_ar_dir="$1"; shift + f_ex_an_ar_oldlib="$1" + + $show "(cd $f_ex_an_ar_dir && $AR x $f_ex_an_ar_oldlib)" + $run eval "(cd \$f_ex_an_ar_dir && $AR x \$f_ex_an_ar_oldlib)" || exit $? + if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then + : + else + $echo "$modename: ERROR: object name conflicts: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" 1>&2 + exit $EXIT_FAILURE + fi +} + +# func_extract_archives gentop oldlib ... +func_extract_archives () +{ + my_gentop="$1"; shift + my_oldlibs=${1+"$@"} + my_oldobjs="" + my_xlib="" + my_xabs="" + my_xdir="" + my_status="" + + $show "${rm}r $my_gentop" + $run ${rm}r "$my_gentop" + $show "$mkdir $my_gentop" + $run $mkdir "$my_gentop" + my_status=$? + if test "$my_status" -ne 0 && test ! -d "$my_gentop"; then + exit $my_status + fi + + for my_xlib in $my_oldlibs; do + # Extract the objects. + case $my_xlib in + [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; + *) my_xabs=`pwd`"/$my_xlib" ;; + esac + my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'` + my_xdir="$my_gentop/$my_xlib" + + $show "${rm}r $my_xdir" + $run ${rm}r "$my_xdir" + $show "$mkdir $my_xdir" + $run $mkdir "$my_xdir" + exit_status=$? + if test "$exit_status" -ne 0 && test ! -d "$my_xdir"; then + exit $exit_status + fi + case $host in + *-darwin*) + $show "Extracting $my_xabs" + # Do not bother doing anything if just a dry run + if test -z "$run"; then + darwin_orig_dir=`pwd` + cd $my_xdir || exit $? + darwin_archive=$my_xabs + darwin_curdir=`pwd` + darwin_base_archive=`$echo "X$darwin_archive" | $Xsed -e 's%^.*/%%'` + darwin_arches=`lipo -info "$darwin_archive" 2>/dev/null | $EGREP Architectures 2>/dev/null` + if test -n "$darwin_arches"; then + darwin_arches=`echo "$darwin_arches" | $SED -e 's/.*are://'` + darwin_arch= + $show "$darwin_base_archive has multiple architectures $darwin_arches" + for darwin_arch in $darwin_arches ; do + mkdir -p "unfat-$$/${darwin_base_archive}-${darwin_arch}" + lipo -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" + cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" + func_extract_an_archive "`pwd`" "${darwin_base_archive}" + cd "$darwin_curdir" + $rm "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" + done # $darwin_arches + ## Okay now we have a bunch of thin objects, gotta fatten them up :) + darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print| xargs basename | sort -u | $NL2SP` + darwin_file= + darwin_files= + for darwin_file in $darwin_filelist; do + darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP` + lipo -create -output "$darwin_file" $darwin_files + done # $darwin_filelist + ${rm}r unfat-$$ + cd "$darwin_orig_dir" + else + cd "$darwin_orig_dir" + func_extract_an_archive "$my_xdir" "$my_xabs" + fi # $darwin_arches + fi # $run + ;; + *) + func_extract_an_archive "$my_xdir" "$my_xabs" + ;; + esac + my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` + done + func_extract_archives_result="$my_oldobjs" +} +# End of Shell function definitions +##################################### + +# Darwin sucks +eval std_shrext=\"$shrext_cmds\" + +disable_libs=no + +# 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 $EXIT_FAILURE + ;; + 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$" < "$progpath" > /dev/null; then + taglist="$taglist $tagname" + # Evaluate the configuration. + eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $progpath`" + 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) 2005 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 $? + ;; + + --config) + ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $progpath + # 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" < "$progpath" + done + exit $? + ;; + + --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 $? + ;; + + --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 + preserve_args="$preserve_args --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 $EXIT_FAILURE + ;; + + *) + nonopt="$arg" + break + ;; + esac +done + +if test -n "$prevopt"; then + $echo "$modename: option \`$prevopt' requires an argument" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE +fi + +case $disable_libs in +no) + ;; +shared) + build_libtool_libs=no + build_old_libs=yes + ;; +static) + build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` + ;; +esac + +# 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 $EXIT_FAILURE + 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 $EXIT_FAILURE + 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, and some SunOS ksh mistreat backslash-escaping + # in scan sets (worked around with variable expansion), + # and furthermore cannot handle '|' '&' '(' ')' in scan sets + # at all, so we specify them 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 $EXIT_FAILURE + ;; + target) + $echo "$modename: you must specify a target with \`-o'" 1>&2 + exit $EXIT_FAILURE + ;; + *) + # 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 $EXIT_FAILURE + ;; + esac + + func_infer_tag $base_compile + + 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 + + qlibobj=`$echo "X$libobj" | $Xsed -e "$sed_quote_subst"` + case $qlibobj in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + qlibobj="\"$qlibobj\"" ;; + esac + test "X$libobj" != "X$qlibobj" \ + && $echo "X$libobj" | grep '[]~#^*{};<>?"'"'"' &()|`$[]' \ + && $echo "$modename: libobj name \`$libobj' may not contain shell special characters." + 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 $EXIT_FAILURE + 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 $EXIT_FAILURE" 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 $EXIT_FAILURE" 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 "$progpath" "$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 $EXIT_FAILURE + fi + $echo "$srcfile" > "$lockfile" + fi + + if test -n "$fix_srcfile_path"; then + eval srcfile=\"$fix_srcfile_path\" + fi + qsrcfile=`$echo "X$srcfile" | $Xsed -e "$sed_quote_subst"` + case $qsrcfile in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + qsrcfile="\"$qsrcfile\"" ;; + esac + + $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 $EXIT_FAILURE + 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 $EXIT_FAILURE + 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 <&2 + fi + if test -n "$link_static_flag"; then + dlopen_self=$dlopen_self_static + fi + prefer_static_libs=yes + else + if test -z "$pic_flag" && test -n "$link_static_flag"; then + dlopen_self=$dlopen_self_static + fi + prefer_static_libs=built + fi + build_libtool_libs=no + build_old_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 $EXIT_FAILURE + 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 $EXIT_FAILURE + 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 + else + # If the PIC object exists, use it instead. + # $xdir was prepended to $pic_object above. + non_pic_object="$pic_object" + non_pic_objects="$non_pic_objects $non_pic_object" + 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 $EXIT_FAILURE + 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 $EXIT_FAILURE + 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 $EXIT_FAILURE + ;; + 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 + ;; + shrext) + shrext_cmds="$arg" + prev= + continue + ;; + darwin_framework|darwin_framework_skip) + test "$prev" = "darwin_framework" && compiler_flags="$compiler_flags $arg" + compile_command="$compile_command $arg" + finalize_command="$finalize_command $arg" + prev= + 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 $EXIT_FAILURE + fi + if test "X$arg" = "X-export-symbols"; then + prev=expsyms + else + prev=expsyms_regex + fi + continue + ;; + + -framework|-arch|-isysroot) + case " $CC " in + *" ${arg} ${1} "* | *" ${arg} ${1} "*) + prev=darwin_framework_skip ;; + *) compiler_flags="$compiler_flags $arg" + prev=darwin_framework ;; + esac + compile_command="$compile_command $arg" + finalize_command="$finalize_command $arg" + 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 + absdir="$dir" + notinst_path="$notinst_path $dir" + 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*) + testbindir=`$echo "X$dir" | $Xsed -e 's*/lib$*/bin*'` + case :$dllsearchpath: in + *":$dir:"*) ;; + *) dllsearchpath="$dllsearchpath:$dir";; + esac + case :$dllsearchpath: in + *":$testbindir:"*) ;; + *) dllsearchpath="$dllsearchpath:$testbindir";; + esac + ;; + esac + continue + ;; + + -l*) + if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos*) + # These systems don't actually have a C or math library (as such) + continue + ;; + *-*-os2*) + # These systems don't actually have a C library (as such) + test "X$arg" = "X-lc" && continue + ;; + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) + # 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 + ;; + *-*-sco3.2v5* | *-*-sco5v6*) + # Causes problems with __ctype + test "X$arg" = "X-lc" && continue + ;; + *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) + # Compiler inserts libc in the correct place for threads to work + test "X$arg" = "X-lc" && continue + ;; + esac + elif test "X$arg" = "X-lc_r"; then + case $host in + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) + # Do not include libc_r directly, use -pthread flag. + continue + ;; + esac + fi + deplibs="$deplibs $arg" + continue + ;; + + # Tru64 UNIX uses -model [arg] to determine the layout of C++ + # classes, name mangling, and exception handling. + -model) + compile_command="$compile_command $arg" + compiler_flags="$compiler_flags $arg" + finalize_command="$finalize_command $arg" + prev=xcompiler + continue + ;; + + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe) + compiler_flags="$compiler_flags $arg" + compile_command="$compile_command $arg" + finalize_command="$finalize_command $arg" + continue + ;; + + -module) + module=yes + continue + ;; + + # -64, -mips[0-9] enable 64-bit mode on the SGI compiler + # -r[0-9][0-9]* specifies the processor on the SGI compiler + # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler + # +DA*, +DD* enable 64-bit mode on the HP compiler + # -q* pass through compiler args for the IBM compiler + # -m* pass through architecture-specific compiler args for GCC + # -m*, -t[45]*, -txscale* pass through architecture-specific + # compiler args for GCC + # -pg pass through profiling flag for GCC + # @file GCC response files + -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*|-pg| \ + -t[45]*|-txscale*|@*) + + # 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" + compiler_flags="$compiler_flags $arg" + 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 $EXIT_FAILURE + ;; + 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 $EXIT_FAILURE + 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 + else + # If the PIC object exists, use it instead. + # $xdir was prepended to $pic_object above. + non_pic_object="$pic_object" + non_pic_objects="$non_pic_objects $non_pic_object" + 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 $EXIT_FAILURE + 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 $EXIT_FAILURE + 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 + exit_status=$? + if test "$exit_status" -ne 0 && test ! -d "$output_objdir"; then + exit $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 $EXIT_FAILURE + ;; + *.$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 duplications 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 + 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 $EXIT_FAILURE + ;; + 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%" + test "X$link_all_deplibs" != Xno && libs="$libs $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 + compiler_flags="$compiler_flags $deplib" + fi + continue + ;; + -l*) + if test "$linkmode" != lib && test "$linkmode" != prog; then + $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2 + 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 $std_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" + else + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + fi + newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` + ;; + *) + $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) + valid_a_lib=no + case $deplibs_check_method in + match_pattern*) + set dummy $deplibs_check_method + match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` + if eval $echo \"$deplib\" 2>/dev/null \ + | $SED 10q \ + | $EGREP "$match_pattern_regex" > /dev/null; then + valid_a_lib=yes + fi + ;; + pass_all) + valid_a_lib=yes + ;; + esac + if test "$valid_a_lib" != yes; 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' or unhandled argument \`$deplib'" 1>&2 + exit $EXIT_FAILURE + 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 $EXIT_FAILURE + 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 + avoidtemprpath= + + + # 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 $EXIT_FAILURE + 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 $EXIT_FAILURE + 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 $EXIT_FAILURE + 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 $EXIT_FAILURE + 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 + test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes + else + if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then + dir="$ladir" + absdir="$abs_ladir" + # Remove this search path later + notinst_path="$notinst_path $abs_ladir" + else + dir="$ladir/$objdir" + absdir="$abs_ladir/$objdir" + # Remove this search path later + notinst_path="$notinst_path $abs_ladir" + fi + 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 $EXIT_FAILURE + 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" && test -z "$avoidtemprpath" ; then + # Make sure the rpath contains only unique directories. + case "$temp_rpath " in + *" $dir "*) ;; + *" $absdir "*) ;; + *) temp_rpath="$temp_rpath $absdir" ;; + 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 + use_static_libs=$prefer_static_libs + if test "$use_static_libs" = built && test "$installed" = yes ; then + use_static_libs=no + fi + if test -n "$library_names" && + { test "$use_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.0.[024]*) add_dir="-L$dir" ;; + *-*-sysv4*uw2*) add_dir="-L$dir" ;; + *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ + *-*-unixware7*) 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 | + $EGREP ": [^:]* 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 $EXIT_FAILURE + 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 + 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 $EXIT_FAILURE + 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 + *" $path "*) ;; + *) deplibs="$path $deplibs" ;; + esac + case " $deplibs " in + *" $depdepl "*) ;; + *) deplibs="$depdepl $deplibs" ;; + 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_cmds\" + 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 $EXIT_FAILURE + 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_cmds\" + 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 $EXIT_FAILURE + 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 $EXIT_FAILURE + 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" + ;; + *) + $echo "$modename: unknown library version type \`$version_type'" 1>&2 + $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 + exit $EXIT_FAILURE + ;; + 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]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; + *) + $echo "$modename: CURRENT \`$current' must be a nonnegative integer" 1>&2 + $echo "$modename: \`$vinfo' is not valid version information" 1>&2 + exit $EXIT_FAILURE + ;; + esac + + case $revision in + 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; + *) + $echo "$modename: REVISION \`$revision' must be a nonnegative integer" 1>&2 + $echo "$modename: \`$vinfo' is not valid version information" 1>&2 + exit $EXIT_FAILURE + ;; + esac + + case $age in + 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; + *) + $echo "$modename: AGE \`$age' must be a nonnegative integer" 1>&2 + $echo "$modename: \`$vinfo' is not valid version information" 1>&2 + exit $EXIT_FAILURE + ;; + 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 $EXIT_FAILURE + 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="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$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 $EXIT_FAILURE + ;; + 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 test "X$precious_files_regex" != "X"; then + if echo $p | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 + then + continue + fi + 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* | *-*-dragonfly*) + # Do not include libc due to us having libc/libc_r. + ;; + *-*-sco3.2v5* | *-*-sco5v6*) + # Causes problems with __ctype + ;; + *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) + # Compiler inserts libc in the correct place for threads to work + ;; + *) + # 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 + + + # move library search paths that coincide with paths to not yet + # installed libraries to the beginning of the library search list + new_libs= + for path in $notinst_path; do + case " $new_libs " in + *" -L$path/$objdir "*) ;; + *) + case " $deplibs " in + *" -L$path/$objdir "*) + new_libs="$new_libs -L$path/$objdir" ;; + esac + ;; + esac + done + for deplib in $deplibs; do + case $deplib in + -L*) + case " $new_libs " in + *" $deplib "*) ;; + *) new_libs="$new_libs $deplib" ;; + esac + ;; + *) new_libs="$new_libs $deplib" ;; + esac + done + deplibs="$new_libs" + + + # 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_cmds\" + 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" + linknames= + 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=: + # Break out early, otherwise skipped_export may be + # set to false by a later but shorter cmd. + break + 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" + generated="$generated $gentop" + + func_extract_archives $gentop $convenience + libobjs="$libobjs $func_extract_archives_result" + 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" : ".*" 2>/dev/null` && + 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 + output_la=`$echo "X$output" | $Xsed -e "$basename"` + + # 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/$output_la-${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" : ".*" 2>/dev/null` && + 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/$output_la-${k}.$objext + k=`expr $k + 1` + output=$output_objdir/$output_la-${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 reloadable object files + # after they are used. + i=0 + while test "$i" -lt "$k" + do + i=`expr $i + 1` + delfiles="$delfiles $output_objdir/$output_la-${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" + $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" || { + lt_exit=$? + + # Restore the uninstalled library and exit + if test "$mode" = relink; then + $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)' + fi + + exit $lt_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 $? + + if test -n "$convenience"; then + if test -z "$whole_archive_flag_spec"; then + $show "${rm}r $gentop" + $run ${rm}r "$gentop" + fi + fi + + exit $EXIT_SUCCESS + 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 $EXIT_FAILURE + 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" + generated="$generated $gentop" + + func_extract_archives $gentop $convenience + reload_conv_objs="$reload_objs $func_extract_archives_result" + 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 $EXIT_SUCCESS + 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 $EXIT_SUCCESS + 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 $EXIT_SUCCESS + ;; + + 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 + + + # move library search paths that coincide with paths to not yet + # installed libraries to the beginning of the library search list + new_libs= + for path in $notinst_path; do + case " $new_libs " in + *" -L$path/$objdir "*) ;; + *) + case " $compile_deplibs " in + *" -L$path/$objdir "*) + new_libs="$new_libs -L$path/$objdir" ;; + esac + ;; + esac + done + for deplib in $compile_deplibs; do + case $deplib in + -L*) + case " $new_libs " in + *" $deplib "*) ;; + *) new_libs="$new_libs $deplib" ;; + esac + ;; + *) new_libs="$new_libs $deplib" ;; + esac + done + compile_deplibs="$new_libs" + + + 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*) + testbindir=`$echo "X$libdir" | $Xsed -e 's*/lib$*/bin*'` + case :$dllsearchpath: in + *":$libdir:"*) ;; + *) dllsearchpath="$dllsearchpath:$libdir";; + esac + case :$dllsearchpath: in + *":$testbindir:"*) ;; + *) dllsearchpath="$dllsearchpath:$testbindir";; + 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/$outputname.exp" + $run $rm $export_symbols + $run eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' + case $host in + *cygwin* | *mingw* ) + $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' + $run eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' + ;; + esac + else + $run eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' + $run eval 'grep -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' + $run eval 'mv "$nlist"T "$nlist"' + case $host in + *cygwin* | *mingw* ) + $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' + $run eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' + ;; + esac + 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. */ +" + + case $host in + *cygwin* | *mingw* ) + $echo >> "$output_objdir/$dlsyms" "\ +/* DATA imports from DLLs on WIN32 can't be const, because + runtime relocations are performed -- see ld's documentation + on pseudo-relocs */ +struct { +" + ;; + * ) + $echo >> "$output_objdir/$dlsyms" "\ +const struct { +" + ;; + esac + + + $echo >> "$output_objdir/$dlsyms" "\ + 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 $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")" + $run eval '(cd $output_objdir && $LTCC $LTCFLAGS -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. + case $host in + *cygwin* | *mingw* ) + if test -f "$output_objdir/${outputname}.def" ; then + compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%"` + finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%"` + else + 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}%"` + fi + ;; + * ) + 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}%"` + ;; + esac + ;; + *) + $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2 + exit $EXIT_FAILURE + ;; + 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" + exit_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 $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 $EXIT_SUCCESS + 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 $progpath --fallback-echo"; then + case $progpath in + [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";; + *) qecho="$SHELL `pwd`/$progpath --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* ) + output_name=`basename $output` + output_path=`dirname $output` + cwrappersource="$output_path/$objdir/lt-$output_name.c" + cwrapper="$output_path/$output_name.exe" + $rm $cwrappersource $cwrapper + trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 + + cat > $cwrappersource <> $cwrappersource<<"EOF" +#include +#include +#include +#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 '/' +# define PATH_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 +# ifndef PATH_SEPARATOR_2 +# define PATH_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 */ + +#ifndef PATH_SEPARATOR_2 +# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) +#else /* PATH_SEPARATOR_2 */ +# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) +#endif /* PATH_SEPARATOR_2 */ + +#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) +#define XFREE(stale) do { \ + if (stale) { free ((void *) stale); stale = 0; } \ +} while (0) + +/* -DDEBUG is fairly common in CFLAGS. */ +#undef DEBUG +#if defined DEBUGWRAPPER +# define DEBUG(format, ...) fprintf(stderr, format, __VA_ARGS__) +#else +# define DEBUG(format, ...) +#endif + +const char *program_name = NULL; + +void * xmalloc (size_t num); +char * xstrdup (const char *string); +const char * base_name (const char *name); +char * find_executable(const char *wrapper); +int check_executable(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 (base_name (argv[0])); + DEBUG("(main) argv[0] : %s\n",argv[0]); + DEBUG("(main) program_name : %s\n",program_name); + newargz = XMALLOC(char *, argc+2); +EOF + + cat >> $cwrappersource <> $cwrappersource <<"EOF" + newargz[1] = find_executable(argv[0]); + if (newargz[1] == NULL) + lt_fatal("Couldn't find %s", argv[0]); + DEBUG("(main) found exe at : %s\n",newargz[1]); + /* 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; + + for (i=0; i> $cwrappersource <> $cwrappersource <> $cwrappersource <<"EOF" + return 127; +} + +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 +; +} + +const char * +base_name (const char *name) +{ + const char *base; + +#if defined (HAVE_DOS_BASED_FILE_SYSTEM) + /* Skip over the disk name in MSDOS pathnames. */ + if (isalpha ((unsigned char)name[0]) && name[1] == ':') + name += 2; +#endif + + for (base = name; *name; name++) + if (IS_DIR_SEPARATOR (*name)) + base = name + 1; + return base; +} + +int +check_executable(const char * path) +{ + struct stat st; + + DEBUG("(check_executable) : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!"); + if ((!path) || (!*path)) + return 0; + + if ((stat (path, &st) >= 0) && + ( + /* MinGW & native WIN32 do not support S_IXOTH or S_IXGRP */ +#if defined (S_IXOTH) + ((st.st_mode & S_IXOTH) == S_IXOTH) || +#endif +#if defined (S_IXGRP) + ((st.st_mode & S_IXGRP) == S_IXGRP) || +#endif + ((st.st_mode & S_IXUSR) == S_IXUSR)) + ) + return 1; + else + return 0; +} + +/* Searches for the full path of the wrapper. Returns + newly allocated full path name if found, NULL otherwise */ +char * +find_executable (const char* wrapper) +{ + int has_slash = 0; + const char* p; + const char* p_next; + /* static buffer for getcwd */ + char tmp[LT_PATHMAX + 1]; + int tmp_len; + char* concat_name; + + DEBUG("(find_executable) : %s\n", wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!"); + + if ((wrapper == NULL) || (*wrapper == '\0')) + return NULL; + + /* Absolute path? */ +#if defined (HAVE_DOS_BASED_FILE_SYSTEM) + if (isalpha ((unsigned char)wrapper[0]) && wrapper[1] == ':') + { + concat_name = xstrdup (wrapper); + if (check_executable(concat_name)) + return concat_name; + XFREE(concat_name); + } + else + { +#endif + if (IS_DIR_SEPARATOR (wrapper[0])) + { + concat_name = xstrdup (wrapper); + if (check_executable(concat_name)) + return concat_name; + XFREE(concat_name); + } +#if defined (HAVE_DOS_BASED_FILE_SYSTEM) + } +#endif + + for (p = wrapper; *p; p++) + if (*p == '/') + { + has_slash = 1; + break; + } + if (!has_slash) + { + /* no slashes; search PATH */ + const char* path = getenv ("PATH"); + if (path != NULL) + { + for (p = path; *p; p = p_next) + { + const char* q; + size_t p_len; + for (q = p; *q; q++) + if (IS_PATH_SEPARATOR(*q)) + break; + p_len = q - p; + p_next = (*q == '\0' ? q : q + 1); + if (p_len == 0) + { + /* empty path: current directory */ + if (getcwd (tmp, LT_PATHMAX) == NULL) + lt_fatal ("getcwd failed"); + tmp_len = strlen(tmp); + concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1); + memcpy (concat_name, tmp, tmp_len); + concat_name[tmp_len] = '/'; + strcpy (concat_name + tmp_len + 1, wrapper); + } + else + { + concat_name = XMALLOC(char, p_len + 1 + strlen(wrapper) + 1); + memcpy (concat_name, p, p_len); + concat_name[p_len] = '/'; + strcpy (concat_name + p_len + 1, wrapper); + } + if (check_executable(concat_name)) + return concat_name; + XFREE(concat_name); + } + } + /* not found in PATH; assume curdir */ + } + /* Relative path | not found in path: prepend cwd */ + if (getcwd (tmp, LT_PATHMAX) == NULL) + lt_fatal ("getcwd failed"); + tmp_len = strlen(tmp); + concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1); + memcpy (concat_name, tmp, tmp_len); + concat_name[tmp_len] = '/'; + strcpy (concat_name + tmp_len + 1, wrapper); + + if (check_executable(concat_name)) + return concat_name; + XFREE(concat_name); + return NULL; +} + +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 $LTCFLAGS -s -o $cwrapper $cwrappersource + ;; + esac + $rm $output + trap "$rm $output; exit $EXIT_FAILURE" 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. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +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 $EXIT_FAILURE + 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 $EXIT_FAILURE + 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 $EXIT_FAILURE + fi +fi\ +" + chmod +x $output + fi + exit $EXIT_SUCCESS + ;; + 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" + generated="$generated $gentop" + + func_extract_archives $gentop $addlibs + oldobjs="$oldobjs $func_extract_archives_result" + 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 + # POSIX demands no paths to be encoded in archives. We have + # to avoid creating archives with duplicate basenames if we + # might have to extract them afterwards, e.g., when creating a + # static archive out of a convenience library, or when linking + # the entirety of a libtool archive into another (currently + # not supported by libtool). + if (for obj in $oldobjs + do + $echo "X$obj" | $Xsed -e 's%^.*/%%' + done | sort | sort -uc >/dev/null 2>&1); then + : + else + $echo "copying selected object files to avoid basename conflicts..." + + if test -z "$gentop"; then + gentop="$output_objdir/${outputname}x" + generated="$generated $gentop" + + $show "${rm}r $gentop" + $run ${rm}r "$gentop" + $show "$mkdir $gentop" + $run $mkdir "$gentop" + exit_status=$? + if test "$exit_status" -ne 0 && test ! -d "$gentop"; then + exit $exit_status + fi + fi + + save_oldobjs=$oldobjs + oldobjs= + counter=1 + for obj in $save_oldobjs + do + objbase=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` + case " $oldobjs " in + " ") oldobjs=$obj ;; + *[\ /]"$objbase "*) + while :; do + # Make sure we don't pick an alternate name that also + # overlaps. + newobj=lt$counter-$objbase + counter=`expr $counter + 1` + case " $oldobjs " in + *[\ /]"$newobj "*) ;; + *) if test ! -f "$gentop/$newobj"; then break; fi ;; + esac + done + $show "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" + $run ln "$obj" "$gentop/$newobj" || + $run cp "$obj" "$gentop/$newobj" + oldobjs="$oldobjs $gentop/$newobj" + ;; + *) oldobjs="$oldobjs $obj" ;; + esac + done + fi + + 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 + + # 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" : ".*" 2>/dev/null` && + 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 $progpath $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 $EXIT_FAILURE + 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 $EXIT_FAILURE + 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 $EXIT_FAILURE + 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 $EXIT_SUCCESS + ;; + + # 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" | 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) + case " $install_prog " in + *[\\\ /]cp\ *) ;; + *) prev=$arg ;; + esac + ;; + -g | -m | -o) prev=$arg ;; + -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 $EXIT_FAILURE + fi + + if test -n "$prev"; then + $echo "$modename: the \`$prev' option requires an argument" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + 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 $EXIT_FAILURE + 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 $EXIT_FAILURE + 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 $EXIT_FAILURE + ;; + 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 $EXIT_FAILURE + 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 $EXIT_FAILURE + 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 $EXIT_FAILURE + 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. + # Try `ln -sf' first, because the `ln' binary might depend on + # the symlink we replace! Solaris /bin/ln does not understand -f, + # so we also need to try rm && ln -s. + for linkname + do + if test "$linkname" != "$realname"; then + $show "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })" + $run eval "(cd $destdir && { $LN_S -f $realname $linkname || { $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" || { + lt_exit=$? + + # Restore the uninstalled library and exit + if test "$mode" = relink; then + $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)' + fi + + exit $lt_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 $EXIT_FAILURE + ;; + 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 $EXIT_SUCCESS + ;; + + *) + # 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= + + # Note that it is not necessary on cygwin/mingw to append a dot to + # foo even if both foo and FILE.exe exist: automatic-append-.exe + # behavior happens only for exec(3), not for open(2)! Also, sourcing + # `FILE.' does not work on cygwin managed mounts. + # + # If there is no directory component, then add one. + case $wrapper in + */* | *\\*) . ${wrapper} ;; + *) . ./${wrapper} ;; + 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 $EXIT_FAILURE + 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= + # Note that it is not necessary on cygwin/mingw to append a dot to + # foo even if both foo and FILE.exe exist: automatic-append-.exe + # behavior happens only for exec(3), not for open(2)! Also, sourcing + # `FILE.' does not work on cygwin managed mounts. + # + # If there is no directory component, then add one. + case $wrapper in + */* | *\\*) . ${wrapper} ;; + *) . ./${wrapper} ;; + esac + + outputname= + if test "$fast_install" = no && test -n "$relink_command"; then + if test "$finalize" = yes && test -z "$run"; then + tmpdir=`func_mktempdir` + 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 anyway + 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 $progpath $preserve_args --finish$current_libdirs' + else + exit $EXIT_SUCCESS + 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 $EXIT_SUCCESS + + $echo "X----------------------------------------------------------------------" | $Xsed + $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 "X----------------------------------------------------------------------" | $Xsed + exit $EXIT_SUCCESS + ;; + + # 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 $EXIT_FAILURE + 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 $EXIT_FAILURE + 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 $EXIT_FAILURE + 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 $EXIT_FAILURE + 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 $EXIT_SUCCESS + 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 $EXIT_FAILURE + 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" + + case "$mode" in + clean) + case " $library_names " in + # " " in the beginning catches empty $dlname + *" $dlname "*) ;; + *) rmfiles="$rmfiles $objdir/$dlname" ;; + esac + test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" + ;; + uninstall) + 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. + ;; + esac + 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 $EXIT_FAILURE + ;; + esac + + if test -z "$exec_cmd"; then + $echo "$modename: invalid operation mode \`$mode'" 1>&2 + $echo "$generic_help" 1>&2 + exit $EXIT_FAILURE + fi +fi # test -z "$show_help" + +if test -n "$exec_cmd"; then + eval exec $exec_cmd + exit $EXIT_FAILURE +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 $EXIT_SUCCESS + ;; + +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 $EXIT_FAILURE + ;; +esac + +$echo +$echo "Try \`$modename --help' for more information about other modes." + +exit $? + +# 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 +disable_libs=shared +# ### END LIBTOOL TAG CONFIG: disable-shared + +# ### BEGIN LIBTOOL TAG CONFIG: disable-static +disable_libs=static +# ### END LIBTOOL TAG CONFIG: disable-static + +# Local Variables: +# mode:shell-script +# sh-indentation:2 +# End: diff -r 000000000000 -r d39e1d0d75b6 m4/Makefile.am --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/m4/Makefile.am Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,9 @@ +# $Id: Makefile.am,v 1.5 2004/01/01 01:56:35 hipnod Exp $ +############################################################################### + +EXTRA_DIST = \ + gift-pkgconfig.m4 \ + gift-prefix.m4 \ + libxml.m4 \ + openbsd.m4 \ + zlib.m4 diff -r 000000000000 -r d39e1d0d75b6 m4/Makefile.in --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/m4/Makefile.in Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,302 @@ +# Makefile.in generated by automake 1.7.9 from Makefile.am. +# @configure_input@ + +# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 +# 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@ + +# $Id: Makefile.am,v 1.5 2004/01/01 01:56:35 hipnod Exp $ +############################################################################### + +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 = : +host_triplet = @host@ +ACLOCAL = @ACLOCAL@ +AMDEP_FALSE = @AMDEP_FALSE@ +AMDEP_TRUE = @AMDEP_TRUE@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +GNUTELLA_CFLAGS = @GNUTELLA_CFLAGS@ +GNUTELLA_LIBS = @GNUTELLA_LIBS@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIBXML2_CFLAGS = @LIBXML2_CFLAGS@ +LIBXML2_LIBS = @LIBXML2_LIBS@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ +MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ +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@ +PKG_CONFIG = @PKG_CONFIG@ +PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ +RANLIB = @RANLIB@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +USE_ZLIB = @USE_ZLIB@ +VERSION = @VERSION@ +XML2_CONFIG = @XML2_CONFIG@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +ac_ct_RANLIB = @ac_ct_RANLIB@ +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@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +datadir = @datadir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +oldincludedir = @oldincludedir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ + +EXTRA_DIST = \ + gift-pkgconfig.m4 \ + gift-prefix.m4 \ + libxml.m4 \ + openbsd.m4 \ + zlib.m4 + +subdir = m4 +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +DIST_SOURCES = +DIST_COMMON = $(srcdir)/Makefile.in Makefile.am +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4) + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu m4/Makefile +Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in $(top_builddir)/config.status + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe) + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +distclean-libtool: + -rm -f libtool +uninstall-info-am: +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) + +top_distdir = .. +distdir = $(top_distdir)/$(PACKAGE)-$(VERSION) + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ + list='$(DISTFILES)'; for file in $$list; do \ + case $$file in \ + $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ + $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ + esac; \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test "$$dir" != "$$file" && test "$$dir" != "."; then \ + dir="/$$dir"; \ + $(mkinstalldirs) "$(distdir)$$dir"; \ + else \ + dir=''; \ + fi; \ + if test -d $$d/$$file; then \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile + +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-libtool + +dvi: dvi-am + +dvi-am: + +info: info-am + +info-am: + +install-data-am: + +install-exec-am: + +install-info: install-info-am + +install-man: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-info-am + +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + distclean distclean-generic distclean-libtool distdir dvi \ + dvi-am info info-am install install-am install-data \ + install-data-am install-exec install-exec-am install-info \ + install-info-am install-man install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \ + uninstall-info-am + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff -r 000000000000 -r d39e1d0d75b6 m4/gift-pkgconfig.m4 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/m4/gift-pkgconfig.m4 Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,25 @@ +############################################################################### +## $Id: gift-pkgconfig.m4,v 1.4 2003/09/04 06:56:24 hipnod Exp $ +############################################################################### + +AC_DEFUN([GIFT_PLUGIN_PKGCONFIG], + [AC_PATH_PROG(PKG_CONFIG, pkg-config) + + if test x$prefix != xNONE; then + PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$prefix/lib/pkgconfig" + fi + + PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig" + export PKG_CONFIG_PATH + + PKG_CHECK_MODULES([$1], libgift >= $2 libgift < $3) + + # fudge libgiftproto in there which doesnt have any pkg-config entry + AS_VAR_SET($1_LIBS, "AS_VAR_GET($1_LIBS) -lgiftproto") + + # hack to set libgift_version + libgift_version=`pkg-config libgift --modversion` + + AC_SUBST($1_CFLAGS) + AC_SUBST($1_LIBS) + ]) diff -r 000000000000 -r d39e1d0d75b6 m4/gift-prefix.m4 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/m4/gift-prefix.m4 Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,25 @@ +############################################################################### +## $Id: gift-prefix.m4,v 1.2 2004/01/04 07:35:13 hipnod Exp $ +############################################################################### + +AC_DEFUN([GIFT_PLUGIN_CHECK_PREFIX],[ + libgift_prefix=`pkg-config --variable=prefix libgift` + + gift_plugin_prefix=$prefix + if test x"$prefix" = xNONE; then + gift_plugin_prefix=/usr/local + fi + + if test x"$libgift_prefix" != x"$gift_plugin_prefix"; then + AC_MSG_WARN([ + You are trying to install in $gift_plugin_prefix, but I only + detected a giFT installation in $libgift_prefix. + You may be installing in the wrong place. + + You should probably supply --prefix=$libgift_prefix + to configure. Or, if you have a giFT installation in + $gift_plugin_prefix, you could add ${gift_plugin_prefix}/lib/pkgconfig + to the PKG_CONFIG_PATH environment variable, so I can detect it. +]) + fi +]) diff -r 000000000000 -r d39e1d0d75b6 m4/libxml.m4 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/m4/libxml.m4 Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,31 @@ +############################################################################### +## $Id: libxml.m4,v 1.1 2003/09/17 23:25:51 hipnod Exp $ +############################################################################### + +AC_DEFUN([GIFT_GNUTELLA_CHECK_LIBXML],[ + # + # Check on the user's PATH if no path was specified in OPT_LIBXML, + # when the user has passed --with-libxml without a directory, + # or check the directory if one was supplied. + # + if test x"$OPT_LIBXML" = xyes; then + AC_PATH_PROG(XML2_CONFIG, xml2-config, [no]) + else + XMLPATH="$OPT_LIBXML/bin" + AC_PATH_PROG(XML2_CONFIG, xml2-config, [no], [$XMLPATH]) + fi + + if test x"$XML2_CONFIG" != xno; then + LIBXML2_CFLAGS=`$XML2_CONFIG --cflags` + LIBXML2_LIBS=`$XML2_CONFIG --libs` + + AC_SUBST(LIBXML2_CFLAGS) + AC_SUBST(LIBXML2_LIBS) + AC_DEFINE(USE_LIBXML2) + else + AC_MSG_ERROR([ +Couldn't run ${OPT_LIBXML}/bin/xml2-config + +]) + fi +]) diff -r 000000000000 -r d39e1d0d75b6 m4/openbsd.m4 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/m4/openbsd.m4 Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,18 @@ +############################################################################### +## $Id: openbsd.m4,v 1.1 2003/07/30 08:05:44 hipnod Exp $ +############################################################################### + +dnl +dnl OPENBSD_LIBTOOL_WORKAROUND +dnl +dnl Work-around a problem caused by the -avoid-version libtool option. Can +dnl anyone come up with a better way? +dnl + +AC_DEFUN([OPENBSD_LIBTOOL_WORKAROUND], + [case "${host_os}" in + openbsd*) + sed 's/^need_version=no$/need_version=yes/' < libtool > libtool.tmp && mv -f libtool.tmp libtool + ;; + esac + ]) diff -r 000000000000 -r d39e1d0d75b6 m4/zlib.m4 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/m4/zlib.m4 Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,64 @@ +############################################################################### +## $Id: zlib.m4,v 1.1 2003/09/17 22:26:07 hipnod Exp $ +############################################################################### + +dnl +dnl Check for zlib in some bizarre locations... +dnl +AC_DEFUN([GIFT_PLUGIN_CHECK_ZLIB], +[ + # set the minimum ZLIB_VER we're willing to link against... + ZLIB_VER=1.1.4 + + # for some reason Darwin has a 1.1.3 version with the 1.1.4 security fix + # applied backwards... + case "${host}" in + *-*-darwin* ) + ZLIB_VER=1.1.3 + ;; + esac + + if test x"$OPT_ZLIB" = xno; then + zlib_ok=no + else + ZLIB_DIRS="$OPT_ZLIB /usr /usr/local /sw" + for ZLIB_DIR in $ZLIB_DIRS; + do + LIBS_SAVE="$LIBS" + CPPFLAGS_SAVE="$CPPFLAGS" + LIBS="$LIBS -L${ZLIB_DIR}/lib" + CPPFLAGS="$CPPFLAGS -I${ZLIB_DIR}/include" + AC_CACHE_CHECK( + [for zlib version ${ZLIB_VER}+ in ${ZLIB_DIR}], + zlib_ok, + AC_TRY_RUN( + [#include + #include + void main() { + exit(strcmp(ZLIB_VERSION, "${ZLIB_VER}") < 0); + } + ], + [zlib_ok=yes], + [zlib_ok=no], + [zlib_ok=yes])) + + if test "$zlib_ok" != "no"; then + AC_CHECK_FUNC(gzread, , AC_CHECK_LIB(z, gzread)) + AC_DEFINE(USE_ZLIB) + AC_SUBST(USE_ZLIB) + break + fi + LIBS="$LIBS_SAVE" + CPPFLAGS="$CPPFLAGS_SAVE" + done + + if test "$zlib_ok" = "no"; then + AC_MSG_ERROR([ +NOTE: The zlib compression library version ${ZLIB_VER} or greater was not found + on your system. + + If zlib ${ZLIB_VER}+ is not installed, install it. + ]) + fi + fi +]) diff -r 000000000000 -r d39e1d0d75b6 missing --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/missing Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,336 @@ +#! /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 diff -r 000000000000 -r d39e1d0d75b6 mkinstalldirs --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mkinstalldirs Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,111 @@ +#! /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 diff -r 000000000000 -r d39e1d0d75b6 src/Makefile.am --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/Makefile.am Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,68 @@ +# $Id: Makefile.am,v 1.19 2004/03/26 11:44:12 hipnod Exp $ +############################################################################### + +AM_CFLAGS = \ + $(LIBXML2_CFLAGS) \ + $(GNUTELLA_CFLAGS) + +INCLUDES = \ + -I$(top_srcdir) + +SUBDIRS = \ + encoding \ + io \ + message \ + transfer + +EXTRA_DIST = \ + Makefile.msvc + +plugindir = $(libdir)/giFT + +plugin_LTLIBRARIES = libGnutella.la + +libGnutella_la_SOURCES = \ + dns.c dns.h \ + file_cache.c file_cache.h \ + gt_accept.c gt_accept.h \ + gt_ban.c gt_ban.h \ + gt_bind.c gt_bind.h \ + gt_conf.c gt_conf.h \ + gt_connect.c gt_connect.h \ + gt_gnutella.c gt_gnutella.h \ + gt_guid.c gt_guid.h \ + gt_http_client.c gt_http_client.h \ + gt_http_server.c gt_http_server.h \ + gt_netorg.c gt_netorg.h \ + gt_node_cache.c gt_node_cache.h \ + gt_node.c gt_node.h \ + gt_node_list.c gt_node_list.h \ + gt_packet.c gt_packet.h \ + gt_query_route.c gt_query_route.h \ + gt_search.c gt_search.h \ + gt_search_exec.c gt_search_exec.h \ + gt_share.c gt_share.h \ + gt_share_file.c gt_share_file.h \ + gt_share_state.c gt_share_state.h \ + gt_stats.c gt_stats.h \ + gt_urn.c gt_urn.h \ + gt_utils.c gt_utils.h \ + gt_version.c gt_version.h \ + gt_web_cache.c gt_web_cache.h \ + gt_xfer.c gt_xfer.h \ + gt_xfer_obj.c gt_xfer_obj.h \ + http_request.c http_request.h \ + sha1.c sha1.h \ + trie.c trie.h \ + xml.c xml.h + +libGnutella_la_LIBADD = \ + $(top_builddir)/src/encoding/libgt_encoding.la \ + $(top_builddir)/src/io/libgt_io.la \ + $(top_builddir)/src/message/libgt_message.la \ + $(top_builddir)/src/transfer/libgt_transfer.la \ + $(LIBXML2_LIBS) \ + $(GNUTELLA_LIBS) + +libGnutella_la_LDFLAGS = \ + $(PLUGIN_LDFLAGS) diff -r 000000000000 -r d39e1d0d75b6 src/Makefile.in --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/Makefile.in Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,679 @@ +# Makefile.in generated by automake 1.7.9 from Makefile.am. +# @configure_input@ + +# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 +# 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@ + +# $Id: Makefile.am,v 1.19 2004/03/26 11:44:12 hipnod Exp $ +############################################################################### + +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 = : +host_triplet = @host@ +ACLOCAL = @ACLOCAL@ +AMDEP_FALSE = @AMDEP_FALSE@ +AMDEP_TRUE = @AMDEP_TRUE@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +GNUTELLA_CFLAGS = @GNUTELLA_CFLAGS@ +GNUTELLA_LIBS = @GNUTELLA_LIBS@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIBXML2_CFLAGS = @LIBXML2_CFLAGS@ +LIBXML2_LIBS = @LIBXML2_LIBS@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ +MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ +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@ +PKG_CONFIG = @PKG_CONFIG@ +PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ +RANLIB = @RANLIB@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +USE_ZLIB = @USE_ZLIB@ +VERSION = @VERSION@ +XML2_CONFIG = @XML2_CONFIG@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +ac_ct_RANLIB = @ac_ct_RANLIB@ +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@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +datadir = @datadir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +oldincludedir = @oldincludedir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ + +AM_CFLAGS = \ + $(LIBXML2_CFLAGS) \ + $(GNUTELLA_CFLAGS) + + +INCLUDES = \ + -I$(top_srcdir) + + +SUBDIRS = \ + encoding \ + io \ + message \ + transfer + + +EXTRA_DIST = \ + Makefile.msvc + + +plugindir = $(libdir)/giFT + +plugin_LTLIBRARIES = libGnutella.la + +libGnutella_la_SOURCES = \ + dns.c dns.h \ + file_cache.c file_cache.h \ + gt_accept.c gt_accept.h \ + gt_ban.c gt_ban.h \ + gt_bind.c gt_bind.h \ + gt_conf.c gt_conf.h \ + gt_connect.c gt_connect.h \ + gt_gnutella.c gt_gnutella.h \ + gt_guid.c gt_guid.h \ + gt_http_client.c gt_http_client.h \ + gt_http_server.c gt_http_server.h \ + gt_netorg.c gt_netorg.h \ + gt_node_cache.c gt_node_cache.h \ + gt_node.c gt_node.h \ + gt_node_list.c gt_node_list.h \ + gt_packet.c gt_packet.h \ + gt_query_route.c gt_query_route.h \ + gt_search.c gt_search.h \ + gt_search_exec.c gt_search_exec.h \ + gt_share.c gt_share.h \ + gt_share_file.c gt_share_file.h \ + gt_share_state.c gt_share_state.h \ + gt_stats.c gt_stats.h \ + gt_urn.c gt_urn.h \ + gt_utils.c gt_utils.h \ + gt_version.c gt_version.h \ + gt_web_cache.c gt_web_cache.h \ + gt_xfer.c gt_xfer.h \ + gt_xfer_obj.c gt_xfer_obj.h \ + http_request.c http_request.h \ + sha1.c sha1.h \ + trie.c trie.h \ + xml.c xml.h + + +libGnutella_la_LIBADD = \ + $(top_builddir)/src/encoding/libgt_encoding.la \ + $(top_builddir)/src/io/libgt_io.la \ + $(top_builddir)/src/message/libgt_message.la \ + $(top_builddir)/src/transfer/libgt_transfer.la \ + $(LIBXML2_LIBS) \ + $(GNUTELLA_LIBS) + + +libGnutella_la_LDFLAGS = \ + $(PLUGIN_LDFLAGS) + +subdir = src +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +LTLIBRARIES = $(plugin_LTLIBRARIES) + +libGnutella_la_DEPENDENCIES = \ + $(top_builddir)/src/encoding/libgt_encoding.la \ + $(top_builddir)/src/io/libgt_io.la \ + $(top_builddir)/src/message/libgt_message.la \ + $(top_builddir)/src/transfer/libgt_transfer.la +am_libGnutella_la_OBJECTS = dns.lo file_cache.lo gt_accept.lo gt_ban.lo \ + gt_bind.lo gt_conf.lo gt_connect.lo gt_gnutella.lo gt_guid.lo \ + gt_http_client.lo gt_http_server.lo gt_netorg.lo \ + gt_node_cache.lo gt_node.lo gt_node_list.lo gt_packet.lo \ + gt_query_route.lo gt_search.lo gt_search_exec.lo gt_share.lo \ + gt_share_file.lo gt_share_state.lo gt_stats.lo gt_urn.lo \ + gt_utils.lo gt_version.lo gt_web_cache.lo gt_xfer.lo \ + gt_xfer_obj.lo http_request.lo sha1.lo trie.lo xml.lo +libGnutella_la_OBJECTS = $(am_libGnutella_la_OBJECTS) + +DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/dns.Plo ./$(DEPDIR)/file_cache.Plo \ +@AMDEP_TRUE@ ./$(DEPDIR)/gt_accept.Plo ./$(DEPDIR)/gt_ban.Plo \ +@AMDEP_TRUE@ ./$(DEPDIR)/gt_bind.Plo ./$(DEPDIR)/gt_conf.Plo \ +@AMDEP_TRUE@ ./$(DEPDIR)/gt_connect.Plo \ +@AMDEP_TRUE@ ./$(DEPDIR)/gt_gnutella.Plo ./$(DEPDIR)/gt_guid.Plo \ +@AMDEP_TRUE@ ./$(DEPDIR)/gt_http_client.Plo \ +@AMDEP_TRUE@ ./$(DEPDIR)/gt_http_server.Plo \ +@AMDEP_TRUE@ ./$(DEPDIR)/gt_netorg.Plo ./$(DEPDIR)/gt_node.Plo \ +@AMDEP_TRUE@ ./$(DEPDIR)/gt_node_cache.Plo \ +@AMDEP_TRUE@ ./$(DEPDIR)/gt_node_list.Plo \ +@AMDEP_TRUE@ ./$(DEPDIR)/gt_packet.Plo \ +@AMDEP_TRUE@ ./$(DEPDIR)/gt_query_route.Plo \ +@AMDEP_TRUE@ ./$(DEPDIR)/gt_search.Plo \ +@AMDEP_TRUE@ ./$(DEPDIR)/gt_search_exec.Plo \ +@AMDEP_TRUE@ ./$(DEPDIR)/gt_share.Plo \ +@AMDEP_TRUE@ ./$(DEPDIR)/gt_share_file.Plo \ +@AMDEP_TRUE@ ./$(DEPDIR)/gt_share_state.Plo \ +@AMDEP_TRUE@ ./$(DEPDIR)/gt_stats.Plo ./$(DEPDIR)/gt_urn.Plo \ +@AMDEP_TRUE@ ./$(DEPDIR)/gt_utils.Plo ./$(DEPDIR)/gt_version.Plo \ +@AMDEP_TRUE@ ./$(DEPDIR)/gt_web_cache.Plo \ +@AMDEP_TRUE@ ./$(DEPDIR)/gt_xfer.Plo ./$(DEPDIR)/gt_xfer_obj.Plo \ +@AMDEP_TRUE@ ./$(DEPDIR)/http_request.Plo ./$(DEPDIR)/sha1.Plo \ +@AMDEP_TRUE@ ./$(DEPDIR)/trie.Plo ./$(DEPDIR)/xml.Plo +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) \ + $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +DIST_SOURCES = $(libGnutella_la_SOURCES) + +RECURSIVE_TARGETS = info-recursive dvi-recursive pdf-recursive \ + ps-recursive install-info-recursive uninstall-info-recursive \ + all-recursive install-data-recursive install-exec-recursive \ + installdirs-recursive install-recursive uninstall-recursive \ + check-recursive installcheck-recursive +DIST_COMMON = $(srcdir)/Makefile.in Makefile.am +DIST_SUBDIRS = $(SUBDIRS) +SOURCES = $(libGnutella_la_SOURCES) + +all: all-recursive + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4) + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu src/Makefile +Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in $(top_builddir)/config.status + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe) +pluginLTLIBRARIES_INSTALL = $(INSTALL) +install-pluginLTLIBRARIES: $(plugin_LTLIBRARIES) + @$(NORMAL_INSTALL) + $(mkinstalldirs) $(DESTDIR)$(plugindir) + @list='$(plugin_LTLIBRARIES)'; for p in $$list; do \ + if test -f $$p; then \ + f="`echo $$p | sed -e 's|^.*/||'`"; \ + echo " $(LIBTOOL) --mode=install $(pluginLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(plugindir)/$$f"; \ + $(LIBTOOL) --mode=install $(pluginLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(plugindir)/$$f; \ + else :; fi; \ + done + +uninstall-pluginLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(plugin_LTLIBRARIES)'; for p in $$list; do \ + p="`echo $$p | sed -e 's|^.*/||'`"; \ + echo " $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(plugindir)/$$p"; \ + $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(plugindir)/$$p; \ + done + +clean-pluginLTLIBRARIES: + -test -z "$(plugin_LTLIBRARIES)" || rm -f $(plugin_LTLIBRARIES) + @list='$(plugin_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" = "$$p" && dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libGnutella.la: $(libGnutella_la_OBJECTS) $(libGnutella_la_DEPENDENCIES) + $(LINK) -rpath $(plugindir) $(libGnutella_la_LDFLAGS) $(libGnutella_la_OBJECTS) $(libGnutella_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) core *.core + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dns.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/file_cache.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gt_accept.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gt_ban.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gt_bind.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gt_conf.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gt_connect.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gt_gnutella.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gt_guid.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gt_http_client.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gt_http_server.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gt_netorg.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gt_node.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gt_node_cache.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gt_node_list.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gt_packet.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gt_query_route.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gt_search.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gt_search_exec.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gt_share.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gt_share_file.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gt_share_state.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gt_stats.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gt_urn.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gt_utils.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gt_version.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gt_web_cache.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gt_xfer.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gt_xfer_obj.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/http_request.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sha1.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/trie.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xml.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \ +@am__fastdepCC_TRUE@ -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \ +@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ +@am__fastdepCC_TRUE@ fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$< + +.c.obj: +@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \ +@am__fastdepCC_TRUE@ -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \ +@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ +@am__fastdepCC_TRUE@ fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi` + +.c.lo: +@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \ +@am__fastdepCC_TRUE@ -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; \ +@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ +@am__fastdepCC_TRUE@ fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Plo' tmpdepfile='$(DEPDIR)/$*.TPlo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +distclean-libtool: + -rm -f libtool +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): + @set fnord $$MAKEFLAGS; amf=$$2; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +mostlyclean-recursive clean-recursive distclean-recursive \ +maintainer-clean-recursive: + @set fnord $$MAKEFLAGS; amf=$$2; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ + done; \ + rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done + +ETAGS = etags +ETAGSFLAGS = + +CTAGS = ctags +CTAGSFLAGS = + +tags: TAGS + +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-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + if (etags --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + else \ + include_option=--include; \ + 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) $(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 "$(ETAGS_ARGS)$$tags$$unique" \ + || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique + +ctags: CTAGS +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) + +top_distdir = .. +distdir = $(top_distdir)/$(PACKAGE)-$(VERSION) + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ + list='$(DISTFILES)'; for file in $$list; do \ + case $$file in \ + $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ + $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ + esac; \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test "$$dir" != "$$file" && test "$$dir" != "."; then \ + dir="/$$dir"; \ + $(mkinstalldirs) "$(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='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -d $(distdir)/$$subdir \ + || mkdir $(distdir)/$$subdir \ + || exit 1; \ + (cd $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$(top_distdir)" \ + distdir=../$(distdir)/$$subdir \ + distdir) \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-recursive +all-am: Makefile $(LTLIBRARIES) +installdirs: installdirs-recursive +installdirs-am: + $(mkinstalldirs) $(DESTDIR)$(plugindir) + +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: + -rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-recursive + +clean-am: clean-generic clean-libtool clean-pluginLTLIBRARIES \ + mostlyclean-am + +distclean: distclean-recursive + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-libtool distclean-tags + +dvi: dvi-recursive + +dvi-am: + +info: info-recursive + +info-am: + +install-data-am: install-pluginLTLIBRARIES + +install-exec-am: + +install-info: install-info-recursive + +install-man: + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: uninstall-info-am uninstall-pluginLTLIBRARIES + +uninstall-info: uninstall-info-recursive + +.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am clean \ + clean-generic clean-libtool clean-pluginLTLIBRARIES \ + clean-recursive ctags ctags-recursive distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-recursive distclean-tags distdir dvi dvi-am \ + dvi-recursive info info-am info-recursive install install-am \ + install-data install-data-am install-data-recursive \ + install-exec install-exec-am install-exec-recursive \ + install-info install-info-am install-info-recursive install-man \ + install-pluginLTLIBRARIES install-recursive install-strip \ + installcheck installcheck-am installdirs installdirs-am \ + installdirs-recursive maintainer-clean maintainer-clean-generic \ + maintainer-clean-recursive mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool mostlyclean-recursive \ + pdf pdf-am pdf-recursive ps ps-am ps-recursive tags \ + tags-recursive uninstall uninstall-am uninstall-info-am \ + uninstall-info-recursive uninstall-pluginLTLIBRARIES \ + uninstall-recursive + +# 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: diff -r 000000000000 -r d39e1d0d75b6 src/Makefile.msvc --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/Makefile.msvc Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,115 @@ +# $Id: Makefile.msvc,v 1.18 2004/03/27 00:36:20 mkern Exp $ + +!include ../Make.msvc + +INCLUDES = $(INCLUDES) -I. -Iio + +!if defined(dynamic) || defined(DYNAMIC) + +LIBS = $(LIBS) $(LIBGIFT_LIB) $(LIBGIFTPROTO_LIB) $(GIFT_LIB) +TARGET = $(GNUTELLA_DLL) + +!else # !(defined(dynamic) || defined(DYNAMIC)) + +LIBS = $(LIBS) $(LIBGIFT_STATIC) $(LIBGIFTPROTO_STATIC) $(GIFT_LIB) +TARGET = $(GNUTELLA_STATIC) + +!endif # defined(dynamic) || defined(DYNAMIC) + + +OBJECTS = \ + dns$(O) \ + file_cache$(O) \ + gt_accept$(O) \ + gt_ban$(O) \ + gt_bind$(O) \ + gt_conf$(O) \ + gt_connect$(O) \ + gt_gnutella$(O) \ + gt_guid$(O) \ + gt_http_client$(O) \ + gt_http_server$(O) \ + gt_netorg$(O) \ + gt_node$(O) \ + gt_node_cache$(O) \ + gt_node_list$(O) \ + gt_packet$(O) \ + gt_query_route$(O) \ + gt_search$(O) \ + gt_search_exec$(O) \ + gt_share$(O) \ + gt_share_file$(O) \ + gt_share_state$(O) \ + gt_stats$(O) \ + gt_urn$(O) \ + gt_utils$(O) \ + gt_version$(O) \ + gt_web_cache$(O) \ + gt_xfer$(O) \ + gt_xfer_obj$(O) \ + http_request$(O) \ + sha1$(O) \ + trie$(O) \ + xml$(O) \ + encoding\base32$(O) \ + encoding\url$(O) \ + io\io_buf$(O) \ + io\rx_inflate$(O) \ + io\rx_layer$(O) \ + io\rx_link$(O) \ + io\rx_packet$(O) \ + io\rx_stack$(O) \ + io\tx_deflate$(O) \ + io\tx_layer$(O) \ + io\tx_link$(O) \ + io\tx_packet$(O) \ + io\tx_stack$(O) \ + message\bye$(O) \ + message\gt_message$(O) \ + message\ping$(O) \ + message\ping_reply$(O) \ + message\push$(O) \ + message\query$(O) \ + message\query_reply$(O) \ + message\query_route$(O) \ + message\vendor$(O) \ + transfer\download$(O) \ + transfer\push_proxy$(O) \ + transfer\source$(O) + + +all : $(TARGET) + + +clean : + @-del /Q /F *$(O) + @-del /Q /F $(GNUTELLA_LIB) + @-del /Q /F $(GNUTELLA_DLL) + @-del /Q /F $(GNUTELLA_STATIC) + @-del /Q /F *.exp + @-del /Q /F *.idb + @-del /Q /F *.ilk + @-del /Q /F *.pch + @-del /Q /F *.pdb + @-del /Q /F *.plg + @-del /Q /F io\*$(O) + @-del /Q /F transfer\*$(O) + @-del /Q /F message\*$(O) + @-del /Q /F encoding\*$(O) + + +!if defined(dynamic) || defined(DYNAMIC) + +$(TARGET) : $(OBJECTS) + $(LD) $(LDFLAGS) -dll -out:$(TARGET) $(LIBS) $(OBJECTS) + +!else # !(defined(dynamic) || defined(DYNAMIC)) + +$(TARGET) : $(OBJECTS) + $(LT) -nologo -out:$(TARGET) $(OBJECTS) + +!endif # defined(dynamic) || defined(DYNAMIC) + + +.c$(O): + $(CC) $(CFLAGS) $(DEFS) $(INCLUDES) -Fo$@ -c $< diff -r 000000000000 -r d39e1d0d75b6 src/dns.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/dns.c Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,57 @@ +/* + * $Id: dns.c,v 1.2 2003/12/26 12:02:20 mkern Exp $ + * + * Copyright (C) 2003 giFT project (gift.sourceforge.net) + * + * 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. + */ + +#include "gt_gnutella.h" +#include "dns.h" + +/*****************************************************************************/ + +struct hostent *gt_dns_lookup (const char *name) +{ + return gethostbyname (name); +} + +int gt_dns_get_errno (void) +{ +#ifdef HAVE_HSTRERROR /* assume h_errno present if hstrerror() is */ + return h_errno; +#else +#ifdef WIN32 + return WSAGetLastError (); +#endif /* WIN32 */ + return 0; +#endif +} + +void gt_dns_set_errno (int error_code) +{ +#ifdef HAVE_HSTRERROR + h_errno = 0; +#else +#ifdef WIN32 + WSASetLastError (error_code); +#endif /* WIN32 */ +#endif +} + +const char *gt_dns_strerror (int error_code) +{ +#ifdef HAVE_HSTRERROR + return hstrerror (error_code); +#else + return "Host name lookup failure"; +#endif +} diff -r 000000000000 -r d39e1d0d75b6 src/dns.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/dns.h Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,39 @@ +/* + * $Id: dns.h,v 1.1 2003/12/22 01:57:51 hipnod Exp $ + * + * Copyright (C) 2003 giFT project (gift.sourceforge.net) + * + * 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. + */ + +#ifndef GIFT_GT_DNS_H_ +#define GIFT_GT_DNS_H_ + +/*****************************************************************************/ + +/* + * This depends on the right header file being included before this file. + */ +#ifndef NO_ADDRESS +#define NO_ADDRESS NO_DATA +#endif + +/*****************************************************************************/ + +struct hostent *gt_dns_lookup (const char *name); + +int gt_dns_get_errno (void); +void gt_dns_set_errno (int error_code); +const char *gt_dns_strerror (int error_code); + +/*****************************************************************************/ + +#endif /* GIFT_GT_DNS_H_ */ diff -r 000000000000 -r d39e1d0d75b6 src/encoding/Makefile.am --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/encoding/Makefile.am Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,14 @@ +# $Id: Makefile.am,v 1.2 2004/03/24 06:34:36 hipnod Exp $ + +AM_CFLAGS = \ + $(GNUTELLA_CFLAGS) + +INCLUDES = \ + -I$(top_srcdir)/src + +noinst_LTLIBRARIES = \ + libgt_encoding.la + +libgt_encoding_la_SOURCES = \ + base32.c base32.h \ + url.c url.h diff -r 000000000000 -r d39e1d0d75b6 src/encoding/Makefile.in --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/encoding/Makefile.in Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,438 @@ +# Makefile.in generated by automake 1.7.9 from Makefile.am. +# @configure_input@ + +# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 +# 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@ + +# $Id: Makefile.am,v 1.2 2004/03/24 06:34:36 hipnod Exp $ + +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 = : +host_triplet = @host@ +ACLOCAL = @ACLOCAL@ +AMDEP_FALSE = @AMDEP_FALSE@ +AMDEP_TRUE = @AMDEP_TRUE@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +GNUTELLA_CFLAGS = @GNUTELLA_CFLAGS@ +GNUTELLA_LIBS = @GNUTELLA_LIBS@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIBXML2_CFLAGS = @LIBXML2_CFLAGS@ +LIBXML2_LIBS = @LIBXML2_LIBS@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ +MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ +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@ +PKG_CONFIG = @PKG_CONFIG@ +PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ +RANLIB = @RANLIB@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +USE_ZLIB = @USE_ZLIB@ +VERSION = @VERSION@ +XML2_CONFIG = @XML2_CONFIG@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +ac_ct_RANLIB = @ac_ct_RANLIB@ +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@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +datadir = @datadir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +oldincludedir = @oldincludedir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ + +AM_CFLAGS = \ + $(GNUTELLA_CFLAGS) + + +INCLUDES = \ + -I$(top_srcdir)/src + + +noinst_LTLIBRARIES = \ + libgt_encoding.la + + +libgt_encoding_la_SOURCES = \ + base32.c base32.h \ + url.c url.h + +subdir = src/encoding +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) + +libgt_encoding_la_LDFLAGS = +libgt_encoding_la_LIBADD = +am_libgt_encoding_la_OBJECTS = base32.lo url.lo +libgt_encoding_la_OBJECTS = $(am_libgt_encoding_la_OBJECTS) + +DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/base32.Plo ./$(DEPDIR)/url.Plo +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) \ + $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +DIST_SOURCES = $(libgt_encoding_la_SOURCES) +DIST_COMMON = $(srcdir)/Makefile.in Makefile.am +SOURCES = $(libgt_encoding_la_SOURCES) + +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4) + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu src/encoding/Makefile +Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in $(top_builddir)/config.status + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe) + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" = "$$p" && dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libgt_encoding.la: $(libgt_encoding_la_OBJECTS) $(libgt_encoding_la_DEPENDENCIES) + $(LINK) $(libgt_encoding_la_LDFLAGS) $(libgt_encoding_la_OBJECTS) $(libgt_encoding_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) core *.core + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/base32.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/url.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \ +@am__fastdepCC_TRUE@ -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \ +@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ +@am__fastdepCC_TRUE@ fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$< + +.c.obj: +@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \ +@am__fastdepCC_TRUE@ -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \ +@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ +@am__fastdepCC_TRUE@ fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi` + +.c.lo: +@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \ +@am__fastdepCC_TRUE@ -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; \ +@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ +@am__fastdepCC_TRUE@ fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Plo' tmpdepfile='$(DEPDIR)/$*.TPlo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +distclean-libtool: + -rm -f libtool +uninstall-info-am: + +ETAGS = etags +ETAGSFLAGS = + +CTAGS = ctags +CTAGSFLAGS = + +tags: TAGS + +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: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(ETAGS_ARGS)$$tags$$unique" \ + || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique + +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) + +top_distdir = ../.. +distdir = $(top_distdir)/$(PACKAGE)-$(VERSION) + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ + list='$(DISTFILES)'; for file in $$list; do \ + case $$file in \ + $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ + $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ + esac; \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test "$$dir" != "$$file" && test "$$dir" != "."; then \ + dir="/$$dir"; \ + $(mkinstalldirs) "$(distdir)$$dir"; \ + else \ + dir=''; \ + fi; \ + if test -d $$d/$$file; then \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) + +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-libtool distclean-tags + +dvi: dvi-am + +dvi-am: + +info: info-am + +info-am: + +install-data-am: + +install-exec-am: + +install-info: install-info-am + +install-man: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-info-am + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLTLIBRARIES ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am info info-am install \ + install-am install-data install-data-am install-exec \ + install-exec-am install-info install-info-am install-man \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool pdf \ + pdf-am ps ps-am tags uninstall uninstall-am uninstall-info-am + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff -r 000000000000 -r d39e1d0d75b6 src/encoding/base32.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/encoding/base32.c Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,167 @@ +/* + * $Id: base32.c,v 1.2 2004/03/27 00:34:25 mkern Exp $ + * + * Copyright (C) 2003-2004 giFT project (gift.sourceforge.net) + * + * 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. + */ + +#include "gt_gnutella.h" +#include "encoding/base32.h" + +/*****************************************************************************/ + +/* base32 alphabet */ +static const char *ALPHA = "ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"; + +static uint8_t base32_bits[256] = { 0 }; + +/*****************************************************************************/ + +/* convert 5 bytes to 8 characters in base 32 */ +static void bin_to_base32 (const uint8_t *in, char *out) +{ + out[0] = ALPHA[(in[0] ) >> 3]; + out[1] = ALPHA[(in[0] & 0x07) << 2 | (in[1] & 0xc0) >> 6]; + out[2] = ALPHA[(in[1] & 0x3e) >> 1]; + out[3] = ALPHA[(in[1] & 0x01) << 4 | (in[2] & 0xf0) >> 4]; + out[4] = ALPHA[(in[2] & 0x0f) << 1 | (in[3] & 0x80) >> 7]; + out[5] = ALPHA[(in[3] & 0x7c) >> 2]; + out[6] = ALPHA[(in[3] & 0x03) << 3 | (in[4] & 0xe0) >> 5]; + out[7] = ALPHA[(in[4] & 0x1f)]; +} + +/* convert 8 characters in base 32 to 5 bytes */ +static void base32_to_bin (const char *base32, uint8_t *out) +{ + const unsigned char *in = base32; + const uint8_t *bits = base32_bits; + + out[0] = ((bits[in[0]] ) << 3) | (bits[in[1]] & 0x1C) >> 2; + out[1] = ((bits[in[1]] & 0x03) << 6) | (bits[in[2]] ) << 1 + | (bits[in[3]] & 0x10) >> 4; + out[2] = ((bits[in[3]] & 0x0F) << 4) | (bits[in[4]] & 0x1E) >> 1; + out[3] = ((bits[in[4]] & 0x01) << 7) | (bits[in[5]] ) << 2 + | (bits[in[6]] & 0x18) >> 3; + out[4] = ((bits[in[6]] & 0x07) << 5) | (bits[in[7]]); +} + +static void init_base32_bits (void) +{ + int i; + char *pos; + + /* set the each char's corresponding bit value in a lookup table */ + for (i = 0; i < sizeof(base32_bits); i++) + { + if ((pos = strchr (ALPHA, toupper (i)))) + base32_bits[i] = pos - ALPHA; + } +} + +/*****************************************************************************/ + +BOOL gt_base32_valid (const char *base32, size_t len) +{ + while (len > 0) + { + unsigned char c = toupper (*base32); + + if (!((c >= 'A' && c <= 'Z') || (c >= '2' && c <= '7'))) + break; + + base32++; + len--; + } + + return (len > 0 ? FALSE : TRUE); +} + +void gt_base32_encode (const uint8_t *in, size_t in_len, + char *out, size_t out_len) +{ + assert (in_len == 20); + assert (out_len == 32); + + bin_to_base32 (in, out); + bin_to_base32 (in + 5, out + 8); + bin_to_base32 (in + 10, out + 16); + bin_to_base32 (in + 15, out + 24); +} + +void gt_base32_decode (const char *in, size_t in_len, + uint8_t *out, size_t out_len) +{ + /* initialize lookup table */ + if (base32_bits['b'] == 0) + init_base32_bits (); + + assert (in_len == 32); + assert (out_len == 20); + + base32_to_bin (in , out ); + base32_to_bin (in + 8, out + 5); + base32_to_bin (in + 16, out + 10); + base32_to_bin (in + 24, out + 15); +} + +/*****************************************************************************/ + +#if 0 +static void test_str (const char *test) +{ + unsigned char bin[20]; + char hash[33]; + + hash[32] = 0; + + gt_base32_decode (test, strlen (test), bin, sizeof(bin)); + gt_base32_encode (bin, sizeof(bin), hash, sizeof(hash) - 1); + + if (!gt_base32_valid (hash, 32)) + abort (); + + if (strcmp (hash, test) != 0) + { + printf ("\ntest=%s(%d)\nhash=%s(%d)\n", test, + strlen (test), hash, strlen (hash)); + fflush (stdout); + } +} + +int main (int argc, char **argv) +{ + int i, j; + char str[33]; + int len = strlen (ALPHA); + + str[sizeof (str) - 1] = 0; + + test_str (ALPHA); + + for (i = 1; i <= 100000; i++) + { + for (j = 0; j < 32; j++) + str[j] = ALPHA[rand () % len]; + + if (!gt_base32_valid (str, 32)) + abort (); + + printf ("%i\r", i); + fflush (stdout); + test_str (str); + usleep (1); + } + + printf ("\n"); + return 0; +} +#endif diff -r 000000000000 -r d39e1d0d75b6 src/encoding/base32.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/encoding/base32.h Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,32 @@ +/* + * $Id: base32.h,v 1.1 2004/03/05 17:47:29 hipnod Exp $ + * + * Copyright (C) 2003-2004 giFT project (gift.sourceforge.net) + * + * 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. + */ + +#ifndef GIFT_GT_BASE32_H_ +#define GIFT_GT_BASE32_H_ + +/*****************************************************************************/ + +BOOL gt_base32_valid (const char *base32, size_t len); + +void gt_base32_encode (const uint8_t *in, size_t in_len, + char *out, size_t out_len); + +void gt_base32_decode (const char *in, size_t in_len, + uint8_t *out, size_t out_len); + +/*****************************************************************************/ + +#endif /* GIFT_GT_BASE32_H_ */ diff -r 000000000000 -r d39e1d0d75b6 src/encoding/url.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/encoding/url.c Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,169 @@ +/* + * $Id: url.c,v 1.1 2004/03/24 06:34:36 hipnod Exp $ + * + * Copyright (C) 2001-2003 giFT project (gift.sourceforge.net) + * + * 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. + */ + +#include "gt_gnutella.h" +#include "encoding/url.h" + +#include + +/*****************************************************************************/ +/* url decode/encode helpers */ + +static int oct_value_from_hex (char hex_char) +{ + if (!isxdigit (hex_char)) + return 0; + + if (hex_char >= '0' && hex_char <= '9') + return (hex_char - '0'); + + hex_char = toupper (hex_char); + + return ((hex_char - 'A') + 10); +} + +char *gt_url_decode (const char *encoded) +{ + char *decoded, *ptr; + + if (!encoded) + return NULL; + + /* make sure we are using our own memory here ... */ + ptr = strdup (encoded); + + /* save the head */ + decoded = ptr; + + /* convert '+' -> ' ' and %2x -> char value */ + while (*ptr) + { + switch (*ptr) + { + case '+': + *ptr = ' '; + break; + case '%': + if (isxdigit (ptr[1]) && isxdigit (ptr[2])) + { + int oct_val; + + oct_val = oct_value_from_hex (ptr[1]) * 16; + oct_val += oct_value_from_hex (ptr[2]); + + *ptr = (char) oct_val; + + string_move (ptr + 1, ptr + 3); + } + break; + default: + break; + } + + ptr++; + } + + return decoded; +} + +static char *gt_url_encode_char (char *stream, unsigned char c) +{ + const char hex_alpha[] = "0123456789abcdef"; + + *stream++ = '%'; + + *stream++ = hex_alpha[(c & 0xf0) >> 4]; + *stream++ = hex_alpha[(c & 0x0f)]; + + return stream; +} + +/* + * This is a bit overzealous about what to encode..hopefully that's ok. This + * escapes path components ('/'). + */ +static BOOL is_safe_char (unsigned char c) +{ + if (c >= 'A' && c <= 'Z') + return TRUE; + + if (c >= 'a' && c <= 'z') + return TRUE; + + if (c >= '0' && c <= '9') + return TRUE; + + switch (c) + { + case '-': + case '.': + case '_': + return TRUE; + default: + return FALSE; + } + + return FALSE; +} + +char *gt_url_encode (const char *decoded) +{ + char *encoded, *ptr; + unsigned char chr; + + if (!decoded) + return NULL; + + /* allocate a large enough buffer for all cases */ + encoded = ptr = malloc ((strlen (decoded) * 3) + 1); + + while ((chr = *decoded) != 0) + { + if (is_safe_char (chr)) + *ptr++ = chr; + else + ptr = gt_url_encode_char (ptr, chr); + + decoded++; + } + + *ptr = 0; + + return encoded; +} + +/*****************************************************************************/ + +#if 0 +int main (int argc, char **argv) +{ + int i; + + for (i = 1; i < argc; i++) + { + char *enc, *dec; + + enc = gt_url_encode (argv[i]); + dec = gt_url_decode (enc); + + printf ("%s\n%s\n%s\n", argv[i], enc, dec); + + assert (strcmp (argv[i], dec) == 0); + } + + return 0; +} +#endif diff -r 000000000000 -r d39e1d0d75b6 src/encoding/url.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/encoding/url.h Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,27 @@ +/* + * $Id: url.h,v 1.1 2004/03/24 06:34:36 hipnod Exp $ + * + * Copyright (C) 2001-2003 giFT project (gift.sourceforge.net) + * + * 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. + */ + +#ifndef GIFT_GT_URL_H_ +#define GIFT_GT_URL_H_ + +/*****************************************************************************/ + +char *gt_url_encode (const char *url); +char *gt_url_decode (const char *url); + +/*****************************************************************************/ + +#endif /* GIFT_GT_URL_H_ */ diff -r 000000000000 -r d39e1d0d75b6 src/file_cache.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/file_cache.c Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,202 @@ +/* + * $Id: file_cache.c,v 1.15 2004/03/24 06:28:16 hipnod Exp $ + * + * Copyright (C) 2001-2003 giFT project (gift.sourceforge.net) + * + * 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. + */ + +#include "gt_gnutella.h" + +#include "file_cache.h" + +/*****************************************************************************/ + +FileCache *file_cache_new (const char *file) +{ + FileCache *file_cache; + + if (!(file_cache = malloc (sizeof (FileCache)))) + return NULL; + + memset (file_cache, 0, sizeof (FileCache)); + + file_cache->file = STRDUP (file); + + if (!file_cache_load (file_cache)) + GT->DBGFN (GT, "failed loading %s", file); + + return file_cache; +} + +void file_cache_free (FileCache *cache) +{ + if (!cache) + return; + + dataset_clear (cache->d); + + free (cache->file); + free (cache); +} + +/*****************************************************************************/ + +int file_cache_load (FileCache *cache) +{ + struct stat st; + time_t mtime; + char *line = NULL; + FILE *f; + int nlines; + + if (!cache) + return FALSE; + + if (!(f = fopen (cache->file, "r"))) + { + GT->DBGFN (GT, "couldnt open %s for reading: %s", cache->file, + GIFT_STRERROR ()); + return FALSE; + } + + mtime = 0; + + if (file_stat (cache->file, &st)) + mtime = st.st_mtime; + + dataset_clear (cache->d); + + cache->d = dataset_new (DATASET_HASH); + cache->mtime = mtime; + + nlines = 0; + + while (file_read_line (f, &line)) + { + char *key; + char *value = line; + + key = string_sep (&value, " "); + + string_trim (key); + string_trim (value); + + if (!key) + continue; + + if (!value) + value = ""; + + dataset_insertstr (&cache->d, key, value); + + nlines++; + } + + if (fclose (f) != 0) + return FALSE; + + GT->DBGFN (GT, "loaded filecache for %s. nlines = %i", cache->file, nlines); + return TRUE; +} + +static void sync_one (ds_data_t *key, ds_data_t *value, String *s) +{ + char *keystr = key->data; + char *valuestr = value->data; + + string_appendf (s, "%s %s\n", keystr, valuestr); +} + +BOOL file_cache_sync (FileCache *cache) +{ + FILE *f; + String *s; + char tmp_path[PATH_MAX]; + + if (!cache) + return FALSE; + + snprintf (tmp_path, sizeof (tmp_path), "%s.tmp", cache->file); + + if (!(s = string_new (NULL, 0, 0, TRUE))) + return FALSE; + + if (!(f = fopen (tmp_path, "w"))) + { + GT->DBGFN (GT, "couldnt write to %s: %s", tmp_path, GIFT_STRERROR ()); + string_free (s); + return FALSE; + } + + GT->DBGFN (GT, "syncing %s to disk", tmp_path); + + dataset_foreach (cache->d, DS_FOREACH(sync_one), s); + + if (fwrite (s->str, 1, s->len, f) != s->len) + { + GT->DBGFN (GT, "failed writing %s: %s", tmp_path, GIFT_STRERROR()); + string_free (s); + fclose (f); + return FALSE; + } + + string_free (s); + + if (fclose (f) != 0) + { + GT->DBGFN (GT, "failed closing %s: %s", tmp_path, GIFT_STRERROR()); + return FALSE; + } + + if (!file_mv (tmp_path, cache->file)) + { + GT->DBGFN (GT, "file move %s -> %s failed", tmp_path, cache->file); + return FALSE; + } + + return TRUE; +} + +void file_cache_flush (FileCache *cache) +{ + if (!cache) + return; + + dataset_clear (cache->d); + cache->d = NULL; +} + +/*****************************************************************************/ + +char *file_cache_lookup (FileCache *cache, const char *key) +{ + if (!cache) + return NULL; + + return dataset_lookupstr (cache->d, key); +} + +void file_cache_insert (FileCache *cache, const char *key, const char *value) +{ + if (!cache) + return; + + dataset_insertstr (&cache->d, key, value); +} + +void file_cache_remove (FileCache *cache, const char *key) +{ + if (!cache) + return; + + dataset_removestr (cache->d, key); +} diff -r 000000000000 -r d39e1d0d75b6 src/file_cache.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/file_cache.h Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,46 @@ +/* + * $Id: file_cache.h,v 1.6 2004/03/24 06:28:16 hipnod Exp $ + * + * Copyright (C) 2001-2003 giFT project (gift.sourceforge.net) + * + * 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. + */ + +#ifndef GIFT_GT_FILE_CACHE_H_ +#define GIFT_GT_FILE_CACHE_H_ + +/*****************************************************************************/ + +typedef struct _file_cache +{ + Dataset *d; + time_t mtime; + char *file; +} FileCache; + +/*****************************************************************************/ + +FileCache *file_cache_new (const char *file); +void file_cache_free (FileCache *cache); +int file_cache_load (FileCache *cache); +void file_cache_flush (FileCache *cache); +BOOL file_cache_sync (FileCache *cache); + +/*****************************************************************************/ + +char *file_cache_lookup (FileCache *cache, const char *key); +void file_cache_insert (FileCache *cache, const char *key, + const char *value); +void file_cache_remove (FileCache *cache, const char *key); + +/*****************************************************************************/ + +#endif /* GIFT_GT_FILE_CACHE_H_ */ diff -r 000000000000 -r d39e1d0d75b6 src/gt_accept.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/gt_accept.c Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,795 @@ +/* + * $Id: gt_accept.c,v 1.64 2005/01/04 15:03:40 mkern Exp $ + * + * Copyright (C) 2001-2003 giFT project (gift.sourceforge.net) + * + * 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. + */ + +#include "gt_gnutella.h" + +#include "gt_packet.h" +#include "gt_utils.h" + +#include "gt_connect.h" + +#include "gt_node.h" +#include "gt_node_cache.h" +#include "gt_netorg.h" + +#include "gt_xfer_obj.h" +#include "gt_xfer.h" +#include "gt_http_server.h" + +#include "gt_accept.h" +#include "gt_bind.h" +#include "gt_ban.h" +#include "gt_version.h" + +#include "message/gt_message.h" /* gnutella_start_connection */ + +/*****************************************************************************/ + +#define MAX_FDBUF_SIZE 16384 + +#define INCOMING_TIMEOUT (1 * MINUTES) + +/*****************************************************************************/ +/* Handle incoming connections to this node */ + +/* + * Wrap TCPC and associated timeout for incoming connections in order to limit + * the number of incoming connections. + */ +struct incoming_conn +{ + TCPC *c; + timer_id timer; +}; + +#define GT_METHOD(func) void func (int fd, input_id id, \ + struct incoming_conn *conn) +typedef void (*GtAcceptFunc) (int fd, input_id id, struct incoming_conn *conn); + +GT_METHOD(gt_server_accept); +GT_METHOD(gt_server_get); +GT_METHOD(gt_server_giv); + +static struct server_cmd +{ + char *name; + GtAcceptFunc callback; +} +server_commands[] = +{ + { "GNUTELLA", gt_server_accept }, + { "GET", gt_server_get }, + { "HEAD", gt_server_get }, + { "GIV", gt_server_giv }, + { NULL, NULL } +}; + +/*****************************************************************************/ + +static void send_node_headers (int fd, input_id id, TCPC *c); +static void recv_final_handshake (int fd, input_id id, TCPC *c); +static void determine_method (int fd, input_id id, + struct incoming_conn *conn); + +/*****************************************************************************/ + +static void incoming_conn_free (struct incoming_conn *conn) +{ + timer_remove (conn->timer); + free (conn); +} + +static void incoming_conn_close (struct incoming_conn *conn) +{ + tcp_close (conn->c); + incoming_conn_free (conn); +} + +static BOOL conn_timeout (struct incoming_conn *conn) +{ + incoming_conn_close (conn); + return FALSE; +} + +static struct incoming_conn *incoming_conn_alloc (TCPC *c) +{ + struct incoming_conn *conn; + + conn = malloc (sizeof (struct incoming_conn)); + if (!conn) + return NULL; + + conn->c = c; + conn->timer = timer_add (INCOMING_TIMEOUT, (TimerCallback)conn_timeout, + conn); + + return conn; +} + +/*****************************************************************************/ + +BOOL gt_fdbuf_full (FDBuf *buf) +{ + size_t len = MAX_FDBUF_SIZE; + + if (fdbuf_data (buf, &len) == NULL) + return TRUE; + + return len >= MAX_FDBUF_SIZE; +} + +/*****************************************************************************/ + +/* + * Receive an incoming connection. + */ +void gnutella_handle_incoming (int fd, input_id id, TCPC *listen) +{ + TCPC *c; + + if (!(c = tcp_accept (listen, FALSE))) + return; + + if (HANDSHAKE_DEBUG) + GT->DBGSOCK (GT, c, "got a new connection"); + + id = INPUT_NONE; + gt_handshake_dispatch_incoming (fd, id, c); +} + +/* + * Mark not firewalled if the other end isn't local. + */ +static void fw_status_update (TCPC *c) +{ + if (!c->outgoing && !net_match_host (c->host, "LOCAL")) + { + if (GT_SELF->firewalled) + GT->DBGSOCK (GT, c, "connected, clearing firewalled status"); + + gt_bind_clear_firewalled (); + } +} + +/* + * Allocate a structure to track this connection and continue the dispatching + * process. + */ +void gt_handshake_dispatch_incoming (int fd, input_id id, TCPC *c) +{ + struct incoming_conn *conn; + in_addr_t peer_ip; + + /* + * This will trigger if the connection was closed on the remote end + * or if there's a input timer setup to timeout this connection. In the + * latter case, we have to avoid adding any inputs for the connection. + */ + if (net_sock_error (c->fd)) + { + tcp_close (c); + return; + } + + peer_ip = net_peer (c->fd); + + /* + * While this might be nice for the banner, it's not nice to the ban-ee, + * and I'm sure there's some bugs in the banning code, so we should + * send back an error instead. + */ +#if 0 + if (gt_ban_ipv4_is_banned (peer_ip)) + { + if (HANDSHAKE_DEBUG) + GT->DBGSOCK (GT, c, "not accepting connection [address banned]"); + + tcp_close (c); + return; + } +#endif + + /* + * If there are too many HTTP connections for this IP, close the + * connection now before investing any more resources servicing it. + */ + if (gt_http_connection_length (GT_TRANSFER_UPLOAD, peer_ip) >= + HTTP_MAX_PERUSER_UPLOAD_CONNS) + { + if (HTTP_DEBUG) + GT->DBGSOCK (GT, c, "too many connections for this user, closing"); + + tcp_close (c); + return; + } + + /* local hosts_allow may need to be evaluated to keep outside sources + * away */ + if (GNUTELLA_LOCAL_MODE) + { + if (!net_match_host (peer_ip, GNUTELLA_LOCAL_ALLOW)) + { + if (HANDSHAKE_DEBUG) + GT->DBGSOCK (GT, c, "non-local connection, closing"); + + tcp_close (c); + return; + } + } + + if (!(conn = incoming_conn_alloc (c))) + { + tcp_close (c); + return; + } + + input_remove (id); + input_add (c->fd, conn, INPUT_READ, + (InputCallback)determine_method, 0); +} + +/* + * Dispatch incoming connections to the proper subsystem. + */ +static void determine_method (int fd, input_id id, struct incoming_conn *conn) +{ + struct server_cmd *command; + FDBuf *fdbuf; + int ret; + char *request; + TCPC *c = conn->c; + + fdbuf = tcp_readbuf (c); + + if ((ret = fdbuf_delim (fdbuf, "\n")) < 0) + { + if (HANDSHAKE_DEBUG) + GT->DBGSOCK (GT, c, "error: %s", GIFT_NETERROR ()); + + incoming_conn_close (conn); + return; + } + + /* some data was read: update fw status */ + fw_status_update (c); + + if (gt_fdbuf_full (fdbuf)) + { + incoming_conn_close (conn); + return; + } + + if (ret > 0) + return; + + /* + * NOTE: fdbuf_release() is not called here, so the first line is left on + * the FDBuf. + */ + request = fdbuf_data (fdbuf, NULL); + + for (command = server_commands; command->name != NULL; command++) + { + if (!strncasecmp (command->name, request, strlen (command->name))) + { + input_remove (id); + input_add (fd, conn, INPUT_READ, + (InputCallback)command->callback, 0); + + return; + } + } + + if (HANDSHAKE_DEBUG) + GT->DBGFN (GT, "bad command: %s", request); + + incoming_conn_close (conn); +} + +/*****************************************************************************/ + +/* + * Main connection acceptance routine. This begins the connection's + * journey through the rest of the handshaking code. + */ +GT_METHOD(gt_server_accept) +{ + char *request; + char *version_str; + size_t request_len = 0; + int n; + GtNode *node; + TCPC *c = conn->c; + FDBuf *buf; + + if (HANDSHAKE_DEBUG) + GT->DBGFN (GT, "entered"); + + buf = tcp_readbuf (c); + + if ((n = fdbuf_delim (buf, "\n")) < 0) + { + if (HANDSHAKE_DEBUG) + GT->DBGSOCK (GT, c, "error on recv: %s", GIFT_NETERROR ()); + + incoming_conn_close (conn); + return; + } + + if (gt_fdbuf_full (buf)) + { + incoming_conn_close (conn); + return; + } + + if (n > 0) + return; + + request = fdbuf_data (buf, &request_len); + + if (!gt_http_header_terminated (request, request_len)) + return; + + fdbuf_release (buf); + + if (HANDSHAKE_DEBUG) + GT->DBGSOCK (GT, c, "accepted headers:\n%s", request); + + version_str = strchr (request, '/'); + if (version_str) + version_str++; + + if (strncasecmp ("GNUTELLA CONNECT/", request, + sizeof ("GNUTELLA CONNECT/") - 1) != 0) + { + if (HANDSHAKE_DEBUG) + GT->DBGSOCK (GT, c, "bad handshake header"); + + incoming_conn_close (conn); + return; + } + + /* deny 0.4 connections */ + if (!version_str || strncasecmp (version_str, "0.4", 3) == 0) + { + if (HANDSHAKE_DEBUG) + GT->DBGSOCK (GT, c, "closing 0.4 connection"); + + incoming_conn_close (conn); + return; + } + + /* make a node out of this connection */ + if (!(node = gt_node_instantiate (c))) + { + if (HANDSHAKE_DEBUG) + GT->DBGFN (GT, "node_instantiate failed"); + + incoming_conn_close (conn); + return; + } + + /* + * Update the start_connect_time so the node will stick around for a while + * even when the node list gets trimmed. + */ + node->start_connect_time = time (NULL); + + gt_node_state_set (node, GT_NODE_CONNECTING_1); + node->incoming = TRUE; + + /* + * Store the http header. + * + * NOTE: We don't check the return code here. This function expects a + * properly formatted HTTP response, but we are handing it a + * Gnutella connection request instead, so it will return failure. + */ + gnutella_parse_response_headers (request, &node->hdr); + + /* + * Use the node handshake timeout timer now, and get rid of the + * generic incoming connection timeout timer. + */ + gnutella_set_handshake_timeout (c, TIMEOUT_2 * SECONDS); + incoming_conn_free (conn); + + input_remove (id); + input_add (fd, c, INPUT_WRITE, + (InputCallback)send_node_headers, TIMEOUT_DEF); +} + +GT_METHOD(gt_server_giv) +{ + FDBuf *buf; + int n; + in_addr_t peer_ip; + char *response; + size_t response_len = 0; + char *client_id; + gt_guid_t *guid; + TCPC *c = conn->c; + + if (HTTP_DEBUG || HANDSHAKE_DEBUG) + GT->DBGFN (GT, "entered"); + + buf = tcp_readbuf (c); + + if ((n = fdbuf_delim (buf, "\n")) < 0) + { + incoming_conn_close (conn); + return; + } + + if (gt_fdbuf_full (buf)) + { + incoming_conn_close (conn); + return; + } + + if (n > 0) + return; + + response = fdbuf_data (buf, &response_len); + + if (!gt_http_header_terminated (response, response_len)) + return; + + fdbuf_release (buf); + + if (HTTP_DEBUG || HANDSHAKE_DEBUG) + GT->DBGSOCK (GT, c, "giv response=%s", response); + + string_sep (&response, " "); /* Skip "GIV " */ + string_sep (&response, ":"); /* Skip the file index */ + + client_id = string_sep (&response, "/"); + string_lower (client_id); + + if (!(guid = gt_guid_bin (client_id))) + { + incoming_conn_close (conn); + return; + } + + peer_ip = net_peer (c->fd); + + /* + * This will continue the GtTransfer if one is found, and store + * the connection if one is not. The connection will be resumed + * when a chunk for this source is reissued. + */ + gt_push_source_add_conn (guid, peer_ip, c); + + incoming_conn_free (conn); + free (guid); +} + +/*****************************************************************************/ + +GT_METHOD(gt_server_get) +{ + if (HTTP_DEBUG) + GT->DBGFN (GT, "entered"); + + /* dispatch to the HTTP server code */ + gt_http_server_dispatch (fd, id, conn->c); + + /* get rid of the tracking information for the connection in this + * subsystem */ + incoming_conn_free (conn); +} + +/*****************************************************************************/ +/* GNUTELLA/0.6 CONNECTIONS */ + +BOOL gt_http_header_terminated (char *data, size_t len) +{ + int cnt; + + assert (len > 0); + len--; + + for (cnt = 0; len > 0 && cnt < 2; cnt++) + { + if (data[len--] != '\n') + break; + + /* treat CRLF as LF */ + if (data[len] == '\r') + len--; + } + + return (cnt == 2); +} + +/* TODO: header continuation and joining of multiple occurrences */ +void gt_http_header_parse (char *headers, Dataset **d) +{ + char *line, *key; + + while ((line = string_sep_set (&headers, "\r\n"))) + { + key = string_sep (&line, ":"); + + if (!key || !line) + continue; + + string_trim (key); + string_trim (line); + + /* dont allow empty key-values, need to check this too */ + if (string_isempty (line)) + continue; + + dataset_insertstr (d, string_lower (key), line); + } +} + +static void send_nodes (struct cached_node *node, String *s) +{ + if (s->str[s->len - 1] != ':') + string_append (s, ","); + else + string_append (s, " "); + + string_appendf (s, "%s:%hu", net_ip_str (node->addr.ip), node->addr.port); +} + +static void deny_connection (TCPC *c, int code, char *msg) +{ + String *s; + List *nodes; + in_addr_t ip; + + if (!(s = string_new (NULL, 0, 0, TRUE))) + return; + + string_appendf (s, "GNUTELLA/0.6 %d %s\r\n", code, msg); + string_appendf (s, "User-Agent: %s\r\n", gt_version()); + + ip = net_peer (c->fd); + if (!gt_is_local_ip (ip, 0)) + string_appendf (s, "Remote-IP: %s\r\n", net_ip_str (ip)); + + /* append some different nodes to try */ + nodes = gt_node_cache_get (10); + + if (nodes) + { + string_append (s, "X-Try-Ultrapeers:"); + + list_foreach (nodes, (ListForeachFunc)send_nodes, s); + list_free (nodes); + + string_append (s, "\r\n"); + } + + /* append message terminator */ + string_append (s, "\r\n"); + + /* we will be closing the connection after this, so we don't + * care if the send fails or not. */ + tcp_send (c, s->str, s->len); + + if (HANDSHAKE_DEBUG) + GT->DBGSOCK (GT, c, "connection denied response:\n%s", s->str); + + string_free (s); +} + +static void setup_node_class (GtNode *node) +{ + char *ultrapeer; + char *qrp; + + ultrapeer = dataset_lookupstr (node->hdr, "x-ultrapeer"); + qrp = dataset_lookupstr (node->hdr, "x-query-routing"); + + if (ultrapeer && !strcasecmp (ultrapeer, "true") && qrp != NULL) + gt_node_class_set (node, GT_NODE_ULTRA); + else + gt_node_class_set (node, GT_NODE_LEAF); +} + +BOOL gnutella_auth_connection (TCPC *c) +{ + GtNode *node; + + node = GT_NODE(c); + assert (GT_NODE(c) == node && GT_CONN(node) == c); + + /* set the class of this node based on the headers sent */ + setup_node_class (node); + + /* + * If the remote node is only crawling us, accept the connection + * no matter what. + */ + if (dataset_lookupstr (node->hdr, "crawler")) + return TRUE; + + /* + * If we are a leaf node, and so is this node, deny the connection, + * but send 'X-Try-Ultrapeer:' headers with the ultrapeers we + * are connected to in order to try to bootstrap the remote client. + */ + if (!(GT_SELF->klass & GT_NODE_ULTRA) && (node->klass & GT_NODE_LEAF)) + { + deny_connection (c, 503, "I am a shielded leaf node"); + return FALSE; + } + + if (gt_conn_need_connections (node->klass) <= 0) + { + deny_connection (c, 503, "Too many connections"); + return FALSE; + } + + if (gt_ban_ipv4_is_banned (node->ip)) + { + deny_connection (c, 403, "Unauthorized"); + return FALSE; + } + + return TRUE; +} + +static void send_node_headers (int fd, input_id id, TCPC *c) +{ + if (net_sock_error (c->fd)) + { + gt_node_error (c, NULL); + gt_node_disconnect (c); + return; + } + + if (!gnutella_auth_connection (c)) + { + gt_node_error (c, "[incoming] connection not authorized"); + gt_node_disconnect (c); + return; + } + + /* send OK response to the peer and send headers for this node also */ + if (!gnutella_send_connection_headers (c, "GNUTELLA/0.6 200 OK")) + { + gt_node_error (c, NULL); + gt_node_disconnect (c); + return; + } + + /* reset the timeout for this connection */ + gnutella_set_handshake_timeout (c, TIMEOUT_3 * SECONDS); + + input_remove (id); + input_add (fd, c, INPUT_READ, + (InputCallback)recv_final_handshake, 0); +} + +/* TODO: this should be abstracted */ +static char *field_has_value (Dataset *d, const char *key, const char *val) +{ + char *value; + char *str; + + if (!(value = dataset_lookupstr (d, key))) + return NULL; + + if ((str = strstr (value, val))) + return str; + + return NULL; +} + +static BOOL need_inflate (GtNode *node) +{ + if (!(field_has_value (node->hdr, "content-encoding", "deflate"))) + return FALSE; + + return TRUE; +} + +static BOOL need_deflate (GtNode *node) +{ + if (!(field_has_value (node->hdr, "accept-encoding", "deflate"))) + return FALSE; + + return TRUE; +} + +void gnutella_mark_compression (GtNode *node) +{ + if (need_inflate (node)) + node->rx_inflated = TRUE; + + if (need_deflate (node)) + node->tx_deflated = TRUE; +} + +static void add_key (ds_data_t *key, ds_data_t *value, Dataset **d) +{ + char *hdr = key->data; + char *val = value->data; + + dataset_insertstr (d, hdr, val); +} + +static void recv_final_handshake (int fd, input_id id, TCPC *c) +{ + FDBuf *buf; + int n; + char *response; + size_t response_len = 0; + Dataset *additional = NULL; + + buf = tcp_readbuf (c); + + if ((n = fdbuf_delim (buf, "\n")) < 0) + { + if (HANDSHAKE_DEBUG) + GT->DBGSOCK (GT, c, "fdbuf_delim: error %s", GIFT_NETERROR ()); + + gt_node_disconnect (c); + return; + } + + if (gt_fdbuf_full (buf)) + { + gt_node_disconnect (c); + return; + } + + if (n > 0) + return; + + response = fdbuf_data (buf, &response_len); + + if (!gt_http_header_terminated (response, response_len)) + return; + + fdbuf_release (buf); + + if (HANDSHAKE_DEBUG) + GT->DBGSOCK (GT, c, "stage3 response:\n%s", response); + + if (!gnutella_parse_response_headers (response, &additional)) + { + if (HANDSHAKE_DEBUG) + gt_node_error (c, "node denied us in stage3 of handshake"); + + gt_node_disconnect (c); + dataset_clear (additional); + return; + } + + /* + * Append or replace the fields the node sent into the header for this + * node. + * + * TODO: should probably change the interface to parse_response_headers so + * we can just pass in the header list of the node. + */ + dataset_foreach (additional, DS_FOREACH(add_key), >_NODE(c)->hdr); + dataset_clear (additional); + + /* mark the compression flags on this GtNode */ + gnutella_mark_compression (GT_NODE(c)); + + input_remove (id); + input_add (fd, c, INPUT_WRITE, + (InputCallback)gnutella_start_connection, TIMEOUT_DEF); +} diff -r 000000000000 -r d39e1d0d75b6 src/gt_accept.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/gt_accept.h Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,44 @@ +/* + * $Id: gt_accept.h,v 1.10 2005/01/04 15:03:40 mkern Exp $ + * + * Copyright (C) 2001-2003 giFT project (gift.sourceforge.net) + * + * 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. + */ + +#ifndef GIFT_GT_ACCEPT_H_ +#define GIFT_GT_ACCEPT_H_ + +/*****************************************************************************/ + +void gnutella_handle_incoming (int fd, input_id, TCPC *c); + +BOOL gnutella_will_deflate (struct gt_node *node); +void gnutella_mark_compression (struct gt_node *node); + +BOOL gnutella_auth_connection (TCPC *c); + +void gt_http_header_parse (char *headers, Dataset **dataset); +BOOL gt_http_header_terminated (char *data, size_t len); + +void gt_handshake_dispatch_incoming (int fd, input_id id, TCPC *c); + +/*****************************************************************************/ + +/* + * Returns TRUE if an arbitrary limit on the buffer underlying the FDBuf has + * been reached. + */ +BOOL gt_fdbuf_full (FDBuf *buf); + +/*****************************************************************************/ + +#endif /* GIFT_GT_ACCEPT_H_ */ diff -r 000000000000 -r d39e1d0d75b6 src/gt_ban.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/gt_ban.c Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,241 @@ +/* + * $Id: gt_ban.c,v 1.7 2004/01/29 07:50:25 hipnod Exp $ + * + * Copyright (C) 2003 giFT project (gift.sourceforge.net) + * + * 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. + */ + +#include "gt_gnutella.h" + +#include "gt_conf.h" +#include "gt_ban.h" + +/*****************************************************************************/ + +/* mask of bits that determines which bucket a ban goes into */ +#define INDEX_MASK (0xff000000) + +/*****************************************************************************/ + +typedef struct ban_ipv4 +{ + in_addr_t ipv4; + uint32_t netmask; +} ban_ipv4_t; + +/*****************************************************************************/ + +/* ban list organize by the first 8 bits */ +static Dataset *ipv4_ban_list; + +/*****************************************************************************/ + +static char *net_mask_str (uint32_t netmask) +{ + static char buf[128]; + + snprintf (buf, sizeof (buf) - 1, "%d.%d.%d.%d", + (netmask & 0xff000000) >> 24, + (netmask & 0x00ff0000) >> 16, + (netmask & 0x0000ff00) >> 8, + (netmask & 0x000000ff)); + + return buf; +} + +static uint32_t net_mask_bin (char *netmask) +{ + uint32_t a[4]; + + if (!netmask) + return 0xFFFFffff; + + if (sscanf (netmask, "%d.%d.%d.%d", &a[0], &a[1], &a[2], &a[3]) != 4) + return 0xFFFFffff; + + return (a[0] << 24) | (a[1] << 16) | (a[2] << 8) | a[3]; +} + +/*****************************************************************************/ + +/* + * Returns 0 if ban 'b' is contained within ban 'a'. + */ +static int find_superset_ban (ban_ipv4_t *a, ban_ipv4_t *b) +{ + uint32_t sig1 = a->ipv4 & a->netmask; + uint32_t sig2 = b->ipv4 & b->netmask; + + /* + * If there are no bits in the significant address portions + * that contradict within _a_'s netmask, then ban _b_ is a + * subset of _a_. + */ + return ((sig2 ^ sig1) & a->netmask); +} + +static void log_dup (ban_ipv4_t *orig_ban, ban_ipv4_t *b) +{ + char *ip1, *ip2; + char *n1, *n2; + + if (!orig_ban || !b) + return; + + n1 = STRDUP (net_mask_str (b->netmask)); + ip1 = STRDUP (net_ip_str (htonl (b->ipv4))); + n2 = net_mask_str (orig_ban->netmask); + ip2 = net_ip_str (htonl (orig_ban->ipv4)); + + if (BAN_DEBUG) + GT->dbg (GT, "ban %s/%s is a subset of %s/%s", ip1, n1, ip2, n2); + + free (ip1); + free (n1); +} + +BOOL gt_ban_ipv4_add (in_addr_t address, uint32_t netmask) +{ + uint32_t prefix; + List *list; + List *orig; + ban_ipv4_t *ban; + + if (!(ban = MALLOC (sizeof (ban_ipv4_t)))) + return FALSE; + + address = ntohl (address); + + ban->ipv4 = address; + ban->netmask = netmask | INDEX_MASK; /* ensure we have at least 8 bits */ + + prefix = address & INDEX_MASK; + + list = dataset_lookup (ipv4_ban_list, &prefix, sizeof (prefix)); + + if ((orig = list_find_custom (list, ban, (ListForeachFunc)find_superset_ban))) + { + log_dup (list_nth_data (orig, 0), ban); + free (ban); + return TRUE; + } + + list = list_prepend (list, ban); + + if (!dataset_insert (&ipv4_ban_list, &prefix, sizeof (prefix), list, 0)) + return FALSE; + + if (BAN_DEBUG) + { + GT->dbg (GT, "*!*@%s/%s", net_ip_str (htonl (address)), + net_mask_str (netmask)); + } + + return TRUE; +} + +BOOL gt_ban_ipv4_is_banned (in_addr_t address) +{ + uint32_t prefix; + List *list; + ban_ipv4_t ban; + + address = ntohl (address); + prefix = address & INDEX_MASK; + + if (!(list = dataset_lookup (ipv4_ban_list, &prefix, sizeof (prefix)))) + return FALSE; + + ban.ipv4 = address; + ban.netmask = 0xFFFFffff; + + if (list_find_custom (list, &ban, (ListForeachFunc)find_superset_ban)) + return TRUE; + + return FALSE; +} + +/*****************************************************************************/ + +static BOOL load_hostiles_txt (char *hostiles_filename) +{ + FILE *f; + char *hostiles_path; + char *buf = NULL; + char *p; + + hostiles_path = gift_conf_path ("%s/%s", GT->name, hostiles_filename); + + if (!(f = fopen (hostiles_path, "r"))) + return FALSE; + + while (file_read_line (f, &buf)) + { + in_addr_t ipv4; + uint32_t netmask; + char *ipv4_str; + char *mask_str; + + p = buf; + + /* divide the string into two sides */ + ipv4_str = string_sep (&p, "/"); + mask_str = p; + + if (!ipv4_str) + continue; + + netmask = net_mask_bin (mask_str); + ipv4 = net_ip (ipv4_str); + + if (!ipv4 || ipv4 == INADDR_NONE) + continue; + + gt_ban_ipv4_add (ipv4, netmask); + } + + fclose (f); + return TRUE; +} + +void gt_ban_init (void) +{ + ipv4_ban_list = dataset_new (DATASET_HASH); + + if (!gt_config_load_file ("Gnutella/hostiles.txt", TRUE, FALSE)) + GT->warn (GT, "couldn't load \"hostiles.txt\""); + + load_hostiles_txt ("hostiles.txt"); +#ifndef WIN32 + load_hostiles_txt ("Hostiles.txt"); /* case-sensitivite blah */ +#endif +} + +static int free_ban (ban_ipv4_t *ban, void *udata) +{ + free (ban); + return TRUE; +} + +static int cleanup_lists (ds_data_t *data, ds_data_t *value, void *udata) +{ + List *list = value->data; + list_foreach_remove (list, (ListForeachFunc)free_ban, NULL); + return DS_CONTINUE | DS_REMOVE; +} + +void gt_ban_cleanup (void) +{ + dataset_foreach_ex (ipv4_ban_list, DS_FOREACH_EX(cleanup_lists), NULL); + dataset_clear (ipv4_ban_list); + ipv4_ban_list = NULL; +} diff -r 000000000000 -r d39e1d0d75b6 src/gt_ban.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/gt_ban.h Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,33 @@ +/* + * $Id: gt_ban.h,v 1.2 2003/12/16 09:32:46 hipnod Exp $ + * + * Copyright (C) 2003 giFT project (gift.sourceforge.net) + * + * 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. + */ + +#ifndef GIFT__GT_BAN_H__ +#define GIFT__GT_BAN_H__ + +/*****************************************************************************/ + +#define BAN_DEBUG gt_config_get_int("ban/debug=0") + +/*****************************************************************************/ + +BOOL gt_ban_ipv4 (in_addr_t address, unsigned int netmask); +BOOL gt_ban_ipv4_is_banned (in_addr_t address); + +void gt_ban_init (void); +void gt_ban_cleanup (void); + +/*****************************************************************************/ +#endif /* GIFT__GT_BAN_H__ */ diff -r 000000000000 -r d39e1d0d75b6 src/gt_bind.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/gt_bind.c Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,321 @@ +/* + * $Id: gt_bind.c,v 1.6 2004/04/17 06:08:14 hipnod Exp $ + * + * Copyright (C) 2001-2004 giFT project (gift.sourceforge.net) + * + * 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. + */ + +#include "gt_gnutella.h" +#include "gt_node.h" +#include "gt_node_list.h" + +#include "gt_accept.h" +#include "gt_bind.h" +#include "gt_packet.h" +#include "gt_share_state.h" + +#include "transfer/push_proxy.h" + +/*****************************************************************************/ + +/* global node pointer for this machine */ +GtNode *GT_SELF; + +/*****************************************************************************/ + +/* how often to retest the firewalled status of this node */ +#define FW_RETEST_INTERVAL (60 * MINUTES) + +/* maximum amount of time before last connect read from disk before + * reassuming this node is firewalled on startup */ +#define FW_MAX_RETEST_TIME (7 * EDAYS) + +/*****************************************************************************/ + +/* time at which this node started running */ +static time_t start_time; + +/* last time we got a connection on this host */ +static time_t last_connect; + +/* retest firewalled status every so often */ +static timer_id fw_test_timer; + +/*****************************************************************************/ + +static char *fw_file (void) +{ + return gift_conf_path ("Gnutella/fwstatus"); +} + +static void save_fw_status (void) +{ + FILE *f; + + if (!(f = fopen (fw_file (), "w"))) + return; + + /* + * Store the last successful time of connect along with the port. + */ + fprintf (f, "%lu %hu\n", last_connect, GT_SELF->gt_port); + + fclose (f); +} + +/* returns whether or not the node is firewalled */ +static BOOL load_fw_status (in_port_t port) +{ + FILE *f; + char buf[RW_BUFFER]; + time_t last_time; + in_port_t last_port; + + if (!(f = fopen (fw_file (), "r"))) + return TRUE; + + if (fgets (buf, sizeof (buf) - 1, f) == NULL) + { + fclose (f); + return TRUE; + } + + fclose (f); + + /* Store the time of the last successful connect, so + * > 0 means _not_ firewalled */ + if (sscanf (buf, "%lu %hu", &last_time, &last_port) != 2) + return TRUE; + + /* if we got a connection within a recent time at some point with this + * port, mark not firewalled */ + if ((last_time > 0 && last_time < FW_MAX_RETEST_TIME) && + last_port == port) + { + last_connect = last_time; + return FALSE; + } + + return TRUE; +} + +static gt_node_class_t read_class (void) +{ + char *klass; + + klass = gt_config_get_str ("main/class"); + + if (klass && strstr (klass, "ultra")) + return GT_NODE_ULTRA; + + return GT_NODE_LEAF; +} + +static void setup_self (GtNode *node, TCPC *c, in_port_t port) +{ + /* load the firewalled status of this port */ + node->firewalled = load_fw_status (port); + + /* attach the connection to this node */ + gt_node_connect (node, c); + node->gt_port = port; + + /* load the class for this node */ + node->klass = read_class (); + + input_add (c->fd, c, INPUT_READ, + (InputCallback)gnutella_handle_incoming, FALSE); +} + +static GtNode *bind_gnutella_port (in_port_t port) +{ + GtNode *node; + TCPC *c; + + GT->DBGFN (GT, "entered"); + + if (!(node = gt_node_new ())) + return NULL; + + /* assume sane defaults in case the bind fails */ + node->gt_port = 0; + node->firewalled = TRUE; + node->klass = GT_NODE_LEAF; + + if (!port || !(c = tcp_bind (port, FALSE))) + { + GT->warn (GT, "Failed binding port %d, setting firewalled", port); + return node; + } + + GT->dbg (GT, "bound to port %d", port); + + /* setup what will become GT_SELF structure */ + setup_self (node, c, port); + + return node; +} + +static void setup_listening_port (in_port_t port) +{ + GT_SELF = bind_gnutella_port (port); + + /* + * If running in local mode, let the user set firewalled status in + * GNUTELLA_LOCAL_FW. Not sure if this is a good idea, but it makes + * testing easier. + */ + if (GNUTELLA_LOCAL_MODE) + { + if (GNUTELLA_LOCAL_FW) + GT_SELF->firewalled = TRUE; + else + GT_SELF->firewalled = FALSE; + } +} + +/*****************************************************************************/ + +BOOL gt_bind_is_firewalled (void) +{ + if (!GT_SELF->firewalled) + return FALSE; + + /* + * Pretend we are not firewalled at the beginning in order + * to possibly get more connections, to prove we are not firewalled. + */ + if (gt_uptime () < 10 * EMINUTES) + return FALSE; + + /* we are firewalled */ + return TRUE; +} + +void gt_bind_clear_firewalled (void) +{ + time (&last_connect); + GT_SELF->firewalled = FALSE; +} + +static BOOL fwtest_node (GtNode *node) +{ + GtPacket *pkt; + BOOL ret; + + if (!GT_SELF->firewalled) + return FALSE; + + if (!(pkt = gt_packet_vendor (GT_VMSG_TCP_CONNECT_BACK))) + return FALSE; + + gt_packet_put_port (pkt, GT_SELF->gt_port); + GT->DBGSOCK (GT, GT_CONN(node), "fwtesting"); + + ret = gt_node_send_if_supported (node, pkt); + gt_packet_free (pkt); + + return ret; +} + +/*****************************************************************************/ + +static void push_proxy_request (GtNode *node) +{ + GtPacket *pkt; + + if (!(pkt = gt_packet_vendor (GT_VMSG_PUSH_PROXY_REQ))) + return; + + /* the GUID of the PushProxyRequest must be our client identifier */ + gt_packet_set_guid (pkt, GT_SELF_GUID); + + gt_node_send_if_supported (node, pkt); + + gt_packet_free (pkt); +} + +/*****************************************************************************/ + +/* + * Called when a new connection to a node has completed. + */ +void gt_bind_completed_connection (GtNode *node) +{ + if (node->vmsgs_sent && dataset_length (node->vmsgs_supported) > 0) + return; + + node->vmsgs_sent = TRUE; + + fwtest_node (node); + push_proxy_request (node); +} + +/*****************************************************************************/ + +static GtNode *retest (TCPC *c, GtNode *node, void *udata) +{ + /* + * Only clear firewalled status once and if the node supports + * the TcpConnectBack message. + */ + if (fwtest_node (node) && GT_SELF->firewalled == FALSE) + { + GT->DBGFN (GT, "clearing firewalled status"); + GT_SELF->firewalled = TRUE; + } + + return NULL; +} + +static BOOL fw_test (void *udata) +{ + gt_conn_foreach (retest, NULL, + GT_NODE_NONE, GT_NODE_CONNECTED, 0); + + return TRUE; +} + +/*****************************************************************************/ + +time_t gt_uptime (void) +{ + return start_time; +} + +/*****************************************************************************/ + +void gt_bind_init (void) +{ + int port; + + port = gt_config_get_int ("main/port=6346"); + setup_listening_port (port); + + time (&start_time); + + fw_test_timer = timer_add (FW_RETEST_INTERVAL, fw_test, NULL); +} + +void gt_bind_cleanup (void) +{ + save_fw_status (); + + /* gt_node_free() will remove the listening input callback */ + gt_node_free (GT_SELF); + GT_SELF = NULL; + + start_time = 0; + last_connect = 0; + + timer_remove_zero (&fw_test_timer); +} diff -r 000000000000 -r d39e1d0d75b6 src/gt_bind.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/gt_bind.h Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,46 @@ +/* + * $Id: gt_bind.h,v 1.2 2004/03/24 06:19:46 hipnod Exp $ + * + * Copyright (C) 2001-2004 giFT project (gift.sourceforge.net) + * + * 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. + */ + +#ifndef GIFT_GT_BIND_H_ +#define GIFT_GT_BIND_H_ + +/*****************************************************************************/ + +struct gt_node; + +/* should be renamed to gt_bind_uptime() */ +time_t gt_uptime (void); + +/*****************************************************************************/ + +/* received an incoming connection on this binding */ +void gt_bind_clear_firewalled (void); + +/* a connection on this binding completed: used for sending ConnectBack + * messages to the other side */ +void gt_bind_completed_connection (struct gt_node *remote); + +/* whether this node is firewalled */ +BOOL gt_bind_is_firewalled (void); + +/*****************************************************************************/ + +void gt_bind_init (void); +void gt_bind_cleanup (void); + +/*****************************************************************************/ + +#endif /* GIFT_GT_BIND_H_ */ diff -r 000000000000 -r d39e1d0d75b6 src/gt_conf.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/gt_conf.c Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,225 @@ +/* + * $Id: gt_conf.c,v 1.4 2004/03/24 06:27:40 hipnod Exp $ + * + * Copyright (C) 2003 giFT project (gift.sourceforge.net) + * + * 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. + */ + +#include "gt_gnutella.h" +#include "gt_conf.h" + +/*****************************************************************************/ + +#define CHECK_CONFIG_INTERVAL (1 * MINUTES) + +/*****************************************************************************/ + +static Config *gt_conf; + +static char *conf_path; +static time_t conf_mtime; + +static Dataset *cache; + +static timer_id refresh_timer; + +/*****************************************************************************/ + +static char *get_key (const char *key_str) +{ + char *str; + char *key; + + if (!(str = STRDUP (key_str))) + return NULL; + + key = string_sep (&str, "="); + return key; +} + +static char *cache_lookup (const char *key_str) +{ + char *key; + char *data; + + if (!(key = get_key (key_str))) + return NULL; + + data = dataset_lookupstr (cache, key); + free (key); + + return data; +} + +static void cache_insert (const char *key_str, const char *value) +{ + char *key; + + if (!(key = get_key (key_str))) + return; + + dataset_insertstr (&cache, key, value); + free (key); +} + +char *gt_config_get_str (const char *key) +{ + char *str; + char *ret; + + if (!(str = cache_lookup (key))) + str = config_get_str (gt_conf, (char *)key); + + ret = str; + + /* unset keys are marked specially by the empty string so + * we don't have to call config_get_xxx for them */ + if (string_isempty (str)) + { + ret = NULL; + str = ""; + } + + /* hrm, the dataset doesn't handle inserting the same item you lookup + * yet, so we can't do the insert unconditionally here.. */ + if (str != cache_lookup (key)) + cache_insert (key, str); + + return ret; +} + +int gt_config_get_int (const char *key) +{ + return ATOI (gt_config_get_str (key)); +} + +/* check the mtime on the conf file. If it has changed, reload */ +static int refresh_conf (void *udata) +{ + struct stat conf_st; + char *path; + BOOL ret; + + path = STRDUP (gift_conf_path (conf_path)); + ret = file_stat (path, &conf_st); + + if (!ret || conf_st.st_mtime != conf_mtime) + { + GT->DBGFN (GT, "Gnutella.conf changed on disk. flushing cached config"); + + /* gt_config_get_xxx will reload the cache */ + dataset_clear (cache); + cache = NULL; + + conf_mtime = conf_st.st_mtime; + } + + free (path); + return TRUE; +} + +BOOL gt_config_load_file (const char *relative_path, BOOL update, BOOL force) +{ + char *src_path; + char *dst_path; + BOOL src_exists; + BOOL dst_exists; + struct stat src_st; + struct stat dst_st; + BOOL ret = TRUE; + + src_path = STRDUP (stringf ("%s/%s", platform_data_dir(), relative_path)); + dst_path = STRDUP (gift_conf_path (relative_path)); + + src_exists = file_stat (src_path, &src_st); + dst_exists = file_stat (dst_path, &dst_st); + + /* + * NOTE: the user may modify the config files in ~/.giFT/Gnutella/. + * If so, the mtime there should be greater, so look for an mtime + * greater than instead of not equal to the those files. + */ + if (force || (src_exists && + (!dst_exists || src_st.st_mtime > dst_st.st_mtime))) + { + /* + * Copy the default configuration from the data dir + * (usually "/usr/local/share/giFT/Gnutella/") + */ + GT->DBGFN (GT, "reloading configuration for %s (copying %s -> %s)", + relative_path, src_path, dst_path); + ret = file_cp (src_path, dst_path); + } + + free (dst_path); + free (src_path); + + return ret; +} + +static Config *load_config (const char *relative_path) +{ + Config *conf; + char *full_path; + + full_path = STRDUP (gift_conf_path (relative_path)); + + if (!(conf = config_new (full_path))) + { + /* copy the configuration from the data dir */ + gt_config_load_file (relative_path, TRUE, TRUE); + + /* retry loading the configuration */ + conf = config_new (full_path); + } + + free (full_path); + + return conf; +} + +/*****************************************************************************/ + +BOOL gt_config_init (void) +{ + struct stat st; + + refresh_timer = timer_add (CHECK_CONFIG_INTERVAL, + (TimerCallback)refresh_conf, NULL); + + conf_path = STRDUP (stringf ("%s/%s.conf", GT->name, GT->name)); + + if (file_stat (gift_conf_path (conf_path), &st)) + conf_mtime = st.st_mtime; + + gt_conf = load_config (conf_path); + cache = dataset_new (DATASET_HASH); + + if (!refresh_timer || !conf_path || !gt_conf) + return FALSE; + + return TRUE; +} + +void gt_config_cleanup (void) +{ + dataset_clear (cache); + cache = NULL; + + config_free (gt_conf); + gt_conf = NULL; + + free (conf_path); + conf_path = NULL; + + timer_remove_zero (&refresh_timer); +} diff -r 000000000000 -r d39e1d0d75b6 src/gt_conf.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/gt_conf.h Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,36 @@ +/* + * $Id: gt_conf.h,v 1.2 2004/03/24 06:27:40 hipnod Exp $ + * + * Copyright (C) 2003 giFT project (gift.sourceforge.net) + * + * 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. + */ + +#ifndef GIFT_GT_CONF_H_ +#define GIFT_GT_CONF_H_ + +/*****************************************************************************/ + +char *gt_config_get_str (const char *key); +int gt_config_get_int (const char *key); + +/*****************************************************************************/ + +BOOL gt_config_load_file (const char *path, BOOL update, BOOL force); + +/*****************************************************************************/ + +BOOL gt_config_init (void); +void gt_config_cleanup (void); + +/*****************************************************************************/ + +#endif /* GIFT_GT_CONF_H_ */ diff -r 000000000000 -r d39e1d0d75b6 src/gt_connect.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/gt_connect.c Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,544 @@ +/* + * $Id: gt_connect.c,v 1.55 2005/01/04 15:03:40 mkern Exp $ + * + * Copyright (C) 2001-2003 giFT project (gift.sourceforge.net) + * + * 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. + */ + +#include "gt_gnutella.h" +#include "gt_version.h" + +#include "gt_connect.h" +#include "gt_accept.h" +#include "gt_packet.h" + +#include "gt_node.h" +#include "gt_node_list.h" +#include "gt_utils.h" + +#include "gt_search.h" +#include "gt_netorg.h" + +#include "gt_node_cache.h" + +#include "message/gt_message.h" /* gnutella_start_connection */ + +/*****************************************************************************/ + +static void send_connect (int fd, input_id id, TCPC *c); +static void recv_headers (int fd, input_id id, TCPC *c); +static void send_response (int fd, input_id id, TCPC *c); +static BOOL send_final (TCPC *c); + +/*****************************************************************************/ + +static BOOL handshake_timeout (TCPC *c) +{ + GtNode *node = GT_NODE(c); + + node->handshake_timer = 0; + + if (!(node->state & GT_NODE_CONNECTED)) + { + gt_node_disconnect (c); + return FALSE; + } + + return FALSE; +} + +void gnutella_set_handshake_timeout (TCPC *c, time_t delay) +{ + timer_remove (GT_NODE(c)->handshake_timer); + + GT_NODE(c)->handshake_timer = timer_add (delay, + (TimerCallback)handshake_timeout, + c); +} + +int gt_connect (GtNode *node) +{ + TCPC *c; + + if (!node) + return -1; + +#if 0 + if (GT_CONN(node) != NULL) + { + GT->dbg (GT, "duplicate connection?: %p", GT_CONN(node)); + return -1; + } + + if (node->state != GT_NODE_DISCONNECTED) + { + GT->dbg (GT, "state = %i??", node->state); + return -1; + } +#endif + + /* this must be called only on disconnected nodes */ + assert (GT_CONN(node) == NULL); + assert (node->state == GT_NODE_DISCONNECTED); + +#if 0 + if (!conn_auth (c, TRUE)) + return -1; +#endif + + /* set this early: gt_netorg relies on this being set in order + * to check if it should access the gwebcaches */ + node->start_connect_time = time (NULL); + + /* make sure port is valid */ + if (node->gt_port == 0) + { + GT->DBGFN (GT, "bad port on node %s", net_ip_str (node->ip)); + return -1; + } + + /* make outgoing connection */ + if (!(c = tcp_open (node->ip, node->gt_port, FALSE))) + return -1; + + gt_node_connect (node, c); + + gt_node_state_set (node, GT_NODE_CONNECTING_1); + node->incoming = FALSE; + + /* set the connection timeout */ + gnutella_set_handshake_timeout (c, TIMEOUT_1 * SECONDS); + + input_add (c->fd, c, INPUT_WRITE, + (InputCallback)send_connect, 0); + + return c->fd; +} + +static void send_connect (int fd, input_id id, TCPC *c) +{ + if (net_sock_error (c->fd)) + { + gt_node_disconnect (c); + return; + } + + /* Send the connect string along with our headers */ + if (!gnutella_send_connection_headers (c, "GNUTELLA CONNECT/0.6")) + { + gt_node_error (c, NULL); + gt_node_disconnect (c); + return; + } + + /* we connected ok, so give the peer some more time */ + gnutella_set_handshake_timeout (c, TIMEOUT_2 * SECONDS); + + input_remove (id); + input_add (fd, c, INPUT_READ, + (InputCallback)recv_headers, 0); +} + +BOOL gnutella_parse_response_headers (char *reply, Dataset **r_headers) +{ + int code; /* 200, 404, ... */ + char *response; + Dataset *headers = NULL; + + response = string_sep (&reply, "\r\n"); + + if (!response) + return FALSE; + + /* */ string_sep (&response, " "); /* shift past HTTP/1.1 */ + code = ATOI (string_sep (&response, " ")); /* shift past 200 */ + + /* parse the headers */ + gt_http_header_parse (reply, &headers); + + if (r_headers) + *r_headers = headers; + else + dataset_clear (headers); + + if (code >= 200 && code <= 299) + return TRUE; + + return FALSE; +} + +static time_t parse_uptime (Dataset *d) +{ + char *str; + int days, hours, mins; + int n; + + if (!(str = dataset_lookupstr (d, "uptime"))) + return 0; + + string_lower (str); + + if ((n = sscanf (str, "%dd %dh %dm", &days, &hours, &mins)) != 3) + return 0; + + if (HANDSHAKE_DEBUG) + { + GT->dbg (GT, "uptime parsed: %d days, %d hours, %d minutes", + days, hours, mins); + } + + return days * EDAYS + hours * EHOURS + mins * EMINUTES; +} + +/* look in a header field for nodes, and register them */ +static void extract_nodes (Dataset *d, in_addr_t src, + const char *field, gt_node_class_t klass) +{ + char *str; + char *value; + time_t now; + + now = time (NULL); + + if (!(str = dataset_lookupstr (d, field))) + return; + + while ((value = string_sep (&str, ","))) + { + in_addr_t ip; + in_port_t port; + + ip = net_ip (string_sep (&value, ":")); + port = ATOI (value); + + if (port == (in_port_t) -1 || port == 0) + continue; + + if (ip == INADDR_NONE || ip == 0) + continue; + + if (gt_is_local_ip (ip, src)) + continue; + + gt_node_cache_add_ipv4 (ip, port, klass, now, 0, src); + } + + gt_node_cache_trace (); +} + +static void recv_headers (int fd, input_id id, TCPC *c) +{ + FDBuf *buf; + char *response; + size_t response_len = 0; + int n; + BOOL ok; + time_t uptime; + GtNode *node = GT_NODE(c); + + buf = tcp_readbuf (c); + + if ((n = fdbuf_delim (buf, "\n")) < 0) + { + GT->DBGFN (GT, "error reading headers: %s", GIFT_NETERROR ()); + gt_node_disconnect (c); + return; + } + + if (gt_fdbuf_full (buf)) + { + gt_node_disconnect (c); + return; + } + + if (n > 0) + return; + + response = fdbuf_data (buf, &response_len); + if (!gt_http_header_terminated (response, response_len)) + return; + + fdbuf_release (buf); + + if (HANDSHAKE_DEBUG) + GT->DBGSOCK (GT, c, "node handshake response:\n%s", response); + + /* parse and store the response */ + ok = gnutella_parse_response_headers (response, &node->hdr); + + /* extract nodes */ + extract_nodes (node->hdr, node->ip, "x-try-ultrapeers", GT_NODE_ULTRA); + extract_nodes (node->hdr, node->ip, "x-try", GT_NODE_NONE); + + /* grab the uptime from the "Uptime: " header and update this node */ + if ((uptime = parse_uptime (node->hdr)) > 0) + { + gt_node_cache_add_ipv4 (node->ip, node->gt_port, + GT_NODE_ULTRA, time (NULL), uptime, node->ip); + + /* XXX: remove the item immediately so we trigger the side effect of + * adding this node to the stable list */ + gt_node_cache_del_ipv4 (node->ip, node->gt_port); + } + + if (!ok) + { + gt_node_disconnect (c); + return; + } + + input_remove (id); + input_add (fd, c, INPUT_WRITE, + (InputCallback)send_response, 0); +} + +static void send_response (int fd, input_id id, TCPC *c) +{ + if (net_sock_error (c->fd)) + { + gt_node_error (c, NULL); + gt_node_disconnect (c); + return; + } + + if (!gnutella_auth_connection (c)) + { + gt_node_error (c, "[outgoing] connection not authorized"); + gt_node_disconnect (c); + return; + } + + if (!send_final (c)) + { + gt_node_error (c, NULL); + GT->DBGSOCK (GT, c, "error at stage 3 of handshake"); + gt_node_disconnect (c); + return; + } + + /* ok, startup this connection */ + input_remove (id); + input_add (fd, c, INPUT_WRITE, + (InputCallback)gnutella_start_connection, 0); +} + +/*****************************************************************************/ + +static GtNode *append_node (TCPC *c, GtNode *node, String *s) +{ + if (s->str[s->len - 1] != ' ') + string_append (s, ","); + + string_appendf (s, "%s:%hu", net_ip_str (node->ip), node->gt_port); + return NULL; +} + +static void append_crawler_headers (String *msg) +{ + if (gt_conn_length (GT_NODE_ULTRA, GT_NODE_CONNECTED) > 0) + { + string_append (msg, "Peers: "); + gt_conn_foreach (GT_CONN_FOREACH(append_node), msg, + GT_NODE_ULTRA, GT_NODE_CONNECTED, 0); + string_append (msg, "\r\n"); + } + + if (GT_SELF->klass & GT_NODE_ULTRA && + gt_conn_length (GT_NODE_LEAF, GT_NODE_CONNECTED) > 0) + { + string_append (msg, "Leaves: "); + gt_conn_foreach (GT_CONN_FOREACH(append_node), msg, + GT_NODE_LEAF, GT_NODE_CONNECTED, 0); + string_append (msg, "\r\n"); + } +} + +BOOL gnutella_send_connection_headers (TCPC *c, const char *header) +{ + String *msg; + + if (!(msg = string_new (NULL, 0, 0, TRUE))) + return FALSE; + + string_appendf (msg, "%s\r\n", header); + + string_append (msg, "X-Query-Routing: 0.1\r\n"); + string_appendf (msg, "X-Ultrapeer: %s\r\n", + (GT_SELF->klass & GT_NODE_ULTRA) ? "True" : "False"); + + /* append the client and version we are using */ + string_appendf (msg, "User-Agent: %s\r\n", gt_version ()); + + /* Add a header describing the remote IP of the peer */ + string_appendf (msg, "Remote-IP: %s\r\n", net_peer_ip (c->fd)); + + /* let remote end know it's ok to send vendor messages */ + string_appendf (msg, "Vendor-Message: 0.1\r\n"); + + /* support transmission of pings/pongs with GGEP appended */ + string_append (msg, "GGEP: 0.5\r\n"); + + /* If this is the limewire crawler, append "Peers: " and "Leaves: " + * headers and close the connection */ + if (!c->outgoing && dataset_lookupstr (GT_NODE(c)->hdr, "crawler")) + append_crawler_headers (msg); + + /* append willingness to receive compressed data */ + string_append (msg, "Accept-Encoding: deflate\r\n"); + + /* check whether the remote node sent us Accept-Encoding: deflate + * already */ + gnutella_mark_compression (GT_NODE(c)); + + /* compress data if we must */ + if (GT_NODE(c)->tx_deflated) + string_append (msg, "Content-Encoding: deflate\r\n"); + + /* Add message terminator */ + string_append (msg, "\r\n"); + + if (HANDSHAKE_DEBUG) + GT->DBGSOCK (GT, c, "sending node headers:\n%s", msg->str); + + if (tcp_send (c, msg->str, msg->len) <= 0) + { + string_free (msg); + return FALSE; + } + + string_free (msg); + return TRUE; +} + +static BOOL send_final (TCPC *c) +{ + String *s; + int ret; + int len; + + if (!(s = string_new (NULL, 0, 0, TRUE))) + return FALSE; + + /* append header acceptance line */ + string_append (s, "GNUTELLA/0.6 200 OK\r\n"); + + /* mark the connection as complete */ + gnutella_mark_compression (GT_NODE(c)); + + if (GT_NODE(c)->tx_deflated) + string_append (s, "Content-Encoding: deflate\r\n"); + + /* append msg terminator */ + string_append (s, "\r\n"); + + if (HANDSHAKE_DEBUG) + GT->DBGSOCK (GT, c, "sending final handshake:\n%s", s->str); + + len = s->len; + ret = tcp_send (c, s->str, s->len); + + string_free (s); + + if (ret != len) + return FALSE; + + return TRUE; +} + +/*****************************************************************************/ +/* CONNECTABILITY TESTING */ + +static void connect_test_result (GtNode *node, TCPC *c, BOOL success) +{ + GT->DBGFN (GT, "connect test to %s %s", net_ip_str (node->ip), + (success ? "succeeded" : "failed")); + + node->firewalled = (success ? FALSE : TRUE); + node->verified = TRUE; + + if (c) + { + tcp_close (c); + node->gt_port_verify = NULL; + } +} + +static void test_connectable (int fd, input_id id, TCPC *c) +{ + GtNode *node; + + node = c->udata; + + if (net_sock_error (c->fd)) + { + connect_test_result (node, c, FALSE); + return; + } + + /* + * Send two newlines, because some firewalls will let connections pass + * through, but no data. + */ + tcp_send (c, "\n\n", 2); + connect_test_result (node, c, TRUE); +} + +/* + * Test if the port of a peer we are connected to is connectable. This lets a + * node know if it's firewalled. We could use this info to mangle the 'push' + * flag on query hits from this node if it is a leaf. + * + * Mangling query hits would break any future checksum or signing algorithm on + * query hits though, so that isn't done. + */ +void gt_connect_test (GtNode *node, in_port_t port) +{ + TCPC *new_c; + + if (!port) + { + node->firewalled = TRUE; + return; + } + + /* this needs some kind of local mode switch */ +#if 0 + if (net_match_host (GT_NODE(c)->ip, "LOCAL")) + { + GT_NODE(c)->firewalled = TRUE; + return; + } +#endif + + if (!node->incoming) + return; + + GT->DBGFN (GT, "starting connect test on %s:%hu", + net_ip_str (node->ip), port); + + if (!(new_c = tcp_open (node->ip, port, FALSE))) + { + GT->DBGFN (GT, "failed to open test connection to %s:%hu", + net_ip_str (node->ip), node->gt_port); + return; + } + + if (node->gt_port_verify) + tcp_close (node->gt_port_verify); + + /* keep track of this connection */ + node->gt_port_verify = new_c; + new_c->udata = node; + + input_add (new_c->fd, new_c, INPUT_WRITE, + (InputCallback)test_connectable, TIMEOUT_DEF); +} diff -r 000000000000 -r d39e1d0d75b6 src/gt_connect.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/gt_connect.h Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,38 @@ +/* + * $Id: gt_connect.h,v 1.9 2004/03/24 06:21:13 hipnod Exp $ + * + * Copyright (C) 2001-2003 giFT project (gift.sourceforge.net) + * + * 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. + */ + +#ifndef GIFT_GT_CONNECT_H_ +#define GIFT_GT_CONNECT_H_ + +/*****************************************************************************/ + +#define HANDSHAKE_DEBUG gt_config_get_int("handshake/debug=0") + +/*****************************************************************************/ + +struct gt_node; + +BOOL gnutella_send_connection_headers (TCPC *c, const char *header); +void gnutella_start_connection (int fd, input_id id, TCPC *c); +BOOL gnutella_parse_response_headers (char *response, Dataset **headers); +void gnutella_set_handshake_timeout (TCPC *c, time_t time); + +void gt_connect_test (struct gt_node *node, in_port_t port); +int gt_connect (struct gt_node *node); + +/*****************************************************************************/ + +#endif /* GIFT_GT_CONNECT_H_ */ diff -r 000000000000 -r d39e1d0d75b6 src/gt_gnutella.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/gt_gnutella.c Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,282 @@ +/* + * $Id: gt_gnutella.c,v 1.74 2006/08/06 16:53:36 hexwab Exp $ + * + * Copyright (C) 2001-2004 giFT project (gift.sourceforge.net) + * + * 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. + */ + +#include "gt_gnutella.h" + +#include "gt_conf.h" +#include "sha1.h" +#include "xml.h" + +#include "gt_share.h" +#include "gt_share_state.h" + +#include "gt_accept.h" +#include "gt_ban.h" +#include "gt_bind.h" + +#include "gt_node.h" +#include "gt_node_list.h" +#include "gt_netorg.h" + +#include "gt_xfer_obj.h" +#include "gt_xfer.h" + +#include "gt_search.h" +#include "gt_search_exec.h" + +#include "gt_web_cache.h" +#include "gt_stats.h" +#include "gt_query_route.h" +#include "transfer/source.h" /* gnutella_source_{add,remove,cmp} */ + +/*****************************************************************************/ + +/* giFT protocol pointer */ +Protocol *GT; + +/*****************************************************************************/ + +/* The ip address is local if the address is local and the source from which + * it was discovered was not local */ +BOOL gt_is_local_ip (in_addr_t ip, in_addr_t src) +{ + if (ip == 0) + return TRUE; + + if (net_match_host (ip, "LOCAL") && + (src == 0 || !net_match_host (src, "LOCAL"))) + { + return TRUE; + } + + return FALSE; +} + +/*****************************************************************************/ + +/* shutdown */ +static void gnutella_destroy (Protocol *p) +{ + GT->DBGFN (GT, "entered"); + + /* cleanup any network maintenance data */ + gt_netorg_cleanup (); + + /* save the node list to disk */ + gt_node_list_save (); + + /* cleanup any information about banned nodes */ + gt_ban_cleanup (); + + /* destroy query_router tables */ + gt_query_router_self_destroy (); + + /* cleanup remote search data structures */ + gt_search_cleanup (); + + /* cleanup local share state */ + gt_share_state_local_cleanup (); + + /* cleanup local search data structures */ + gt_search_exec_cleanup (); + + /* cleanup XML structures */ + gt_xml_cleanup (); + + /* free and disconnect all nodes */ + gt_node_remove_all (); + + /* destroy web cache information */ + gt_web_cache_cleanup (); + + /* stop binding to the local port */ + gt_bind_cleanup (); + + /* free configuration information */ + gt_config_cleanup (); + + /* free this client's GUID */ + gt_guid_self_cleanup (); +} + +/*****************************************************************************/ + +static unsigned char *gnutella_sha1_hash (const char *path, size_t *len) +{ + *len = SHA1_BINSIZE; + return sha1_digest (path, 0); +} + +static char *gnutella_sha1_dsp (unsigned char *hash, size_t len) +{ + return sha1_string (hash); +} + +/*****************************************************************************/ + +static BOOL self_is_too_old (void) +{ + return FALSE; +} + +static void too_old_error_msg (void) +{ + GIFT_ERROR (("\nYour version of the Gnutella plugin is more than 1 year\n" + "old. In order to protect the Gnutella network from \n" + "older programs, this plugin has deactivated itself.\n\n" + "Please update the plugin with a new version from \n" + "http://www.giftproject.org/, or stop running the \n" + "plugin by runnning gift-setup or removing \"Gnutella\"\n" + "from the /main/plugins line in $HOME/.giFT/giftd.conf\n" + "manually.\n\n" + "Thanks, and sorry for the inconvenience.\n")); +} + +static BOOL gnutella_start (Protocol *p) +{ + p->DBGFN (p, "Starting Gnutella plugin"); + + /* + * If this node is extremely old, deactivate the plugin, but print a + * message to the log file. + * + * This is a temporary hack to clean out old nodes in the future, just + * until ultrapeer support is implemented, but we don't want to bother + * people that are using other plugins and don't care... + */ + if (self_is_too_old ()) + { + too_old_error_msg (); + return TRUE; + } + + if (!gt_config_init ()) + { + GIFT_ERROR (("Unable to load config file. Please copy it to " + "~/.giFT/Gnutella/Gnutella.conf")); + return FALSE; + } + + if (!gt_web_cache_init ()) + { + GIFT_ERROR (("Unable to load gwebcaches file. Please copy it to " + "~/.giFT/Gnutella/gwebcaches")); + return FALSE; + } + + /* load any banned ip addresses */ + gt_ban_init (); + + /* initialize the GUID for this node */ + gt_guid_self_init (); + + /* listen for connections */ + gt_bind_init (); + + /* load the list of all previously contacted nodes */ + gt_node_list_load (); + + /* initialize query router tables */ + gt_query_router_self_init (); + + /* initialize the local search data structures */ + gt_search_exec_init (); + + /* initialize the local sharing state */ + gt_share_state_local_init (); + + /* initialize the remote search data structures */ + gt_search_init (); + + /* initialize support for xml metadata */ + gt_xml_init (); + + /* startup network maintenance */ + gt_netorg_init (); + + return TRUE; +} + +/* + * The entry-point for the giFT daemon + */ +BOOL Gnutella_init (Protocol *p) +{ + if (protocol_compat (p, LIBGIFTPROTO_MKVERSION (0, 11, 4)) != 0) + return FALSE; + + p->version_str = STRDUP (GT_VERSION); + GT = p; + + /* gt_gnutella.c: */ + p->start = gnutella_start; + + /* skip initializing if too old. Note that we still need to provide a + * start function since gift's default handler will return FALSE. The + * actual error message describing the 'too old' problem is also generated + * by our start function. + */ + if (self_is_too_old ()) + return TRUE; + + /* describe the hash algo */ + p->hash_handler (p, "SHA1", HASH_PRIMARY, gnutella_sha1_hash, + gnutella_sha1_dsp); + + /* gt_gnutella.c: */ + p->destroy = gnutella_destroy; + + /* gt_search.c: */ + p->search = gnutella_search; +#if 0 + p->browse = gnutella_browse; +#endif + p->locate = gnutella_locate; + p->search_cancel = gnutella_search_cancel; + + /* gt_xfer.c: */ + p->download_start = gnutella_download_start; + p->download_stop = gnutella_download_stop; + p->upload_stop = gnutella_upload_stop; + p->chunk_suspend = gnutella_chunk_suspend; + p->chunk_resume = gnutella_chunk_resume; + + /* transfer/source.c: */ + p->source_cmp = gnutella_source_cmp; + p->source_add = gnutella_source_add; + p->source_remove = gnutella_source_remove; + +#if 0 + p->upload_avail = gnutella_upload_avail; + p->user_cmp = gnutella_user_cmp; +#endif + + /* gt_share.c: */ + p->share_new = gnutella_share_new; + p->share_free = gnutella_share_free; + p->share_add = gnutella_share_add; + p->share_remove = gnutella_share_remove; + p->share_sync = gnutella_share_sync; + + /* gt_share_state.c: */ + p->share_hide = gnutella_share_hide; + p->share_show = gnutella_share_show; + + /* gt_stats.c: */ + p->stats = gnutella_stats; + + return TRUE; +} diff -r 000000000000 -r d39e1d0d75b6 src/gt_gnutella.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/gt_gnutella.h Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,112 @@ +/* + * $Id: gt_gnutella.h,v 1.43 2006/08/06 17:26:39 hexwab Exp $ + * + * Copyright (C) 2001-2003 giFT project (gift.sourceforge.net) + * + * 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. + */ + +#ifndef GIFT_GT_GNUTELLA_H_ +#define GIFT_GT_GNUTELLA_H_ + +/*****************************************************************************/ + +#include "config.h" + +/*****************************************************************************/ + +#define GT_VERSION GT_MAJOR_VERSION "." GT_MINOR_VERSION "." \ + GT_MICRO_VERSION GT_EXTRA_VERSION + +#define GT_DEBUG +#define LIBGIFT_DEBUG + +#define GIFT_PLUGIN +#include + +/* this works because duplicate case labels are disallowed in C */ +#define assert_at_compile(cond) \ + do { switch (0) { default: case 0: case cond: break; } } while (0) + +/*****************************************************************************/ + +#include +#include +#include +#include + +/*****************************************************************************/ + +#include +#include +#include + +#include +#include + +/*****************************************************************************/ + +#include "gt_guid.h" +#include "gt_conf.h" + +#include + +/*****************************************************************************/ +/* global variables */ + +extern Protocol *GT; + +extern struct gt_node *GT_SELF; + +extern gt_guid_t *GT_SELF_GUID; + +/*****************************************************************************/ + +#define GNUTELLA_LOCAL_MODE gt_config_get_int("local/lan_mode=0") +#define GNUTELLA_LOCAL_FW gt_config_get_int("local/firewalled=0") +#define GNUTELLA_LOCAL_ALLOW gt_config_get_str("local/hosts_allow=LOCAL") + +/*****************************************************************************/ + +BOOL gt_is_local_ip (in_addr_t ip, in_addr_t src); + +/*****************************************************************************/ + +/* + * libgift doesn't define this... + */ +#ifndef EDAYS +#define EDAYS (24 * EHOURS) +#endif + +/* + * This needs libgift >= 0.11.5 + */ +#ifndef GIFT_PLUGIN_EXPORT +#define GIFT_PLUGIN_EXPORT +#endif + +/* + * Invalid input/timer ids used for readability and to help porting to libgift + * 0.12. + */ +#define INPUT_NONE ((input_id)0) +#define TIMER_NONE ((timer_id)0) + +/* + * The entry-point for the giFT daemon + */ +GIFT_PLUGIN_EXPORT + BOOL Gnutella_init (Protocol *p); + +/*****************************************************************************/ + +#endif /* GIFT_GT_GNUTELLA_H_ */ diff -r 000000000000 -r d39e1d0d75b6 src/gt_guid.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/gt_guid.c Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,309 @@ +/* + * $Id: gt_guid.c,v 1.18 2006/01/28 16:57:56 mkern Exp $ + * + * Copyright (C) 2001-2003 giFT project (gift.sourceforge.net) + * + * 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. + */ + +#include "gt_gnutella.h" +#include "sha1.h" + +/*****************************************************************************/ + +/* global guid identifying this client */ +gt_guid_t *GT_SELF_GUID; + +/*****************************************************************************/ + +/* seed for generating unique numbers */ +static unsigned int seed = 0; + +/* map binary numbers to hexadecimal */ +static char bin_to_hex[] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', + 'a', 'b', 'c', 'd', 'e', 'f' }; + +/* guid filled with all zeroes */ +static gt_guid_t zero_guid[GT_GUID_LEN] = { 0 }; + +/*****************************************************************************/ + +/* TODO: use /dev/urandom when available */ +static unsigned int rng_seed (void) +{ + sha1_state_t sha1; + struct timeval tv; + unsigned int seed; + int i; + unsigned char hash[SHA1_BINSIZE]; + + gt_sha1_init (&sha1); + platform_gettimeofday (&tv, NULL); + + gt_sha1_append (&sha1, &tv.tv_usec, sizeof (tv.tv_usec)); + gt_sha1_append (&sha1, &tv.tv_sec, sizeof (tv.tv_sec)); + +#ifdef HAVE_GETPID + { + pid_t pid = getpid(); + gt_sha1_append (&sha1, &pid, sizeof (pid)); + } +#endif + +#ifdef WIN32 + { + DWORD process_id = GetCurrentProcessId(); + gt_sha1_append (&sha1, &process_id, sizeof (process_id)); + } +#endif + +#ifdef HAVE_GETPPID + { + pid_t ppid = getppid(); + gt_sha1_append (&sha1, &ppid, sizeof (ppid)); + } +#endif /* WIN32 */ + + memset (hash, 0, sizeof (hash)); + gt_sha1_finish (&sha1, hash); + + seed = 0; + i = 0; + + /* crush the hash into an unsigned int */ + while (i < SHA1_BINSIZE) + { + unsigned int t; + size_t len; + + t = 0; + len = MIN (sizeof (unsigned int), SHA1_BINSIZE - i); + + memcpy (&t, &hash[i], len); + + seed ^= t; + i += len; + } + + return seed; +} + +void gt_guid_init (gt_guid_t *guid) +{ + int i; + + if (!seed) + { + seed = rng_seed(); + srand (seed); + } + + for (i = GT_GUID_LEN - 1; i >= 0; i--) + guid[i] = 256.0 * rand() / (RAND_MAX + 1.0); + + /* mark this GUID as coming from a "new" client */ + guid[8] = 0xff; + guid[15] = 0x01; +} + +gt_guid_t *gt_guid_new (void) +{ + gt_guid_t *guid; + + if (!(guid = malloc (GT_GUID_LEN))) + return NULL; + + gt_guid_init (guid); + + return guid; +} + +int gt_guid_cmp (const gt_guid_t *a, const gt_guid_t *b) +{ + if (!a) + return (b == NULL ? 0 : -1); + else if (!b) + return (a == NULL ? 0 : +1); + + return memcmp (a, b, GT_GUID_LEN); +} + +char *gt_guid_str (const gt_guid_t *guid) +{ + static char buf[128]; + unsigned char c; + int pos; + int len; + + if (!guid) + return NULL; + + pos = 0; + len = GT_GUID_LEN; + + while (len-- > 0) + { + c = *guid++; + + buf[pos++] = bin_to_hex[(c & 0xf0) >> 4]; + buf[pos++] = bin_to_hex[(c & 0x0f)]; + } + + buf[pos] = 0; + + return buf; +} + +gt_guid_t *gt_guid_dup (const gt_guid_t *guid) +{ + gt_guid_t *new_guid; + + if (!(new_guid = malloc (GT_GUID_LEN))) + return NULL; + + memcpy (new_guid, guid, GT_GUID_LEN); + + return new_guid; +} + +static unsigned char hex_char_to_bin (char x) +{ + if (x >= '0' && x <= '9') + return (x - '0'); + + x = toupper (x); + + return ((x - 'A') + 10); +} + +static int hex_to_bin (const char *hex, unsigned char *bin, int len) +{ + unsigned char value; + + while (isxdigit (hex[0]) && isxdigit (hex[1]) && len-- > 0) + { + value = (hex_char_to_bin (*hex++) << 4) & 0xf0; + value |= (hex_char_to_bin (*hex++) & 0x0f); + *bin++ = value; + } + + return (len <= 0) ? TRUE : FALSE; +} + +gt_guid_t *gt_guid_bin (const char *guid_ascii) +{ + gt_guid_t *guid; + + if (!guid_ascii) + return NULL; + + if (!(guid = malloc (GT_GUID_LEN))) + return NULL; + + if (!hex_to_bin (guid_ascii, guid, GT_GUID_LEN)) + { + free (guid); + return NULL; + } + + return guid; +} + +/*****************************************************************************/ + +BOOL gt_guid_is_empty (const gt_guid_t *guid) +{ + if (!guid) + return TRUE; + + return memcmp (guid, zero_guid, GT_GUID_LEN) == 0; +} + +/*****************************************************************************/ + +/* + * Load the client GUID for this node. + */ +static gt_guid_t *get_client_id (char *conf_path) +{ + FILE *f; + gt_guid_t *client_id = NULL; + char *buf = NULL; + + /* + * There are people who distribute giFT packages which include the + * developer's client-id file. These packages (mainly KCeasy derivatives, + * I think) are widely enough distributed that other gnutella developers + * have noticed the problem and notified me. To prevent this problem in + * future versions I have forced randomization of the GUID on each startup + * below. --mkern + */ +#if 0 + if ((f = fopen (gift_conf_path (conf_path), "r"))) + { + while (file_read_line (f, &buf)) + { + char *id; + char *line; + + free (client_id); + client_id = NULL; + + line = buf; + id = string_sep_set (&line, "\r\n"); + + if (string_isempty (id)) + continue; + + client_id = gt_guid_bin (id); + } + + fclose (f); + } +#endif + + /* TODO: regenerate when client guid is pretty old */ + if (client_id != NULL) + return client_id; + + /* + * Create a new client identifier + */ + client_id = gt_guid_new (); + assert (client_id != NULL); + + /* store the id in ~/.giFT/Gnutella/clientid */ + if (!(f = fopen (gift_conf_path (conf_path), "w"))) + { + GIFT_ERROR (("clientid storage file: %s", GIFT_STRERROR ())); + return client_id; + } + + fprintf (f, "%s\n", gt_guid_str (client_id)); + fclose (f); + + return client_id; +} + +void gt_guid_self_init (void) +{ + GT_SELF_GUID = get_client_id ("Gnutella/client-id"); + + /* remove the old clientid file which used an inferior random number + * generator */ + remove (gift_conf_path ("Gnutella/clientid")); +} + +void gt_guid_self_cleanup (void) +{ + free (GT_SELF_GUID); + GT_SELF_GUID = NULL; +} diff -r 000000000000 -r d39e1d0d75b6 src/gt_guid.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/gt_guid.h Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,48 @@ +/* + * $Id: gt_guid.h,v 1.10 2004/03/05 17:49:40 hipnod Exp $ + * + * Copyright (C) 2001-2003 giFT project (gift.sourceforge.net) + * + * 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. + */ + +#ifndef GIFT_GT_GUID_H_ +#define GIFT_GT_GUID_H_ + +/*****************************************************************************/ + +#define GT_GUID_LEN 16 + +/*****************************************************************************/ + +typedef uint8_t gt_guid_t; + +/*****************************************************************************/ + +gt_guid_t *gt_guid_new (void); +void gt_guid_init (gt_guid_t *guid); +int gt_guid_cmp (const gt_guid_t *a, const gt_guid_t *b); +char *gt_guid_str (const gt_guid_t *guid); +gt_guid_t *gt_guid_dup (const gt_guid_t *guid); +gt_guid_t *gt_guid_bin (const char *guid_ascii); + +/*****************************************************************************/ + +BOOL gt_guid_is_empty (const gt_guid_t *guid); + +/*****************************************************************************/ + +void gt_guid_self_init (void); +void gt_guid_self_cleanup (void); + +/*****************************************************************************/ + +#endif /* GIFT_GT_GUID_H_ */ diff -r 000000000000 -r d39e1d0d75b6 src/gt_http_client.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/gt_http_client.c Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,909 @@ +/* + * $Id: gt_http_client.c,v 1.57 2006/02/03 20:11:40 mkern Exp $ + * + * Copyright (C) 2001-2003 giFT project (gift.sourceforge.net) + * + * 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. + */ + +#include "gt_gnutella.h" +#include "gt_version.h" + +#include "gt_xfer_obj.h" +#include "gt_xfer.h" + +#include "gt_http_client.h" +#include "gt_http_server.h" + +#include "gt_accept.h" + +#include "transfer/source.h" + +/*****************************************************************************/ + +/* prototyping this function effectively provides the non-blocking flow of the + * program and helps to self-document this file */ +static void get_server_reply (int fd, input_id id, GtTransfer *xfer); + +/*****************************************************************************/ +/* CLIENT HELPERS */ + +static int gt_http_client_send (TCPC *c, char *command, char *request, ...) +{ + char *key; + char *value; + String *s; + int ret; + va_list args; + + if (!command || !request) + return -1; + + if (!(s = string_new (NULL, 0, 0, TRUE))) + return -1; + + string_appendf (s, "%s %s HTTP/1.1\r\n", command, request); + + va_start (args, request); + + for (;;) + { + /* if we receive the sentinel, bail out */ + if (!(key = va_arg (args, char *))) + break; + + if (!(value = va_arg (args, char *))) + continue; + + string_appendf (s, "%s: %s\r\n", key, value); + } + + va_end (args); + + /* append final message terminator */ + string_append (s, "\r\n"); + + if (HTTP_DEBUG) + GT->DBGSOCK (GT, c, "sending client request:\n%s", s->str); + + ret = tcp_send (c, s->str, s->len); + string_free (s); + + return ret; +} + +/* parse an HTTP server reply */ +static BOOL parse_server_reply (GtTransfer *xfer, TCPC *c, char *reply) +{ + char *response; /* HTTP/1.1 200 OK */ + char *version; + int code; /* 200, 404, ... */ + + if (!xfer || !reply) + return FALSE; + + if (HTTP_DEBUG) + GT->DBGSOCK (GT, c, "reply:\n%s", reply); + + response = string_sep_set (&reply, "\r\n"); + + if (!response) + return FALSE; + + version = string_sep (&response, " "); /* shift past HTTP/1.1 */ + code = ATOI (string_sep (&response, " ")); /* shift past 200 */ + + /* parse the rest of the key/value fields */ + gt_http_header_parse (reply, &xfer->header); + + xfer->code = code; + xfer->version = STRDUP (version); + + return TRUE; +} + +/*****************************************************************************/ + +/* + * Complete interface to the standard HTTP GET / with a server. These routines + * require non of OpenFT's extensions and communicate perfectly valid + * HTTP/1.1 (to my knowledge). You could use this to transfer non-OpenFT, + * hopefully. ;) + * + * NOTE: + * I need to add more text here so this stands out better as one of the two + * core subsystems within this file. So here it is. :P + */ +void gt_http_client_get (Chunk *chunk, GtTransfer *xfer) +{ + TCPC *c; + + if (!chunk || !xfer) + { + GT->DBGFN (GT, "uhm."); + return; + } + + xfer->command = STRDUP ("GET"); + + if (!(c = gt_http_connection_open (GT_TRANSFER_DOWNLOAD, xfer->ip, + xfer->port))) + { + gt_transfer_close (xfer, TRUE); + return; + } + + /* pass along the connection with the xfer */ + gt_transfer_set_tcpc (xfer, c); + assert (xfer->chunk == chunk); + assert (chunk->udata == xfer); + + gt_transfer_status (xfer, SOURCE_WAITING, "Connecting"); + + /* be a little more aggressive timing out HTTP connections (TIMEOUT_DEF / + * 2 + 5), so that useless sources don't occupy Chunks so often */ + input_add (c->fd, xfer, INPUT_WRITE, + (InputCallback)gt_http_client_start, TIMEOUT_DEF / 2 + 5); +} + +static int client_get_request (GtTransfer *xfer) +{ + TCPC *c; + char host[128]; + char range_hdr[64]; + int ret; + + if (!xfer) + return FALSE; + + c = gt_transfer_get_tcpc (xfer); + + snprintf (range_hdr, sizeof (range_hdr) - 1, "bytes=%i-%i", + (int) xfer->start, (int) xfer->stop - 1); + + snprintf (host, sizeof (host) - 1, "%s:%hu", net_ip_str (xfer->ip), + xfer->port); + + /* always send the Range request just because we always know the full size + * we want */ + ret = gt_http_client_send (c, "GET", xfer->request, + "Range", range_hdr, + "Host", host, + "User-Agent", gt_version(), + "X-Queue", "0.1", + NULL); + + return ret; +} + +/* + * Verify connection status and Send the GET request to the server. + */ +void gt_http_client_start (int fd, input_id id, GtTransfer *xfer) +{ + Chunk *chunk; + TCPC *c; + + c = gt_transfer_get_tcpc (xfer); + chunk = gt_transfer_get_chunk (xfer); + + if (net_sock_error (c->fd)) + { + GtSource *gt; + + gt = gt_transfer_get_source (xfer); + + /* set the connection as having failed, and retry w/ a push */ + gt->connect_failed = TRUE; + + gt_transfer_status (xfer, SOURCE_CANCELLED, (fd == -1 ? + "Connect timeout" : + "Connect failed")); + gt_transfer_close (xfer, TRUE); + return; + } + + /* + * Update the length of the chunk in the GtTransfer. We do this + * because giftd may change the range of the chunk while we are + * playing with it, and this is the last point where we can update + * the range. + * + * If giftd changes the range after this point, we'll be forced to break + * this connection :( + */ + gt_transfer_set_length (xfer, chunk); + + /* send the GET / request to the server */ + if (client_get_request (xfer) <= 0) + { + gt_transfer_status (xfer, SOURCE_CANCELLED, "GET send failed"); + gt_transfer_close (xfer, TRUE); + return; + } + + gt_transfer_status (xfer, SOURCE_WAITING, "Sent HTTP request"); + + /* do not remove all fds associated with this socket until we destroy it */ + input_remove (id); + + /* wait for the server response */ + input_add (fd, xfer, INPUT_READ, + (InputCallback)get_server_reply, TIMEOUT_DEF); +} + +/* + * Read the response body, if any, so persistent HTTP will work. + * Note that the GtTransfer can still timeout, in which case + * the connection will get closed and so will the xfer. + */ +static void read_response_body (int fd, input_id id, GtTransfer *xfer) +{ + Chunk *chunk; + TCPC *c; + FDBuf *buf; + char *response; + int n; + int len; + + c = gt_transfer_get_tcpc (xfer); + chunk = gt_transfer_get_chunk (xfer); + + len = xfer->stop - xfer->start; + + /* since the body isnt important, close if its too large */ + if (len >= 16384) + { + GT->DBGFN (GT, "[%s:%hu] response body too large (%d)", + net_ip_str (xfer->ip), xfer->port); + gt_transfer_close (xfer, TRUE); + return; + } + + buf = tcp_readbuf (c); + + if ((n = fdbuf_fill (buf, len)) < 0) + { + GT->DBGFN (GT, "error [%s:%hu]: %s", + net_ip_str (xfer->ip), xfer->port, GIFT_NETERROR ()); + gt_transfer_close (xfer, TRUE); + return; + } + + if (n > 0) + return; + + /* + * Set the body as having been completely read. + * This allows the connection to be cached. + */ + xfer->remaining_len -= len; + assert (xfer->remaining_len == 0); + + response = fdbuf_data (buf, NULL); + fdbuf_release (buf); + + if (HTTP_DEBUG) + GT->DBGSOCK (GT, c, "body:\n%s", response); + + input_remove (id); + + /* perform an orderly close */ + gt_transfer_close (xfer, FALSE); +} + +static time_t queue_interval (time_t interval) +{ + /* + * HACK: giftd will retry the queued download every 49 seconds, + * so round the next retry time to coincide with that interval. + */ + if (interval > 49) + interval = (interval / 49 + 1) * 49; + + return interval; +} + +/*****************************************************************************/ + +/* set the next time to retry from the Retry-After: header */ +static void set_retry_after (GtTransfer *xfer) +{ + int seconds; + char *retry_after; + GtSource *gt; +#if 0 + char *msg; + struct tm *tm; +#endif + + if (!(retry_after = dataset_lookupstr (xfer->header, "retry-after"))) + return; + + /* + * This can be either a HTTP date or a number of seconds. We only + * support the number of seconds right now. + */ + seconds = ATOI (retry_after); + + if (seconds <= 0) + return; + + if (!(gt = gt_transfer_get_source (xfer))) + return; + + /* set the retry time for the next download */ + gt->retry_time = time (NULL) + queue_interval (seconds); + +#if 0 + /* get the absolute time */ + tm = localtime (>->retry_time); + + /* let the user know when we are going to retry */ + msg = stringf_dup ("Queued (retry at %d:%02d:%02d)", tm->tm_hour, + tm->tm_min, tm->tm_sec); + + gt_transfer_status (xfer, SOURCE_QUEUED_REMOTE, msg); + free (msg); +#endif +} + +/* + * Check for both the active-queueing style "X-Queue:" and PARQ-style + * "X-Queued:". + * + * We avoid having to parse the X-Queue: line in the PARQ case (which would + * be "1.0") by allowing X-Queued to override X-Queue. + */ +static size_t find_queue_key (Dataset *header, const char *key) +{ + size_t pos = 0; + char *val; + char *line0, *line; + char *active_queue_line; + char *parq_queue_line; + char *sep; + + active_queue_line = dataset_lookupstr (header, "x-queue"); + parq_queue_line = dataset_lookupstr (header, "x-queued"); + + if (!active_queue_line && !parq_queue_line) + return 0; + + line = active_queue_line; + sep = ", "; + + if (parq_queue_line) + { + line = parq_queue_line; + sep = "; "; + } + + line0 = line = STRDUP (line); + + while ((val = string_sep_set (&line, sep))) + { + char *str; + + str = string_sep_set (&val, "= "); + + if (!str || !val) + continue; + + if (!strcasecmp (str, key)) + pos = ATOI (val); + } + + free (line0); + return pos; +} + +/* Create a message describing our position in the remote node's + * upload queue. */ +static char *get_queue_status (GtTransfer *xfer, char *msg) +{ + size_t len = 0; + size_t pos = 0; + + pos = find_queue_key (xfer->header, "position"); + len = find_queue_key (xfer->header, "length"); + + msg = STRDUP (msg); + + if (pos != 0) + { + free (msg); + + if (len != 0) + msg = stringf_dup ("Queued (%u/%u)", pos, len); + else + msg = stringf_dup ("Queued (position %u)", pos); + } + + return msg; +} + +/* set the next time to retry the download based on the X-Queue: field */ +static void set_queue_status (GtTransfer *xfer) +{ + GtSource *gt; + char *queue_line; + int poll_min; + + if (!(gt = gt_transfer_get_source (xfer))) + return; + + if (!(queue_line = dataset_lookupstr (xfer->header, "x-queue"))) + return; + + if ((poll_min = find_queue_key (xfer->header, "pollmin")) <= 0) + return; + + gt->retry_time = time (NULL) + queue_interval (poll_min); +} + +/* + * Try to read any content-body in the response, so that persistent + * HTTP can work correctly, which is really important for push downloads. + */ +static void handle_http_error (GtTransfer *xfer, SourceStatus status, + char *status_txt) +{ + TCPC *c; + Chunk *chunk; + int len = 0; + char *content_len; + char *conn_hdr; + + /* update the interface protocol with the error status of this xfer */ + status_txt = get_queue_status (xfer, status_txt); + gt_transfer_status (xfer, status, status_txt); + + free (status_txt); + + c = gt_transfer_get_tcpc (xfer); + chunk = gt_transfer_get_chunk (xfer); + + /* + * Check for a Content-Length: field, and use that for the + * length of the response body, if any. + */ + content_len = dataset_lookupstr (xfer->header, "content-length"); + conn_hdr = dataset_lookupstr (xfer->header, "connection"); + + /* look at the Retry-After: header and set download retry time */ + set_retry_after (xfer); + + /* parse the X-Queue: and X-Queued: headers for the queue position/ + * retry time */ + set_queue_status (xfer); + + /* + * Don't read the body if they supplied "Connection: Close". + * Close if the HTTP version is 1.0 (TODO: this should + * not close 1.0 connections if they supplied Connection: + * Keep-Alive, I guess) + */ + if (!STRCASECMP (xfer->version, "HTTP/1.0") || + !STRCASECMP (xfer->version, "HTTP") || + !STRCASECMP (conn_hdr, "close")) + { + gt_transfer_close (xfer, TRUE); + return; + } + + if (content_len) + len = ATOUL (content_len); + + /* abuse xfer->{start,stop} fields for the length of the response body */ + xfer->start = 0; + xfer->stop = len; + + /* set this flag to let gt_transfer_close() know the headers + * have been parsed */ + xfer->transmitted_hdrs = TRUE; + + /* set the length so that if the connection times out, it will be + * force closed when we havent read the entire body */ + xfer->remaining_len = len; + + /* if there is no length to read, we are done */ + if (len == 0) + { + gt_transfer_close (xfer, FALSE); + return; + } + + input_remove_all (c->fd); + input_add (c->fd, xfer, INPUT_READ, + (InputCallback)read_response_body, TIMEOUT_DEF); +} + +/*****************************************************************************/ + +/* + * Process an HTTP return code (either client or server [push]) and attempt + * to appropriately handle/expunge the transfer structure accordingly. The + * return value indicates whether or not we may continue after the code + * has been processed. Some error codes (404) are considered fatal here + * and you should abort after this call. + * + * NOTE: + * If this function returns FALSE, the calling argument is free'd and you + * should not access it further. + */ +int gt_http_handle_code (GtTransfer *xfer, int code) +{ + TCPC *c; + Chunk *chunk; + GtSource *gt; + + /* successful code, do nothing */ + if (code >= 200 && code <= 299) + return TRUE; + + c = gt_transfer_get_tcpc (xfer); + chunk = gt_transfer_get_chunk (xfer); + + gt = gt_transfer_get_source (xfer); + assert (gt != NULL); + + /* + * We have to be careful not to access the transfer or any + * data related to it after calling p->source_abort, which + * will cancel the transfer. + */ + switch (code) + { + default: + case 404: /* not found */ + { + /* + * If this was a uri-res request, retry with an index request. + * Otherwise, remove the source. + * + * TODO: perhaps this should retry with url-encoded index + * request, before removing? + */ + if (gt->uri_res_failed) + { + GT->source_abort (GT, chunk->transfer, xfer->source); + } + else + { + handle_http_error (xfer, SOURCE_QUEUED_REMOTE, + "File not found"); + gt->uri_res_failed = TRUE; + } + } + break; + case 401: /* unauthorized */ + handle_http_error (xfer, SOURCE_CANCELLED, "Access denied"); + break; + case 503: /* remotely queued */ + handle_http_error (xfer, SOURCE_QUEUED_REMOTE, "Queued (Remotely)"); + break; + case 500: /* source may not match, check later */ + /* + * The remote node has reported that this file has changed + * since the last time we received results for it. This more + * than likely indicates a hash change, in which case we should + * not keep this associated with this transfer. Unfortunately, + * giFT fails to provide any sort of abstraction for us + * to remove sources ourselves, so we need this hopefully + * temporary hack to remove the source. + */ + GT->source_abort (GT, chunk->transfer, xfer->source); + break; + } + + return FALSE; +} + +static int parse_content_range (char *range, off_t *r_start, off_t *r_end, + off_t *r_size) +{ + char *start, *end, *size; + + string_sep (&range, "bytes"); + string_sep_set (&range, " ="); /* accept "bytes=" and "bytes " */ + + if (r_end) + *r_end = -1; + if (r_start) + *r_start = -1; + if (r_size) + *r_size = -1; + + if (!range) + return FALSE; + + start = string_sep (&range, "-"); + end = string_sep (&range, "/"); + size = range; + + if (r_start && start) + *r_start = ATOUL (start); + if (r_end && end) + *r_end = ATOUL (end); + if (r_size && size) + *r_size = ATOUL (size); + + if (start && end && size) + return TRUE; + + return FALSE; +} + +static int verify_range_response (GtTransfer *xfer, Chunk *chunk) +{ + char *user_agent; + char *content_range; + char *content_len; + off_t start, stop, size; +#if 0 + off_t file_size; +#endif + off_t xfer_size; + int error = FALSE; + +#if 0 + file_size = chunk->transfer->total; +#endif + xfer_size = xfer->stop - xfer->start; + + if ((content_len = dataset_lookupstr (xfer->header, "content-length"))) + { + size = ATOUL (content_len); + + if (size != xfer_size) + { + GIFT_ERROR (("bad content len=%lu, expected %lu", size, xfer_size)); + error = TRUE; + gt_transfer_status (xfer, SOURCE_CANCELLED, "Bad Content-Length"); + } + } + + if ((content_range = dataset_lookupstr (xfer->header, "content-range"))) + { + if (HTTP_DEBUG) + { + GT->dbg (GT, "Content-Range: %s, start=%lu, stop=%lu", + content_range, chunk->start, chunk->stop); + } + + if (parse_content_range (content_range, &start, &stop, &size)) + { + if (start != xfer->start) + { + GIFT_ERROR (("bad xfer start: %lu %lu", xfer->start, start)); + error = TRUE; + } + if (stop != xfer->stop - 1) + { + GIFT_ERROR (("bad xfer end: %lu %lu", xfer->stop, stop)); + error = TRUE; + } +#if 0 + if (size != file_size) + { + GIFT_ERROR (("bad xfer size: %lu, expected %lu", file_size, + size)); + error = TRUE; + } +#endif + } + else + { + GIFT_ERROR (("error parsing content-range hdr")); + error = TRUE; + } + } + + if (!content_len && !content_range) + { + if (!(user_agent = dataset_lookupstr (xfer->header, "Server"))) + user_agent = dataset_lookupstr (xfer->header, "User-Agent"); + + GIFT_ERROR (("missing Content-Range/Length, start=%lu, stop=%lu, " + "culprit=%s", xfer->start, xfer->stop, user_agent)); + + error = TRUE; + } + + if (error) + { + GT->DBGFN (GT, "removing source %s", chunk->source->url); + GT->source_abort (GT, chunk->transfer, chunk->source); + return FALSE; + } + + return TRUE; +} + +/* + * Receive and process the HTTP response + */ +static void get_server_reply (int fd, input_id id, GtTransfer *xfer) +{ + Chunk *chunk; + TCPC *c; + GtSource *gt; + FDBuf *buf; + unsigned char *data; + char *msg; + size_t data_len = 0; + int n; + + chunk = gt_transfer_get_chunk (xfer); + c = gt_transfer_get_tcpc (xfer); + + gt = gt_transfer_get_source (xfer); + + buf = tcp_readbuf (c); + + /* attempt to read the complete server response */ + if ((n = fdbuf_delim (buf, "\n")) < 0) + { + msg = "Timed out"; + + /* + * If the peer abruptly closed the connection, its possible it + * didn't understand our request if it was a uri-res request. + * So, disable uri-res in that case. + */ + if (fd != -1) + { + gt->uri_res_failed = TRUE; + msg = "Connection closed"; + } + + gt_transfer_status (xfer, SOURCE_CANCELLED, msg); + gt_transfer_close (xfer, TRUE); + return; + } + + if (gt_fdbuf_full (buf)) + { + gt_transfer_close (xfer, TRUE); + return; + } + + if (n > 0) + return; + + data = fdbuf_data (buf, &data_len); + + if (!gt_http_header_terminated (data, data_len)) + return; + + fdbuf_release (buf); + + /* parse the server response */ + if (!parse_server_reply (xfer, c, data)) + { + gt_transfer_status (xfer, SOURCE_CANCELLED, "Malformed HTTP header"); + gt_transfer_close (xfer, TRUE); + return; + } + + /* + * NOTE: if we wanted to do any further processing of the server reply + * after GET /, this is where it would be + */ + + /* determine what to do with the HTTP code reply */ + if (!gt_http_handle_code (xfer, xfer->code)) + return; + + /* make sure the server understood our "Range:" request */ + if (!verify_range_response (xfer, chunk)) + return; + + /* + * Received HTTP headers, ...and now we are waiting for the file. This + * should be a very short wait :) + */ + gt_transfer_status (xfer, SOURCE_WAITING, "Received HTTP headers"); + xfer->transmitted_hdrs = TRUE; + + /* special case if the request size is 0 */ + if (xfer->remaining_len == 0) + { + gt_transfer_close (xfer, FALSE); + return; + } + + /* disable the header read timeout */ + timer_remove_zero (&xfer->header_timer); + + /* wait for the file to be sent by the server */ + input_remove (id); + input_add (fd, xfer, INPUT_READ, + (InputCallback)gt_get_read_file, 0); +} + +/* + * Receive the requested file from the server. + */ +void gt_get_read_file (int fd, input_id id, GtTransfer *xfer) +{ + TCPC *c; + Chunk *chunk; + char buf[RW_BUFFER]; + size_t size; + int recv_len; + + c = gt_transfer_get_tcpc (xfer); + chunk = gt_transfer_get_chunk (xfer); + + /* set the max initial size of the request */ + size = sizeof (buf); + + /* + * Cap the size of the received length at the length + * of the request. + * + * This way we can't receive part of the next request + * header with persistent HTTP. + */ + if (size > xfer->remaining_len) + size = xfer->remaining_len; + + /* + * Ask giFT for the max size we should read. If this returns 0, the + * download was suspended. + */ + if ((size = download_throttle (chunk, size)) == 0) + return; + + if ((recv_len = tcp_recv (c, buf, size)) <= 0) + { + GT->DBGFN (GT, "tcp_recv error (%d) from %s:%hu: %s", recv_len, + net_ip_str (c->host), c->port, GIFT_NETERROR()); + + gt_transfer_status (xfer, SOURCE_CANCELLED, "Cancelled remotely"); + gt_transfer_close (xfer, TRUE); + return; + } + + /* + * We are receiving a file here, so this will always be calling + * gt_download. + */ + gt_transfer_write (xfer, chunk, buf, (size_t)recv_len); +} + +/*****************************************************************************/ + +static void client_reset_timeout (int fd, input_id id, TCPC *c) +{ + /* normally we would call recv () here but there's no reason why the server + * should be sending stuff down to use...so, disconnect */ + if (HTTP_DEBUG) + GT->DBGSOCK (GT, c, "closing client HTTP connection"); + + gt_http_connection_close (GT_TRANSFER_DOWNLOAD, c, TRUE); +} + +void gt_http_client_reset (TCPC *c) +{ + /* This can happen when the GtTransfer and TCPC have been decoupled, + * such as when we are waiting for a GIV response from a node. */ + if (!c) + return; + + tcp_flush (c, TRUE); + + input_remove_all (c->fd); + input_add (c->fd, c, INPUT_READ, + (InputCallback)client_reset_timeout, 2 * MINUTES); +} diff -r 000000000000 -r d39e1d0d75b6 src/gt_http_client.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/gt_http_client.h Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,33 @@ +/* + * $Id: gt_http_client.h,v 1.9 2004/01/18 05:40:56 hipnod Exp $ + * + * Copyright (C) 2001-2003 giFT project (gift.sourceforge.net) + * + * 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. + */ + +#ifndef GIFT_GT_HTTP_CLIENT_H_ +#define GIFT_GT_HTTP_CLIENT_H_ + +/*****************************************************************************/ + +void gt_http_client_get (Chunk *chunk, GtTransfer *xfer); +void gt_http_client_push (in_addr_t ip, in_port_t port, + char *request, off_t start, off_t stop); +void gt_http_client_reset (TCPC *c); + +int gt_http_handle_code (GtTransfer *xfer, int code); +void gt_http_client_start (int fd, input_id id, GtTransfer *xfer); +void gt_get_read_file (int fd, input_id id, GtTransfer *xfer); + +/*****************************************************************************/ + +#endif /* GIFT_GT_HTTP_CLIENT_H_ */ diff -r 000000000000 -r d39e1d0d75b6 src/gt_http_server.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/gt_http_server.c Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,946 @@ +/* + * $Id: gt_http_server.c,v 1.73 2005/01/04 15:03:40 mkern Exp $ + * + * Copyright (C) 2001-2003 giFT project (gift.sourceforge.net) + * + * 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. + */ + +#include "gt_gnutella.h" + +#include "gt_xfer_obj.h" +#include "gt_xfer.h" + +#include "gt_http_server.h" +#include "gt_http_client.h" + +#include "gt_accept.h" +#include "gt_ban.h" +#include "gt_version.h" + +/*****************************************************************************/ + +/* convenient shorthand */ +#define CONTENT_URN_FIELD "X-Gnutella-Content-URN" + +#define INCOMING_TIMEOUT (1 * MINUTES) + +/*****************************************************************************/ + +struct http_incoming +{ + TCPC *c; + timer_id timer; +}; + +/*****************************************************************************/ + +static void server_handle_get (GtTransfer *xfer); +static void get_client_request (int fd, input_id id, + struct http_incoming *http); +static void send_http_response (int fd, input_id id, GtTransfer *xfer); + +/*****************************************************************************/ +/* SERVER HELPERS */ + +static char *lookup_http_code (int code, char **desc) +{ + char *err; + char *txt; + + switch (code) + { + case 200: err = "OK"; + txt = "Success"; + break; + case 206: err = "Partial Content"; + txt = "Resume successful"; + break; + case 403: err = "Forbidden"; + txt = "You do not have access to this file"; + break; + case 404: err = "Not Found"; + txt = "File is not available"; + break; + case 500: err = "Internal Server Error"; + txt = "Stale file entry, retry later"; + break; + case 501: err = "Not Implemented"; + txt = "???"; + break; + case 503: err = "Service Unavailable"; + txt = "Upload queue is currently full, please try again later"; + break; + default: err = NULL; + txt = NULL; + break; + } + + if (desc) + *desc = txt; + + return err; +} + +static String *alloc_header (int code) +{ + char *code_text; + String *s; + + /* so that we can communicate both the numerical code and the human + * readable string */ + if (!(code_text = lookup_http_code (code, NULL))) + return FALSE; + + if (!(s = string_new (NULL, 0, 0, TRUE))) + return FALSE; + + string_appendf (s, "HTTP/1.1 %i %s\r\n", code, code_text); + + return s; +} + +static void construct_header_va (String *s, int code, va_list args) +{ + char *key; + char *value; + + /* Add "Server: " header */ + string_appendf (s, "Server: %s\r\n", gt_version ()); + + for (;;) + { + if (!(key = va_arg (args, char *))) + break; + + if (!(value = va_arg (args, char *))) + continue; + + string_appendf (s, "%s: %s\r\n", key, value); + } + + /* append final message terminator */ + string_append (s, "\r\n"); +} + +static String *construct_header (int code, ...) +{ + String *s; + va_list args; + + if (!(s = alloc_header (code))) + return NULL; + + va_start (args, code); + construct_header_va (s, code, args); + va_end (args); + + return s; +} + +/* + * Construct and send a server reply. + */ +static BOOL gt_http_server_send (TCPC *c, int code, ...) +{ + String *s; + int ret; + size_t len; + va_list args; + + if (!(s = alloc_header (code))) + return FALSE; + + va_start (args, code); + + construct_header_va (s, code, args); + + va_end (args); + + if (HTTP_DEBUG) + GT->DBGSOCK (GT, c, "sending reply to client =\n%s", s->str); + + len = s->len; + ret = tcp_send (c, s->str, s->len); + + string_free (s); + + return (ret == len); +} + +static char *get_error_page (GtTransfer *xfer, int code) +{ + char *page; + char *err; + char *errtxt = NULL; + + if (!(err = lookup_http_code (code, &errtxt))) + return 0; + + page = stringf ("

%i %s


%s.", code, err, errtxt); + + return page; +} + +static BOOL supports_queue (GtTransfer *xfer) +{ + char *features; + + if (dataset_lookupstr (xfer->header, "x-queue")) + return TRUE; + + if ((features = dataset_lookupstr (xfer->header, "x-features"))) + { + /* XXX: case-sensitive */ + if (strstr (features, "queue")) + return TRUE; + } + + return FALSE; +} + +static char *get_queue_line (GtTransfer *xfer) +{ + String *s; + + /* do nothing if not queued */ + if (xfer->queue_pos == 0) + return NULL; + + if (!(s = string_new (NULL, 0, 0, TRUE))) + return NULL; + + string_appendf (s, "position=%d,length=%d,pollMin=%d,pollMax=%d", + xfer->queue_pos, xfer->queue_ttl, 45, 120); + + return string_free_keep (s); +} + +static String *get_error_header (GtTransfer *xfer, int code, + const char *error_page) +{ + size_t len; + char content_len[256]; + char *queue_line = NULL; + char *content_type = "text/html"; + String *s; + + len = strlen (error_page); + snprintf (content_len, sizeof (content_len), "%u", len); + + if (code == 503 && supports_queue (xfer)) + queue_line = get_queue_line (xfer); + + /* don't send a content-type header if there is no entity body */ + if (len == 0) + content_type = NULL; + + s = construct_header (code, + "Content-Type", content_type, + "Content-Length", content_len, + CONTENT_URN_FIELD, xfer->content_urns, + "X-Queue", queue_line, + NULL); + + free (queue_line); + return s; +} + +static void send_error_reply (int fd, input_id id, GtTransfer *xfer) +{ + String *s; + const char *error_page; + int ret; + TCPC *c; + + c = gt_transfer_get_tcpc (xfer); + + if (!(error_page = get_error_page (xfer, xfer->code))) + { + gt_transfer_close (xfer, TRUE); + return; + } + + /* + * If the remote end supports queueing or supplied + * "X-Gnutella-Content-URN",, it's a Gnutella client and we don't want to + * keep sending the error page, because over many requests from this + * client the bandwidth could add up. + */ + if (supports_queue (xfer) || + dataset_lookupstr (xfer->header, "x-gnutella-content-urn")) + { + error_page = ""; /* empty */ + } + + if (!(s = get_error_header (xfer, xfer->code, error_page))) + { + gt_transfer_close (xfer, TRUE); + return; + } + + string_append (s, error_page); + + if (HTTP_DEBUG) + GT->DBGSOCK (GT, c, "sending reply to client =\n%s", s->str); + + /* send the whole page at once */ + ret = tcp_send (c, s->str, s->len); + + /* if the whole thing was sent keep the connection open */ + if (ret == s->len) + { + xfer->transmitted_hdrs = TRUE; + xfer->remaining_len = 0; + } + + string_free (s); + + gt_transfer_close (xfer, FALSE); +} + +static void gt_http_server_send_error_and_close (GtTransfer *xfer, int code) +{ + TCPC *c; + + c = gt_transfer_get_tcpc (xfer); + + xfer->code = code; + + input_remove_all (c->fd); + input_add (c->fd, xfer, INPUT_WRITE, + (InputCallback)send_error_reply, TIMEOUT_DEF); +} + +/*****************************************************************************/ + +/* parse the Range: bytes=0-10000 format */ +static void parse_client_request_range (Dataset *dataset, + off_t *r_start, off_t *r_stop) +{ + char *range; + off_t start; + off_t stop; + + if (!r_start && !r_stop) + return; + + if (r_start) + *r_start = 0; + if (r_stop) + *r_stop = 0; + + /* leave stop as 0 if we can't figure anything out yet. This is expected + * to be handled separately by GET and PUSH */ + if (!(range = dataset_lookupstr (dataset, "range"))) + return; + + /* WARNING: this butchers the data in the dataset! */ + string_sep (&range, "bytes"); + string_sep_set (&range, " ="); + + if (!range) + { + if (HTTP_DEBUG) + GT->DBGFN (GT, "error parsing Range: header"); + + return; + } + + start = (off_t) ATOI (string_sep (&range, "-")); + stop = (off_t) ATOI (string_sep (&range, " ")); + + /* + * The end of the range is optional (e.g. "Range: 0-"), and in that case + * stop == 0. In the case of a single byte file, stop == 1. + * + * TODO: this is broken for one-byte requests at the start of the file. + */ + if (stop > 0) + stop = stop + 1; + + if (r_start) + *r_start = start; + if (r_stop) + *r_stop = stop; +} + +/* + * Parse requests of the forms: + * + * /get/47/File maybe with spaces HTTP + * /get/47/files_%20_url_encoded HTTP/1.1 + * /uri-res/N2R?urn:sha1:ABCD HTTP/1.0 + * + * and combinations thereof. The "HTTP" trailer is mandatory. + */ +static void get_request_and_version (char *data, char **request, + char **version) +{ + size_t len; + char *next; + char *dup; + char *http_version = NULL; + + *request = NULL; + *version = NULL; + + /* trim whitespace inbetween command and request */ + string_trim (data); + + if (!(dup = STRDUP (data))) + return; + + string_upper (dup); + + next = dup; + + /* find the last instance of "HTTP" in the string */ + while ((next = strstr (next, "HTTP"))) + { + http_version = next; + next += sizeof ("HTTP") - 1; + } + + /* the rest of the string must be the request */ + if (http_version != NULL && http_version != dup) + { + len = http_version - dup; + data[len - 1] = 0; + + *request = data; + *version = data + len; + } + + free (dup); +} + +/* + * Break down the clients HTTP request + */ +static int parse_client_request (Dataset **r_dataset, char **r_command, + char **r_request, char **r_version, + off_t *r_start, off_t *r_stop, char *hdr) +{ + Dataset *dataset = NULL; + char *command; /* GET */ + char *request; /* /file.tar.gz */ + char *version; /* HTTP/1.1 */ + char *req_line; + + if (!hdr) + return FALSE; + + /* + * Get the first line of the request + */ + req_line = string_sep_set (&hdr, "\r\n"); + + /* get the command (GET, HEAD, etc.) */ + command = string_sep (&req_line, " "); + + /* + * Handle non-url-encoded requests as well as encoded + * ones and get the request and version from this HTTP line. + */ + get_request_and_version (req_line, &request, &version); + + if (HTTP_DEBUG) + { + GT->DBGFN (GT, "command=%s version=%s request=%s", + command, version, request); + } + + if (!request || string_isempty (request)) + return FALSE; + + if (r_command) + *r_command = command; + if (r_request) + *r_request = request; + if (r_version) + *r_version = version; + + gt_http_header_parse (hdr, &dataset); + + if (r_dataset) + *r_dataset = dataset; + + /* handle Range: header */ + parse_client_request_range (dataset, r_start, r_stop); + + if (r_start && r_stop) + { + if (HTTP_DEBUG) + GT->dbg (GT, "range: [%i, %i)", *r_start, *r_stop); + } + + return TRUE; +} + +/*****************************************************************************/ + +/* + * Send the request reply back to the client + * + * NOTE: + * This is used by both GET / and PUSH / + */ +static void reply_to_client_request (GtTransfer *xfer) +{ + TCPC *c; + Chunk *chunk; + off_t entity_size; + char range[128]; + char length[32]; + BOOL ret; + + if (!xfer) + return; + + c = gt_transfer_get_tcpc (xfer); + chunk = gt_transfer_get_chunk (xfer); + + /* + * Determine the "total" entity body that we have locally, not necessarily + * the data that we are uploading. HTTP demands this, but OpenFT really + * doesn't give a shit. + * + * NOTE: + * This only works to standard when operating on a GET / request, PUSH's + * merely use the range! + */ + if (xfer->open_path_size) + entity_size = xfer->open_path_size; + else + entity_size = xfer->stop - xfer->start; + + /* NOTE: we are "working" around the fact that HTTP's Content-Range + * reply is inclusive for the last byte, whereas giFT's is not. */ + snprintf (range, sizeof (range) - 1, "bytes %i-%i/%i", + (int) xfer->start, (int) (xfer->stop - 1), (int) entity_size); + + snprintf (length, sizeof (length) - 1, "%i", + (int) (xfer->stop - xfer->start)); + + ret = gt_http_server_send (c, xfer->code, + "Content-Range", range, + "Content-Length", length, + "Content-Type", xfer->content_type, + CONTENT_URN_FIELD, xfer->content_urns, + NULL); + + /* if we transmitted all headers successfully, set transmitted_hdrs + * to keep the connection alive, possibly */ + if (ret) + xfer->transmitted_hdrs = TRUE; +} + +/*****************************************************************************/ + +static void http_incoming_free (struct http_incoming *incoming) +{ + timer_remove (incoming->timer); + free (incoming); +} + +static void http_incoming_close (struct http_incoming *incoming) +{ + gt_http_connection_close (GT_TRANSFER_UPLOAD, incoming->c, TRUE); + http_incoming_free (incoming); +} + +static BOOL http_incoming_timeout (struct http_incoming *incoming) +{ + http_incoming_close (incoming); + return FALSE; +} + +static struct http_incoming *http_incoming_alloc (TCPC *c) +{ + struct http_incoming *incoming; + + incoming = malloc (sizeof (struct http_incoming)); + if (!incoming) + return NULL; + + incoming->c = c; + incoming->timer = timer_add (INCOMING_TIMEOUT, + (TimerCallback)http_incoming_timeout, + incoming); + + return incoming; +} + +void gt_http_server_dispatch (int fd, input_id id, TCPC *c) +{ + struct http_incoming *incoming; + + if (net_sock_error (c->fd)) + { + gt_http_connection_close (GT_TRANSFER_UPLOAD, c, TRUE); + return; + } + + if (!(incoming = http_incoming_alloc (c))) + { + gt_http_connection_close (GT_TRANSFER_UPLOAD, c, TRUE); + return; + } + + /* keep track of this incoming connection */ + /* gt_http_connection_insert (GT_TRANSFER_UPLOAD, c); */ + + input_remove (id); + input_add (c->fd, incoming, INPUT_READ, + (InputCallback)get_client_request, 0); +} + +/* + * Handle the client's GET commands. + */ +static void get_client_request (int fd, input_id id, struct http_incoming *http) +{ + GtTransfer *xfer; + TCPC *c; + Dataset *dataset = NULL; + char *command = NULL; + char *request = NULL; + char *version = NULL; + off_t start = 0; + off_t stop = 0; + FDBuf *buf; + unsigned char *data; + size_t data_len = 0; + int n; + + c = http->c; + buf = tcp_readbuf (c); + + if ((n = fdbuf_delim (buf, "\n")) < 0) + { + http_incoming_close (http); + return; + } + + if (gt_fdbuf_full (buf)) + { + http_incoming_close (http); + return; + } + + if (n > 0) + return; + + data = fdbuf_data (buf, &data_len); + + if (!gt_http_header_terminated (data, data_len)) + return; + + fdbuf_release (buf); + + if (HTTP_DEBUG) + GT->DBGSOCK (GT, c, "client request:\n%s", data); + + /* parse the client's request and determine how we should proceed */ + if (!parse_client_request (&dataset, &command, &request, &version, + &start, &stop, data)) + { + GT->DBGSOCK (GT, c, "invalid http header"); + http_incoming_close (http); + return; + } + + /* discard incoming connection timeout maintainance structure */ + http_incoming_free (http); + + /* + * We have enough information now to actually allocate the transfer + * structure and pass it along to all logic that follows this + * + * NOTE: + * Each individual handler can determine when it wants to let giFT + * in on this + */ + xfer = gt_transfer_new (GT_TRANSFER_UPLOAD, NULL, + net_peer (c->fd), 0, start, stop); + + /* connect the connection and the xfer in unholy matrimony */ + gt_transfer_set_tcpc (xfer, c); + + /* assign all our own memory */ + xfer->command = STRDUP (command); + xfer->header = dataset; + xfer->version = STRDUP (version); + + if (!gt_transfer_set_request (xfer, request)) + { + if (HTTP_DEBUG) + GT->DBGSOCK (GT, c, "invalid request \"s\"", request); + + gt_transfer_close (xfer, TRUE); + return; + } + + /* no need for this function again */ + input_remove (id); + + /* figure out how to handle this request */ + if (!strcasecmp (xfer->command, "GET") || + !strcasecmp (xfer->command, "HEAD")) + { + server_handle_get (xfer); + return; + } + + gt_http_server_send_error_and_close (xfer, 501); +} + +/*****************************************************************************/ + +static Transfer *start_upload (GtTransfer *xfer, Chunk **chunk) +{ + Transfer *transfer; + char *user; + + user = net_ip_str (xfer->ip); + + transfer = GT->upload_start (GT, chunk, user, xfer->share_authd, + xfer->start, xfer->stop); + + assert (transfer != NULL); + + return transfer; +} + +/* setup the structure for uploading. this will be called from within + * client space for PUSH requests as well */ +int gt_server_setup_upload (GtTransfer *xfer) +{ + Transfer *transfer; /* giFT structure */ + Chunk *chunk; + TCPC *c; + + if (!xfer) + return FALSE; + + c = gt_transfer_get_tcpc (xfer); + assert (xfer->chunk == NULL); + + /* + * Ban the host if they don't have access -- this gives no information + * about whether we have the file or not, and i think this is in violation + * of the HTTP spec (supposed to return "404 not found" before 403, but + * i'm not sure. + */ + if (gt_ban_ipv4_is_banned (c->host)) + { + xfer->code = 403; + return FALSE; + } + + /* open the file that was requested before we go bringing giFT into + * this */ + if (!(xfer->f = gt_transfer_open_request (xfer, &xfer->code))) + return FALSE; + + /* assign stop a value before we proceed */ + if (xfer->stop == 0) + { + struct stat st; + + if (!file_stat (xfer->open_path, &st) || st.st_size == 0) + { + /* stupid bastards have a 0 length file */ + GT->DBGSOCK (GT, c, "cannot satisfy %s: invalid share", + xfer->open_path); + return FALSE; + } + + xfer->stop = st.st_size; + xfer->remaining_len = xfer->stop - xfer->start; + } + + /* we can now be certain that we are handling a download request from + * the client. allocate the appropriate structures to hook into giFT */ + if (!(transfer = start_upload (xfer, &chunk))) + { + GT->DBGFN (GT, "unable to register upload with the daemon"); + return FALSE; + } + + /* override 200 w/ 206 if the request is not the whole file size */ + if (xfer->remaining_len != xfer->share_authd->size) + xfer->code = 206; + + /* assign the circular references for passing the chunk along */ + gt_transfer_set_chunk (xfer, chunk); + + /* finally, seek the file descriptor where it needs to be */ + fseek (xfer->f, xfer->start, SEEK_SET); + + return TRUE; +} + +static void server_handle_get (GtTransfer *xfer) +{ + TCPC *c; + + c = gt_transfer_get_tcpc (xfer); + assert (xfer->chunk == NULL); + + /* WARNING: this block is duplicated in http_client:client_push_request */ + if (!gt_server_setup_upload (xfer)) + { + if (xfer->code == 200) + xfer->code = 404; + + gt_http_server_send_error_and_close (xfer, xfer->code); + return; + } + + input_add (c->fd, xfer, INPUT_WRITE, + (InputCallback)send_http_response, TIMEOUT_DEF); +} + +static void send_http_response (int fd, input_id id, GtTransfer *xfer) +{ + TCPC *c; + + c = gt_transfer_get_tcpc (xfer); + + if (net_sock_error (c->fd)) + { + gt_transfer_close (xfer, TRUE); + return; + } + + /* ok, send client the header */ + reply_to_client_request (xfer); + + if (!strcasecmp (xfer->command, "HEAD")) + { + gt_transfer_close (xfer, TRUE); + return; + } + + /* disable header read timer */ + timer_remove_zero (&xfer->header_timer); + + input_remove (id); + input_add (c->fd, xfer, INPUT_WRITE, + (InputCallback)gt_server_upload_file, 0); +} + +/* + * Uploads the file requests + */ +void gt_server_upload_file (int fd, input_id id, GtTransfer *xfer) +{ + TCPC *c; + Chunk *chunk; + char buf[RW_BUFFER]; + size_t read_len; + size_t size; + int sent_len = 0; + off_t remainder; + + c = gt_transfer_get_tcpc (xfer); + chunk = gt_transfer_get_chunk (xfer); + + assert (xfer->f != NULL); + + /* number of bytes left to be uploaded by this chunk */ + if ((remainder = xfer->remaining_len) <= 0) + { + /* for whatever reason this function may have been called when we have + * already overrun the transfer...in that case we will simply fall + * through to the end-of-transfer condition */ + gt_transfer_write (xfer, chunk, NULL, 0); + return; + } + + size = sizeof (buf); + + if (size > remainder) + size = remainder; + + /* + * Ask giFT for the size we should send. If this returns 0, the upload + * was suspended. + */ + if ((size = upload_throttle (chunk, size)) == 0) + return; + + /* read as much as we can from the local file */ + if (!(read_len = fread (buf, sizeof (char), size, xfer->f))) + { + GT->DBGFN (GT, "unable to read from %s: %s", xfer->open_path, + GIFT_STRERROR ()); + gt_transfer_status (xfer, SOURCE_CANCELLED, "Local read error"); + gt_transfer_close (xfer, TRUE); + return; + } + + if ((sent_len = tcp_send (c, buf, MIN (read_len, remainder))) <= 0) + { + gt_transfer_status (xfer, SOURCE_CANCELLED, + "Unable to send data block"); + gt_transfer_close (xfer, TRUE); + return; + } + + /* check if the file was too small for the transfer TODO: this isn't + * checked earlier, but should be */ + if (read_len != size) + { + gt_transfer_status (xfer, SOURCE_CANCELLED, "Unexpected end of file"); + gt_transfer_close (xfer, TRUE); + return; + } + + /* + * Check for short send(). This could use fseek(), but I have this + * growing feeling that using stdio everywhere is a bad idea. + */ + if (read_len != sent_len) + { + gt_transfer_status (xfer, SOURCE_CANCELLED, "Short send()"); + gt_transfer_close (xfer, TRUE); + return; + } + + /* + * Call gt_upload to report back to giFT. This will also cancel + * the transfer if the upload has completed. + */ + gt_transfer_write (xfer, chunk, buf, sent_len); +} + +/*****************************************************************************/ + +void gt_http_server_reset (TCPC *c) +{ + /* + * This can happen because the GtTransfer and TCPC can be decoupled, as in + * the case of a push request sent. + */ + if (!c) + return; + + /* finish all queued writes before we reset */ + tcp_flush (c, TRUE); + + /* reset the input state */ + input_remove_all (c->fd); + input_add (c->fd, c, INPUT_READ, + (InputCallback)gt_http_server_dispatch, 2 * MINUTES); +} diff -r 000000000000 -r d39e1d0d75b6 src/gt_http_server.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/gt_http_server.h Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,32 @@ +/* + * $Id: gt_http_server.h,v 1.7 2004/02/23 04:20:07 hipnod Exp $ + * + * Copyright (C) 2001-2003 giFT project (gift.sourceforge.net) + * + * 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. + */ + +#ifndef GIFT_GT_HTTP_SERVER_H_ +#define GIFT_GT_HTTP_SERVER_H_ + +/*****************************************************************************/ + +void gt_http_server_incoming (int fd, input_id id, TCPC *c); + +int gt_server_setup_upload (GtTransfer *xfer); +void gt_server_upload_file (int fd, input_id id, GtTransfer *xfer); + +void gt_http_server_dispatch (int fd, input_id id, TCPC *c); +void gt_http_server_reset (TCPC *c); + +/*****************************************************************************/ + +#endif /* GIFT_GT_HTTP_SERVER_H_ */ diff -r 000000000000 -r d39e1d0d75b6 src/gt_netorg.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/gt_netorg.c Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,577 @@ +/* + * $Id: gt_netorg.c,v 1.47 2005/01/04 15:00:51 mkern Exp $ + * + * Copyright (C) 2001-2003 giFT project (gift.sourceforge.net) + * + * 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. + */ + +#include "gt_gnutella.h" + +#include "gt_node.h" +#include "gt_node_list.h" +#include "gt_netorg.h" + +#include "gt_connect.h" +#include "gt_accept.h" + +#include "gt_packet.h" + +#include "gt_node_cache.h" +#include "gt_web_cache.h" + +/*****************************************************************************/ + +/* how often we check the network's condition */ +#define MAINTAIN_INTERVAL (10 * SECONDS) + +/* how often to check to disconnect idle nodes */ +#define IDLE_DISCONNECT_INTERVAL (2 * MINUTES) + +/* how often to trim the node list */ +#define CLEANUP_INTERVAL (15 * MINUTES) + +/* how often to clear indications of connecting to nodes */ +#define RETRY_ALL_INTERVAL (60 * MINUTES) + +/* maximum number of unreplied pings before disconnecting from a node */ +#define MAX_UNREPLIED_PINGS 10 + +/* how many connections attempts each maintain loop for nodes previously + * registered */ +#define TRY_CONNECT_NODE_LIST gt_config_get_int("connect/node_list=3") + +/* how many connection attempts for nodes in the pong cache */ +#define TRY_CONNECT_NODE_CACHE gt_config_get_int("connect/node_cache=7") + +/*****************************************************************************/ + +/* timer for initiating/closing connections */ +static timer_id maintain_timer; + +/* timer for disconnecting connections */ +static timer_id disconnect_timer; + +/* timer for disconnecting idle nodes */ +static timer_id idle_disconnect_timer; + +/* timer for cleaning up the node list */ +static timer_id cleanup_timer; + +/* timer to clear 'tried' indicators to retry connecting */ +static timer_id retry_all_timer; + +/*****************************************************************************/ + +static GtNode *node_disconnect_one (TCPC *c, GtNode *node, void *udata) +{ + GT->DBGFN (GT, "[%s]: disconnecting", net_ip_str (GT_NODE(c)->ip)); + gt_node_disconnect (c); + return NULL; +} + +static GtNode *node_ping (TCPC *c, GtNode *node, GtPacket *packet) +{ + gt_packet_send (c, packet); + + /* ->pings_with_noreply gets set to zero when the node sends a pong */ + if (gt_packet_ttl (packet) == 1) + node->pings_with_noreply++; + + return NULL; +} + +static void ping_hosts_ttl (uint8_t ttl) +{ + GtPacket *packet; + + if (!(packet = gt_packet_new (GT_MSG_PING, ttl, NULL))) + return; + + gt_conn_foreach (GT_CONN_FOREACH(node_ping), packet, + GT_NODE_NONE, GT_NODE_CONNECTED, 0); + + gt_packet_free (packet); +} + +static void ping_hosts (time_t now) +{ + static time_t last_ping; + static time_t last_keep_alive; + BOOL need_connections; + uint8_t ttl; + + need_connections = gt_conn_need_connections (GT_NODE_ULTRA); + + if (now - last_ping < 30 * SECONDS && !need_connections) + return; + + last_ping = now; + + /* ping to get more hosts if we need connections */ + if (now - last_keep_alive >= 1 * MINUTES) + { + /* do a keepalive */ + ttl = 1; + last_keep_alive = now; + } + else + { + /* get more hosts */ + ttl = 7; + } + + ping_hosts_ttl (ttl); +} + +/*****************************************************************************/ + +static void disconnect_no_query_route (void) +{ + int nr_supernodes; + + /* only disconnect if theres other nodes to fallback on */ + nr_supernodes = gt_conn_length (GT_NODE_ULTRA, GT_NODE_CONNECTED); + + if (nr_supernodes > 0) + { + gt_conn_foreach (node_disconnect_one, NULL, + GT_NODE_LEAF, GT_NODE_CONNECTED, 0); + } +} + +static void report_connected_leaf (int connected) +{ + static int last_connected = 0; + + if (connected != last_connected) + { + GT->DBGFN (GT, "connected=%d nodes=%d", connected, + gt_conn_length (GT_NODE_NONE, GT_NODE_ANY)); + last_connected = connected; + } +} + +static int get_need_as_ultra (gt_node_class_t klass) +{ + switch (klass) + { + case GT_NODE_ULTRA: return GT_PEER_CONNECTIONS; + case GT_NODE_LEAF: return GT_LEAF_CONNECTIONS; + default: return 0; + } +} + +static int get_need_as_leaf (gt_node_class_t klass) +{ + switch (klass) + { + case GT_NODE_ULTRA: return GT_SHIELDED_CONNECTIONS; + case GT_NODE_LEAF: return 0; /* no leaf<->leaf connections allowed */ + default: return 0; + } +} + +int gt_conn_need_connections (gt_node_class_t klass) +{ + int connected; + int desired; + + connected = gt_conn_length (klass, GT_NODE_CONNECTED); + + /* don't call this with multiple classes -- the need of one + * class could cancel a surplus of the other */ + assert (klass == GT_NODE_ULTRA || klass == GT_NODE_LEAF); + + if (GT_SELF->klass & GT_NODE_ULTRA) + desired = get_need_as_ultra (klass); + else + desired = get_need_as_leaf (klass); + + return desired - connected; +} + +static void disconnect_hosts (gt_node_class_t klass, int excess) +{ + int connected; + + connected = gt_conn_length (klass, GT_NODE_CONNECTED); + + GT->DBGFN (GT, "too many connections (%d)[%s], disconnecting %d", + connected, gt_node_class_str (klass), excess); + + while (excess-- > 0) + { + GtNode *node = gt_conn_random (klass, GT_NODE_CONNECTED); + + /* TODO: send BYE message here */ + + assert (GT_CONN(node) != NULL); + gt_node_disconnect (GT_CONN(node)); + } +} + +static BOOL disconnect_excess_timer (void *udata) +{ + int leaf_excess; + int ultra_excess; + + leaf_excess = gt_conn_need_connections (GT_NODE_LEAF); + ultra_excess = gt_conn_need_connections (GT_NODE_ULTRA); + + if (leaf_excess < 0) + disconnect_hosts (GT_NODE_LEAF, -leaf_excess); + + if (ultra_excess < 0) + disconnect_hosts (GT_NODE_ULTRA, -ultra_excess); + + disconnect_timer = 0; + return FALSE; +} + +static GtNode *collect_each_node (TCPC *c, GtNode *node, List **nodes) +{ + if (node->tried_connect) + return NULL; + + if (!node->gt_port) + return NULL; + + /* mark having tried to to connect to this node already */ + node->tried_connect = TRUE; + + *nodes = list_append (*nodes, node); + + /* stop iterating if we have enough nodes */ + if (list_length (*nodes) >= TRY_CONNECT_NODE_LIST) + return node; + + return NULL; +} + +static GtNode *clear_try_bit (TCPC *c, GtNode *node, void *udata) +{ + node->tried_connect = FALSE; + return NULL; +} + +static BOOL prune_registered (struct cached_node *cached, void *udata) +{ + if (gt_node_lookup (cached->addr.ip, cached->addr.port)) + { + GT->DBGFN (GT, "pruning %s (already registered)", + net_ip_str (cached->addr.ip), cached->addr.port); + free (cached); + return TRUE; + } + + return FALSE; +} + +static BOOL register_cached (struct cached_node *cached, void *udata) +{ + GtNode *node; + + node = gt_node_lookup (cached->addr.ip, cached->addr.port); + + if (node) + { + /* + * Argh, gt_node_lookup only matches by IP + * This should be assert (0) + */ + assert (node->gt_port != cached->addr.port); + + free (cached); + return TRUE; + } + + node = gt_node_register (cached->addr.ip, cached->addr.port, + cached->klass); + + /* we've got to free the node, Jim */ + free (cached); + + /* this happens if the address is invalid or a mem failure */ + if (!node) + return TRUE; + + gt_connect (node); + node->tried_connect = TRUE; + + return TRUE; +} + +static BOOL connect_each (GtNode *node, void *udata) +{ + if (gt_connect (node) < 0) + { + GT->err (GT, "Failed to connect to node %s:%hu: %s", + net_ip_str (node->ip), node->gt_port, GIFT_NETERROR()); + return TRUE; + } + + return TRUE; +} + +/*****************************************************************************/ + +/* returns number of nodes we will try to connect to */ +static size_t try_some_nodes (time_t now) +{ + List *nodes = NULL; + List *cached = NULL; + size_t total = 0; + size_t nr; + size_t len; + size_t count; + + /* the total amount of nodes we should try */ + nr = TRY_CONNECT_NODE_LIST + TRY_CONNECT_NODE_CACHE; + + /* + * Iterate the node (pong) cache and node list until we + * have seen 'nr' nodes or there are no more hosts to try. + */ + + while (total < nr) + { + gt_conn_foreach (GT_CONN_FOREACH(collect_each_node), &nodes, + GT_NODE_NONE, GT_NODE_DISCONNECTED, 0); + + /* grab at most nr - total nodes (still need to fix the preceeding + * call to gt_conn_foreach() to respect 'total') */ + count = MIN (nr - total, TRY_CONNECT_NODE_CACHE); + assert (count >= 0); + + cached = gt_node_cache_get_remove (count); + + /* registered nodes can still slip into our node cache, argh */ + cached = list_foreach_remove (cached, + (ListForeachFunc)prune_registered, + NULL); + + len = list_length (nodes) + list_length (cached); + + total += len; + + if (len == 0) + break; + + nodes = list_foreach_remove (nodes, (ListForeachFunc)connect_each, + NULL); + assert (nodes == NULL); + + cached = list_foreach_remove (cached, (ListForeachFunc)register_cached, + NULL); + assert (cached == NULL); + } + + return total; +} + +static void maintain_class (gt_node_class_t klass, time_t now) +{ + int connected; + int need; + + connected = gt_conn_length (klass, GT_NODE_CONNECTED); + need = gt_conn_need_connections (klass); + + /* + * print the number of nodes connected if it has changed + * XXX: print leaves from ultrapeers and leaves too. + * damn static variables to hell + */ + if (klass == GT_NODE_ULTRA) + report_connected_leaf (connected); + + /* 0 == perfection */ + if (need == 0) + return; + + /* disconnect some nodes */ + if (need < 0) + { + if (disconnect_timer) + return; + + /* + * Disconnect the node soon, because it could happen that + * someone will disconnect from us first, causing cascading + * disconnects. + */ + GT->DBGFN (GT, "starting disconnect timer..."); + disconnect_timer = timer_add (4 * SECONDS, + (TimerCallback)disconnect_excess_timer, + NULL); + return; + } + + /* + * If try_some_nodes() returns 0, then there are no nodes in the node + * cache nor any on the node list that we haven't tried yet. In that case, + * we need to contact the gwebcaches and hope a fresh infusion of nodes + * will help. While we wait, we retry all the nodes we already tried by + * clearing node->tried_connect for each node, which otherwise prevents + * from recontacting the nodes. + * + * We will "block" on the gwebcaches if the bandwidth is completely + * saturated and we can't get a reply from anyone, or if there are no + * ultrapeers with connection slots available. The gwebcache subsystem + * imposes its own limits on how often it will contact gwebcaches, so if + * we do end up in this situation, hopefully we will simply spend most of + * the time unconnected rather than hammering the gwebcaches. + */ + if (try_some_nodes (now) == 0) + { + size_t len; + + len = gt_conn_length (GT_NODE_NONE, GT_NODE_ANY); + GT->dbg (GT, "try_some_nodes() returned 0. node list len=%u", len); + + if (connected == 0 || len < 20) + { + /* try to get more hosts */ + GT->dbg (GT, "No hosts to try. Looking in gwebcaches..."); + gt_web_cache_update (); + } + + GT->dbg (GT, "Retrying to connect to nodes..."); + + /* while we are waiting for the gwebcaches, try each node again */ + gt_conn_foreach (GT_CONN_FOREACH(clear_try_bit), NULL, + GT_NODE_NONE, GT_NODE_ANY, 0); + + return; + } +} + +static GtNode *disconnect_no_ping_replies (TCPC *c, GtNode *node, void *udata) +{ + if (node->pings_with_noreply < MAX_UNREPLIED_PINGS) + return NULL; + + GT->DBGSOCK (GT, node->c, "%d unreplied pings. disconnecting", + node->pings_with_noreply); + + gt_node_disconnect (c); + return NULL; +} + +/*****************************************************************************/ + +/* + * This is the main network maintainence function. All connections to the + * network are initiated from here. + */ +static BOOL maintain (void *udata) +{ + time_t now; + + now = time (NULL); + + /* disconnect nodes without query routing if we are not a supernode */ + if (!(GT_SELF->klass & GT_NODE_ULTRA)) + disconnect_no_query_route (); + +#if 0 + trace_list (connections); +#endif + + /* + * Send pings to all connected nodes. We used to do this only every + * minute, but because some nodes have short timeouts if they receive + * nothing from you, we now do it every MAINTAIN_INTERVAL. + */ + ping_hosts (now); + + maintain_class (GT_NODE_ULTRA, now); + maintain_class (GT_NODE_LEAF, now); + + return TRUE; +} + +static BOOL idle_disconnect (void *udata) +{ + gt_conn_foreach (GT_CONN_FOREACH(disconnect_no_ping_replies), NULL, + GT_NODE_NONE, GT_NODE_CONNECTED, 0); + return TRUE; +} + +static BOOL cleanup (void *udata) +{ + /* trim excess nodes */ + gt_conn_trim (); + + /* save to disk important nodes from the node list */ + gt_node_list_save (); + + /* save to disk important nodes from the node cache */ + gt_node_cache_save (); + + return TRUE; +} + +static BOOL retry_all (void *udata) +{ + /* + * Clear the 'tried' bit for all nodes, so if we start looking for nodes + * we try reconnecting to the ones we know about instead of contacting the + * gwebcaches. + * + * NOTE: should all the nodes be possibly retried (GT_NODE_ANY) or + * only those that are disconnected (GT_NODE_DISCONNECTED)? + */ + gt_conn_foreach (GT_CONN_FOREACH(clear_try_bit), NULL, + GT_NODE_NONE, GT_NODE_ANY, 0); + + return TRUE; +} +/*****************************************************************************/ + +void gt_netorg_init (void) +{ + if (maintain_timer != 0) + return; + + /* load the node cache */ + gt_node_cache_init (); + + /* setup the links maintain timer */ + maintain_timer = timer_add (MAINTAIN_INTERVAL, + maintain, NULL); + + idle_disconnect_timer = timer_add (IDLE_DISCONNECT_INTERVAL, + idle_disconnect, NULL); + + cleanup_timer = timer_add (CLEANUP_INTERVAL, + cleanup, NULL); + + retry_all_timer = timer_add (RETRY_ALL_INTERVAL, + retry_all, NULL); + + /* call it now so we don't have to wait the first time */ + maintain (NULL); +} + +void gt_netorg_cleanup (void) +{ + /* save the node cache */ + gt_node_cache_cleanup (); + + timer_remove_zero (&disconnect_timer); + + timer_remove_zero (&maintain_timer); + timer_remove_zero (&idle_disconnect_timer); + timer_remove_zero (&cleanup_timer); + timer_remove_zero (&retry_all_timer); +} diff -r 000000000000 -r d39e1d0d75b6 src/gt_netorg.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/gt_netorg.h Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,48 @@ +/* + * $Id: gt_netorg.h,v 1.16 2004/01/04 06:01:20 hipnod Exp $ + * + * Copyright (C) 2001-2003 giFT project (gift.sourceforge.net) + * + * 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. + */ + +#ifndef GIFT_GT_NETORG_H_ +#define GIFT_GT_NETORG_H_ + +/*****************************************************************************/ + +/* number of ultrapeers we try to maintain connections to if we are a leaf */ +#define GT_SHIELDED_CONNECTIONS gt_config_get_int("main/connections=3") + +/* number of leaf connections we will maintain as ultrapeer */ +#define GT_LEAF_CONNECTIONS gt_config_get_int("main/leaf_connections=0") + +/* number of ultrapeer<->ultrapeer connections we maintain if we're one */ +#define GT_PEER_CONNECTIONS gt_config_get_int("main/peer_connections=3") + +/* timeouts for connecting to nodes at different stages */ +#define TIMEOUT_1 gt_config_get_int("handshake/timeout1=20") +#define TIMEOUT_2 gt_config_get_int("handshake/timeout2=40") +#define TIMEOUT_3 gt_config_get_int("handshake/timeout3=60") + +/*****************************************************************************/ + +/* return how many connections we need for the given node class */ +int gt_conn_need_connections (gt_node_class_t klass); + +/*****************************************************************************/ + +void gt_netorg_init (void); +void gt_netorg_cleanup (void); + +/*****************************************************************************/ + +#endif /* GIFT_GT_NETORG_H_ */ diff -r 000000000000 -r d39e1d0d75b6 src/gt_node.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/gt_node.c Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,459 @@ +/* + * $Id: gt_node.c,v 1.59 2005/01/04 15:00:51 mkern Exp $ + * + * Copyright (C) 2001-2003 giFT project (gift.sourceforge.net) + * + * 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. + */ + +#include "gt_gnutella.h" + +#include "gt_node.h" +#include "gt_node_list.h" + +#include "gt_utils.h" + +#include "gt_packet.h" +#include "gt_query_route.h" +#include "gt_share_state.h" + +#include "gt_node_cache.h" + +#include "io/rx_stack.h" /* gt_rx_stack_free */ +#include "io/tx_stack.h" /* gt_tx_stack_free, gt_tx_stack_queue */ + +#include "transfer/push_proxy.h" + +/*****************************************************************************/ + +/* maps ids -> node, so we dont have to keep TCPC ptrs in + * various data structures */ +static Dataset *node_ids; + +/*****************************************************************************/ + +static void node_add (GtNode *node) +{ + if (!node_ids) + node_ids = dataset_new (DATASET_HASH); + + if (!node->ip) + return; + + dataset_insert (&node_ids, &node->ip, sizeof (node->ip), node, 0); +} + +static void node_remove (GtNode *node) +{ + if (!node) + return; + + if (!node->ip) + return; + + dataset_remove (node_ids, &node->ip, sizeof (node->ip)); +} + +/*****************************************************************************/ + +GtNode *gt_node_new () +{ + GtNode *node; + + if (!(node = MALLOC (sizeof (GtNode)))) + return NULL; + + return node; +} + +static void free_node (GtNode *node) +{ + if (!node) + return; + + gt_node_disconnect (GT_CONN(node)); + gt_conn_remove (node); + + free (node); +} + +/* NOTE: this isnt safe to call at all times */ +void gt_node_free (GtNode *node) +{ + node_remove (node); + free_node (node); +} + +/* set the node to use the TCP connection */ +void gt_node_connect (GtNode *node, TCPC *c) +{ + assert (GT_CONN(node) == NULL); + assert (GT_NODE(c) == NULL); + + node->c = c; + c->udata = node; +} + +/* put the node into some data structures to keep track of it */ +static void track_node (GtNode *node, TCPC *c) +{ + if (node->ip) + assert (node->ip == c->host); + + /* fill in peer info (in network byte order) */ + node->ip = c->host; + assert (node->ip != 0); + + gt_conn_add (node); + node_add (node); +} + +/* instantiate a node from an existing connection */ +GtNode *gt_node_instantiate (TCPC *c) +{ + GtNode *node; + BOOL existed = FALSE; + + if (!c || !c->host) + return NULL; + + /* TODO: We should really lookup the port in Listen-IP header, right? */ + node = gt_node_lookup (c->host, 0); + + if (node) + { + existed = TRUE; + + /* abort if already connected/connecting */ + if (node->state != GT_NODE_DISCONNECTED) + return NULL; + } + else + { + if (!(node = gt_node_new ())) + return NULL; + } + + assert (node->c == NULL); + + /* attach this node to the connection and vice-versa */ + gt_node_connect (node, c); + + if (!existed) + track_node (node, c); + + return node; +} + +static int free_one (ds_data_t *key, ds_data_t *value, void *udata) +{ + GtNode *node = value->data; + + /* don't call gt_node_free here while iterating through the + * Dataset because it will cause us to miss items when the + * Dataset is resized */ + free_node (node); + + return DS_CONTINUE | DS_REMOVE; +} + +void gt_node_remove_all (void) +{ + dataset_foreach_ex (node_ids, DS_FOREACH_EX(free_one), NULL); + dataset_clear (node_ids); + node_ids = NULL; +} + +BOOL gt_node_freeable (GtNode *node) +{ + time_t now; + + if (node->state != GT_NODE_DISCONNECTED) + return FALSE; + + now = time (NULL); + + /* keep hosts with whom we've had a connection for a good while */ + if (node->vitality > 0 && now - node->vitality <= 30 * EDAYS) + return FALSE; + + if (now - node->start_connect_time <= 30 * EMINUTES) + return FALSE; + + /* yeah, sure, free the node if you want */ + return TRUE; +} + +/*****************************************************************************/ + +/* + * Check if this node supports the vendor message packet inside 'pkt', + * and then send the vendor message if so. + * + * The 'version' field of the VMSG is mangled to be the minimum supported + * by both this node and the remote end. + */ +BOOL gt_node_send_if_supported (GtNode *node, GtPacket *pkt) +{ + gt_vendor_msg_t vmsg; + unsigned char *vendor; + uint16_t id; + uint16_t ver; + uint16_t *send_ver; + + gt_packet_seek (pkt, GNUTELLA_HDR_LEN); + vendor = gt_packet_get_ustr (pkt, 4); + id = gt_packet_get_uint16 (pkt); + ver = gt_packet_get_uint16 (pkt); + + if (gt_packet_error (pkt)) + return FALSE; + + memset (&vmsg, 0, sizeof(vmsg)); + memcpy (&vmsg.vendor_id, vendor, 4); + vmsg.id = id; + + send_ver = dataset_lookup (node->vmsgs_supported, &vmsg, sizeof(vmsg)); + if (!send_ver) + return FALSE; + + /* XXX: we've no good facility for writing in the middle of the packet */ + memcpy (&pkt->data[GNUTELLA_HDR_LEN + VMSG_HDR_LEN - 2], send_ver, 2); + + if (gt_packet_send (GT_CONN(node), pkt) < 0) + return FALSE; + + return TRUE; +} + +BOOL gt_node_send (GtNode *node, GtPacket *packet) +{ + /* don't queue the packet if the node isn't in a state to send it */ + if (!(node->state & (GT_NODE_CONNECTED | GT_NODE_CONNECTING_2))) + return FALSE; + + /* enable this at some point in the future */ +#if 0 + assert (GT_CONN(node) != NULL); +#endif + if (!GT_CONN(node) || GT_CONN(node)->fd < 0) + return FALSE; + + return gt_tx_stack_queue (node->tx_stack, packet->data, packet->len); +} + +/*****************************************************************************/ + +GtNode *gt_node_lookup (in_addr_t ip, in_port_t port) +{ + return dataset_lookup (node_ids, &ip, sizeof (ip)); +} + +GtNode *gt_node_register (in_addr_t ip, in_port_t port, + gt_node_class_t klass) +{ + GtNode *node; + + if (GNUTELLA_LOCAL_MODE) + { + if (!net_match_host (ip, "LOCAL")) + return NULL; + } + + if (!ip) + return NULL; + + /* TODO: there is probably a problem here if a node is already + * connected and we're informed about it falsely some other way. */ + if ((node = dataset_lookup (node_ids, &ip, sizeof (ip)))) + { + if (klass != GT_NODE_NONE) + gt_node_class_set (node, klass); + + return node; + } + + if (!(node = gt_node_new ())) + return NULL; + + node->ip = ip; + node->gt_port = port; + + node_add (node); + gt_conn_add (node); + + if (klass != GT_NODE_NONE) + gt_node_class_set (node, klass); + + /* remove this node from the node cache in order to keep the cache + * conherent with the node list */ + gt_node_cache_del_ipv4 (ip, port); + + return node; +} + +void gt_node_error (TCPC *c, const char *fmt, ...) +{ + static char buf[4096]; + va_list args; + + assert (GT_CONN(GT_NODE(c)) == c); + + if (!fmt) + { + GT->DBGSOCK (GT, c, "[%hu] error: %s", GT_NODE(c)->gt_port, + GIFT_NETERROR ()); + return; + } + + va_start (args, fmt); + vsnprintf (buf, sizeof (buf) - 1, fmt, args); + va_end (args); + + GT->DBGSOCK (GT, c, "error: %s", buf); +} + +void gt_node_disconnect (TCPC *c) +{ + GtNode *node; + + if (!c) + return; + + node = GT_NODE(c); + assert (node->c == c); + + /* remove node timers */ + timer_remove_zero (&node->handshake_timer); + timer_remove_zero (&node->search_timer); + timer_remove_zero (&node->query_route_timer); + + /* destroy existing received buffers for this connection */ + gt_rx_stack_free (node->rx_stack); + node->rx_stack = NULL; + + /* destroy send buffers */ + gt_tx_stack_free (node->tx_stack); + node->tx_stack = NULL; + + /* remove the node from push proxy status */ + gt_push_proxy_del (node); + + /* reset connection status flags */ + node->verified = FALSE; + node->firewalled = FALSE; + node->incoming = FALSE; + node->rx_inflated = FALSE; + node->tx_deflated = FALSE; + node->vmsgs_sent = FALSE; + + /* close the connection for this node, if any */ + tcp_close_null (&node->c); + + node->pings_with_noreply = 0; + + /* clear verification connection */ + tcp_close_null (&node->gt_port_verify); + + free (node->ping_guid); + node->ping_guid = NULL; + + dataset_clear (node->hdr); + node->hdr = NULL; + + dataset_clear (node->vmsgs_supported); + node->vmsgs_supported = NULL; + + gt_share_state_free (node->share_state); + node->share_state = NULL; + + gt_query_router_free (node->query_router); + node->query_router = NULL; + node->query_router_counter = 0; + + /* update the last time if this node was connected */ + node->last_connect_duration = time (NULL) - node->start_connect_time; + node->total_connect_duration += node->last_connect_duration; + + gt_node_state_set (node, GT_NODE_DISCONNECTED); +} + +/*****************************************************************************/ + +char *gt_node_class_str (gt_node_class_t klass) +{ + switch (klass) + { + case GT_NODE_NONE: return "NONE"; + case GT_NODE_LEAF: return "LEAF"; + case GT_NODE_ULTRA: return "ULTRAPEER"; + case GT_NODE_DEAD: return "DEAD (freeing node)"; + default: return ""; + } +} + +char *gt_node_state_str (gt_node_state_t state) +{ + switch (state) + { + case GT_NODE_DISCONNECTED: return "Disconnected"; + case GT_NODE_CONNECTING_1: return "Connecting (handshaking)"; + case GT_NODE_CONNECTING_2: return "Connecting (awaiting ping response)"; + case GT_NODE_CONNECTED: return "Connected"; + default: return ""; + } +} + +char *gt_node_str (GtNode *node) +{ + static char buf[128]; + + snprintf (buf, sizeof (buf) - 1, "%s:%hu", net_ip_str (node->ip), + node->gt_port); + + return buf; +} + +void gt_node_state_set (GtNode *node, gt_node_state_t state) +{ + gt_node_state_t old_state = node->state; + + if (old_state != state) + { + node->state = state; + gt_conn_set_state (node, old_state, state); + } +} + +void gt_node_class_set (GtNode *node, gt_node_class_t klass) +{ + gt_node_class_t old_class = node->klass; + + if (old_class != klass) + { + /* quiet, please */ +#if 0 + if (old_class == GT_NODE_NONE) + { + GT->dbg (GT, "%-24s %s", gt_node_str (node), + gt_node_class_str (klass)); + } + else + { + GT->dbg (GT, "%-24s %s (%s)", gt_node_str (node), + gt_node_class_str (klass), gt_node_class_str (old_class)); + } +#endif + + node->klass = klass; + gt_conn_set_class (node, old_class, klass); + } +} diff -r 000000000000 -r d39e1d0d75b6 src/gt_node.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/gt_node.h Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,185 @@ +/* + * $Id: gt_node.h,v 1.36 2005/01/04 15:00:51 mkern Exp $ + * + * Copyright (C) 2001-2003 giFT project (gift.sourceforge.net) + * + * 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. + */ + +#ifndef GIFT_GT_NODE_H_ +#define GIFT_GT_NODE_H_ + +/*****************************************************************************/ + +#define MAX_NODES gt_config_get_int("main/max_nodes=2000") + +/*****************************************************************************/ + +struct gt_query_router; +struct gt_packet; +struct gt_vendor_msg; +struct gt_rx_stack; +struct gt_tx_stack; + +typedef enum gt_node_state +{ + GT_NODE_DISCONNECTED = 0x00, /* functionless node */ + GT_NODE_CONNECTING_1 = 0x01, /* pending */ + GT_NODE_CONNECTING_2 = 0x02, /* waiting for first ping response */ + GT_NODE_CONNECTED = 0x08, /* first packet is seen */ + GT_NODE_ANY = 0xFF, /* any state */ +} gt_node_state_t; + +typedef enum gt_node_class +{ + GT_NODE_NONE = 0x00, + GT_NODE_LEAF = 0x01, /* plain 0.6 or 0.4 nodes */ + GT_NODE_ULTRA = 0x02, /* ultrapeers */ + GT_NODE_DEAD = 0x04, /* node is marked for deletion (unused) */ +} gt_node_class_t; + +typedef struct gt_node +{ + in_addr_t ip; + + /* the gnutella port of the other side */ + in_port_t gt_port; + + /* the port the other side came from, could be the same as gt_port */ + in_port_t peer_port; + + /* IP address used in communication with this node */ + in_addr_t my_ip; + + /* HTTP headers the other node sent on 0.6 connection in stage-2 of + * the 3-way handshake */ + Dataset *hdr; + + /* Contains all the vendor messages supported by this node */ + Dataset *vmsgs_supported; + + unsigned int incoming : 1; /* incoming connection */ + unsigned int verified : 1; /* port has been verified */ + unsigned int firewalled : 1; /* firewalled connection */ + unsigned int tried_connect : 1; /* used internally by gt_netorg.c */ + unsigned int rx_inflated : 1; /* incoming traffic compressed */ + unsigned int tx_deflated : 1; /* outgoing traffic compressed */ + unsigned int vmsgs_sent : 1; /* sent our initial batch of vmsgs */ + + /* current state of the given connection */ + gt_node_state_t state; + + /* node classification that this connection is communicating with */ + gt_node_class_t klass; + + /* TCPC a node uses. could be null */ + TCPC *c; + + /* consecutive number of pings the host has not replied to */ + unsigned int pings_with_noreply; + + /* push proxy address, which may be different from peer address if remote + * end is multi-homed */ + in_addr_t push_proxy_ip; + in_port_t push_proxy_port; + + /* Data source for packets being read in */ + struct gt_rx_stack *rx_stack; + /* Data source for packets being sent out */ + struct gt_tx_stack *tx_stack; + + /* TCPC used for port verification */ + TCPC *gt_port_verify; + + /* identifier for this node in the GUID cache */ + unsigned long id; + + /* stats information */ + unsigned long size_kb; + unsigned long files; + + /* timers for node things */ + timer_id handshake_timer; + timer_id search_timer; + timer_id query_route_timer; + + /* around the time of the last connect to this node */ + time_t vitality; + + /* number of disconnections from this node */ + unsigned int disconnect_cnt; + + /* guid of the last ping from this node */ + gt_guid_t *ping_guid; + + /* time of the last ping from this node */ + time_t last_ping_time; + + /* start of the last connect to this node */ + time_t start_connect_time; + + /* time the last connection made to this node lasted */ + time_t last_connect_duration; + + /* total amount of time we have been connected to this node */ + time_t total_connect_duration; + + /* status of shares submitted to this node */ + struct gt_share_state *share_state; + + /* router for query packets */ + struct gt_query_router *query_router; + + /* version of the query router table submitted to this node currently */ + int query_router_counter; +} GtNode; + +/*****************************************************************************/ + +#define GT_NODE(c) ((GtNode *)c->udata) +#define GT_CONN(node) ((TCPC *) node->c) + +/*****************************************************************************/ + +GtNode *gt_node_new (void); +GtNode *gt_node_instantiate (TCPC *c); +void gt_node_free (GtNode *node); +BOOL gt_node_freeable (GtNode *node); + +char *gt_node_str (GtNode *node); +void gt_node_connect (GtNode *node, TCPC *c); +void gt_node_disconnect (TCPC *c); +void gt_node_error (TCPC *c, const char *fmt, ...); + +void gt_node_remove_all (void); + +/*****************************************************************************/ + +void gt_node_state_set (GtNode *node, gt_node_state_t state); +void gt_node_class_set (GtNode *node, gt_node_class_t klass); + +char *gt_node_class_str (gt_node_class_t klass); +char *gt_node_state_str (gt_node_state_t state); + +/*****************************************************************************/ + +GtNode *gt_node_lookup (in_addr_t ip, in_port_t port); +GtNode *gt_node_register (in_addr_t ip, in_port_t port, + gt_node_class_t klass); + +/*****************************************************************************/ + +BOOL gt_node_send_if_supported (GtNode *node, struct gt_packet *pkt); +BOOL gt_node_send (GtNode *node, struct gt_packet *pkt); + +/*****************************************************************************/ + +#endif /* GIFT_GT_NODE_H_ */ diff -r 000000000000 -r d39e1d0d75b6 src/gt_node_cache.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/gt_node_cache.c Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,459 @@ +/* + * $Id: gt_node_cache.c,v 1.11 2004/03/05 17:58:39 hipnod Exp $ + * + * Copyright (C) 2001-2003 giFT project (gift.sourceforge.net) + * + * 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. + */ + +#include "gt_gnutella.h" + +#include "gt_node.h" +#include "gt_node_cache.h" + +#include "file_cache.h" + +/*****************************************************************************/ + +#define MAX_RECENT (150) +#define MAX_STABLE (30) + +#define MAX_STICKY_RECENT (150) +#define MAX_STICKY_STABLE (30) + +/*****************************************************************************/ + +static List *recent; +static List *stable; + +static List *sticky_recent; /* synced to disk */ +static List *sticky_stable; /* like stable list, but nodes stay */ + +#if 0 +static List *compressible; +#endif + +/*****************************************************************************/ + +static void ipv4_addr_init (struct ipv4_addr *addr, in_addr_t ip, + in_port_t port) +{ + memset (addr, 0, sizeof (struct ipv4_addr)); + + addr->ip = ip; + addr->port = port; +} + +static void cached_node_init (struct cached_node *node, in_addr_t ipv4, + in_port_t port, gt_node_class_t klass, + time_t timestamp, time_t uptime, + in_addr_t src_ip) +{ + memset (node, 0, sizeof (*node)); + + ipv4_addr_init (&node->addr, ipv4, port); + + node->klass = klass; + node->timestamp = timestamp; + node->uptime = uptime; + node->src_ip = src_ip; +} + +static int cmp_ipv4 (struct cached_node *a, struct cached_node *b) +{ + return memcmp (&a->addr, &b->addr, sizeof (a->addr)); +} + +static int cmp_recent (struct cached_node *a, struct cached_node *b) +{ + return INTCMP (b->timestamp, a->timestamp); +} + +static int cmp_stable (struct cached_node *a, struct cached_node *b) +{ + time_t a_time, b_time; + + /* + * Assume the node will be up for as much time as it was up + * already, and convert this to a timestamp. + * + * This makes a difference than just comparing the uptime + * because the cache gets synced to disk. + */ + a_time = a->uptime * 2 + a->timestamp; + b_time = b->uptime * 2 + b->timestamp; + + return INTCMP (b_time, a_time); +} + +static List *add_list (List *list, size_t max_elements, CompareFunc func, + struct cached_node *node) +{ + struct cached_node *new_node; + struct cached_node *rm; + List *dup; + List *link; + + if ((dup = list_find_custom (list, node, (CompareFunc)cmp_ipv4))) + { + free (dup->data); + list = list_remove_link (list, dup); + } + + if (!(new_node = gift_memdup (node, sizeof (struct cached_node)))) + return list; + + list = list_insert_sorted (list, func, new_node); + + /* + * Truncate list at max_elements. + */ + link = list_nth (list, max_elements); + rm = list_nth_data (link, 0); + + list = list_remove_link (list, link); + free (rm); + + return list; +} + +static void add_to_cache (struct cached_node *node) +{ + recent = add_list (recent, MAX_RECENT, + (CompareFunc)cmp_recent, node); + sticky_recent = add_list (sticky_recent, MAX_STICKY_RECENT, + (CompareFunc)cmp_recent, node); + + if (node->uptime > 0) + { + stable = add_list (stable, MAX_STABLE, + (CompareFunc)cmp_stable, node); + sticky_stable = add_list (sticky_stable, MAX_STICKY_STABLE, + (CompareFunc)cmp_stable, node); + } +} + +void gt_node_cache_add_ipv4 (in_addr_t ipv4, in_port_t port, + gt_node_class_t klass, time_t timestamp, + time_t uptime, in_addr_t src_ip) +{ + struct cached_node node; + + /* make sure we don't add nodes with class GT_NODE_NONE */ + if (klass == GT_NODE_NONE) + klass = GT_NODE_LEAF; + + cached_node_init (&node, ipv4, port, klass, timestamp, uptime, src_ip); + add_to_cache (&node); + + /* don't put nodes that are already in the node list in the cache */ + if (gt_node_lookup (ipv4, port)) + gt_node_cache_del_ipv4 (ipv4, port); +} + +static List *del_list (List *list, struct cached_node *node, + in_addr_t ipv4, in_port_t port) +{ + List *link; + + if (!(link = list_find_custom (list, node, (CompareFunc)cmp_ipv4))) + return list; + + free (link->data); + return list_remove_link (list, link); +} + +static void del_from_cache (in_addr_t ipv4, in_port_t port) +{ + struct cached_node node; + + cached_node_init (&node, ipv4, port, GT_NODE_NONE, 0, 0, 0); + + recent = del_list (recent, &node, ipv4, port); + stable = del_list (stable, &node, ipv4, port); +} + +void gt_node_cache_del_ipv4 (in_addr_t ipv4, in_port_t port) +{ + del_from_cache (ipv4, port); +} + +/*****************************************************************************/ + +#if 0 +static int print_node (struct cached_node *node, String *s) +{ + char *src; + + src = STRDUP (net_ip_str (node->src_ip)); + + string_appendf (s, "[%s:%hu {%s}] ", net_ip_str (node->addr.ip), + node->addr.port, src); + free (src); + + return FALSE; +} + +static void print_list (char *prefix, List *list) +{ + String *s; + + if (!(s = string_new (NULL, 0, 0, TRUE))) + return; + + string_append (s, prefix); + + list_foreach (list, (ListForeachFunc)print_node, s); + GT->dbg (GT, "%s", s->str); + + string_free (s); +} +#endif + +void gt_node_cache_trace (void) +{ +#if 0 + print_list ("recent: ", recent); + print_list ("stable: ", stable); + print_list ("sticky_recent: ", sticky_recent); + print_list ("sticky_stable: ", sticky_stable); +#endif +} + +/*****************************************************************************/ + +/* return some nodes from the cache, and remove them */ +size_t get_first (List **src_list, List **dst_list, size_t nr) +{ + struct cached_node *node; + struct cached_node *dup; + + node = list_nth_data (*src_list, 0); + + if (!node || !(dup = gift_memdup (node, sizeof (*node)))) + return nr; + + *dst_list = list_prepend (*dst_list, dup); + nr--; + + gt_node_cache_del_ipv4 (node->addr.ip, node->addr.port); + return nr; +} + +/* + * Remove some elements from the cache and return them in a list . + * + * The nodes and the list returned SHOULD be freed. + */ +List *gt_node_cache_get_remove (size_t nr) +{ + List *list = NULL; + + /* + * We check the recent list first, and then if that's empty check the + * stable list, so we don't end up checking the stable list all the time. + */ + while (nr > 0 && recent != NULL) + nr = get_first (&recent, &list, nr); + + while (nr > 0 && stable != NULL) + nr = get_first (&stable, &list, nr); + + return list; +} + +/* + * Return some elements from the cache in a list + * + * NOTE: the data in the list returned SHOULD NOT be freed + */ +List *gt_node_cache_get (size_t nr) +{ + List *list = NULL; + size_t len; + int index; + + len = list_length (sticky_recent); + + /* + * If we don't have more than twice the number of nodes, just return an + * offset in the list of recent nodes. + * + * This is done so we can use the simple (stupid) selection algorithm + * below that would be inefficient otherwise. + */ + if (len / 2 < nr) + return list_copy (list_nth (sticky_recent, MAX (0, len - nr))); + + while (nr > 0) + { + struct cached_node *node; + + index = (float)len * rand() / (RAND_MAX + 1.0); + + node = list_nth_data (sticky_recent, index); + assert (node != NULL); + + if (list_find (list, node)) + continue; + + list = list_append (list, node); + nr--; + } + + return list; +} + +/*****************************************************************************/ + +static char *node_cache_file (const char *name) +{ + return gift_conf_path ("Gnutella/%s", name); +} + +/* + * Store the cache data in the dataset. The ip:port as a string + * is used as a key. + */ +static BOOL write_line (struct cached_node *node, FileCache *cache) +{ + char *ip_port; + char *line; + + ip_port = stringf_dup ("%s:%hu", net_ip_str (node->addr.ip), + node->addr.port); + + if (!ip_port) + return FALSE; + + line = stringf_dup ("%s %lu %lu %s", gt_node_class_str (node->klass), + (long)node->timestamp, (long)node->uptime, + net_ip_str (node->src_ip)); + + if (!line) + { + free (ip_port); + return FALSE; + } + + file_cache_insert (cache, ip_port, line); + + free (ip_port); + free (line); + + return FALSE; +} + +/* + * Read in a line from a cache file. + * + * The ip:port is the key in the Dataset. The value + * is everything else that dsecribe an entry in the node + * cache, as a string. + */ +static void parse_line (ds_data_t *key, ds_data_t *value, void *udata) +{ + char *ip_port = key->data; + char *str = value->data; + in_addr_t ipv4; + in_port_t port; + time_t timestamp; + time_t uptime; + in_addr_t src_ip; + char *klass; + + ipv4 = net_ip (string_sep (&ip_port, ":")); + port = ATOUL (ip_port); + + if (ipv4 == 0 || ipv4 == INADDR_NONE || port == 0) + return; + + /* NOTE: we ignore the class string for now */ + klass = string_sep (&str, " "); + timestamp = ATOUL (string_sep (&str, " ")); + uptime = ATOUL (string_sep (&str, " ")); + src_ip = net_ip (string_sep (&str, " ")); + + if (!klass || timestamp == 0) + return; + + /* add it to the cache */ + gt_node_cache_add_ipv4 (ipv4, port, GT_NODE_ULTRA, timestamp, uptime, + src_ip); +} + +static BOOL load_cache (char *name) +{ + FileCache *cache; + char *file; + + file = node_cache_file (name); + cache = file_cache_new (file); + + if (!cache) + return FALSE; + + dataset_foreach (cache->d, DS_FOREACH(parse_line), NULL); + + file_cache_free (cache); + return TRUE; +} + +static BOOL save_cache (char *name, List *list) +{ + FileCache *cache; + char *file; + + file = node_cache_file (name); + cache = file_cache_new (file); + + /* flush the existing data (in memory, only) */ + file_cache_flush (cache); + + /* save each entry in the node cache to the file cache */ + list_foreach (list, (ListForeachFunc)write_line, cache); + + if (!file_cache_sync (cache)) + { + GT->DBGFN (GT, "error saving cache \"%s\": %s", name, GIFT_STRERROR()); + return FALSE; + } + + file_cache_free (cache); + + return TRUE; +} + +void gt_node_cache_load (void) +{ + load_cache ("stable_nodes"); + load_cache ("recent_nodes"); +} + +void gt_node_cache_save (void) +{ + save_cache ("stable_nodes", sticky_stable); + save_cache ("recent_nodes", sticky_recent); +} + +/*****************************************************************************/ + +void gt_node_cache_init (void) +{ + gt_node_cache_load (); +} + +void gt_node_cache_cleanup (void) +{ + gt_node_cache_save (); + + /* TODO: free node cache lists */ +} diff -r 000000000000 -r d39e1d0d75b6 src/gt_node_cache.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/gt_node_cache.h Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,62 @@ +/* + * $Id: gt_node_cache.h,v 1.4 2004/01/04 06:01:20 hipnod Exp $ + * + * Copyright (C) 2001-2003 giFT project (gift.sourceforge.net) + * + * 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. + */ + +#ifndef GIFT__GT_NODE_CACHE_H__ +#define GIFT__GT_NODE_CACHE_H__ + +/*****************************************************************************/ + +struct ipv4_addr +{ + in_addr_t ip; + in_port_t port; +}; + +struct cached_node +{ + struct ipv4_addr addr; + gt_node_class_t klass; + time_t timestamp; + time_t uptime; + in_addr_t src_ip; +}; + +/*****************************************************************************/ + +void gt_node_cache_add_ipv4 (in_addr_t ipv4, in_port_t port, + gt_node_class_t klass, + time_t timestamp, time_t uptime, + in_addr_t src_ip); +void gt_node_cache_del_ipv4 (in_addr_t ipv4, in_port_t port); + +List *gt_node_cache_get_remove (size_t max_len); +List *gt_node_cache_get (size_t max_len); + +void gt_node_cache_trace (void); + +/*****************************************************************************/ + +void gt_node_cache_load (void); +void gt_node_cache_save (void); + +/*****************************************************************************/ + +void gt_node_cache_init (void); +void gt_node_cache_cleanup (void); + +/*****************************************************************************/ + +#endif /* GIFT__GT_NODE_CACHE_H__ */ diff -r 000000000000 -r d39e1d0d75b6 src/gt_node_list.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/gt_node_list.c Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,567 @@ +/* + * $Id: gt_node_list.c,v 1.12 2004/01/29 07:50:25 hipnod Exp $ + * + * Copyright (C) 2001-2003 giFT project (gift.sourceforge.net) + * + * 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. + */ + +#include "gt_gnutella.h" + +#include "gt_node.h" +#include "gt_node_list.h" + +/* + * TODO: rename gt_conn -> gt_node_list + */ + +/*****************************************************************************/ + +/* list of all nodes -- NOTE: duplicated info in gt_node.c */ +static List *node_list; + +/* last place in node_list for gt_conn_foreach */ +static List *iterator; + +/* cache of length of connected portion of node list by class (GtNodeLeaf, + * first, then GtNodeUltra) */ +static int len_cache[2] = { 0 }; + +/*****************************************************************************/ + +static void move_iterator (GtNode *mv) +{ + if (list_nth_data (iterator, 0) == mv) + iterator = list_next (iterator); +} + +void gt_conn_add (GtNode *node) +{ + if (!node) + { + GIFT_ERROR (("adding null node to node list")); + return; + } + + node_list = list_append (node_list, node); +} + +void gt_conn_remove (GtNode *node) +{ + if (!list_find (node_list, node)) + return; + + /* move the iterator if it's pointing at the node we're removing */ + move_iterator (node); + + node_list = list_remove (node_list, node); +} + +static void trace_list (List *nodes) +{ + GtNode *node; + + if (!nodes) + return; + + node = list_nth_data (nodes, 0); + + assert (node != NULL); + assert (GT_CONN(node) != NULL); + + GT->DBGFN (GT, "%s:%hu", net_ip_str (node->ip), node->gt_port); + + if (list_next (nodes)) + trace_list (list_next (nodes)); +} + +/*****************************************************************************/ + +GtNode *gt_conn_foreach (GtConnForeachFunc func, void *udata, + gt_node_class_t klass, gt_node_state_t state, + int iter) +{ + GtNode *node; + TCPC *c; + GtNode *ret = NULL; + List *ptr; + List *start; + List *next; + unsigned int i, count; + int looped = FALSE; + int iterating = FALSE; + + assert (func != NULL); + +#if 0 + GT->DBGFN (GT, "length of conn list: %u", list_length (connections)); +#endif + + if (iter) + iterating = TRUE; + + if (!iterator) + iterator = node_list; + + start = ptr = (iterating) ? iterator : node_list; + + /* having count be the static list length should keep + * concurrent conn_adds from making us never stop */ + count = list_length (node_list); + + /* hack for backward-compatible interface */ + if (state == (gt_node_state_t) -1) + state = GT_NODE_ANY; + + for (i = 0; i < count; i++) + { + if (iter && !ptr && !looped) + { + /* data only gets appended to connection list: + * safe to use head of connection list (connections) */ + ptr = node_list; + looped = TRUE; + } + + if (!ptr) + break; + + /* we wrapped to the beginning, but have just reached the original + * start so we should bail out */ + if (looped && ptr == start) + break; + + node = ptr->data; + c = GT_CONN(node); + + assert (node != NULL); + + if (klass && !(node->klass & klass)) + { + ptr = list_next (ptr); + continue; + } + + if (state != GT_NODE_ANY && node->state != state) + { + ptr = list_next (ptr); + continue; + } + + /* grab the next item. this allows the callback to free this item */ + next = list_next (ptr); + + ret = (*func) (c, node, udata); + + ptr = next; + + if (ret) + break; + + if (iterating && --iter == 0) + break; + } + + /* save the position for next time */ + if (iterating) + iterator = ptr; + + return ret; +} + +/*****************************************************************************/ + +static void add_connected (gt_node_class_t klass) +{ + int add; + + if (klass != GT_NODE_LEAF && klass != GT_NODE_ULTRA) + return; + + add = (klass == GT_NODE_LEAF ? 0 : 1); + len_cache[add]++; +} + +static void del_connected (gt_node_class_t klass) +{ + int del; + + if (klass != GT_NODE_LEAF && klass != GT_NODE_ULTRA) + return; + + del = (klass == GT_NODE_LEAF ? 0 : 1); + len_cache[del]--; +} + +void gt_conn_set_state (GtNode *node, gt_node_state_t old_state, + gt_node_state_t new_state) +{ + if (new_state == GT_NODE_CONNECTED && old_state != GT_NODE_CONNECTED) + add_connected (node->klass); + + if (new_state != GT_NODE_CONNECTED && old_state == GT_NODE_CONNECTED) + del_connected (node->klass); +} + +void gt_conn_set_class (GtNode *node, gt_node_class_t old_class, + gt_node_class_t new_class) +{ + if (node->state != GT_NODE_CONNECTED) + return; + + del_connected (old_class); + add_connected (new_class); + + assert (len_cache[0] >= 0); + assert (len_cache[1] >= 0); +} + +static int check_len_cache (gt_node_class_t klass) +{ + int len = 0; + + if (klass == GT_NODE_NONE) + klass = GT_NODE_LEAF | GT_NODE_ULTRA; + + if (klass & GT_NODE_LEAF) + len += len_cache[0]; + + if (klass & GT_NODE_ULTRA) + len += len_cache[1]; + + return len; +} + +static GtNode *conn_counter (TCPC *c, GtNode *node, int *length) +{ + (*length)++; + return NULL; +} + +int gt_conn_length (gt_node_class_t klass, gt_node_state_t state) +{ + int ret = 0; + int cached_len; + + /* + * We keep a small cache of the length of connected ultrapeers+leaves + * so we don't have to traverse the list most of the time here. + * + * Traversal still happens now as a sanity check. + */ + if (state == GT_NODE_CONNECTED && + (klass == GT_NODE_NONE || klass == GT_NODE_LEAF || + klass == GT_NODE_ULTRA)) + { + cached_len = check_len_cache (klass); + + /* make sure the cache length is the same as the real one */ + gt_conn_foreach (GT_CONN_FOREACH(conn_counter), &ret, klass, state, 0); + assert (ret == cached_len); + + return cached_len; + } + + gt_conn_foreach (GT_CONN_FOREACH(conn_counter), &ret, + klass, state, 0); + + return ret; +} + +/*****************************************************************************/ + +static GtNode *select_rand (TCPC *c, GtNode *node, void **cmp) +{ + int *nr = cmp[0]; + GtNode **ret = cmp[1]; + float range = *nr; + float prob; + + /* make sure we pick at least one */ + if (!*ret) + *ret = node; + + /* set the probability of selecting this node */ + prob = range * rand() / (RAND_MAX + 1.0); + + if (prob < 1) + *ret = node; + + (*nr)++; + + /* we dont use the return value here, because we need to try + * all the nodes, and returning non-null here short-circuits */ + return NULL; +} + +/* + * Pick a node at random that is also of the specified + * class and state. + */ +GtNode *gt_conn_random (gt_node_class_t klass, gt_node_state_t state) +{ + void *cmp[2]; + int nr; + GtNode *ret = NULL; + + /* initial probability */ + nr = 1; + + cmp[0] = &nr; + cmp[1] = &ret; + + gt_conn_foreach (GT_CONN_FOREACH(select_rand), cmp, + klass, state, 0); + + return ret; +} + +/*****************************************************************************/ + +static BOOL collect_old (GtNode *node, void **data) +{ + List **to_free = data[0]; + int *max_tofree = data[1]; + + /* don't make the node list too small */ + if (*max_tofree == 0) + return FALSE; + + if (gt_node_freeable (node)) + { + /* protect the iterator because we're removing a node */ + move_iterator (node); + + (*max_tofree)--; + *to_free = list_append (*to_free, node); + + return TRUE; + } + + return FALSE; +} + +static BOOL dump_node (GtNode *node, void *udata) +{ + gt_node_free (node); + return TRUE; +} + +/* + * NOTE: We can't re-descend the node_list by calling gt_node_free [which + * calls gt_conn_remove->list_remove] while iterating the node_list in + * list_foreach_remove. So, we build a second a list of nodes to free while + * removing those from node_list "by hand" and then free that list. + */ +void gt_conn_trim (void) +{ + List *to_free = NULL; + int max_tofree; + int len; + void *data[2]; + + len = list_length (node_list); + max_tofree = MAX (0, len - 500); + + data[0] = &to_free; + data[1] = &max_tofree; + + /* get rid of the oldest nodes first */ + gt_conn_sort ((CompareFunc)gt_conn_sort_vit_neg); + + node_list = list_foreach_remove (node_list, (ListForeachFunc)collect_old, + data); + + GT->DBGFN (GT, "trimming %d/%d nodes", list_length (to_free), len); + list_foreach_remove (to_free, (ListForeachFunc)dump_node, NULL); + + /* set the node list back to rights wrt vitality */ + gt_conn_sort ((CompareFunc)gt_conn_sort_vit); + + /* reset the iterator to some random node */ + iterator = list_nth (node_list, + (float)rand() * len / (RAND_MAX + 1.0)); +} + +/*****************************************************************************/ + +int gt_conn_sort_vit (GtNode *a, GtNode *b) +{ + if (a->vitality > b->vitality) + return -1; + else if (a->vitality < b->vitality) + return 1; + else + return 0; +} + +int gt_conn_sort_vit_neg (GtNode *a, GtNode *b) +{ + return -gt_conn_sort_vit (a, b); +} + +/* NOTE: this isnt safe to call at all times */ +void gt_conn_sort (CompareFunc func) +{ + node_list = list_sort (node_list, func); + + /* reset the iterator */ + iterator = NULL; +} + +/*****************************************************************************/ + +struct _sync_args +{ + time_t tm; + FILE *f; +}; + +static GtNode *sync_node (TCPC *c, GtNode *node, struct _sync_args *sync) +{ + size_t ret; + + /* node->vitality is updated lazily, to avoid a syscall for every + * packet. Maybe this isnt worth it */ + if (node->state & GT_NODE_CONNECTED) + node->vitality = sync->tm; + + /* only cache the node if we have connected to it before successfully */ + if (node->vitality > 0 && + node->gt_port > 0) + { + ret = fprintf (sync->f, "%lu %s:%hu %lu %lu\n", (long)node->vitality, + net_ip_str (node->ip), node->gt_port, + (long)node->size_kb, (long)node->files); + + /* stop iterating if there was an error */ + if (ret <= 0) + return node; + } + + return NULL; +} + +void gt_node_list_save (void) +{ + struct _sync_args sync; + char *tmp_path; + + time (&sync.tm); + tmp_path = STRDUP (gift_conf_path ("Gnutella/nodes.tmp")); + + if (!(sync.f = fopen (gift_conf_path ("Gnutella/nodes.tmp"), "w"))) + { + GT->DBGFN (GT, "error opening tmp file: %s", GIFT_STRERROR ()); + free (tmp_path); + return; + } + + /* + * The nodes file is fairly important. Check for errors when writing to + * the disk. + */ + if (gt_conn_foreach (GT_CONN_FOREACH(sync_node), &sync, + GT_NODE_NONE, GT_NODE_ANY, 0) != NULL) + { + GT->warn (GT, "error writing nodes file: %s", GIFT_STRERROR()); + fclose (sync.f); + free (tmp_path); + return; + } + + if (fclose (sync.f) != 0) + { + GT->warn (GT, "error closing nodes file: %s", GIFT_STRERROR()); + free (tmp_path); + return; + } + + file_mv (tmp_path, gift_conf_path ("Gnutella/nodes")); + + free (tmp_path); +} + +static void load_nodes (/*const*/ char *conf_path, gt_node_class_t klass) +{ + GtNode *node; + FILE *f; + char *buf = NULL; + char *ptr; + + f = fopen (gift_conf_path (conf_path), "r"); + + /* try the global nodes file */ + if (!f) + { + char *filename; + + if (!(filename = malloc (strlen (platform_data_dir ()) + 50))) + return; + + sprintf (filename, "%s/%s", platform_data_dir (), conf_path); + + f = fopen (filename, "r"); + + free (filename); + } + + if (!f) + return; + + while (file_read_line (f, &buf)) + { + unsigned long vitality; + in_addr_t ip; + in_port_t port; + uint32_t size_kb; + uint32_t files; + + ptr = buf; + + /* [vitality] [ip]:[port] [shares size(kB)] [file count] */ + + vitality = ATOUL (string_sep (&ptr, " ")); + ip = net_ip (string_sep (&ptr, ":")); + port = ATOI (string_sep (&ptr, " ")); + size_kb = ATOI (string_sep (&ptr, " ")); + files = ATOI (string_sep (&ptr, " ")); + + if (!ip || ip == INADDR_NONE) + continue; + + if (size_kb == (uint32_t)-1) + size_kb = 0; + + if (files == (uint32_t)-1) + files = 0; + + node = gt_node_register (ip, port, klass); + + if (!node) + continue; + + node->vitality = vitality; + + node->size_kb = size_kb; + node->files = files; + } + + fclose (f); +} + +void gt_node_list_load (void) +{ + load_nodes ("Gnutella/nodes", GT_NODE_ULTRA); + + /* sort the list so we contact the most recent nodes first */ + gt_conn_sort ((CompareFunc) gt_conn_sort_vit); +} diff -r 000000000000 -r d39e1d0d75b6 src/gt_node_list.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/gt_node_list.h Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,60 @@ +/* + * $Id: gt_node_list.h,v 1.6 2004/01/04 06:01:20 hipnod Exp $ + * + * Copyright (C) 2001-2003 giFT project (gift.sourceforge.net) + * + * 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. + */ + +#ifndef GIFT_GT_NODE_LIST_H_ +#define GIFT_GT_NODE_LIST_H_ + +/*****************************************************************************/ + +typedef GtNode* (*GtConnForeachFunc) (TCPC *c, GtNode *node, void *udata); +#define GT_CONN_FOREACH(func) ((GtConnForeachFunc)func) + +/*****************************************************************************/ + +void gt_conn_add (GtNode *node); +void gt_conn_remove (GtNode *node); +GtNode *gt_conn_foreach (GtConnForeachFunc func, void *udata, + gt_node_class_t klass, gt_node_state_t state, + int iter); + +/*****************************************************************************/ + +int gt_conn_length (gt_node_class_t klass, + gt_node_state_t state); +GtNode *gt_conn_random (gt_node_class_t klass, + gt_node_state_t state); +void gt_conn_trim (void); + +void gt_conn_sort (CompareFunc func); +int gt_conn_sort_vit (GtNode *a, GtNode *b); +int gt_conn_sort_vit_neg (GtNode *a, GtNode *b); + +/*****************************************************************************/ + +void gt_conn_set_state (GtNode *node, gt_node_state_t old_state, + gt_node_state_t new_state); +void gt_conn_set_class (GtNode *node, gt_node_class_t old_class, + gt_node_class_t new_class); + +/*****************************************************************************/ + +/* update or load the list of nodes in ~/.giFT/Gnutella/nodes */ +void gt_node_list_save (void); +void gt_node_list_load (void); + +/*****************************************************************************/ + +#endif /* GIFT_GT_NODE_LIST_H_ */ diff -r 000000000000 -r d39e1d0d75b6 src/gt_packet.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/gt_packet.c Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,813 @@ +/* + * $Id: gt_packet.c,v 1.35 2004/04/17 06:05:53 hipnod Exp $ + * + * Copyright (C) 2001-2003 giFT project (gift.sourceforge.net) + * + * 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. + */ + +#include "gt_gnutella.h" + +#include "gt_packet.h" + +#include "gt_node.h" +#include "gt_netorg.h" + +#include "gt_utils.h" + +#include "gt_query_route.h" +#include "message/gt_message.h" /* gt_vendor_msg_get_{id,version} */ + +#include + +/*****************************************************************************/ + +GtPacket *gt_packet_new (uint8_t cmd, uint8_t ttl, gt_guid_t *guid) +{ + GtPacket *packet; + unsigned char *data; + + if (!(packet = MALLOC (sizeof (GtPacket)))) + return NULL; + + if (!(data = MALLOC (GT_PACKET_INITIAL))) + { + free (packet); + return NULL; + } + + packet->data = data; + packet->len = GNUTELLA_HDR_LEN; + packet->data_len = GT_PACKET_INITIAL; + + /* + * Caller could provide GUID or request it be randomly initialized. + */ + if (guid) + gt_packet_set_guid (packet, guid); + else + gt_guid_init ((gt_guid_t *)packet->data); + + gt_packet_set_command (packet, cmd); + gt_packet_set_ttl (packet, ttl); + gt_packet_set_payload_len (packet, 0); + gt_packet_set_hops (packet, 0); + + /* set the offset to start at the end of the header */ + packet->offset = GNUTELLA_HDR_LEN; + + return packet; +} + +GtPacket *gt_packet_reply (GtPacket *src, uint8_t cmd) +{ + GtPacket *packet; + uint8_t hops; + gt_guid_t *guid; + + hops = gt_packet_hops (src); + guid = gt_packet_guid (src); + + if (!(packet = gt_packet_new (cmd, hops + 1, guid))) + return NULL; + + return packet; +} + +GtPacket *gt_packet_vendor (const gt_vendor_msg_t *vmsg) +{ + GtPacket *pkt; + + if (!(pkt = gt_packet_new (GT_MSG_VENDOR, 1, NULL))) + return NULL; + + gt_packet_put_ustr (pkt, vmsg->vendor_id, 4); + gt_packet_put_uint16 (pkt, vmsg->id); + gt_packet_put_uint16 (pkt, 1); /* vmsg version */ + + if (gt_packet_error (pkt)) + { + gt_packet_free (pkt); + return NULL; + } + + return pkt; +} + +void gt_packet_free (GtPacket *packet) +{ + if (!packet) + return; + + free (packet->data); + free (packet); +} + +/*****************************************************************************/ + +gt_guid_t *gt_packet_guid (GtPacket *packet) +{ + assert (packet->data_len >= GNUTELLA_HDR_LEN); + + return packet->data; +} + +uint32_t gt_packet_payload_len (GtPacket *packet) +{ + assert (packet->data_len >= GNUTELLA_HDR_LEN); + + return get_payload_len (packet->data); +} + +uint32_t gt_packet_command (GtPacket *packet) +{ + assert (packet->data_len >= GNUTELLA_HDR_LEN); + + return get_command (packet->data); +} + +uint8_t gt_packet_hops (GtPacket *packet) +{ + assert (packet->data_len >= GNUTELLA_HDR_LEN); + + return get_hops (packet->data); +} + +uint8_t gt_packet_ttl (GtPacket *packet) +{ + assert (packet->data_len >= GNUTELLA_HDR_LEN); + + return get_ttl (packet->data); +} + +/*****************************************************************************/ + +void gt_packet_set_guid (GtPacket *packet, gt_guid_t *guid) +{ + assert (packet->data_len >= GNUTELLA_HDR_LEN); + + memcpy (packet->data, guid, 16); +} + +void gt_packet_set_command (GtPacket *packet, uint8_t cmd) +{ + assert (packet->data_len >= GNUTELLA_HDR_LEN); + + get_command (packet->data) = cmd; +} + +void gt_packet_set_ttl (GtPacket *packet, uint8_t ttl) +{ + assert (packet->data_len >= GNUTELLA_HDR_LEN); + + get_ttl (packet->data) = ttl; +} + +void gt_packet_set_hops (GtPacket *packet, uint8_t hops) +{ + assert (packet->data_len >= GNUTELLA_HDR_LEN); + + get_hops (packet->data) = hops; +} + +void gt_packet_set_payload_len (GtPacket *packet, uint32_t len) +{ + assert (packet->data_len >= GNUTELLA_HDR_LEN); + + len = htovl (len); + + memcpy (packet->data + 19, &len, 4); +} + +/*****************************************************************************/ +/* functions to read data from packets */ + +static uint8_t gt_get8 (unsigned char *src) +{ + return *src; +} + +#define copy_bytes(src,sz,endian,swap,sizedvar_t,swap_net,swap_vax) \ + sizedvar_t r; \ + sizedvar_t v; \ + sizedvar_t n; \ + \ + memcpy (&r, src, sz); \ + \ + n = swap_net (r); \ + \ + assert_at_compile (BIG == 0x01); \ + if (endian & swap) \ + r = n; \ + \ + v = swap_vax (r); \ + \ + assert_at_compile (LITTLE == 0x00); \ + if (~endian & swap) \ + r = v; \ + \ + return r; + +static uint16_t gt_get16 (unsigned char *src, int endian, int swap) +{ + copy_bytes (src, 2, endian, swap, uint16_t, ntohs, vtohs); +} + +static uint32_t gt_get32 (unsigned char *src, int endian, int swap) +{ + copy_bytes (src, 4, endian, swap, uint32_t, ntohl, vtohl); +} + +/*****************************************************************************/ + +static BOOL gt_packet_resize (GtPacket *packet, size_t len) +{ + size_t resize_len; + unsigned char *resized; + + if (!packet) + return FALSE; + + assert (len >= GNUTELLA_HDR_LEN); + assert (len < GT_PACKET_MAX); + + /* the buffer we have allocated is already large enough */ + if (packet->data_len >= len) + return TRUE; + + /* determine an appropriate resize length */ + for (resize_len = packet->data_len; resize_len < len; ) + { + if (resize_len == 0) + resize_len = GT_PACKET_INITIAL; + else + resize_len *= 2; + } + + if (!(resized = realloc (packet->data, resize_len))) + { + packet->error = TRUE; + return FALSE; + } + + memset (resized + packet->data_len, 0, resize_len - packet->data_len); + + /* modify the packet structure to reflect this resize */ + packet->data_len = resize_len; + packet->data = resized; + + return TRUE; +} + +int gt_packet_error (GtPacket *packet) +{ + return packet->error; +} + +int gt_packet_seek (GtPacket *packet, int offset) +{ + int old_offset; + + /* should we be setting packet->error here? */ + if (offset >= packet->len || offset < 0) + { + packet->error = TRUE; + return -1; + } + + old_offset = packet->offset; + packet->offset = offset; + + return old_offset; +} + +GtPacket *gt_packet_unserialize (unsigned char *data, size_t len) +{ + GtPacket *packet; + + if (!(packet = gt_packet_new (0, 0, NULL))) + return NULL; + + if (len >= GT_PACKET_MAX) + { + gt_packet_free (packet); + return NULL; + } + + if (!gt_packet_resize (packet, len)) + { + GIFT_ERROR (("error resizing packet")); + gt_packet_free (packet); + return NULL; + } + + memcpy (packet->data, data, len); + + packet->len = len; + + /* Hmm, this should never happen, time to valgrind */ + if (gt_packet_payload_len (packet) != len - GNUTELLA_HDR_LEN) + { + GIFT_ERROR (("corrupt packet")); + gt_packet_free (packet); + return NULL; + } + + return packet; +} + +/*****************************************************************************/ + +uint8_t gt_packet_get_uint8 (GtPacket *packet) +{ return gt_packet_get_uint (packet, 1, LITTLE, FALSE); } + +uint16_t gt_packet_get_uint16 (GtPacket *packet) +{ return gt_packet_get_uint (packet, 2, LITTLE, TRUE); } + +uint32_t gt_packet_get_uint32 (GtPacket *packet) +{ return gt_packet_get_uint (packet, 4, LITTLE, TRUE); } + +in_addr_t gt_packet_get_ip (GtPacket *packet) +{ return gt_packet_get_uint (packet, 4, BIG, FALSE); } + +in_port_t gt_packet_get_port (GtPacket *packet) +{ return gt_packet_get_uint (packet, 2, LITTLE, TRUE); } + +/*****************************************************************************/ + +uint32_t gt_packet_get_uint (GtPacket *packet, size_t size, + int endian, int swap) +{ + uint32_t data32 = 0; + char *offs; + + assert (packet); + + /* check overrun */ + if (packet->offset + size > packet->len) + { + packet->error = TRUE; + return 0; + } + + offs = packet->data + packet->offset; + + switch (size) + { + case 1: + data32 = (uint32_t)gt_get8 (offs); + break; + case 2: + data32 = (uint32_t)gt_get16 (offs, endian, swap); + break; + case 4: + data32 = gt_get32 (offs, endian, swap); + break; + default: + printf ("%s: wtf are you doing?\n", __PRETTY_FUNCTION__); + return data32; + } + + packet->offset += size; + + return data32; +} + +/*****************************************************************************/ + +static int gt_packet_append (GtPacket *packet, const void *data, size_t size) +{ + size_t required; + + if (!packet || !data || size == 0) + return FALSE; + + if (packet->data_len + size >= GT_PACKET_MAX) + { + packet->error = TRUE; + return FALSE; + } + + /* determine the total required space to append size bytes */ + required = packet->len + size; + + /* if we can't resize, gracefully fail...the caller should determine + * how bad this truly is */ + if (!gt_packet_resize (packet, required)) + return FALSE; + + /* append size bytes of data */ + memcpy (packet->data + packet->len, data, size); + + /* increment the length of this packet */ + packet->len += size; + + gt_packet_set_payload_len (packet, gt_packet_payload_len (packet) + size); + return TRUE; +} + +int gt_packet_put_uint (GtPacket *packet, void *data, size_t size, + int endian, int swap) +{ + int ret; + uint16_t unet16; + uint32_t unet32; + + if (!data || size < 0 || size > sizeof (uint32_t)) + return FALSE; + + switch (size) + { + case 2: + unet16 = gt_get16 (data, endian, swap); + ret = gt_packet_append (packet, &unet16, size); + break; + case 4: + unet32 = gt_get32 (data, endian, swap); + ret = gt_packet_append (packet, &unet32, size); + break; + default: + ret = gt_packet_append (packet, data, size); + break; + } + + return ret; +} + +/*****************************************************************************/ + +int gt_packet_put_uint8 (GtPacket *packet, uint8_t byte) +{ return gt_packet_put_uint (packet, &byte, 1, LITTLE, FALSE); } + +int gt_packet_put_uint16 (GtPacket *packet, uint16_t bytes) +{ return gt_packet_put_uint (packet, &bytes, 2, LITTLE, TRUE); } + +int gt_packet_put_uint32 (GtPacket *packet, uint32_t bytes) +{ return gt_packet_put_uint (packet, &bytes, 4, LITTLE, TRUE); } + +int gt_packet_put_ip (GtPacket *packet, in_addr_t ip) +{ return gt_packet_put_uint (packet, &ip, 4, BIG, FALSE); } + +int gt_packet_put_port (GtPacket *packet, in_port_t port) +{ return gt_packet_put_uint (packet, &port, 2, LITTLE, TRUE); } + +int gt_packet_put_ustr (GtPacket *packet, const unsigned char *str, size_t len) +{ + assert (len > 0); + return gt_packet_append (packet, str, len); +} + +int gt_packet_put_str (GtPacket *packet, const char *str) +{ + size_t len; + + if (!str) + return gt_packet_put_uint8 (packet, 0); + + len = strlen (str) + 1; + return gt_packet_put_ustr (packet, (const unsigned char *)str, len); +} + +/*****************************************************************************/ + +/* checks for the gt_packet_get_array sentinel given the size. the sentinel is + * defined as a full element filled with zeroes */ +static int array_sentinel (char *ptr, size_t size) +{ + while (size--) + { + /* non-zero byte, this element couldnt be the sentinel */ + if (*ptr != 0) + return FALSE; + + ptr++; + } + + return TRUE; +} + +void *gt_packet_get_array (GtPacket *packet, size_t nmemb, size_t size, + int term, int endian, int swap) +{ + char *start; + char *ptr; + char *end; + int n; + + assert (packet); + + /* we tried to read past the end of the packet */ + if (packet->offset >= packet->len) + { + packet->error = TRUE; + return NULL; + } + + start = packet->data + packet->offset; + end = packet->data + packet->len; + + /* TODO - optimize compares inside this loop */ + n = 0; + for (ptr = start; ptr + size < end; ptr += size, n++) + { + if (term && array_sentinel (ptr, size)) + break; + + if (nmemb > 0 && n >= nmemb) + break; + + if (swap) + { + switch (size) + { + case 2: + net_put16 (ptr, gt_get16 (ptr, endian, swap)); + break; + case 4: + net_put32 (ptr, gt_get32 (ptr, endian, swap)); + break; + default: + assert (0); + break; + } + } + } + + /* If the array was not null terminated, then terminate it now */ + if (term && !array_sentinel (ptr, size)) + { + uint32_t zero = 0; + size_t len; + + /* this is the length of the array we read */ + len = (ptr - start + size); + + /* we must have hit the end of the packet */ + assert (packet->offset + len == packet->len); + + if (!gt_packet_resize (packet, packet->len + size)) + { + packet->offset = packet->len; + return NULL; + } + + /* Hrm, this changes the payload, which we really dont want to do. */ + if (!gt_packet_append (packet, &zero, size)) + { + packet->offset = packet->len; + return NULL; + } + } + + /* invalid data...no sentinel found */ + if (ptr + size > end) + { + packet->offset = packet->len; + return NULL; + } + + /* ptr is at the sentinel right now, move one element out to calculate the + * next packet start */ + if (term) + ptr += size; + + /* this includes the sentinel now */ + packet->offset += (ptr - start); + + return start; +} + +char *gt_packet_get_str (GtPacket *packet) +{ + return gt_packet_get_array (packet, 0, 1, TRUE, FALSE, FALSE); +} + +unsigned char *gt_packet_get_ustr (GtPacket *packet, size_t len) +{ + return gt_packet_get_array (packet, len, 1, FALSE, FALSE, FALSE); +} + +/******************************************************************************/ + +static char *packet_command_str (unsigned char cmd) +{ + static char buf[16]; + + switch (cmd) + { + case GT_MSG_PING: return "PING"; + case GT_MSG_PING_REPLY: return "PONG"; + case GT_MSG_BYE: return "BYE"; + case GT_MSG_QUERY_ROUTE: return "QROUTE"; + case GT_MSG_VENDOR: return "VMSG"; + case GT_MSG_VENDOR_STD: return "VMSG-S"; + case GT_MSG_PUSH: return "PUSH"; + case GT_MSG_QUERY: return "QUERY"; + case GT_MSG_QUERY_REPLY: return "HITS"; + + default: + snprintf (buf, sizeof (buf), "[<%02hx>]", cmd); + return buf; + } +} + +static void packet_log (char *data, int len, int sent, char *user_agent, + in_addr_t ip) +{ + uint8_t cmd; + char user_buf[32]; + char *file; + static FILE *ascii_log; + + if (!ascii_log) + { + file = PACKET_ASCII_LOG; + + if (!(ascii_log = fopen (file, "w"))) + return; + } + + cmd = get_command (data); + + user_buf[0] = 0; + + /* copy the first few chars of user_agent to make it line up */ + if (user_agent) + { + strncpy (user_buf, user_agent, 21); + user_buf[21] = 0; + } + + fprintf (ascii_log, "%2s %-6s sz: %-5hu peer: %-22s [%s]\n", + (sent ? "<=" : "=>"), + packet_command_str (cmd), len, + (user_buf[0] ? user_buf : "(None)"), + (ip == 0 ? "None" : net_ip_str (ip))); + + fprint_hex (ascii_log, data, len); +} + +void gt_packet_log (GtPacket *packet, TCPC *src, int sent) +{ + char *user_agent; + in_addr_t ip; + + if (!PACKET_DEBUG) + return; + + user_agent = NULL; + ip = 0; + + /* append the user-agent string to the packet log */ + if (src) + { + ip = src->host; + user_agent = dataset_lookupstr (GT_NODE(src)->hdr, "user-agent"); + } + + packet_log (packet->data, packet->len, sent, user_agent, ip); +} + +/******************************************************************************/ + +int gt_packet_send (TCPC *c, GtPacket *packet) +{ + if (!c || c->fd < 0) + return -1; + + if (!gt_node_send (GT_NODE(c), packet)) + return -1; + + return 0; +} + +/******************************************************************************/ + +static int send_packetva (TCPC *c, uint8_t cmd, + gt_guid_t *guid, uint8_t ttl, + uint8_t hops, char *fmt, va_list args) +{ + GtPacket *pkt; + char *p; + int short_fmt = FALSE; + int field_width = 0; + int ret; + + if (!(pkt = gt_packet_new (cmd, ttl, guid))) + return -1; + + for (p = fmt; *p; p++) + { + switch (*p) + { + case '%': + short_fmt = FALSE; + break; + case 'h': + short_fmt = TRUE; + break; + case 'l': + break; + case 'c': + { + uint8_t bits8 = (uint8_t) va_arg (args, int); + gt_packet_put_uint8 (pkt, bits8); + } + break; + case 'u': + if (short_fmt) + { + uint16_t bits16 = (uint16_t) va_arg (args, int); + gt_packet_put_uint16 (pkt, bits16); + } + else + { + uint32_t bits32 = (uint32_t) va_arg (args, int); + gt_packet_put_uint32 (pkt, bits32); + } + break; + case 's': + { + char *str = va_arg (args, char *); + gt_packet_put_str (pkt, str); + } + break; + case '0': case '1': case '2': case '3': case '4': case '5': + case '6': case '7': case '8': case '9': + field_width = field_width * 10 + (*p - '0'); + break; + case '*': + field_width = va_arg (args, int); + break; + case 'p': + { + unsigned char *ustr = va_arg (args, unsigned char *); + + gt_packet_put_ustr (pkt, ustr, field_width); + field_width = 0; + } + break; + default: + abort (); + break; + } + } + + if (gt_packet_error (pkt)) + { + gt_packet_free (pkt); + return -1; + } + + ret = gt_packet_send (c, pkt); + gt_packet_free (pkt); + + return ret; +} + +int gt_packet_send_fmt (TCPC *c, uint8_t cmd, + gt_guid_t *guid, uint8_t ttl, + uint8_t hops, char *fmt, ...) +{ + va_list args; + int ret; + + va_start (args, fmt); + ret = send_packetva (c, cmd, guid, ttl, hops, fmt, args); + va_end (args); + + return ret; +} + +int gt_packet_reply_fmt (TCPC *c, GtPacket *packet, + uint8_t cmd, char *fmt, ...) +{ + va_list args; + int ret; + size_t hops; + gt_guid_t *guid; + + guid = gt_packet_guid (packet); + hops = gt_packet_hops (packet); + + va_start (args, fmt); + ret = send_packetva (c, cmd, guid, hops + 1, 0, fmt, args); + va_end (args); + + return ret; +} + +/******************************************************************************/ + +int gt_packet_forward (GtPacket *packet, TCPC *c) +{ + return -1; +} diff -r 000000000000 -r d39e1d0d75b6 src/gt_packet.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/gt_packet.h Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,215 @@ +/* + * $Id: gt_packet.h,v 1.27 2004/05/02 10:09:41 hipnod Exp $ + * + * Copyright (C) 2001-2003 giFT project (gift.sourceforge.net) + * + * 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. + */ + +#ifndef GIFT_GT_PACKET_H_ +#define GIFT_GT_PACKET_H_ + +/*****************************************************************************/ + +#define PACKET_DEBUG gt_config_get_int("packet/debug=0") +#define PACKET_ASCII_LOG gt_config_get_str("packet/ascii_log_file=/dev/tty") + +/*****************************************************************************/ + +#define GNUTELLA_HDR_LEN 23 + +#define GT_PACKET_INITIAL (48) +#define GT_PACKET_MAX (65536) /* smallest invalid, including header */ + +/*****************************************************************************/ + +struct gt_packet +{ + uint32_t offset; /* Pointer within packet */ + uint32_t len; /* size of packet structure */ + uint32_t data_len; /* how big the packet data is */ + uint32_t error; /* packet encountered memory error */ + + unsigned char *data; /* packet header + arbtrary packet data */ +}; + +typedef struct gt_packet GtPacket; + +typedef enum gt_packet_type +{ + GT_MSG_PING = 0x00, + GT_MSG_PING_REPLY = 0x01, + GT_MSG_BYE = 0x02, + GT_MSG_QUERY_ROUTE = 0x30, + GT_MSG_VENDOR = 0x31, + GT_MSG_VENDOR_STD = 0x32, + GT_MSG_PUSH = 0x40, + GT_MSG_QUERY = 0x80, + GT_MSG_QUERY_REPLY = 0x81, +} gt_packet_type_t; + +/*****************************************************************************/ + +#define VMSG_HDR_LEN (8) + +typedef struct gt_vendor_msg +{ + char vendor_id[4]; + uint16_t id; +} gt_vendor_msg_t; + +/* + * Pretend these global variables are enumerated constants...don't squint + * too hard and you won't see they are global variables. + */ +extern const gt_vendor_msg_t *GT_VMSG_MESSAGES_SUPP, + *GT_VMSG_TCP_CONNECT_BACK, + *GT_VMSG_HOPS_FLOW, + *GT_VMSG_PUSH_PROXY_REQ, + *GT_VMSG_PUSH_PROXY_ACK; + +/*****************************************************************************/ + +#define get_guid(pkt) ((pkt)[0]) +#define get_command(pkt) ((pkt)[16]) +#define get_ttl(pkt) ((pkt)[17]) +#define get_hops(pkt) ((pkt)[18]) + +#define get_payload_len(pkt) \ + (((pkt)[19]) | ((pkt)[20] << 8) | \ + ((pkt)[21] << 16) | ((pkt)[22] << 24)) + +/*****************************************************************************/ + +/* handle little-endian ordering on the network */ + +#ifdef WORDS_BIGENDIAN +/* + * It's best to watch out for sign extension, so we copy to temporary + * unsigned variables here. In case the arguments are signed, all is + * well. + * + * NOTE: this depends on a gcc-extension. If someone wants to port to + * a big-endian, non-gcc compiler, more work here is needed. + * + * NOTE2: the uint{16,32}_t types are guaranteed to be _at least_ the + * number of bits they say they are (i think), so we discard possibly + * extra bits by using bitwise-and. + */ +#define vtohl(x) \ + ({ \ + uint32_t _tmp = (x); \ + (((_tmp & 0xff) << 24) | ((_tmp & 0xff00) << 8) | \ + ((_tmp & 0xff0000) >> 8) | ((_tmp >> 24) & 0xff)); \ + }) + +#define vtohs(x) \ + ({ \ + uint16_t _tmp = (x); \ + (((_tmp & 0xff) << 8) | ((_tmp >> 8) & 0xff)); \ + }) +#else +#define vtohs(x) (x) +#define vtohl(x) (x) +#endif /* WORDS_BIGENDIAN */ + +#define htovs(x) vtohs(x) +#define htovl(x) vtohl(x) + +/* endianness defines */ +#define BIG 1 +#define LITTLE 0 + +/*****************************************************************************/ + +#ifdef __GNUC__ +#define FORMAT_ATTRIBUTE(kind, fmt_arg, first_arg) \ + __attribute__ ((format (kind, fmt_arg, first_arg))) +#else +#define FORMAT_ATTRIBUTE(kind, fmt_arg, first_arg) +#endif + +/*****************************************************************************/ + +GtPacket *gt_packet_new (uint8_t cmd, uint8_t ttl, gt_guid_t *guid); +GtPacket *gt_packet_reply (GtPacket *packet, uint8_t cmd); +GtPacket *gt_packet_vendor (const gt_vendor_msg_t *vmsg); +void gt_packet_free (GtPacket *packet); +int gt_packet_error (GtPacket *packet); +int gt_packet_seek (GtPacket *packet, int offset); + +GtPacket *gt_packet_unserialize (unsigned char *data, size_t len); + +/*****************************************************************************/ + +gt_guid_t *gt_packet_guid (GtPacket *packet); +uint32_t gt_packet_payload_len (GtPacket *packet); +uint32_t gt_packet_command (GtPacket *packet); +uint8_t gt_packet_hops (GtPacket *packet); +uint8_t gt_packet_ttl (GtPacket *packet); + +/*****************************************************************************/ + +void gt_packet_set_guid (GtPacket *packet, gt_guid_t *guid); +void gt_packet_set_payload_len (GtPacket *packet, uint32_t len); +void gt_packet_set_command (GtPacket *packet, uint8_t cmd); +void gt_packet_set_hops (GtPacket *packet, uint8_t hops); +void gt_packet_set_ttl (GtPacket *packet, uint8_t ttl); + +/*****************************************************************************/ + +uint32_t gt_packet_get_uint (GtPacket *packet, size_t size, + int endian, int swap); + +uint8_t gt_packet_get_uint8 (GtPacket *packet); +uint16_t gt_packet_get_uint16 (GtPacket *packet); +uint32_t gt_packet_get_uint32 (GtPacket *packet); + +in_addr_t gt_packet_get_ip (GtPacket *packet); +in_port_t gt_packet_get_port (GtPacket *packet); + +char *gt_packet_get_str (GtPacket *packet); +unsigned char *gt_packet_get_ustr (GtPacket *packet, size_t len); + +/*****************************************************************************/ + +int gt_packet_put_uint8 (GtPacket *packet, uint8_t byte); +int gt_packet_put_uint16 (GtPacket *packet, uint16_t bytes); +int gt_packet_put_uint32 (GtPacket *packet, uint32_t bytes); + +int gt_packet_put_str (GtPacket *packet, const char *str); +int gt_packet_put_ustr (GtPacket *packet, const unsigned char *ustr, + size_t len); + +int gt_packet_put_ip (GtPacket *packet, in_addr_t ip); +int gt_packet_put_port (GtPacket *packet, in_port_t port); + +/*****************************************************************************/ + +int gt_packet_send (TCPC *c, GtPacket *packet); + +int gt_packet_send_fmt (TCPC *c, uint8_t cmd, + gt_guid_t *guid, uint8_t ttl, + uint8_t hops, char *fmt, ...) + FORMAT_ATTRIBUTE (printf, 6, 7); + +int gt_packet_reply_fmt (TCPC *c, GtPacket *packet, + uint8_t cmd, char *fmt, ...) + FORMAT_ATTRIBUTE (printf, 4, 5); + + +/*****************************************************************************/ + +void gt_packet_log (GtPacket *packet, struct tcp_conn *src, int sent); + +/*****************************************************************************/ + +#endif /* GIFT_GT_PACKET_H_ */ diff -r 000000000000 -r d39e1d0d75b6 src/gt_query_route.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/gt_query_route.c Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,1255 @@ +/* + * $Id: gt_query_route.c,v 1.46 2004/04/05 07:56:54 hipnod Exp $ + * + * Copyright (C) 2001-2003 giFT project (gift.sourceforge.net) + * + * 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. + */ + +#include "gt_gnutella.h" + +#include "gt_query_route.h" +#include "gt_packet.h" +#include "gt_utils.h" + +#include "gt_node.h" +#include "gt_node_list.h" + +#include + +#include + +/*****************************************************************************/ + +/* + * TODO: + * - compact table to bit-level representation + * - support incremental updates of table + * - cut-off entries when MAX_FILL_RATIO is reached + */ +#define MIN_TABLE_BITS (16) /* 16 bits */ +#define MAX_TABLE_BITS (21) /* 21 bits */ +#define MIN_TABLE_SIZE (1UL << (MIN_TABLE_BITS - 1)) /* 32k bytes */ +#define MAX_TABLE_SIZE (1UL << (MAX_TABLE_BITS - 1)) /* 1M bytes */ +#define MIN_TABLE_SLOTS (MIN_TABLE_SIZE * 2) /* 64k slots */ +#define MAX_TABLE_SLOTS (MAX_TABLE_SIZE * 2) /* 2M slots */ +#define INC_FILL_RATIO (0.70) /* 0.7% */ +#define MAX_FILL_RATIO (1.00) /* 1% (unused)*/ + +/* + * magical constant necessary for the query routing hash function + */ +#define MULTIPLIER 0x4F1BBCDC + +/* + * How often to synchronize the QRT with ultrapeers. + * + * This is very big because we don't support incremental updating + * yet. + */ +#define QRT_UPDATE_INTERVAL (20 * MINUTES) + +/* + * How often we check to build a compressed patch of local shares. + */ +#define QRT_BUILD_INTERVAL (3 * SECONDS) + +/* + * How long to wait after the first query_route_table_submit() before + * actually submitting the table. + */ +#define QRT_SUBMIT_DELAY (1 * MINUTES) + +/* + * Largest hops value in table. It looks like Limewire hardcodes + * this as 7, and won't understand any other value. + */ +#define INFINITY 7 + +/* + * Constants for changing route table. + */ +#define QRT_KEYWORD_ADD (0x0a) /* -6 */ +#define QRT_KEYWORD_REMOVE (0x06) /* 6 */ + +/* + * The minimum length of a keyword + */ +#define QRP_MIN_LENGTH 3 + +/* + * Maximum patch fragment size to send + */ +#define PATCH_FRAGSIZE 2048 + +/* + * Number of bits in the patches we send + */ +#define PATCH_BITS 4 + +/* + * Holds a 32-bit index describing each token this node shares. + */ +struct qrp_route_entry +{ + int ref; /* number of references to this index */ + uint32_t index; /* the actual position */ +}; + +struct qrp_route_table +{ + uint8_t *table; + size_t bits; + size_t size; + size_t slots; + size_t present; + size_t shared; +}; + +/*****************************************************************************/ + +/* + * The set of indices that are currently marked "present" in the + * routing table. + */ +static Dataset *indices; + +/* + * This holds the compressed table as a full QRP patch (incremental + * updates not supported yet). + */ +static uint8_t *compressed_table; +static size_t compressed_slots; +static size_t compressed_size; + +/* + * Keeps track of how many times the compressed table has changed. + * Used to avoid sending updates when not necessary. + */ +static int compressed_version; + +/* + * Timer that builds the compressed patch for the table submitted + * to peers. + */ +static timer_id build_timer; + +/* + * Whether we have to rebuild the table when shares are done + * syncing. + */ +static BOOL table_changed; + +/* + * The full query-routing table in binary form. This will get + * compressed before transmission. + */ +static struct qrp_route_table *route_table; + +/*****************************************************************************/ + +/* hash function used for query-routing */ +uint32_t gt_query_router_hash_str (char *str, size_t bits) +{ + uint32_t hash; + unsigned int i; + unsigned char c; + + i = hash = 0; + + while ((c = *str++) && !isspace (c)) + { + hash ^= tolower (c) << (i * 8); + + /* using & instead of %, sorry */ + i = (i+1) & 0x03; + } + + return (hash * MULTIPLIER) >> (32 - bits); +} + +/*****************************************************************************/ + +static struct qrp_route_table *qrp_route_table_new (size_t bits) +{ + struct qrp_route_table *qrt; + + if (!(qrt = MALLOC (sizeof (struct qrp_route_table)))) + return NULL; + + qrt->bits = bits; + qrt->size = (1UL << (bits - 1)); + qrt->slots = qrt->size * 2; /* 4-bit entries only */ + + if (!(qrt->table = MALLOC (qrt->size))) + { + free (qrt); + return NULL; + } + + return qrt; +} + +static void qrp_route_table_free (struct qrp_route_table *qrt) +{ + if (!qrt) + return; + + free (qrt->table); + free (qrt); +} + +static void qrp_route_table_insert (struct qrp_route_table *qrt, uint32_t index) +{ + uint8_t old_entry; + int set_lower; + int entry; + + if (!qrt) + return; + + assert (index < qrt->size * 2); + + set_lower = index % 2; + entry = index / 2; + + if (set_lower) + { + old_entry = qrt->table[entry] & 0x0f; + qrt->table[entry] = (qrt->table[entry] & 0xf0) | + ((QRT_KEYWORD_ADD) & 0x0f); + } + else + { + old_entry = (qrt->table[entry] & 0xf0) >> 4; + qrt->table[entry] = (qrt->table[entry] & 0x0f) | + ((QRT_KEYWORD_ADD << 4) & 0xf0); + } + + assert (old_entry == 0 || old_entry == QRT_KEYWORD_REMOVE); +#if 0 + GT->dbg (GT, "+%u [%d/%d]", index, entry, set_lower); +#endif + + qrt->present++; +} + +#if 0 +/* untested */ +static void qrp_route_table_remove (struct qrp_route_table *qrt, uint32_t index) +{ + uint8_t old_entry; + int clear_lower; + int entry; + + if (!qrt) + return; + + assert (index < qrt->size * 2); + + clear_lower = index % 2; + entry = index / 2; + + /* + * This needs to change when doing incremental updating... + */ + + if (clear_lower) + { + old_entry = qrt->table[entry] & 0x0f; + qrt->table[entry] = (qrt->table[entry] & 0xf0) | + ((QRT_KEYWORD_REMOVE) & 0x0f); + } + else + { + old_entry = (qrt->table[entry] & 0xf0) >> 4; + qrt->table[entry] = (qrt->table[entry] & 0x0f) | + ((QRT_KEYWORD_REMOVE << 4) & 0xf0); + } + + assert (old_entry == (uint8_t) QRT_KEYWORD_ADD); +#if 0 + GT->dbg (GT, "-%u [%d/%d]", index, entry, clear_lower); +#endif + + qrt->present--; +} +#endif + +static BOOL qrp_route_table_lookup (struct qrp_route_table *qrt, uint32_t index) +{ + int check_lower; + uint32_t entry; + + if (!qrt) + return FALSE; + + assert (index < qrt->slots); + assert (qrt->slots == qrt->size * 2); + + check_lower = index % 2; + entry = index / 2; + + if (check_lower) + { + if ((qrt->table[entry] & 0x0f) == QRT_KEYWORD_ADD) + return TRUE; + } + else + { + if (((qrt->table[entry] & 0xf0) >> 4) == QRT_KEYWORD_ADD) + return TRUE; + } + + return FALSE; +} + +static double qrp_route_table_fill_ratio (struct qrp_route_table *qrt) +{ + return (double)qrt->present * 100 / qrt->slots; +} + +/*****************************************************************************/ + +static char *zlib_strerror (int error) +{ + switch (error) + { + case Z_OK: return "OK"; + case Z_STREAM_END: return "End of stream"; + case Z_NEED_DICT: return "Decompressing dictionary needed"; + case Z_STREAM_ERROR: return "Stream error"; + case Z_ERRNO: return "Generic zlib error"; + case Z_DATA_ERROR: return "Data error"; + case Z_MEM_ERROR: return "Memory error"; + case Z_BUF_ERROR: return "Buffer error"; + case Z_VERSION_ERROR: return "Incompatible runtime zlib library"; + default: break; + } + + return "Invalid zlib error code"; +} + +/* TODO: make this use a stream-like interface */ +static uint8_t *compress_table (uint8_t *table, size_t in_size, size_t *out_size) +{ + z_streamp out; + int ret; + uint8_t *out_buf; + int free_size; + + *out_size = 0; + + if (!(out = MALLOC (sizeof(*out)))) + return NULL; + + out->zalloc = Z_NULL; + out->zfree = Z_NULL; + out->opaque = Z_NULL; + + if ((ret = deflateInit (out, Z_DEFAULT_COMPRESSION)) != Z_OK) + { + GT->DBGFN (GT, "deflateInit error: %s", zlib_strerror (ret)); + free (out); + return NULL; + } + + /* allocate initial buffer */ + free_size = in_size + in_size / 100; + + if (!(out_buf = malloc (free_size))) + { + free (out_buf); + deflateEnd (out); + free (out); + return NULL; + } + + out->next_in = table; + out->avail_in = in_size; + out->next_out = out_buf; + out->avail_out = free_size; + + if ((ret = deflate (out, Z_FINISH)) != Z_STREAM_END) + { + GT->DBGFN (GT, "compression error: %s", zlib_strerror (ret)); + free (out_buf); + deflateEnd (out); + free (out); + return NULL; + } + + /* + * This could theoretically fail I guess. If it does, we shouldn't keep + * the table at least. + */ + assert (out->avail_in == 0); + + *out_size = free_size - out->avail_out; + + deflateEnd (out); + free (out); + + return out_buf; +} + +#if 0 +/* send the a QRP table to nodes we haven't sent a real table yet */ +static GtNode *update_nodes (TCPC *c, GtNode *node, void *udata) +{ + assert (node->state == GT_NODE_CONNECTED); + assert (GT_CONN(node) == c); + + /* + * If the counter is not 0, we sent a table to this node already. + * So, wait for the timer to pick that up. + */ + if (node->query_router_counter != 0) + return NULL; + + /* submit the table */ + query_route_table_submit (c); + + /* reset the submit timer */ + if (GT_NODE(c)->query_route_timer != 0) + timer_reset (GT_NODE(c)->query_route_timer); + + return NULL; +} +#endif + +static void add_index (ds_data_t *key, ds_data_t *value, + struct qrp_route_table *qrt) +{ + struct qrp_route_entry *entry = value->data; + uint32_t slot; + + /* grab only the most significant bits of the entry */ + slot = entry->index >> (32 - qrt->bits); + + /* + * If the entry already exists in the table, bump shared entries and + * forget about this entry. + */ + if (qrp_route_table_lookup (qrt, slot)) + { + qrt->shared++; + return; + } + + qrp_route_table_insert (qrt, slot); +} + +static void build_uncompressed (struct qrp_route_table *qrt) +{ + dataset_foreach (indices, DS_FOREACH(add_index), qrt); +} + +static int build_qrp_table (void *udata) +{ + uint8_t *new_table; + size_t new_size; + StopWatch *sw; + double elapsed; + double fill_ratio; + + if (!route_table && !(route_table = qrp_route_table_new (MIN_TABLE_BITS))) + { + /* try again later */ + return TRUE; + } + + sw = stopwatch_new (TRUE); + + /* build a table from the indices */ + build_uncompressed (route_table); + + stopwatch_stop (sw); + + elapsed = stopwatch_elapsed (sw, NULL); + + fill_ratio = qrp_route_table_fill_ratio (route_table); + + GT->DBGFN (GT, "%.4lfs elapsed building", elapsed); + GT->DBGFN (GT, "present=%u shared=%u size=%u", route_table->present, + route_table->shared, route_table->size); + GT->DBGFN (GT, "fill ratio=%.4lf%%", fill_ratio); + + /* + * If the fill ratio is greater than an acceptable threshold, + * and we haven't reached the maximum table size allowed, + * rebuild a larger routing table. + */ + if (fill_ratio >= INC_FILL_RATIO && route_table->bits < MAX_TABLE_BITS) + { + struct qrp_route_table *new_table; + + /* + * If we don't have enough memory to build the new table, fall + * through and compress the existing table. This would only happen + * if this node has a very small amount of memory. + */ + if ((new_table = qrp_route_table_new (route_table->bits + 1))) + { + qrp_route_table_free (route_table); + route_table = new_table; + + /* retry the build later, it's kinda expensive */ + stopwatch_free (sw); + return TRUE; + } + } + + stopwatch_start (sw); + + /* compress a new table */ + new_table = compress_table (route_table->table, + route_table->size, + &new_size); + + elapsed = stopwatch_free_elapsed (sw); + + GT->DBGFN (GT, "%.4lfs elapsed compressing", elapsed); + GT->DBGFN (GT, "compressed size=%lu", new_size); + + if (!new_table) + return TRUE; + + assert (new_size > 0); + + /* + * Replace the old compressed table + */ + free (compressed_table); + + compressed_table = new_table; + compressed_size = new_size; + compressed_slots = route_table->slots; + + compressed_version++; + + if (!compressed_version) + compressed_version++; + + /* + * An optimization to reduce memory usage: realloc the + * compressed table to the smaller size. + */ + if ((new_table = realloc (new_table, new_size))) + compressed_table = new_table; + +#if 0 + /* update nodes with this table */ + gt_conn_foreach (GT_CONN_FOREACH(update_nodes), NULL, + GT_NODE_ULTRA, GT_NODE_CONNECTED, 0); +#endif + + /* + * Temporary optimization: we can free the uncompressed + * route table now, as it is unused. This is a dubious optimization + * though because the table will probably hang around in + * the future when incremental updating works. + */ + qrp_route_table_free (route_table); + route_table = NULL; + + /* remove the timer, as the table is now up to date */ + build_timer = 0; + return FALSE; +} + +static int start_build (void *udata) +{ + build_timer = timer_add (QRT_BUILD_INTERVAL, + (TimerCallback)build_qrp_table, NULL); + return FALSE; +} + +static void start_build_timer (void) +{ + if (build_timer) + return; + + /* + * If we don't have a compressed table, we haven't built + * the table before, so build it soon. Otherwise, + * we won't submit it for a while anyway, so build it + * at half the update interval. + */ + if (compressed_table) + { + build_timer = timer_add (QRT_UPDATE_INTERVAL / 2, + (TimerCallback)start_build, NULL); + return; + } + + start_build (NULL); +} + +/*****************************************************************************/ + +/* TODO: this should be moved to GT_SELF */ +uint8_t *gt_query_router_self (size_t *size, int *version) +{ + if (!compressed_table) + return NULL; + + assert (size != NULL && version != NULL); + + *size = compressed_size; + *version = compressed_version; + + return compressed_table; +} + +static int free_entries (ds_data_t *key, ds_data_t *value, void *udata) +{ + struct qrp_route_entry *entry = value->data; + + free (entry); + + return DS_CONTINUE | DS_REMOVE; +} + +void gt_query_router_self_destroy (void) +{ + timer_remove_zero (&build_timer); + + qrp_route_table_free (route_table); + route_table = NULL; + + free (compressed_table); + compressed_table = NULL; + compressed_slots = 0; + compressed_size = 0; + compressed_version = 0; + + dataset_foreach_ex (indices, DS_FOREACH_EX(free_entries), NULL); + dataset_clear (indices); + indices = NULL; +} + +void gt_query_router_self_init (void) +{ + indices = dataset_new (DATASET_HASH); +} + +/*****************************************************************************/ + +static uint32_t *append_token (uint32_t *tokens, size_t *len, + size_t pos, uint32_t tok) +{ + if (pos >= *len) + { + uint32_t *new_tokens; + + *(len) += 8; + new_tokens = realloc (tokens, *len * sizeof (uint32_t)); + + assert (new_tokens != NULL); + tokens = new_tokens; + } + + tokens[pos] = tok; + return tokens; +} + +static uint32_t *tokenize (char *hpath, size_t *r_len) +{ + uint32_t *tokens; + int count; + size_t len; + char *str, *str0; + char *next; + + if (!(str0 = str = STRDUP (hpath))) + return NULL; + + tokens = NULL; + len = 0; + count = 0; + + while ((next = string_sep_set (&str, QRP_DELIMITERS)) != NULL) + { + uint32_t tok; + + if (string_isempty (next)) + continue; + + /* don't add keywords that are too small */ + if (strlen (next) < QRP_MIN_LENGTH) + continue; + + tok = gt_query_router_hash_str (next, 32); + tokens = append_token (tokens, &len, count++, tok); + } + + *r_len = count; + + free (str0); + + return tokens; +} + +void gt_query_router_self_add (FileShare *file) +{ + uint32_t *tokens, *tokens0; + uint32_t tok; + size_t len; + int i; + struct qrp_route_entry *entry; + + tokens0 = tokens = tokenize (share_get_hpath (file), &len); + + assert (tokens != NULL); + assert (len > 0); + + for (i = 0; i < len; i++) + { + tok = tokens[i]; + + if ((entry = dataset_lookup (indices, &tok, sizeof (tok)))) + { + entry->ref++; + continue; + } + + /* + * Create a new index and add it to the table. + */ + if (!(entry = malloc (sizeof (struct qrp_route_entry)))) + continue; + + entry->ref = 1; + entry->index = tok; + + dataset_insert (&indices, &tok, sizeof (tok), entry, 0); + + table_changed = TRUE; + } + + free (tokens0); +} + +void gt_query_router_self_remove (FileShare *file) +{ + uint32_t *tokens, *tokens0; + uint32_t tok; + size_t len; + int i; + struct qrp_route_entry *entry; + + tokens0 = tokens = tokenize (share_get_hpath (file), &len); + + assert (tokens != NULL); + assert (len > 0); + + for (i = 0; i < len; i++) + { + tok = tokens[i]; + + entry = dataset_lookup (indices, &tok, sizeof (tok)); + assert (entry != NULL); + + if (--entry->ref > 0) + continue; + + dataset_remove (indices, &tok, sizeof (tok)); + + table_changed = TRUE; + } + + free (tokens0); +} + +void gt_query_router_self_sync (BOOL begin) +{ + if (!begin && table_changed) + { + start_build_timer(); + table_changed = FALSE; + } +} + +/*****************************************************************************/ + +int query_patch_open (GtQueryRouter *router, int seq_size, int compressed, + size_t max_size) +{ + GtQueryPatch *new_patch; + + if (!(new_patch = malloc (sizeof (GtQueryPatch)))) + return FALSE; + + memset (new_patch, 0, sizeof (GtQueryPatch)); + + if (!(new_patch->stream = zlib_stream_open (max_size))) + { + free (new_patch); + return FALSE; + } + + new_patch->seq_size = seq_size; + new_patch->compressed = compressed; + + /* NOTE: sequence is 1-based, not 0-based */ + new_patch->seq_num = 1; + + router->patch = new_patch; + + return TRUE; +} + +void query_patch_close (GtQueryRouter *router) +{ + GtQueryPatch *patch; + + GT->DBGFN (GT, "entered"); + + if (!router) + return; + + patch = router->patch; + + if (!patch) + return; + + zlib_stream_close (patch->stream); + + router->patch = NULL; + free (patch); +} + +/* TODO: compact router tables to bit-level */ +static void query_patch_apply (GtQueryRouter *router, int bits, char *data, + size_t data_size) +{ + GtQueryPatch *patch; + char *table; /* NOTE: this must be signed */ + int i; + + patch = router->patch; + assert (patch != NULL); + + /* check for overflow: this may look wrong but its not */ + if (patch->table_pos + (data_size - 1) >= router->size) + { + GT->DBGFN (GT, "patch overflow: %u (max of %u)", + patch->table_pos+data_size, router->size); + query_patch_close (router); + return; + } + + table = router->table; + + /* hrm */ + if (bits == 4) + { + int j; + + for (i = 0; i < data_size; i++) + { + int pos; + char change; + + pos = i + patch->table_pos; + + /* avoid % */ + j = (i+1) & 0x1; + + /* grab the correct half of the byte and sign-extend it + * NOTE: this starts off with the most significant bits! */ + change = data[i] & (0x0f << (4 * j)); + + /* move to least significant bits + * TODO: does this do sign-extension correctly? */ + change >>= 4; + + table[pos] += change; + } + } + else if (bits == 8) + { + /* untested */ + for (i = 0; i < data_size; i++) + { + table[i + patch->table_pos] += data[i]; + } + } + else + { + GT->DBGFN (GT, "undefined bits value in query patch: %u", bits); + query_patch_close (router); + return; + } + + /* store the table position for the next patch */ + patch->table_pos += i; + + /* cleanup the data if the patch is done */ + patch->seq_num++; + + if (patch->seq_num > patch->seq_size) + query_patch_close (router); +} + +/*****************************************************************************/ + +/* TODO: compact router tables to bit-level */ +GtQueryRouter *gt_query_router_new (size_t size, int infinity) +{ + GtQueryRouter *router; + + if (size > MAX_TABLE_SIZE) + return NULL; + + if (!(router = malloc (sizeof (GtQueryRouter)))) + return NULL; + + memset (router, 0, sizeof (GtQueryRouter)); + + if (!(router->table = malloc (size))) + { + free (router->table); + return NULL; + } + + memset (router->table, infinity, size); + + router->size = size; + + return router; +} + +void gt_query_router_free (GtQueryRouter *router) +{ + if (!router) + return; + + query_patch_close (router); + + free (router->table); + free (router); +} + +/*****************************************************************************/ + +static void print_hex (unsigned char *data, size_t size) +{ + fprint_hex (stdout, data, size); +} + +void gt_query_router_update (GtQueryRouter *router, size_t seq_num, + size_t seq_size, int compressed, int bits, + unsigned char *zdata, size_t size) +{ + GtQueryPatch *patch; + char *data; + + if (!router) + { + GT->DBGFN (GT, "null router"); + return; + } + + if (!router->patch) + { + if (!query_patch_open (router, seq_size, compressed, router->size)) + return; + } + + patch = router->patch; + + /* check for an invalid sequence number or size */ + if (patch->seq_size != seq_size || patch->seq_num != seq_num) + { + GT->DBGFN (GT, "bad patch: seq_size %u vs %u, seq_num %u vs %u", + patch->seq_size, seq_size, patch->seq_num, seq_num); + query_patch_close (router); + return; + } + + if (compressed != patch->compressed) + { + GT->DBGFN (GT, "tried to change encodings in patch"); + query_patch_close (router); + return; + } + + switch (compressed) + { + case 0x00: /* no compression */ + if (!zlib_stream_write (patch->stream, zdata, size)) + { + GT->DBGFN (GT, "error copying data"); + query_patch_close (router); + return; + } + + break; + + case 0x01: /* deflate */ + printf ("zlib compressed data:\n"); + print_hex (zdata, size); + + if (!zlib_stream_inflate (patch->stream, zdata, size)) + { + GT->DBGFN (GT, "error inflating data"); + query_patch_close (router); + return; + } + + break; + + default: + GT->DBGFN (GT, "unknown compression algorithm in query route patch"); + return; + } + + /* read the data in the stream */ + if (!(size = zlib_stream_read (patch->stream, &data))) + { + GT->DBGFN (GT, "error calling zlib_stream_read"); + query_patch_close (router); + return; + } + + printf ("after uncompressing:\n"); + print_hex (data, size); + + /* apply the patch -- this will cleanup any data if necessary */ + query_patch_apply (router, bits, data, size); + + print_hex (router->table, router->size); +} + +/*****************************************************************************/ + +static void submit_empty_table (TCPC *c) +{ + static char table[8] = { 0 }; + int len; + +#if 0 + size_t size; +#endif + + GT->DBGFN (GT, "reseting route table for %s", net_ip_str (GT_NODE(c)->ip)); + + /* all slots in the table should be initialized to infinity, so it + * should be "empty" on the remote node */ + memset (table, 0, sizeof (table)); + + +#if 0 + /* TEST: set part of the table to -infinity to get queries */ + size = sizeof (table); + memset (table + (size + 1) / 2 - 1, -infinity, (size + 1) / 4); +#endif + + /* format: */ + if (gt_packet_send_fmt (c, GT_MSG_QUERY_ROUTE, NULL, 1, 0, + "%c%lu%c", 0, (unsigned long) sizeof (table), + INFINITY) < 0) + { + GT->DBGFN (GT, "error reseting table"); + return; + } + + len = sizeof (table); + + if (gt_packet_send_fmt (c, GT_MSG_QUERY_ROUTE, NULL, 1, 0, + "%c%c%c%c%c%*p", + 1, 1, 1, 0, 8, len, table) < 0) + { + GT->DBGFN (GT, "error sending empty patch"); + return; + } +} + +static void submit_table (TCPC *c, uint8_t *table, size_t size, size_t slots) +{ + int infinity = INFINITY; + int seq_size; + int compressed; + int seq_num; + uint8_t *p; + size_t send_size; + + /* XXX make table size settable at runtime */ + + /* send a reset table first */ + if (gt_packet_send_fmt (c, GT_MSG_QUERY_ROUTE, NULL, 1, 0, + "%c%lu%c", 0, (long)slots, infinity) < 0) + { + GT->DBGFN (GT, "error reseting table"); + return; + } + + /* Break the table into PATCH_FRAGSIZE-sized chunks, + * and include any leftover portions. */ + seq_size = size / PATCH_FRAGSIZE + + (size % PATCH_FRAGSIZE == 0 ? 0 : 1); + + assert (seq_size < 256); +#if 0 + GT->dbg (GT, "sequence size: %u", seq_size); +#endif + + p = table; + compressed = TRUE; + + /* NOTE: patch sequence numbers start at 1 */ + for (seq_num = 1; seq_num <= seq_size; seq_num++) + { + send_size = MIN (PATCH_FRAGSIZE, size); + + if (gt_packet_send_fmt (c, GT_MSG_QUERY_ROUTE, NULL, 1, 0, + "%c%c%c%c%c%*p", + /* QRP PATCH */ 1, + seq_num, seq_size, compressed, + /* bits */ PATCH_BITS, + send_size, p) < 0) + { + GT->DBGFN (GT, "error sending QRT patch"); + return; + } + + size -= send_size; + p += send_size; + } +} + +static BOOL update_qr_table (TCPC *c) +{ + size_t size; + int version; + uint8_t *table; + GtNode *node = GT_NODE(c); + + assert (node->state & GT_NODE_CONNECTED); + + table = gt_query_router_self (&size, &version); + + /* we may not have finished building a table yet */ + if (!table) + return TRUE; + + /* dont submit a table if this node is already up to date */ + if (node->query_router_counter == version) + return TRUE; + + /* HACK: this shouldn't be using compressed_slots */ + submit_table (c, table, size, compressed_slots); + + /* store the version number of this table so + * we dont resubmit unecessarily */ + node->query_router_counter = version; + + return TRUE; +} + +static BOOL submit_first_table (TCPC *c) +{ + GtNode *node = GT_NODE(c); + + assert (node->state & GT_NODE_CONNECTED); + + update_qr_table (c); + + /* remove the first timer */ + timer_remove (node->query_route_timer); + + /* set the timer for updating the table repeatedly */ + node->query_route_timer = timer_add (QRT_UPDATE_INTERVAL, + (TimerCallback)update_qr_table, c); + + /* we removed the timer, and must return FALSE */ + return FALSE; +} + +/* + * Submit the query routing table for this node to another. + * + * This delays sending the table for while. This helps preserve our precious + * upstream when we're looking for nodes to connect to, as this often + * happens when we're in the middle of looking for more nodes. + */ +void query_route_table_submit (TCPC *c) +{ + GtNode *node = GT_NODE(c); + + assert (node->query_route_timer == 0); + + /* save bandwidth with an empty table */ + submit_empty_table (c); + + /* submit a real table later */ + node->query_route_timer = timer_add (QRT_SUBMIT_DELAY, + (TimerCallback)submit_first_table, c); +} + +/*****************************************************************************/ +/* TESTING */ + +#if 0 +#define CHECK(x) do { \ + if (!(x)) printf("FAILED: %s\n", #x); \ + else printf("OK: %s\n", #x); \ +} while (0) + +#define HASH(str, bits) \ + printf ("hash " str ": %u\n", gt_query_router_hash_str (str, bits)) + +int main (int argc, char **argv) +{ +#define hash gt_query_router_hash_str + + CHECK(hash("", 13)==0); + CHECK(hash("eb", 13)==6791); + CHECK(hash("ebc", 13)==7082); + CHECK(hash("ebck", 13)==6698); + CHECK(hash("ebckl", 13)==3179); + CHECK(hash("ebcklm", 13)==3235); + CHECK(hash("ebcklme", 13)==6438); + CHECK(hash("ebcklmen", 13)==1062); + CHECK(hash("ebcklmenq", 13)==3527); + CHECK(hash("", 16)==0); + CHECK(hash("n", 16)==65003); + CHECK(hash("nd", 16)==54193); + CHECK(hash("ndf", 16)==4953); + CHECK(hash("ndfl", 16)==58201); + CHECK(hash("ndfla", 16)==34830); + CHECK(hash("ndflal", 16)==36910); + CHECK(hash("ndflale", 16)==34586); + CHECK(hash("ndflalem", 16)==37658); + CHECK(hash("FAIL", 16)==37458); // WILL FAIL + CHECK(hash("ndflaleme", 16)==45559); + CHECK(hash("ol2j34lj", 10)==318); + CHECK(hash("asdfas23", 10)==503); + CHECK(hash("9um3o34fd", 10)==758); + CHECK(hash("a234d", 10)==281); + CHECK(hash("a3f", 10)==767); + CHECK(hash("3nja9", 10)==581); + CHECK(hash("2459345938032343", 10)==146); + CHECK(hash("7777a88a8a8a8", 10)==342); + CHECK(hash("asdfjklkj3k", 10)==861); + CHECK(hash("adfk32l", 10)==1011); + CHECK(hash("zzzzzzzzzzz", 10)==944); + + CHECK(hash("3nja9", 10)==581); + CHECK(hash("3NJA9", 10)==581); + CHECK(hash("3nJa9", 10)==581); + + printf ("hash(FAIL, 16) = %u\n", hash("FAIL", 16)); + return 0; +} +#endif diff -r 000000000000 -r d39e1d0d75b6 src/gt_query_route.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/gt_query_route.h Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,87 @@ +/* + * $Id: gt_query_route.h,v 1.12 2003/09/22 21:11:10 hipnod Exp $ + * + * Copyright (C) 2001-2003 giFT project (gift.sourceforge.net) + * + * 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. + */ + +#ifndef __GT_QUERY_ROUTE_H__ +#define __GT_QUERY_ROUTE_H__ + +/*****************************************************************************/ + +/* + * Delimiters for words in the query-router protocol hash function. + * This is what LimeWire uses. + */ +#define QRP_DELIMITERS " -._+/*()\\/" + +/*****************************************************************************/ + +struct gt_packet; +struct gt_zlib_stream; + +typedef struct gt_query_router GtQueryRouter; +typedef struct gt_query_patch GtQueryPatch; + +struct gt_query_patch +{ + int seq_size; + int seq_num; + int compressed; + + /* where the last patch left off in the table */ + int table_pos; + + struct gt_zlib_stream *stream; +}; + +struct gt_query_router +{ + char *table; + size_t size; + + GtQueryPatch *patch; +}; + +/*****************************************************************************/ + +uint32_t gt_query_router_hash_str (char *words, size_t bits); + +/*****************************************************************************/ + +void gt_query_router_self_init (void); +void gt_query_router_self_destroy (void); +uint8_t *gt_query_router_self (size_t *size, int *version); +void gt_query_router_self_add (Share *share); +void gt_query_router_self_remove (Share *share); +void gt_query_router_self_sync (BOOL begin); + +/*****************************************************************************/ + +GtQueryRouter *gt_query_router_new (size_t size, int infinity); +void gt_query_router_free (GtQueryRouter *router); + +void gt_query_router_update (GtQueryRouter *router, + size_t seq_num, size_t seq_size, + int compressed, int bits, + unsigned char *zdata, size_t size); + + +/*****************************************************************************/ + +void query_route_table_submit (TCPC *c); +void query_route_table_reset (TCPC *c); + +/*****************************************************************************/ + +#endif /* __GT_QUERY_ROUTE_H__ */ diff -r 000000000000 -r d39e1d0d75b6 src/gt_search.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/gt_search.c Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,732 @@ +/* + * $Id: gt_search.c,v 1.60 2004/11/29 12:32:12 mkern Exp $ + * + * Copyright (C) 2001-2003 giFT project (gift.sourceforge.net) + * + * 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. + */ + +#include "gt_gnutella.h" + +#include "gt_node.h" +#include "gt_node_list.h" +#include "gt_share.h" +#include "gt_share_file.h" +#include "gt_packet.h" +#include "gt_search.h" +#include "gt_xfer.h" + +#include "sha1.h" + +#include "encoding/url.h" /* gt_url_decode */ + +#include "transfer/download.h" +#include "transfer/source.h" + +#include + +/******************************************************************************/ + +/* how often we check if the search has timed out */ +#define TIMEOUT_CHECK_INTERVAL (20 * SECONDS) + +/* after this many results, no more search submissions will occur */ +#define RESULTS_BACKOFF (200) + +/* + * Gnutella searches don't notify when they are done. So, we close the + * search after the following critieria are met: + * + * - we have submitted the search to at least 3 Ultrapeers + * [MIN_NODES] + * - at least 3 minutes have passed since we last submitted to an ultrapeer + * [MIN_SUBMIT_WAIT] + * - no results have been seen in the last minute + * [MIN_RESULT_WAIT] + * + * This means the fastest we'll time out a search is 3 minutes if + * we submit to 3 ultrapeers immediately and get no results within + * 1 minute of the 3 minute time limit. + * + * For hash searches, we wait for 2 * MIN_SUBMIT_WAIT, because the other + * factors won't come into play. + * + * There is also a large timeout for searches that receive no results + * [ANCIENT_TIME]. Searches that exceed this age and haven't received + * any results in the same time will automatically be cancelled, regardless of + * other critieria. + */ +#define MIN_NODES (3) /* ultrapeers */ +#define MIN_SUBMIT_WAIT (3 * EMINUTES) +#define MIN_RESULT_WAIT (1 * EMINUTES) +#define ANCIENT_TIME (10 * EMINUTES) + +/******************************************************************************/ + +/* active keyword and hash searches from this node */ +static List *active_searches; + +/* probability of the next hash search not being dropped */ +static double locate_pass_prob; + +/******************************************************************************/ + +static BOOL finish_search (GtSearch *search) +{ + GT->DBGFN (GT, "search query for \"%s\" timed out", search->query); + gt_search_free (search); + return FALSE; +} + +static BOOL search_is_ancient (GtSearch *search, time_t now) +{ + if (difftime (now, search->start) < ANCIENT_TIME) + return FALSE; + + /* + * If the search is greater than ANCIENT_TIME and hasn't received + * a result in the same time, consider it ancient. + */ + if (search->last_result == 0) + return TRUE; + + if (difftime (now, search->last_result) >= ANCIENT_TIME) + return TRUE; + + return FALSE; +} + +/* + * search_timeout: check if the search needs to be closed. + * + * Its impossible to guarantee this will not close the search too early. + * It is more likely to miss results if bandwidth is being dedicated to + * other purposes besides reading Gnutella messages, or if the TTL and + * consequently the latency of the search is high. + * + * TODO: this should take into account that we may have disconnected + * from the nodes we submitted the search to. Perhaps, have + * a list of the submitted nodes, and make sure the list len >= + * MIN_NODES (but this may run into trouble with not submitting + * searches with results >= RESULTS_BACKOFF...) + */ +static BOOL search_timeout (GtSearch *search) +{ + time_t now; + double submit_wait; + double result_wait; + + time (&now); + + /* check if this search is really old and should be expired */ + if (search_is_ancient (search, now)) + return finish_search (search); + + if (search->submitted < MIN_NODES) + return TRUE; + + submit_wait = MIN_SUBMIT_WAIT; + result_wait = MIN_RESULT_WAIT; + + /* hash searches get very few results, so give them a longer base time */ + if (search->type == GT_SEARCH_HASH) + submit_wait *= 2; + + /* + * If the search has lots of results, don't wait as long. + * + * RESULTS_BACKOFF is a conservative value for not submitting to other + * nodes when we already have plenty of results, and we want to be a + * little less conservative here, so multiply RESULTS_BACKOFF by 2. + */ + if (search->results >= 2 * RESULTS_BACKOFF) + { + submit_wait /= 2; + result_wait /= 2; + } + + if (difftime (now, search->last_submit) < submit_wait) + return TRUE; + + if (difftime (now, search->last_result) < result_wait) + return TRUE; + + /* the search has timed out */ + return finish_search (search); +} + +/*****************************************************************************/ + +GtSearch *gt_search_new (IFEvent *event, char *query, gt_search_type_t type) +{ + GtSearch *search; + + if (!(search = malloc (sizeof (GtSearch)))) + return NULL; + + memset (search, 0, sizeof (GtSearch)); + + search->event = event; + search->type = type; + search->guid = gt_guid_new (); + search->query = STRDUP (query); + search->results = 0; + search->start = time (NULL); + + search->timeout_timer = timer_add (TIMEOUT_CHECK_INTERVAL, + (TimerCallback)search_timeout, + search); + + GT->DBGFN (GT, "new search \"%s\"", query); + + active_searches = list_prepend (active_searches, search); + + return search; +} + +void gt_search_free (GtSearch *search) +{ + if (!search) + return; + + if (!list_find (active_searches, search)) + { + GIFT_ERROR (("couldn't find search %p (query:'%s')", + search, search->query)); + return; + } + + if (search->timeout_timer) + timer_remove (search->timeout_timer); + + if (search->event) + GT->search_complete (GT, search->event); + + /* NOTE: search_complete may have removed the search by calling + * gt_search_disable */ + active_searches = list_remove (active_searches, search); + + free (search->hash); + free (search->realm); + free (search->guid); + free (search->query); + free (search); +} + +static int find_by_event (GtSearch *search, IFEvent *event) +{ + if (search->event == event) + return 0; + + return -1; +} + +void gt_search_disable (IFEvent *event) +{ + List *ls; + GtSearch *search; + + ls = list_find_custom (active_searches, event, + (CompareFunc) find_by_event); + + if (!ls) + { + GT->DBGFN (GT, "didnt find search id %p", (long) event); + return; + } + + search = ls->data; + + GT->DBGFN (GT, "disabled search event %p (query '%s')", event, search->query); + search->event = NULL; +} + +/******************************************************************************/ + +static int find_by_guid (GtSearch *a, GtSearch *b) +{ + return gt_guid_cmp (a->guid, b->guid); +} + +GtSearch *gt_search_find (gt_guid_t *guid) +{ + GtSearch key; + List *l; + + key.guid = guid; + + l = list_find_custom (active_searches, &key, (CompareFunc) find_by_guid); + + if (!l) + return NULL; + + return l->data; +} + +static BOOL search_matches_realm (GtSearch *search, GtShare *share) +{ + char *mime; + + if (!search->realm) + return TRUE; + + if (!(mime = mime_type (share->filename))) + return FALSE; + + if (strstr (mime, search->realm)) + return TRUE; + + if (!STRCMP (search->realm, "text")) + { + /* HACK: special case application/pdf */ + if (strstr (mime, "pdf")) + return TRUE; + + /* HACK: special case application/msword */ + if (strstr (mime, "doc")) + return TRUE; + } + + return FALSE; +} + +static BOOL search_matches_hash (GtSearch *search, Share *file) +{ + Hash *hash; + char *str; + int ret; + + if (search->type != GT_SEARCH_HASH) + return TRUE; + + if (!(hash = share_get_hash (file, "SHA1"))) + { + GT->DBGFN (GT, "bad result for hash query"); + return FALSE; + } + + if (!(str = hash_dsp (hash))) + return FALSE; + + ret = strcmp (search->hash, hashstr_data (str)); + + free (str); + + return (ret == 0); +} + +/* + * We have to filter out backslashes from the name to workaround a bug + * in lib/file.c. + */ +static void set_display_name (Share *share, const char *path) +{ + char *p; + char *disp_name; + + if (!(p = disp_name = STRDUP (path))) + return; + + while (*p) + { + if (*p == '\\') + *p = '_'; + p++; + } + + /* NOTE: this makes the GtShare->filename invalid because it shares memory + * with the Share */ + share_set_path (share, disp_name); + free (disp_name); +} + +void gt_search_reply (GtSearch *search, TCPC *c, in_addr_t host, + in_port_t gt_port, gt_guid_t *client_guid, + int availability, BOOL firewalled, + FileShare *file) +{ + char server[128]; + char *url; + char *host_str; + char *path; + GtShare *share; + GtNode *node; + BOOL is_local; + + node = GT_NODE(c); + + if (!search->event) + return; + + if (gt_is_local_ip (host, node->ip)) + is_local = TRUE; + else + is_local = FALSE; + + /* derive firewalled status if the address is local */ + if (is_local) + firewalled = TRUE; + + /* if they are firewalled and so are we, don't bother. + * NOTE: if we have a download proxy, we shouldnt do this */ + if (firewalled && GT_SELF->firewalled) + return; + + if (!(share = share_get_udata (file, GT->name))) + return; + + /* check if the mimetype for the result matches the query (i.e. this does + * client-side filtering) */ + if (!search_matches_realm (search, share)) + return; + + /* match against the hash if this is a hash search */ + if (!search_matches_hash (search, file)) + return; + + /* get the whole path (result may have '/' separators) */ + path = file->path; + assert (path != NULL); + + url = gt_source_url_new (path, share->index, host, gt_port, + node->ip, node->gt_port, + firewalled, client_guid); + + if (!url) + return; + + /* workaround bug in lib/file.c */ + set_display_name (file, path); + + /* print out the server data so we know which connection to + * talk to when sending a push request */ + snprintf (server, sizeof (server) - 1, "%s:%hu", + net_ip_str (node->ip), node->gt_port); + + if (is_local) + { + /* use the Client GUID for the user if the remote connection is + * on the Internet and the host is 0 or local */ + host_str = stringf_dup ("%s@%s", net_ip_str (host), + gt_guid_str (client_guid)); + } + else + { + /* Just use a plain host for cleanliness */ + host_str = stringf_dup ("%s", net_ip_str (host)); + } + + GT->search_result (GT, search->event, host_str, server, + url, availability, file); + + /* update statistics */ + search->results++; + time (&search->last_result); + + free (host_str); + free (url); +} + +/******************************************************************************/ + +static uint8_t get_search_ttl (GtNode *node, gt_search_type_t type) +{ + char *max_ttl; + uint8_t ttl = 0; + + if ((max_ttl = dataset_lookupstr (node->hdr, "x-max-ttl"))) + ttl = ATOI (max_ttl); + + if (ttl > GT_SEARCH_TTL || ttl == 0) + ttl = GT_SEARCH_TTL; + + /* ok because locates are rate-limited */ +#if 0 + if (type == GT_SEARCH_HASH) + ttl = 1; +#endif + + return ttl; +} + +static TCPC *broadcast_search (TCPC *c, GtNode *node, GtSearch *search) +{ + gt_query_flags_t flags; + uint8_t ttl; + char *hash = NULL; + GtPacket *pkt; + + /* set this query as having flags to be interpolated */ + flags = QF_HAS_FLAGS; + + /* request that only non-firewalled nodes respond if we are firewalled + * NOTE: if we ever support a download proxy, need to unset this */ + if (GT_SELF->firewalled) + flags |= QF_ONLY_NON_FW; + +#ifdef USE_LIBXML2 + flags |= QF_WANTS_XML; +#endif /* USE_LIBXML2 */ + + ttl = get_search_ttl (node, search->type); + + if (search->type == GT_SEARCH_HASH && !search->hash) + { + GT->DBGFN (GT, "trying to search for \"%s\" without a hash?!?", + search->query); + return NULL; + } + + if (!(pkt = gt_packet_new (GT_MSG_QUERY, ttl, search->guid))) + return NULL; + + gt_packet_put_uint16 (pkt, flags); + gt_packet_put_str (pkt, search->query); + + if (search->hash) + hash = stringf_dup ("urn:sha1:%s", search->hash); + + if (hash) + gt_packet_put_str (pkt, hash); + + gt_packet_send (c, pkt); + gt_packet_free (pkt); + + free (hash); + + /* TODO: check error return from gt_packet_send_fmt! */ + search->submitted++; + time (&search->last_submit); + + return NULL; +} + +static BOOL submit_search (GtSearch *search, TCPC *c) +{ + if (search->results >= RESULTS_BACKOFF) + { + /* still count the search as submitted to this node */ + search->submitted++; + return FALSE; + } + + broadcast_search (c, GT_NODE(c), search); + return FALSE; +} + +static BOOL submit_searches (TCPC *c) +{ + list_foreach (active_searches, (ListForeachFunc)submit_search, c); + GT_NODE(c)->search_timer = 0; + return FALSE; +} + +static BOOL reset_submit (GtSearch *search, time_t *now) +{ + if (search->results >= RESULTS_BACKOFF) + return FALSE; + + search->last_submit = *now; + return FALSE; +} + +void gt_searches_submit (TCPC *c, time_t delay_ms) +{ + time_t now; + + /* reset each search timeout because we will submit each search soon */ + time (&now); + list_foreach (active_searches, (ListForeachFunc)reset_submit, &now); + + /* submit the searches once after a delay */ + if (!GT_NODE(c)->search_timer) + { + GT_NODE(c)->search_timer = timer_add (delay_ms, + (TimerCallback)submit_searches, c); + } +} + +BOOL gnutella_search (Protocol *p, IFEvent *event, char *query, char *exclude, + char *realm, Dataset *meta) +{ + GtSearch *search; + + search = gt_search_new (event, query, GT_SEARCH_KEYWORD); + search->realm = STRDUP (realm); + + gt_conn_foreach (GT_CONN_FOREACH(broadcast_search), search, + GT_NODE_NONE, GT_NODE_CONNECTED, 0); + + return TRUE; +} + +/*****************************************************************************/ + +/* + * Using the hash, grab words to stuff in the query section by looking at the + * download list. + */ +char *get_query_words (char *htype, char *hash) +{ + Source *src; + GtSource *gt_src; + char *dup; + + if (htype && strcmp (htype, "SHA1") != 0) + { + GT->DBGFN (GT, "htype != \"SHA1\"!?: %s", htype); + return NULL; + } + + /* HACK: need gift's prefix */ + if (!(dup = stringf_dup ("SHA1:%s", hash))) + return NULL; + + src = gt_download_lookup (dup); + free (dup); + + if (!src) + return NULL; + + if (!(gt_src = src->udata)) + { + GT->DBGFN (GT, "gt_src == NULL?!?!"); + return NULL; + } + + return gt_url_decode (gt_src->filename); +} + +/* + * Returns TRUE if the current locate is ok to send and FALSE if it should be + * dropped to rate-limit locates. To determine that, we assign the locate a + * "probability of passage". Then we roll dice and if it's less than the + * probability, accept. + * + * For each locate attempt the probability of success for the next locate is + * halved, down to a minimum of 0.01%. For each minute that passes since the + * last locate, the probability of the locate succeeding increases by 1%. + */ +static BOOL should_send_locate (void) +{ + static time_t last_locate = 0; + time_t now; + double n; + BOOL passed; + + time (&now); + + if (last_locate == 0) + locate_pass_prob = 100.0; + else + locate_pass_prob += difftime (now, last_locate) / (1.0 * EMINUTES); + + last_locate = now; + + if (locate_pass_prob > 100.0) + locate_pass_prob = 100.0; + + /* hmm, should this be removed? */ + if (locate_pass_prob < 0.01) + locate_pass_prob = 0.01; + + n = 100.0 * rand() / (RAND_MAX + 1.0); + + GT->DBGFN (GT, "locate_pass_prob=%f n=%f", locate_pass_prob, n); + passed = BOOL_EXPR (n < locate_pass_prob); + + /* drop next chance of succeeding */ + locate_pass_prob /= 2; + + return passed; +} + +BOOL gnutella_locate (Protocol *p, IFEvent *event, char *htype, char *hash) +{ + GtSearch *search; + unsigned char *bin; + char *fname; + + /* Only locate hashes which are valid on Gnutella. */ + if (STRCMP (htype, "SHA1")) + return FALSE; + + GT->DBGFN (GT, "new hash search: %s", hash); + + /* sha1_bin() needs a string of at least 32 characters */ + if (STRLEN (hash) < 32) + return FALSE; + + /* skip the hash if it's not parseable in base32 */ + if (!(bin = sha1_bin (hash))) + return FALSE; + + free (bin); + + /* rate-limit locate searches to save bandwidth */ + if (should_send_locate () == FALSE) + { + GT->DBGFN (GT, "dropping locate for %s " + "(too many searches in short period)", hash); + return FALSE; + } + + /* make sure the hash is uppercase (canonical form on Gnet) */ + string_upper (hash); + + /* + * Look for a download with this hash, to put those words in the query to + * reduce the bandwidth consumed through QRP. + */ + if (!(fname = get_query_words (htype, hash))) + fname = STRDUP (""); + + if (!(search = gt_search_new (event, fname, GT_SEARCH_HASH))) + { + free (fname); + return FALSE; + } + + free (fname); + + search->hash = STRDUP (hash); + + gt_conn_foreach (GT_CONN_FOREACH(broadcast_search), search, GT_NODE_NONE, + GT_NODE_CONNECTED, 0); + + return TRUE; +} + +void gnutella_search_cancel (Protocol *p, IFEvent *event) +{ + gt_search_disable (event); +} + +/*****************************************************************************/ + +void gt_search_init (void) +{ + /* nothing */ +} + +BOOL rm_search (GtSearch *search, void *udata) +{ + gt_search_free (search); + + /* return FALSE here because gt_search_free() removes search from list */ + return FALSE; +} + +void gt_search_cleanup (void) +{ + list_foreach_remove (active_searches, (ListForeachFunc)rm_search, NULL); + assert (active_searches == NULL); +} diff -r 000000000000 -r d39e1d0d75b6 src/gt_search.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/gt_search.h Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,120 @@ +/* + * $Id: gt_search.h,v 1.19 2004/01/18 05:43:13 hipnod Exp $ + * + * Copyright (C) 2001-2003 giFT project (gift.sourceforge.net) + * + * 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. + */ + +#ifndef GIFT_GT_SEARCH_H_ +#define GIFT_GT_SEARCH_H_ + +/******************************************************************************/ + +struct tcp_conn; +struct file_share; + +typedef enum +{ + GT_SEARCH_HASH, + GT_SEARCH_KEYWORD, +} gt_search_type_t; + +/* + * These flags exist in what used to be the MinSpeed field of + * queries. The documentation for this field is arranged as two + * bytes in big-endian order, but this uses it in little-endian + * order so as to be consistent with the rest of the protocol. + */ +typedef enum gt_query_flags +{ + QF_WANTS_XML = 0x0020, /* servent wants XML metadata */ + QF_ONLY_NON_FW = 0x0040, /* source desires non-firewalled hits only */ + QF_HAS_FLAGS = 0x0080, /* this query has this interpretation */ +} gt_query_flags_t; + +typedef struct gt_search +{ + /* giFT event */ + IFEvent *event; + + /* what kind of search this is */ + gt_search_type_t type; + + /* the guid used to identify the search */ + char *guid; + + /* the query used for the search */ + char *query; + + /* the hash to look for this search if a URN query XXX should use gt_urn_t + * here, but the interface is just too borked */ + char *hash; + + /* the realm used for this query, if any */ + char *realm; + + /* expires the search according to critieria: see + * gt_search.c:search_timeout */ + timer_id timeout_timer; + + /* when the search was started */ + time_t start; + + /* how many nodes this search has been submitted to */ + size_t submitted; + + /* the last time we submitted to a node */ + time_t last_submit; + + /* time the last result for this search was seen */ + time_t last_result; + + /* results count */ + size_t results; +} GtSearch; + +/* the default ttl for searches */ +#define GT_SEARCH_TTL (5) + +/******************************************************************************/ + +GtSearch *gt_search_new (IFEvent *event, char *query, + gt_search_type_t type); +void gt_search_free (GtSearch *search); +void gt_search_disable (IFEvent *event); +void gt_search_reply (GtSearch *search, struct tcp_conn *c, + in_addr_t ip, in_port_t gt_port, + gt_guid_t *client_guid, int availability, + BOOL firewalled, struct file_share *file); +GtSearch *gt_search_find (gt_guid_t *guid); + +/* submit active searches to a node after a timeout */ +void gt_searches_submit (struct tcp_conn *c, time_t delay); + +/******************************************************************************/ + +BOOL gnutella_search (Protocol *p, IFEvent *event, char *query, + char *exclude, char *realm, Dataset *meta); + +BOOL gnutella_locate (Protocol *p, IFEvent *event, char *htype, + char *hash); + +void gnutella_search_cancel (Protocol *p, IFEvent *event); + +/******************************************************************************/ + +void gt_search_init (void); +void gt_search_cleanup (void); + +/******************************************************************************/ + +#endif /* GIFT_GT_SEARCH_H_ */ diff -r 000000000000 -r d39e1d0d75b6 src/gt_search_exec.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/gt_search_exec.c Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,366 @@ +/* + * $Id: gt_search_exec.c,v 1.23 2004/01/04 05:15:28 hipnod Exp $ + * + * Copyright (C) 2001-2003 giFT project (gift.sourceforge.net) + * + * 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. + */ + +#include "gt_gnutella.h" + +#include "gt_search.h" +#include "gt_search_exec.h" + +#include "gt_query_route.h" /* QRP_DELIMITERS */ +#include "gt_share.h" /* gt_share_local_lookup_by_urn */ +#include "gt_share_file.h" + +#include "sha1.h" /* sha1_string */ +#include "trie.h" + +#include + +/******************************************************************************/ + +#define MAX_RESULTS 200 + +/******************************************************************************/ + +static Trie *gt_search_trie; + +static StopWatch *search_sw; + +/******************************************************************************/ + +GtTokenSet *gt_token_set_new () +{ + GtTokenSet *ts; + + if (!(ts = MALLOC (sizeof (GtTokenSet)))) + return NULL; + + return ts; +} + +void gt_token_set_free (GtTokenSet *ts) +{ + if (!ts) + return; + + free (ts->data); + free (ts); +} + +void gt_token_set_append (GtTokenSet *ts, uint32_t token) +{ + if (ts->len >= ts->data_len) + { + uint32_t *new_tokens; + + ts->data_len += 8; + new_tokens = realloc (ts->data, ts->data_len * sizeof (uint32_t)); + + assert (new_tokens != NULL); + ts->data = new_tokens; + } + + ts->data[ts->len++] = token; +} + +/******************************************************************************/ + +static List *by_hash (unsigned char *hash, size_t *n) +{ + FileShare *file; + char *str; + char *urn; + + *n = 0; + + /* ugly that this is so sha1 specific:need a urn abstraction desperately */ + if (!(str = sha1_string (hash))) + return NULL; + + urn = stringf_dup ("urn:sha1:%s", str); + free (str); + + if (!(file = gt_share_local_lookup_by_urn (urn))) + { + free (urn); + return NULL; + } + + if (LOG_RESULTS) + { + GT->DBGFN (GT, "Wuh-HOO! Answered a query-by-hash (%s) for (%s)", + urn, share_get_hpath (file)); + } + + *n = 1; + free (urn); + + return list_append (NULL, file); +} + +/******************************************************************************/ + +/* some defines for list_find_custom that work like DS_BREAK, etc. */ +#define LIST_BREAK 0 +#define LIST_CONTINUE 1 + +static int search_slowly (Share *file, void **cmp) +{ + GtTokenSet *tokens = cmp[0]; + List **results = cmp[1]; + int *max_results = cmp[2]; + int *count = cmp[3]; + GtShare *share; + int i, j; + int matched; + GtTokenSet *cmp_tokens; + + if (*count >= *max_results) + return LIST_BREAK; + + if (!(share = share_get_udata (file, GT->name))) + return LIST_CONTINUE; + + cmp_tokens = share->tokens; + matched = 0; + + for (i = 0; i < tokens->len; i++) + { + int old_matched = matched; + + for (j = 0; j < cmp_tokens->len; j++) + { + if (tokens->data[i] == cmp_tokens->data[j]) + { + matched++; + break; + } + } + + if (matched == old_matched) + break; + } + + if (matched >= tokens->len) + { + *results = list_prepend (*results, file); + (*count)++; + } + + return LIST_CONTINUE; +} + +/* + * Find the smallest list corresponding to a word in the query + * that is in the trie of shares. + */ +static List *find_smallest (char *query) +{ + char *str; + char *str0; + List *smallest = NULL; + size_t smallest_size = 0; + char *tok; + size_t size; + + if (!(str = str0 = STRDUP (query))) + return NULL; + + string_lower (str); + + while ((tok = string_sep_set (&str, QRP_DELIMITERS))) + { + List *list; + + if (string_isempty (tok)) + continue; + + if (!(list = trie_lookup (gt_search_trie, tok))) + { + /* no shares have this token: therefore no match */ + smallest = NULL; + smallest_size = 0; + break; + } + + if ((size = list_length (list)) < smallest_size || smallest_size == 0) + { + /* keep this one */ + smallest_size = size; + smallest = list; + } + } + + free (str0); + + if (LOG_RESULTS) + GT->DBGFN (GT, "scanning list of %d size", smallest_size); + + return smallest; +} + +/* + * Look up the list of all shares for each word in the query in the + * Trie of all local shares. Find the keyword with the smallest + * list, then iterate the list looking for shares. + */ +static List *by_keyword (char *query, size_t max_results, size_t *n) +{ + GtTokenSet *tokens; + List *results = NULL; + List *smallest; + void *cmp[4]; + + if (!query || string_isempty (query)) + return NULL; + + if (!(tokens = gt_share_tokenize (query))) + return NULL; + + cmp[0] = tokens; + cmp[1] = &results; + cmp[2] = &max_results; + cmp[3] = n; + + smallest = find_smallest (query); + list_find_custom (smallest, cmp, (ListForeachFunc)search_slowly); + + gt_token_set_free (tokens); + return results; +} + +List *gt_search_exec (char *query, gt_search_type_t type, void *extended, + uint8_t ttl, uint8_t hops) +{ + List *results; + int max_res = MAX_RESULTS; + double elapsed; + unsigned char *hash; + size_t n = 0; + + stopwatch_start (search_sw); + + hash = extended; + + switch (type) + { + case GT_SEARCH_KEYWORD: results = by_keyword (query, max_res, &n); break; + case GT_SEARCH_HASH: results = by_hash (hash, &n); break; + default: abort (); + } + + stopwatch_stop (search_sw); + elapsed = stopwatch_elapsed (search_sw, NULL); + + if (LOG_RESULTS) + { + GT->dbg (GT, "results: [%03d] [%d|%d] %.06fs (%s)", n, + ttl, hops, elapsed, query); + } + + return results; +} + +/******************************************************************************/ + +static void add_share (Trie *trie, char *tok, Share *share) +{ + List *list; + + list = trie_lookup (trie, tok); + + /* the share may already be in the list if the filename has + * two words that are the same */ + if (list_find (list, share)) + return; + + list = list_prepend (list, share); + + trie_remove (trie, tok); + trie_insert (trie, tok, list); +} + +static void del_share (Trie *trie, char *tok, Share *share) +{ + List *list; + + list = trie_lookup (trie, tok); + list = list_remove (list, share); + + trie_remove (trie, tok); + + if (!list) + return; + + trie_insert (trie, tok, list); +} + +static void search_trie_change (Trie *trie, Share *share, BOOL add) +{ + char *tok; + char *str0, *str; + + if (!(str0 = str = STRDUP (share_get_hpath (share)))) + return; + + string_lower (str); + + while ((tok = string_sep_set (&str, QRP_DELIMITERS))) + { + if (string_isempty (tok)) + continue; + + if (add) + add_share (trie, tok, share); + else + del_share (trie, tok, share); + } + + free (str0); +} + +void gt_search_exec_add (Share *share) +{ + search_trie_change (gt_search_trie, share, TRUE); +} + +void gt_search_exec_remove (Share *share) +{ + search_trie_change (gt_search_trie, share, FALSE); +} + +void gt_search_exec_sync (void) +{ +#if 0 + printf ("SHARE TRIE:\n"); + trie_print (gt_search_trie); +#endif +} + +void gt_search_exec_init (void) +{ + gt_search_trie = trie_new (); + + search_sw = stopwatch_new (FALSE); +} + +void gt_search_exec_cleanup (void) +{ + trie_free (gt_search_trie); + gt_search_trie = NULL; + + stopwatch_free (search_sw); + search_sw = NULL; +} diff -r 000000000000 -r d39e1d0d75b6 src/gt_search_exec.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/gt_search_exec.h Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,55 @@ +/* + * $Id: gt_search_exec.h,v 1.9 2004/01/04 05:15:28 hipnod Exp $ + * + * Copyright (C) 2001-2003 giFT project (gift.sourceforge.net) + * + * 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. + */ + +#ifndef __GT_SEARCH_EXEC_H__ +#define __GT_SEARCH_EXEC_H__ + +/******************************************************************************/ + +#define LOG_RESULTS gt_config_get_int("search/log_results=0") + +/******************************************************************************/ + +typedef struct gt_token_set +{ + uint32_t *data; + size_t data_len; + size_t len; +} GtTokenSet; + +/******************************************************************************/ + +GtTokenSet *gt_token_set_new (void); +void gt_token_set_free (GtTokenSet *ts); +void gt_token_set_append (GtTokenSet *ts, uint32_t token); + +/******************************************************************************/ + +void gt_search_exec_add (Share *share); +void gt_search_exec_remove (Share *share); +void gt_search_exec_sync (void); + +void gt_search_exec_init (void); +void gt_search_exec_cleanup (void); + +/******************************************************************************/ + +List *gt_search_exec (char *query, gt_search_type_t type, void *extended, + uint8_t ttl, uint8_t hops); + +/******************************************************************************/ + +#endif /* __GT_SEARCH_EXEC_H__ */ diff -r 000000000000 -r d39e1d0d75b6 src/gt_share.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/gt_share.c Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,384 @@ +/* + * $Id: gt_share.c,v 1.35 2004/03/26 11:53:18 hipnod Exp $ + * + * Copyright (C) 2001-2003 giFT project (gift.sourceforge.net) + * + * 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. + */ + +#include "gt_gnutella.h" +#include "sha1.h" + +#include "gt_share.h" +#include "gt_share_file.h" +#include "gt_query_route.h" +#include "gt_search.h" +#include "gt_search_exec.h" + +#include "encoding/url.h" + +/******************************************************************************/ + +#define SHARE_DEBUG gt_config_get_int("share/debug=0") + +/*****************************************************************************/ + +/* each share is assigned an index here */ +static Dataset *indices; + +/* maps binary sha1 hashes -> FileShares */ +static Dataset *sha1_hashes; + +/* stored index of the last index assigned */ +static uint32_t index_counter; + +/* whether shares have been completely synchronized yet */ +static BOOL sync_begun; + +/* if shares are currently being synced */ +static BOOL sync_done; + +/******************************************************************************/ + +static void add_hash (FileShare *file); +static void remove_hash (FileShare *file); + +/******************************************************************************/ + +/* + * Find the old index, using the SHA1 hash as a key. + */ +static uint32_t get_old_index (Hash *hash) +{ + Share *old_share; + uint32_t index = 0; + + old_share = dataset_lookup (sha1_hashes, hash->data, SHA1_BINSIZE); + if (old_share != NULL) + { + GtShare *gt_share = share_get_udata (old_share, GT->name); + + if (gt_share) + index = gt_share->index; + } + + return index; +} + +/* + * Find an unused index, but reuse the existing index if possible. + */ +static uint32_t get_share_index (Share *share) +{ + Hash *hash; + uint32_t index; + + if ((hash = share_get_hash (share, "SHA1")) != NULL) + { + uint32_t hash_tmp; + + /* if a Share with the same hash has another index, re-use that one */ + if ((index = get_old_index (hash)) != 0) + return index; + + memcpy (&hash_tmp, hash->data, 4); + + /* use the first 24 bits of the SHA1 hash to seed the file index */ + index_counter = hash_tmp & 0xfffffff; + } + + if (!(index = dataset_uniq32 (indices, &index_counter))) + return 0; + + return index; +} + +static void add_index (Share *share, GtShare *gt_share) +{ + uint32_t index; + + if (SHARE_DEBUG) + GT->dbg (GT, "++[%d]->%s", gt_share->index, gt_share->filename); + + index = get_share_index (share); + dataset_insert (&indices, &index, sizeof(index), share, 0); +} + +static void remove_index (Share *share, GtShare *gt_share) +{ + uint32_t index = gt_share->index; + + assert (index > 0); + + /* + * Check if the index is pointing at a different share. This case happens + * for every Share that is not removed on a resync, due to the weird way + * giftd 0.11.x use the new/add/remove/free interface. + */ + if (dataset_lookup (indices, &index, sizeof(index)) != share) + return; + + if (SHARE_DEBUG) + GT->dbg (GT, "--[%d]->%s", gt_share->index, gt_share->filename); + + index = gt_share->index; + dataset_remove (indices, &index, sizeof(index)); + + if (dataset_length (indices) == 0) + { + dataset_clear (indices); + indices = NULL; + } +} + +/******************************************************************************/ + +/* TODO: This duplicates memory thats already stored on the FileShare. + * Prevent this by maintaining a per-hash algorithm map of FileShares */ +static void add_hash (FileShare *file) +{ + Hash *hash; + ds_data_t key; + ds_data_t value; + + if (!(hash = share_get_hash (file, "SHA1"))) + return; + + /* This shares the hash memory with the FileShare and also + * points directly at it. */ + ds_data_init (&key, hash->data, hash->len, DS_NOCOPY); + ds_data_init (&value, file, 0, DS_NOCOPY); + + /* We share the key with the FileShare, so remove the old key first + * so we don't end up sharing an old FileShare's hash. */ + dataset_remove_ex (sha1_hashes, &key); + dataset_insert_ex (&sha1_hashes, &key, &value); +} + +static void remove_hash (FileShare *file) +{ + Hash *hash; + + if (!(hash = share_get_hash (file, "SHA1"))) + return; + + /* + * If a FileShare is already present at this hash, and it isn't + * this FileShare, then don't remove it. This _will_ happen + * due to the way FileShares get added and removed on resyncs. + */ + if (dataset_lookup (sha1_hashes, hash->data, hash->len) != file) + return; + + dataset_remove (sha1_hashes, hash->data, hash->len); + + if (dataset_length (sha1_hashes) == 0) + { + dataset_clear (sha1_hashes); + sha1_hashes = NULL; + } +} + +/******************************************************************************/ + +static GtShare *gt_share_local_add (FileShare *file) +{ + GtShare *share; + uint32_t index; + + if (share_get_udata (file, GT->name)) + return NULL; + + index = get_share_index (file); + + if (!(share = gt_share_new_data (file, index))) + return NULL; + + add_hash (file); + add_index (file, share); + + return share; +} + +static void gt_share_local_remove (FileShare *file, GtShare *share) +{ + remove_index (file, share); + remove_hash (file); + + gt_share_free_data (file, share); +} + +static int find_by_index (ds_data_t *key, ds_data_t *value, void **args) +{ + uint32_t *index = args[0]; + char *filename = args[1]; + FileShare **ret = args[2]; + FileShare *file = value->data; + GtShare *share; + + if (!file || !(share = share_get_udata (file, GT->name))) + return DS_CONTINUE; + + if (share->index == *index && + (!filename || !strcmp (filename, share->filename))) + { + *ret = file; + return DS_BREAK; + } + + return DS_CONTINUE; +} + +FileShare *gt_share_local_lookup_by_index (uint32_t index, char *filename) +{ + FileShare *ret = NULL; + void *args[] = { &index, filename, &ret }; + + share_foreach (DS_FOREACH_EX(find_by_index), args); + + return ret; +} + +static FileShare *lookup_sha1 (char *urn) +{ + char *str, *str0; + char *prefix; + unsigned char *bin; + FileShare *file; + + if (!(str0 = str = STRDUP (urn))) + return NULL; + + /* TODO: consolidate with gt_protocol.c:parse_extended_data */ + string_upper (str0); + string_sep (&str, "URN:"); + + prefix = string_sep (&str, ":"); + + /* Only support urn:sha1 or urn:sha-1 urns now */ + if (STRCMP (prefix, "SHA1") != 0 && STRCMP (prefix, "SHA-1") != 0) + { + free (str0); + return NULL; + } + + string_trim (str); + + if (strlen (str) != 32) + { + free (str0); + return NULL; + } + + if (!(bin = sha1_bin (str))) + { + free (str0); + return NULL; + } + + file = dataset_lookup (sha1_hashes, bin, SHA1_BINSIZE); + + free (str0); + free (bin); + + return file; +} + +FileShare *gt_share_local_lookup_by_urn (char *urn) +{ + return lookup_sha1 (urn); +} + +static char *get_sha1 (FileShare *file) +{ + Hash *hash; + char *urn; + char *str; + + if (!(hash = share_get_hash (file, "SHA1"))) + return NULL; + + assert (hash->len == SHA1_BINSIZE); + + if (!(str = sha1_string (hash->data))) + return NULL; + + urn = stringf_dup ("urn:sha1:%s", str); + free (str); + + return urn; +} + +char *gt_share_local_get_urns (FileShare *file) +{ + char *urn; + + urn = get_sha1 (file); + + return urn; +} + +int gt_share_local_sync_is_done (void) +{ + return sync_done; +} + +/******************************************************************************/ + +void *gnutella_share_new (Protocol *p, FileShare *file) +{ + /* add this share to the data structures for searching */ + gt_search_exec_add (file); + + return gt_share_local_add (file); +} + +void gnutella_share_free (Protocol *p, FileShare *file, void *data) +{ + /* remove data structures for searching */ + gt_search_exec_remove (file); + + gt_share_local_remove (file, data); +} + +int gnutella_share_add (Protocol *p, FileShare *file, void *data) +{ + /* add to query routing tables */ + gt_query_router_self_add (file); + + return TRUE; +} + +int gnutella_share_remove (Protocol *p, FileShare *file, void *data) +{ + /* remove from query routing tables */ + gt_query_router_self_remove (file); + + return TRUE; +} + +void gnutella_share_sync (Protocol *p, int begin) +{ + gt_query_router_self_sync (begin); + + if (begin) + { + sync_begun = TRUE; + } + else if (sync_begun) + { + sync_begun = FALSE; + sync_done = TRUE; + + /* synchronize the search structures (possibly, to disk) */ + gt_search_exec_sync (); + } +} diff -r 000000000000 -r d39e1d0d75b6 src/gt_share.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/gt_share.h Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,55 @@ +/* + * $Id: gt_share.h,v 1.9 2004/03/24 06:36:54 hipnod Exp $ + * + * Copyright (C) 2001-2003 giFT project (gift.sourceforge.net) + * + * 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. + */ + +#ifndef __GT_SHARE_H__ +#define __GT_SHARE_H__ + +/******************************************************************************/ + +struct gt_share; +struct file_share; + +/******************************************************************************/ + +FileShare *gt_share_local_lookup_by_index (uint32_t index, char *file); +FileShare *gt_share_local_lookup_by_urn (char *urn); +int gt_share_local_sync_is_done (void); +char *gt_share_local_get_urns (FileShare *file); + +/******************************************************************************/ + +void *gnutella_share_new (Protocol *p, FileShare *file); +void gnutella_share_free (Protocol *p, FileShare *file, void *data); + +int gnutella_share_add (Protocol *p, FileShare *file, void *data); +int gnutella_share_remove (Protocol *p, FileShare *file, void *data); + +void gnutella_share_sync (Protocol *p, int begin); + +/*****************************************************************************/ + +void gnutella_share_hide (Protocol *p); +void gnutella_share_show (Protocol *p); + +/******************************************************************************/ + +/* need these definitions but giFT doesn't provide them to plugins */ +extern Dataset *share_index (unsigned long *files, double *size); +extern void share_foreach (DatasetForeachExFn foreach_fn, void *data); + +/******************************************************************************/ + +#endif /* __GT_SHARE_H__ */ diff -r 000000000000 -r d39e1d0d75b6 src/gt_share_file.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/gt_share_file.c Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,184 @@ +/* + * $Id: gt_share_file.c,v 1.17 2003/07/23 18:43:32 hipnod Exp $ + * + * Copyright (C) 2001-2003 giFT project (gift.sourceforge.net) + * + * 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. + */ + +#include "gt_gnutella.h" + +#include "sha1.h" +#if 0 +#include "src/mime.h" +#endif + +#include "gt_share_file.h" +#include "gt_query_route.h" + +#include "gt_search.h" +#include "gt_search_exec.h" + +/******************************************************************************/ + +unsigned int gt_share_unref (Share *file) +{ + GtShare *share; + + if ((share = share_get_udata (file, GT->name))) + { + if (file->ref <= 1) + { + gt_share_free_data (file, share); + share_set_udata (file, GT->name, NULL); + } + } + + return share_unref (file); +} + +unsigned int gt_share_ref (Share *file) +{ + return share_ref (file); +} + +/******************************************************************************/ + +/* this is duplicated with tokenize in gt_query_route.c for the time being */ +GtTokenSet *gt_share_tokenize (char *hpath) +{ + GtTokenSet *token_set; + char *str; + char *str0; + char *next; + + if (!(str0 = str = STRDUP (hpath))) + return NULL; + + if (!(token_set = gt_token_set_new ())) + { + free (str0); + return NULL; + } + + while ((next = string_sep_set (&str, QRP_DELIMITERS)) != NULL) + { + uint32_t tok; + + if (string_isempty (next)) + continue; + + tok = gt_query_router_hash_str (next, 32); + gt_token_set_append (token_set, tok); + } + + free (str0); + return token_set; +} + +/******************************************************************************/ + +GtShare *gt_share_new_data (Share *file, uint32_t index) +{ + GtShare *share; + char *basename; + + if (!file) + return NULL; + + if (!(share = malloc (sizeof (GtShare)))) + return NULL; + + assert (SHARE_DATA(file) != NULL); + + if (!(basename = file_basename (SHARE_DATA(file)->path))) + { + GT->DBGFN (GT, "bad basename for %s", SHARE_DATA(file)->path); + free (share); + return NULL; + } + + share->index = index; + share->filename = basename; /* share mem with Share */ + share->tokens = gt_share_tokenize (share_get_hpath (file)); + + return share; +} + +void gt_share_free_data (Share *file, GtShare *share) +{ + if (!file) + { + assert (share != NULL); + return; + } + + if (!share) + return; + + gt_token_set_free (share->tokens); + + /* don't free share->filename */ + + free (share); +} + +Share *gt_share_new (char *filename, uint32_t index, off_t size, + unsigned char *sha1) +{ + Share *file; + GtShare *share; +#if 0 + char *mime; + + /* choose mime type based on extension */ + mime = mime_type (filename); +#endif + + /* TODO: parse path out of filename. Nodes don't put paths in the + * search result string yet but may in the future */ + if (!(file = share_new (filename))) + return NULL; + +#if 0 + share_set_mime (file, mime); +#endif + + file->size = size; + + /* + * Set the hash if it was passed in, but also accept a null hash + * TODO: need a generic urn: type to stop hardcoding sha1 + */ + if (sha1 && !share_set_hash (file, "SHA1", sha1, SHA1_BINSIZE, TRUE)) + { + gt_share_unref (file); + return NULL; + } + + if (!(share = gt_share_new_data (file, index))) + { + gt_share_unref (file); + return NULL; + } + + share_set_udata (file, GT->name, share); + + return file; +} + +void gt_share_free (Share *file) +{ + gt_share_free_data (file, share_get_udata (file, GT->name)); + share_set_udata (file, GT->name, NULL); + + share_free (file); +} diff -r 000000000000 -r d39e1d0d75b6 src/gt_share_file.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/gt_share_file.h Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,61 @@ +/* + * $Id: gt_share_file.h,v 1.7 2003/06/01 09:20:35 hipnod Exp $ + * + * Copyright (C) 2001-2003 giFT project (gift.sourceforge.net) + * + * 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. + */ + +#ifndef __GT_SHARE_FILE_H__ +#define __GT_SHARE_FILE_H__ + +/******************************************************************************/ + +struct file_share; + +struct gt_token_set; + +struct gt_share +{ + uint32_t index; + char *filename; + struct gt_token_set *tokens; +}; + +typedef struct gt_share GtShare; + +/******************************************************************************/ + +struct file_share *gt_share_new (char *filename, uint32_t index, + off_t size, unsigned char *sha1); +void gt_share_free (struct file_share *file); + +/******************************************************************************/ + +struct gt_token_set *gt_share_tokenize (char *words); + +/******************************************************************************/ + +unsigned int gt_share_ref (struct file_share *file); +unsigned int gt_share_unref (struct file_share *file); + +/******************************************************************************/ + +GtShare *gt_share_new_data (struct file_share *file, uint32_t index); +void gt_share_free_data (struct file_share *file, GtShare *share); + +/******************************************************************************/ + +FileShare *gt_share_local_lookup_by_hash (unsigned char *sha1); + +/******************************************************************************/ + +#endif /* __GT_SHARE_FILE_H__ */ diff -r 000000000000 -r d39e1d0d75b6 src/gt_share_state.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/gt_share_state.c Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,190 @@ +/* + * $Id: gt_share_state.c,v 1.2 2004/03/31 08:58:24 hipnod Exp $ + * + * Copyright (C) 2004 giFT project (gift.sourceforge.net) + * + * 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. + */ + +#include "gt_gnutella.h" +#include "gt_node.h" +#include "gt_node_list.h" +#include "gt_packet.h" +#include "gt_share_state.h" + +/*****************************************************************************/ + +/* whether giftd has disabled shares */ +static BOOL giftd_hidden = FALSE; + +/*****************************************************************************/ + +struct gt_share_state *gt_share_state_new (void) +{ + struct gt_share_state *state; + + if (!(state = malloc (sizeof(struct gt_share_state)))) + return NULL; + + /* + * Sharing may be disabled now globally, but it isn't for this + * gt_share_state until gt_share_state_update() is called. + */ + state->hidden = FALSE; + state->plugin_hidden = FALSE; + + return state; +} + +void gt_share_state_free (struct gt_share_state *state) +{ + free (state); +} + +static GtPacket *hops_flow_message (uint8_t ttl) +{ + GtPacket *pkt; + + if (!(pkt = gt_packet_vendor (GT_VMSG_HOPS_FLOW))) + return NULL; + + gt_packet_put_uint8 (pkt, ttl); + + if (gt_packet_error (pkt)) + { + gt_packet_free (pkt); + return NULL; + } + + return pkt; +} + +static void toggle_sharing (GtNode *node, struct gt_share_state *state, + BOOL hidden) +{ + GtPacket *hops_disable; + uint8_t max_hops; + + /* regardless of whether the node receives our HospFlow, record whether + * sharing _should_ be disabled */ + state->hidden = hidden; + + if (hidden) + max_hops = 0; + else + max_hops = 8; + + if (!(hops_disable = hops_flow_message (max_hops))) + return; + + if (!dataset_lookupstr (node->hdr, "vendor-message")) + { + gt_packet_free (hops_disable); + return; + } + + GT->DBGSOCK (GT, GT_CONN(node), "sending HopsFlow(%d)", max_hops); + + gt_node_send (node, hops_disable); + gt_packet_free (hops_disable); +} + +void gt_share_state_update (GtNode *node) +{ + struct gt_share_state *state; + + assert (node->state == GT_NODE_CONNECTED); + state = node->share_state; + + if (state->hidden) + { + /* sharing disable, reenable it */ + if (!giftd_hidden && !state->plugin_hidden) + toggle_sharing (node, state, FALSE); + } + else + { + /* sharing enabled, disable it */ + if (giftd_hidden || state->plugin_hidden) + toggle_sharing (node, state, TRUE); + } +} + +/*****************************************************************************/ + +/* + * gt_share_state_update() must have been called before calling either of + * these. + */ + +void gt_share_state_hide (GtNode *node) +{ + node->share_state->plugin_hidden = TRUE; + gt_share_state_update (node); +} + +void gt_share_state_show (GtNode *node) +{ + node->share_state->plugin_hidden = FALSE; + gt_share_state_update (node); +} + +/*****************************************************************************/ + +static GtNode *foreach_state (TCPC *c, GtNode *node, void *udata) +{ + gt_share_state_update (node); + return NULL; +} + +static void update_share_state (BOOL hidden) +{ + giftd_hidden = hidden; + + /* + * Ignore the command from giftd for ultrapeers. XXX: this isn't actually + * right, if we change status inbetween two of these message, we're + * screwed. + */ + if (GT_SELF->klass & GT_NODE_ULTRA) + return; + + gt_conn_foreach (foreach_state, NULL, + GT_NODE_ULTRA, GT_NODE_CONNECTED, 0); +} + +void gnutella_share_hide (Protocol *p) +{ + if (giftd_hidden) + return; + + update_share_state (TRUE); +} + +void gnutella_share_show (Protocol *p) +{ + if (!giftd_hidden) + return; + + update_share_state (FALSE); +} + +/*****************************************************************************/ + +void gt_share_state_local_init (void) +{ + giftd_hidden = FALSE; +} + +void gt_share_state_local_cleanup (void) +{ + giftd_hidden = FALSE; +} diff -r 000000000000 -r d39e1d0d75b6 src/gt_share_state.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/gt_share_state.h Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,72 @@ +/* + * $Id: gt_share_state.h,v 1.2 2004/03/31 08:58:24 hipnod Exp $ + * + * Copyright (C) 2004 giFT project (gift.sourceforge.net) + * + * 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. + */ + +#ifndef GIFT_GT_SHARE_STATE_H_ +#define GIFT_GT_SHARE_STATE_H_ + +/******************************************************************************/ + +/* + * Keep track of the "hidden" share status on the remote node. To + * disable sharing, the node is sent a HopsFlow message with a payload of 0, + * telling it not to send us any queries. If the HopsFlow message isn't + * supported, the query handling code can simply drop the queries + * (alternatively, the QRT could be manipulated, but that's more complicated). + * + * There are two variables to deal with: giftd may have disabled sharing, and + * the plugin may have flow-controlled the remote node. When either of these + * conditions becomes true, the node is sent the HopsFlow message to disable + * receipt of queries. Only when both these conditions become false does the + * node receive another HopsFlow with a payload of 8, allowing the node to send + * us queries again. + * + * giftd's hidden state is tracked by gt_share_state.c. Here, each node's + * hidden state is tracked: + */ +struct gt_share_state +{ + BOOL hidden; /* sharing is disabled for this node */ + BOOL plugin_hidden; /* plugin disabled it (flow control) */ +}; + +/*****************************************************************************/ + +struct gt_share_state *gt_share_state_new (void); +void gt_share_state_free (struct gt_share_state *state); + +/*****************************************************************************/ + +/* update the node about our sharing status, possibly by sending it a HopsFlow + * message */ +void gt_share_state_update (struct gt_node *node); + +/* control share disabling on each individual node (as opposed to locally) */ +void gt_share_state_hide (struct gt_node *node); +void gt_share_state_show (struct gt_node *node); + +/*****************************************************************************/ + +void gt_share_state_local_init (void); +void gt_share_state_local_cleanup (void); + +/*****************************************************************************/ + +void gnutella_share_hide (Protocol *p); +void gnutella_share_show (Protocol *p); + +/******************************************************************************/ + +#endif /* GIFT_GT_SHARE_STATE_H_ */ diff -r 000000000000 -r d39e1d0d75b6 src/gt_stats.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/gt_stats.c Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,303 @@ +/* + * $Id: gt_stats.c,v 1.21 2005/01/04 14:59:58 mkern Exp $ + * + * Copyright (C) 2001-2003 giFT project (gift.sourceforge.net) + * + * 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. + */ + +#include "gt_gnutella.h" + +#include "gt_node.h" +#include "gt_node_list.h" + +#include "gt_search.h" + +/*****************************************************************************/ + +struct gt_stats +{ + double size_kb; + unsigned long files; + size_t users; +}; + +/* number of stats samples to accumulate */ +#define NR_SAMPLES 64 + +/* number of samples to take surrounding the median */ +#define NR_MEDIAN_SAMPLES 2 + +/*****************************************************************************/ + +/* + * This should be computed from our neighboring peers, but for now it + * hardcodes the max leaves for the most numerous nodes on the network, + * Limewire (32) and BearShare (10) + */ +static int avg_leaves = (32 + 10) / 2; + +/* default ttl we use in searches */ +static int default_ttl = GT_SEARCH_TTL; + +/* default outdegree for most nodes */ +static int default_degree = 6; + +/* keep track of the stats for the last NR_SAMPLES pongs */ +static struct gt_stats samples[NR_SAMPLES]; +static size_t samples_index; +static size_t samples_count; + +/*****************************************************************************/ + +void gt_stats_accumulate (in_addr_t ipv4, in_port_t port, + in_addr_t src_ip, uint32_t files, + uint32_t size_kb) +{ + samples[samples_index].files = files; + samples[samples_index].size_kb = size_kb; + + samples_index = (samples_index + 1) % NR_SAMPLES; + samples_count++; + + if (samples_count > NR_SAMPLES) + samples_count = NR_SAMPLES; +} + +static int stats_cmp (const void *a, const void *b) +{ + const struct gt_stats *a_s = a; + const struct gt_stats *b_s = b; + + return a_s->size_kb - b_s->size_kb; +} + +static void clear_stats (struct gt_stats *stats) +{ + stats->size_kb = 0.0; + stats->files = 0; + stats->users = 0; +} + +static void get_median_stats (struct gt_stats *pong_stats, size_t nr) +{ + int low, high; + int mid; + int i; + + if (nr == 0) + return; + + mid = nr / 2; + + low = mid - NR_MEDIAN_SAMPLES; + high = mid + NR_MEDIAN_SAMPLES; + + if (low < 0) + low = 0; + + if (high > nr - 1) + high = nr - 1; + + for (i = low; i <= high; i++) + { + pong_stats->size_kb += samples[i].size_kb; + pong_stats->files += samples[i].files; + pong_stats->users++; + } +} + +static void get_pong_stats (struct gt_stats *pong_stats) +{ + qsort (samples, samples_count, sizeof (struct gt_stats), stats_cmp); + + clear_stats (pong_stats); + get_median_stats (pong_stats, samples_count); +} + +/*****************************************************************************/ + +static TCPC *count_stats (TCPC *c, GtNode *node, struct gt_stats *st) +{ + /* sanity check */ + if (node->size_kb == (uint32_t)-1 || node->files == (uint32_t)-1) + return NULL; + + st->size_kb += node->size_kb; + st->files += node->files; + + if (node->vitality > 0) + st->users++; + + return NULL; +} + +static void get_conn_stats (struct gt_stats *conn_stats) +{ + clear_stats (conn_stats); + + /* grab statistics from the nodes structures */ + gt_conn_foreach (GT_CONN_FOREACH(count_stats), conn_stats, + GT_NODE_NONE, GT_NODE_ANY, 0); +} + +/*****************************************************************************/ + +/* no need to pull in math.h for this simple thing: exponent is small */ +static unsigned long int_pow (int base, int exponent) +{ + unsigned long total = 1; + + while (exponent-- > 0) + total *= base; + + return total; +} + +static unsigned long sum_network (int degree, int ttl) +{ + int i; + unsigned long sum; + + if (ttl <= 0) + return 0; + + sum = degree; + + for (i = 2; i <= ttl; i++) + sum += int_pow (degree-1, i-1) * degree; + + return sum; +} + +/* + * For each node we're connected to, check the 'X-Degree' and 'X-Max-TTL' + * handshake headers to use for degree and ttl in the calculations. + */ +static GtNode *count_edges (TCPC *c, GtNode *node, void *udata) +{ + unsigned long *count = udata; + unsigned long degree = 0; + unsigned long ttl = 0; + char *max_ttl_str; + char *x_degree_str; + + if ((max_ttl_str = dataset_lookupstr (node->hdr, "x-max-ttl")) != NULL) + ttl = ATOUL (max_ttl_str); + + if ((x_degree_str = dataset_lookupstr (node->hdr, "x-degree")) != NULL) + degree = ATOUL (x_degree_str); + + if (degree == 0 || degree > 200) + degree = default_degree; + + if (ttl == 0 || ttl > 30) + ttl = default_ttl; + + /* workaround limewire misfeature where it appears X-Max-TTL is set + * too high */ + if (degree > 30 && ttl > 5) + ttl = default_ttl; + + *count += sum_network (degree, ttl); + return NULL; +} + +/* + * Of course this is totally inaccurate, and not even dynamic. It + * approximates the maximum number of users in a network of + * Gnutella's structure in a given outdegree and TTL range + * (default_degree, default_ttl). This doesn't represent the whole + * network, and since the network has a significant amount of + * cycles this calculation is likely way too much. + * + * To compensate, we divide by 3. We could make a better guess + * about the number of nodes if we could find the number of cycles + * some way, but this information is not readily available. + */ +static unsigned long guess_users (void) +{ + unsigned long users = 0; + + gt_conn_foreach (count_edges, &users, + GT_NODE_ULTRA, GT_NODE_CONNECTED, 0); + + /* multiply by the number of leaves */ + users *= avg_leaves; + + /* divide by average redundancy level. TODO: calculate this dynamically */ + users /= ((3 + 1) / 2); + + /* divide by 3 to account for cycles */ + users /= 3; + + /* multiply by 2 because, well...this whole thing is misleading anyway, + * and the total number of users is greater than the horizon */ + users *= 2; + + return users; +} + +/*****************************************************************************/ + +/* + * TODO: accumulate statistics on average leaves/cycles on our immediate + * peers. + */ +int gnutella_stats (Protocol *p, unsigned long *users, unsigned long *files, + double *size, Dataset **extra) +{ + struct gt_stats pong_stats; + struct gt_stats conn_stats; + struct gt_stats avg_stats; + size_t connected; + + *files = *users = *size = 0; + + connected = gt_conn_length (GT_NODE_ULTRA, GT_NODE_CONNECTED); + + if (connected == 0) + return 0; + + get_pong_stats (&pong_stats); + get_conn_stats (&conn_stats); + + if (conn_stats.users == 0) + conn_stats.users = 1; + + if (pong_stats.users == 0) + pong_stats.users = 1; + + /* divide the total files size by two since it is inflated by ultrapeers + * abusing it to communicate their ultrapeer-ness to other nodes */ + pong_stats.size_kb /= 2; + conn_stats.size_kb /= 2; + + /* find the average of the data for our two sources */ + pong_stats.size_kb /= pong_stats.users; + pong_stats.files /= pong_stats.users; + conn_stats.size_kb /= conn_stats.users; + conn_stats.files /= conn_stats.users; + + /* put the stats of previously connected nodes on equal footing with the + * stats collected from pongs -- they should be more reliable */ + avg_stats.files = (pong_stats.files + conn_stats.files) / 2; + avg_stats.size_kb = (pong_stats.size_kb + conn_stats.size_kb) / 2; + + /* add conn_stats.users for a little variation (not much) */ + avg_stats.users = guess_users () + conn_stats.users; + + *users = avg_stats.users; + *files = avg_stats.files * avg_stats.users; + *size = avg_stats.size_kb * avg_stats.users / 1024 / 1024; + + return connected; +} diff -r 000000000000 -r d39e1d0d75b6 src/gt_stats.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/gt_stats.h Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,27 @@ +/* + * $Id: gt_stats.h,v 1.3 2003/07/21 16:48:07 hipnod Exp $ + * + * Copyright (C) 2001-2003 giFT project (gift.sourceforge.net) + * + * 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. + */ + +#ifndef __GT_STATS_H__ +#define __GT_STATS_H__ + +void gt_stats_accumulate (in_addr_t ipv4, in_port_t port, + in_addr_t src_ip, uint32_t files, + uint32_t size_kb); + +int gnutella_stats (Protocol *p, unsigned long *users, unsigned long *files, + double *size, Dataset **extra); + +#endif /* __GT_STATS_H__ */ diff -r 000000000000 -r d39e1d0d75b6 src/gt_urn.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/gt_urn.c Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,193 @@ +/* + * $Id: gt_urn.c,v 1.4 2004/03/05 17:47:29 hipnod Exp $ + * + * Copyright (C) 2003 giFT project (gift.sourceforge.net) + * + * 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. + */ + +#include "gt_gnutella.h" +#include "gt_urn.h" +#include "encoding/base32.h" +#include "sha1.h" + +/*****************************************************************************/ + +#define URN_PREFIX_LEN (sizeof("urn:")-1) +#define SHA1_PREFIX_LEN (sizeof("sha1:")-1) +#define BITPRINT_PREFIX_LEN (sizeof("bitprint:")-1) + +/*****************************************************************************/ + +enum urn_types +{ + GT_URN_SHA1 = 0, + GT_URN_BITPRINT = 1, /* for now, collapse bitprint to sha1 */ +}; + +/*****************************************************************************/ + +static long get_urn_type (gt_urn_t *urn) +{ + long tmp; + + memcpy (&tmp, urn, sizeof(tmp)); + return tmp; +} + +static void set_urn_type (gt_urn_t *urn, enum urn_types t) +{ + long tmp = t; + + memcpy (urn, &tmp, sizeof(tmp)); +} + +static unsigned char *get_urn_data (const gt_urn_t *urn) +{ + return (unsigned char *)urn + sizeof(long); +} + +static void set_urn_data (gt_urn_t *urn, const unsigned char *data, size_t len) +{ + memcpy (get_urn_data (urn), data, len); +} + +/*****************************************************************************/ + +static size_t bin_length (enum urn_types t) +{ + switch (t) + { + case GT_URN_BITPRINT: + case GT_URN_SHA1: return SHA1_BINSIZE; + default: return 0; + } +} + +static gt_urn_t *sha1_urn_new (const unsigned char *data) +{ + gt_urn_t *new_urn; + + if (!(new_urn = malloc (SHA1_BINSIZE + sizeof(long)))) + return NULL; + + /* put the identifier at the beginning */ + set_urn_type (new_urn, GT_URN_SHA1); + + /* copy the data */ + set_urn_data (new_urn, data, SHA1_BINSIZE); + + return new_urn; +} + +gt_urn_t *gt_urn_new (const char *urn_type, const unsigned char *data) +{ + if (!strcasecmp (urn_type, "urn:sha1")) + return sha1_urn_new (data); + + return NULL; +} + +unsigned char *gt_urn_data (const gt_urn_t *urn) +{ + if (!urn) + return NULL; + + return get_urn_data (urn); +} + +char *gt_urn_string (const gt_urn_t *urn) +{ + unsigned char *data; + char *urn_str; + const size_t prefix_len = URN_PREFIX_LEN + SHA1_PREFIX_LEN; + + /* + * This is the same for bitprint and sha1 urns, because we convert + * to sha1 anyway. + */ + + if (!(data = gt_urn_data (urn))) + return NULL; + + if (!(urn_str = malloc (prefix_len + SHA1_STRLEN + 1))) + return NULL; + + memcpy (urn_str, "urn:sha1:", prefix_len); + gt_base32_encode (data, SHA1_BINSIZE, urn_str + prefix_len, SHA1_STRLEN); + + urn_str[prefix_len + SHA1_STRLEN] = 0; + + return urn_str; +} + +/*****************************************************************************/ + +static gt_urn_t *sha1_urn_parse (const char *base32) +{ + gt_urn_t *bin; + + /* make sure the hash is the right length */ + if (!gt_base32_valid (base32, SHA1_STRLEN)) + return NULL; + + if (!(bin = malloc (SHA1_BINSIZE + sizeof(long)))) + return NULL; + + gt_base32_decode (base32, SHA1_STRLEN, bin + sizeof(long), SHA1_BINSIZE); + set_urn_type (bin, GT_URN_SHA1); + + return bin; +} + +/* + * Bitprint urns are the format: + * + * urn:bitprint:[32-character SHA1].[39-character TigerTree] + * + * We use the sha1 parsing and truncate the tigertree for now. + */ +static gt_urn_t *bitprint_urn_parse (const char *base32) +{ + return sha1_urn_parse (base32); +} + +gt_urn_t *gt_urn_parse (const char *str) +{ + if (strncasecmp ("urn:", str, URN_PREFIX_LEN) != 0) + return NULL; + + str += URN_PREFIX_LEN; + + if (!strncasecmp (str, "sha1:", SHA1_PREFIX_LEN)) + return sha1_urn_parse (str + SHA1_PREFIX_LEN); + + if (!strncasecmp (str, "bitprint:", BITPRINT_PREFIX_LEN)) + return bitprint_urn_parse (str + BITPRINT_PREFIX_LEN); + + return NULL; +} + +/*****************************************************************************/ + +int gt_urn_cmp (gt_urn_t *a, gt_urn_t *b) +{ + int ret; + + if (!a || !b) + return -1; + + if ((ret = memcmp (a, b, 4))) + return ret; + + return memcmp (a + sizeof(long), b + sizeof(long), + bin_length (get_urn_type (a))); +} diff -r 000000000000 -r d39e1d0d75b6 src/gt_urn.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/gt_urn.h Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,36 @@ +/* + * $Id: gt_urn.h,v 1.3 2004/03/05 17:47:29 hipnod Exp $ + * + * Copyright (C) 2003 giFT project (gift.sourceforge.net) + * + * 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. + */ + +#ifndef GIFT_GT_URN_H_ +#define GIFT_GT_URN_H_ + +/*****************************************************************************/ + +typedef unsigned char gt_urn_t; + +/*****************************************************************************/ + +gt_urn_t *gt_urn_new (const char *algo, + const unsigned char *data); +char *gt_urn_string (const gt_urn_t *urn); +gt_urn_t *gt_urn_parse (const char *string); +int gt_urn_cmp (gt_urn_t *a, gt_urn_t *b); + +unsigned char *gt_urn_data (const gt_urn_t *urn); + +/*****************************************************************************/ + +#endif /* GIFT_GT_URN_H_ */ diff -r 000000000000 -r d39e1d0d75b6 src/gt_utils.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/gt_utils.c Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,352 @@ +/* + * $Id: gt_utils.c,v 1.10 2004/04/17 06:05:54 hipnod Exp $ + * + * Copyright (C) 2001-2003 giFT project (gift.sourceforge.net) + * + * 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. + */ + +#include "gt_gnutella.h" + +#include "gt_utils.h" + +#ifdef USE_ZLIB +#include +#endif /* USE_ZLIB */ + +/*****************************************************************************/ + +int peer_addr (int fd, in_addr_t *r_ip, in_port_t *r_port) +{ + struct sockaddr_in sin; + int len = sizeof (struct sockaddr_in); + + if (getpeername (fd, (struct sockaddr *) &sin, &len) < 0) + return FALSE; + + /* maybe port should be kept in network byte-order */ + if (r_port) + *r_port = ntohs (sin.sin_port); + + if (r_ip) + *r_ip = sin.sin_addr.s_addr; + + return TRUE; +} + +char *make_str (char *array, int len) +{ + static int data_len = 0; + static char *data = 0; + + if (len <= 0) + return ""; + + if (!data_len || data_len < len) + { + if (data) + free (data); + + if (!(data = malloc (len + 1))) + return "(No memory for string)"; + } + + memcpy (data, array, len); + + data[len] = 0; + + if (len > data_len) + data_len = len; + + return data; +} + +void fprint_hex (FILE *f, char *buf, int len) +{ + int i, j; + unsigned char *line; + unsigned char *end; + + end = buf + len; + + while ((line = buf) != end) + { + for (i = 0; i < 16; i++) + { + if (line + i == end) + break; + + fprintf (f, "%02x ", line[i]); + } + + for (j = i; j < 16; j++) + fprintf (f, " "); + + fprintf (f, " "); + + for (i = 0; i < 16; i++) + { + if (line + i == end) + break; + + fprintf (f, "%c", isprint (line[i]) ? line[i] : '.'); + } + + buf += i; + fprintf (f, "\n"); + } +} + +/*****************************************************************************/ +/* HTTP HEADER STORAGE */ + +#if 0 +static unsigned long hash_lowercase (Dataset *d, void *key, size_t key_len) +{ + char *str; + int i; + unsigned long hash; + + for (hash = 0, i = 0; i < key_len; i++) + hash ^= tolower (str[i]); + + return hash; +} + +static int cmp_caseless (Dataset *d, DatasetNode *node, void *key, + size_t key_len) +{ + return strncasecmp (node->key, key, MIN (node->key_len, key_len)); +} + +/* Like a Dataset, but stores case-insensitive strings for keys to + * string fields. */ +Headers *headers_new () +{ + Dataset *dataset; + + if (!(dataset = dataset_new (DATASET_DEFAULT))) + return NULL; + + dataset->hash_func = hash_lowercase; + + return hdrs; +} + +char *header_lookup (Headers *hdrs, char *key) +{ + char *value; + + if (!hdrs || !key) + return NULL; + + return dataset_lookupstr (dataset, key); +} + +void header_insert (Headers **hdrs, char *key, char *value) +{ + if (!d || !key) + return; + + if (!(*hdrs) && !(*hdrs = headers_new ())) + return; + + dataset_insertstr (hdrs->dataset, key, value); +} + +void header_remove (Headers *hdrs, char *key) +{ + if (!hdrs) + return NULL; + + dataset_remove (hdrs->dataset, key, size); +} +#endif + +/*****************************************************************************/ +/* ZLIB WRAPPER ROUTINES */ + +static char *zlib_strerror (int error) +{ +#ifndef USE_ZLIB + return NULL; +#else /* USE_ZLIB */ + switch (error) + { + case Z_OK: return "OK"; + case Z_STREAM_END: return "End of stream"; + case Z_NEED_DICT: return "Decompressing dictionary needed"; + case Z_STREAM_ERROR: return "Stream error"; + case Z_ERRNO: return "Generic zlib error"; + case Z_DATA_ERROR: return "Data error"; + case Z_MEM_ERROR: return "Memory error"; + case Z_BUF_ERROR: return "Buffer error"; + case Z_VERSION_ERROR: return "Incompatible runtime zlib library"; + default: break; + } + + return "Invalid zlib error code"; +#endif /* USE_ZLIB */ +} + +static void zstream_close (ZlibStream *stream) +{ +#ifdef USE_ZLIB + switch (stream->type) + { + case ZSTREAM_INFLATE: inflateEnd (stream->streamptr); break; + case ZSTREAM_DEFLATE: deflateEnd (stream->streamptr); break; + default: break; + } + + if (stream->streamptr) + free (stream->streamptr); + + stream->type = ZSTREAM_NONE; + stream->streamptr = NULL; +#endif /* USE_ZLIB */ +} + +ZlibStream *zlib_stream_open (size_t max_size) +{ + ZlibStream *stream; + char *data; + + if (!(stream = malloc (sizeof (ZlibStream)))) + return NULL; + + if (!(data = malloc (max_size))) + { + free (stream); + return NULL; + } + + memset (stream, 0, sizeof (ZlibStream)); + memset (data, 0, max_size); + + stream->start = data; + stream->end = data + max_size; + stream->data = data; + stream->pos = data; + stream->type = ZSTREAM_NONE; + + return stream; +} + +void zlib_stream_close (ZlibStream *stream) +{ + if (!stream) + return; + + if (stream->type != ZSTREAM_NONE) + zstream_close (stream); + + if (stream->data) + free (stream->data); + + free (stream); +} + +int zlib_stream_write (ZlibStream *stream, char *data, size_t size) +{ + if (!stream) + return 0; + + /* check for overflow */ + if (stream->pos + (size-1) > stream->end) + return 0; + + memcpy (stream->pos, data, size); + + stream->pos += size; + + return size; +} + +int zlib_stream_read (ZlibStream *stream, char **r_data) +{ + size_t size; + + if (stream->start == stream->pos) + return 0; + + *r_data = stream->start; + + size = stream->pos - stream->start; + + stream->start = stream->pos; + + return size; +} + +int zlib_stream_inflate (ZlibStream *stream, char *zdata, size_t size) +{ +#ifndef USE_ZLIB + return FALSE; +#else /* USE_ZLIB */ + z_streamp inz; + int ret; + size_t free_size; + + if (!stream) + return FALSE; + + if (!stream->streamptr) + { + assert (stream->type == ZSTREAM_NONE); + + if (!(inz = malloc (sizeof (*inz)))) + return FALSE; + + inz->zalloc = NULL; + inz->zfree = NULL; + inz->opaque = NULL; + + if ((ret = inflateInit (inz)) != Z_OK) + { + GT->DBGFN (GT, "inflateInit error %s", zlib_strerror (ret)); + free (inz); + return FALSE; + } + + stream->type = ZSTREAM_INFLATE; + stream->streamptr = inz; + } + + inz = stream->streamptr; + + /* Argh, I think this is right, but I'm not sure about the +1 */ + free_size = stream->end - stream->pos + 1; + + inz->next_in = zdata; + inz->avail_in = size; + inz->next_out = stream->pos; + inz->avail_out = free_size; + + GT->DBGFN (GT, "next_out: %p avail_out: %u", inz->next_out, inz->avail_out); + + if ((ret = inflate (inz, Z_NO_FLUSH)) != Z_OK) + { + GT->DBGFN (GT, "decompression error: %s", zlib_strerror (ret)); + return FALSE; + } + + GT->DBGFN (GT, "inz->avail_in = %u, inz->avail_out = %u", inz->avail_in, + inz->avail_out); + + stream->pos += free_size - inz->avail_out; + + if (ret == Z_STREAM_END) + zstream_close (stream); + + return TRUE; +#endif /* USE_ZLIB */ +} diff -r 000000000000 -r d39e1d0d75b6 src/gt_utils.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/gt_utils.h Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,76 @@ +/* + * $Id: gt_utils.h,v 1.8 2004/04/17 06:05:54 hipnod Exp $ + * + * Copyright (C) 2001-2003 giFT project (gift.sourceforge.net) + * + * 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. + */ + +#ifndef GIFT_GT_UTILS_H_ +#define GIFT_GT_UTILS_H_ + +/*****************************************************************************/ + +/* define to set data structures to a predefined value after freeing */ +/* #define POISON_FREE 1 */ + +/*****************************************************************************/ + +typedef struct gt_zlib_stream +{ + void *streamptr; + + enum + { + ZSTREAM_NONE = 0x00, + ZSTREAM_INFLATE = 0x01, + ZSTREAM_DEFLATE = 0x02, + } type; + + char *data; + char *start, *end; + char *pos; +} ZlibStream; + +/*****************************************************************************/ + +char *make_str (char *pseudo_str, int len); + +int peer_addr (int fd, in_addr_t *r_ip, in_port_t *r_port); + +void fprint_hex (FILE *f, char *buf, int len); + +/*****************************************************************************/ + +ZlibStream *zlib_stream_open (size_t max); +void zlib_stream_close (ZlibStream *stream); +int zlib_stream_inflate (ZlibStream *stream, char *data, size_t size); +int zlib_stream_write (ZlibStream *stream, char *data, size_t size); + +/* returns the amount of data read */ +int zlib_stream_read (ZlibStream *stream, char **r_data); + +/*****************************************************************************/ + +#ifdef POISON_FREE +#define poisoned_free(ptr, chr) \ +do { \ + memset ((ptr), (chr), sizeof (*(ptr))); \ + free ((ptr)); \ +} while (0) +#else /* POISON_FREE */ +#define poisoned_free(ptr, chr) \ + free ((ptr)) +#endif /* POISON_FREE */ + +/*****************************************************************************/ + +#endif /* GIFT_GT_UTILS_H_ */ diff -r 000000000000 -r d39e1d0d75b6 src/gt_version.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/gt_version.c Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,26 @@ +/* + * $Id: gt_version.c,v 1.2 2004/06/02 07:13:56 hipnod Exp $ + * + * Copyright (C) 2003 giFT project (gift.sourceforge.net) + * + * 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. + */ + +#include "gt_gnutella.h" + +#include "gt_version.h" + +/*****************************************************************************/ + +char *gt_version (void) +{ + return "giFT-Gnutella/" GT_VERSION; +} diff -r 000000000000 -r d39e1d0d75b6 src/gt_version.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/gt_version.h Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,26 @@ +/* + * $Id: gt_version.h,v 1.2 2004/06/02 07:13:56 hipnod Exp $ + * + * Copyright (C) 2003 giFT project (gift.sourceforge.net) + * + * 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. + */ + +#ifndef GIFT_GT_VERSION_H_ +#define GIFT_GT_VERSION_H_ + +/*****************************************************************************/ + +char *gt_version (void); + +/*****************************************************************************/ + +#endif /* GIFT_GT_VERSION_H_ */ diff -r 000000000000 -r d39e1d0d75b6 src/gt_web_cache.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/gt_web_cache.c Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,925 @@ +/* + * $Id: gt_web_cache.c,v 1.65 2006/08/06 16:53:36 hexwab Exp $ + * + * Copyright (C) 2001-2003 giFT project (gift.sourceforge.net) + * + * 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. + */ + +#include "gt_gnutella.h" + +#include "file_cache.h" +#include "http_request.h" + +#include "gt_connect.h" +#include "gt_node.h" +#include "gt_node_list.h" +#include "gt_netorg.h" + +#include "gt_web_cache.h" +#include "gt_conf.h" + +#include "dns.h" + +/*****************************************************************************/ + +/* minimum time to wait before reconnecting to a webcache */ +#define CACHE_RETRY_TIME (8 * EHOURS) + +/*****************************************************************************/ + +/* number of times we have hit some gwebcaches */ +static int cache_hits; + +/* the absolute next time we will allow ourselves to access a cache */ +static time_t next_atime; + +/* amount of time to layoff the caches once we've received some data */ +static time_t backoff_time = 1 * EHOURS; + +/* holds all the caches */ +static FileCache *web_caches; + +/* proxy server to contact */ +static char *gt_proxy_server; + +/* webcaches that succeeded connecting, but returned errors or an + * unparseable response */ +static FileCache *bad_caches; + +/* whether we are in the process of checking the caches */ +static BOOL checking_caches; + +/*****************************************************************************/ + +static void parse_hostfile_response (HttpRequest *http_req, char *hosts_file); +static void parse_urlfile_response (HttpRequest *http_req, char *url_file); + +/*****************************************************************************/ + +/* parse the extended data in the webcaches file, now its just mtime */ +static BOOL parse_web_cache_value (char *value, time_t *r_atime) +{ + time_t atime; + + if ((atime = ATOUL (value)) == (unsigned long) -1) + atime = 0; + + if (r_atime) + *r_atime = atime; + + return TRUE; +} + +/*****************************************************************************/ + +static char *new_webcache_url (const char *host, const char *path) +{ + return stringf_dup ("http://%s/%s", host, STRING_NOTNULL(path)); +} + +static void ban_webcache (HttpRequest *req, const char *why) +{ + char *url; + + url = new_webcache_url (req->host, req->path); + GT->dbg (GT, "banning webcache %s", url); + + file_cache_insert (bad_caches, url, why); + file_cache_sync (bad_caches); + + free (url); +} + +static void insert_webcache (const char *host_name, const char *remote_path, + time_t atime) +{ + char *url; + char *field; + + url = new_webcache_url (host_name, remote_path); + field = stringf_dup ("%lu", atime); + + file_cache_insert (web_caches, url, field); + + free (url); + free (field); +} + +/*****************************************************************************/ + +static void handle_close_request (HttpRequest *req, int error_code) +{ + String *s; + + if (error_code < 0 || error_code < 200 || error_code >= 300) + { + if (error_code == -1) + { + /* the error was our fault, out of mem, etc. dont do anything */ + GT->DBGFN (GT, "connect to server %s failed for some reason", + req->host); + } + else + { + char err[32]; + + snprintf (err, sizeof(err), "Received error %d", error_code); + + /* + * Not found, internal server error, or too many redirects: ban + * the server's URL + */ + GT->DBGFN (GT, "server %s returned error %i", req->host, + error_code); + ban_webcache (req, err); + } + } + + /* TODO: this assumes this is the one hostfile request flying around, + * and not a urlfile request, which probably needs to be handled + * separately */ + checking_caches = FALSE; + + if ((s = req->data)) + string_free (s); +} + +static void parse_hostfile_response (HttpRequest *http_req, char *host_file) +{ + int hosts = 0; + GtNode *node; + time_t now; + + if (!host_file) + { + GT->DBGFN (GT, "empty host file from %s", http_req->host); + return; + } + + GT->DBGFN (GT, "hostfile from server = %s", host_file); + + now = time (NULL); + + /* + * If the response start with "ERROR: " (or pseudo-html '<' char), ban the + * webcache. + */ + if (!strncasecmp (host_file, "ERROR", sizeof ("ERROR") - 1) || + host_file[0] == '<') + { + ban_webcache (http_req, "Malformed response content"); + return; + } + + while (host_file && *host_file) + { + char *host; + in_addr_t ip; + in_port_t port; + + host = string_sep_set (&host_file, "\r\n"); + + ip = net_ip (string_sep (&host, ":")); + port = ATOI (host); + + if (!port || !ip || ip == INADDR_NONE) + continue; + + GT->DBGFN (GT, "registering %s:%hu (from cache %s)", net_ip_str (ip), + port, http_req->host); + + /* register the hosts as ultrapeers */ + node = gt_node_register (ip, port, GT_NODE_ULTRA); + hosts++; + + if (!node) + continue; + + /* set the vitality on this node to preserve it across restarts */ + node->vitality = now; + + /* might be connected already */ + if (node->state != GT_NODE_DISCONNECTED) + continue; + + /* try to connect to the first 5 */ + if (hosts <= 5 && gt_conn_need_connections (GT_NODE_ULTRA)) + gt_connect (node); + + /* don't allow the cache to register an infinite number of hosts */ + if (hosts >= 50) + break; + } + + /* save the nodes we added to disk so we dont hit the caches again */ + gt_node_list_save (); + + /* + * Do an exponential backoff from the caches. If we were online and + * able to receive data, we should be getting node information + * some other way now. + */ + if (hosts >= 5) + { + next_atime = now + backoff_time; + backoff_time *= 2; + } +} + +static void parse_urlfile_response (HttpRequest *http_req, char *url_file) +{ + int caches = 0; + + if (!url_file) + { + GT->DBGFN (GT, "empty url file from %s", http_req->host); + return; + } + + GT->DBGFN (GT, "urlfile from server = %s", url_file); + + while (url_file && *url_file) + { + char *url; + char *host_name; + char *remote_path; + + url = string_sep_set (&url_file, "\r\n"); + + /* skip past http:// */ + string_sep (&url, "http://"); + + host_name = string_sep (&url, "/"); + remote_path = url; + + /* NOTE: remote_path is possibly empty */ + if (!host_name) + continue; + + url = stringf ("http://%s/%s", host_name, STRING_NOTNULL(remote_path)); + + /* if the webcache is already in our db, skip it */ + if (file_cache_lookup (web_caches, url)) + continue; + + /* + * Only allow caches to register two more caches: this + * small number helps to avoid our list of caches getting + * polluted. + */ + if (++caches > 2) + break; + + /* format is: */ + file_cache_insert (web_caches, url, "0"); + } + + /* sync the pending web caches to disk */ + file_cache_sync (web_caches); +} + +static void end_request (HttpRequest *req, char *data) +{ + char *str = req->request; + + if (str && !strncmp (str, "hostfile", strlen ("hostfile"))) + parse_hostfile_response (req, data); + else if (str && !strncmp (str, "urlfile", strlen ("urlfile"))) + parse_urlfile_response (req, data); + else + abort (); +} + +/*****************************************************************************/ + +/* + * Return TRUE if newname is in the same domain as oldname. For example, + * "new.gwc.example.com", "example.com", and "cache.example.com" are all + * considered in the same domain as "www.example.com". + * + * This is called on redirects, to make sure the cache can't redirect to an + * innocent site as part of a DDoS attack. + */ +static BOOL in_same_domain (const char *oldname, const char *newname) +{ + return FALSE; +#if 0 + const char *p; + const char *largest = NULL; + int periods = 0; + + p = newname; + + /* get the largest common substring */ + while (p != NULL) + { + if ((largest = strstr (oldname, p))) + break; + + /* advance to next domain part */ + p = strchr (p + 1, '.'); + } + + if (!largest) + return FALSE; + + /* + * Make sure the substring matches completely to the end. This will + * actually fail when it shouldn't if one name includes the '.' toplevel + * domain and one doesn't. Oh well. + */ + if (strcmp (largest, p) != 0) + return FALSE; + + /* + * Count the number of periods to find the number of subdomains in the + * largest common substring. + */ + for (p = largest; *p != 0; p++) + { + if (*p == '.') + periods++; + } + + /* + * If the last character is the root '.', subtract one, since we are + * looking for the number of common subdomains, and the root is shared by + * all names. + */ + if (largest[strlen (largest) - 1] == '.') + periods--; + + /* + * If there are two periods, at least two toplevel domains match. + */ + if (periods >= 2) + return TRUE; + + /* + * If there is only one period shared, the names MAY be in the same + * domain: one of the names has to be completely contained within the + * other, such as the case of "foo.example.com" and "example.com". + */ + if (periods == 1 && + (strcmp (largest, oldname) == 0 || strcmp (largest, newname) == 0)) + { + return TRUE; + } + + /* not in same domain */ + return FALSE; +#endif +} + +/* + * Called to when the webcache sends a 300-level response with a provided + * Location: header. Have to make sure the domain the cache directs us + * to is the same. + */ +static BOOL handle_redirect (HttpRequest *req, const char *new_host, + const char *new_path) +{ + assert (new_host != NULL); + + if (in_same_domain (req->host, new_host) == FALSE) + return FALSE; + + /* might want to do something else if the ban list later becomes per host + * rather than per URL */ + ban_webcache (req, "Redirected"); + + GT->DBGFN (GT, "Redirecting to new webcache %s/%s", new_host, new_path); + + insert_webcache (new_host, new_path, time (NULL)); + file_cache_sync (web_caches); + + return TRUE; +} + +/*****************************************************************************/ + +static BOOL handle_recv (HttpRequest *req, char *data, size_t len) +{ + String *s; + + /* EOF */ + if (!data) + { + char *str = NULL; + + if ((s = req->data)) + str = s->str; + + GT->DBGFN (GT, "read %s from server %s", str, req->host); + end_request (req, str); + + /* clear data link */ + req->data = NULL; + + return TRUE; + } + + if (!len) + return TRUE; + + GT->DBGFN (GT, "server sent us: %s", data); + + if (!(s = req->data) && !(s = req->data = string_new (NULL, 0, 0, TRUE))) + return FALSE; + + if (string_append (s, data) != len) + { + GT->DBGFN (GT, "string append failed"); + return FALSE; + } + + return TRUE; +} + +/*****************************************************************************/ + +static BOOL handle_add_headers (HttpRequest *req, Dataset **headers) +{ + /* don't let intermediaries cache our request, I think */ + dataset_insertstr (headers, "Cache-Control", "no-cache"); + + return TRUE; +} + +/*****************************************************************************/ + +static BOOL parse_host_and_port (char **r_host, in_port_t *r_port) +{ + char *str; + char *host; + long port; + + str = *r_host; + + if (r_port) + *r_port = 80; + + /* skip leading 'http://' if found */ + if (strstr (str, "http://")) + str += strlen ("http://"); + + host = string_sep (&str, ":"); + + if (!host) + return FALSE; + + *r_host = host; + + if (str && !string_isempty (str)) + { + port = gift_strtol (str); + + /* make sure port is valid */ + if (port <= 0 || port >= 65536) + return FALSE; + + *r_port = port; + } + + return TRUE; +} + +static TCPC *open_http_connection (HttpRequest *req, const char *http_name) +{ + in_addr_t ip; + in_port_t port; + char *str; + char *name; + TCPC *c; + struct hostent *host; + + if (!http_name) + return NULL; + + if (!(str = STRDUP (http_name))) + return NULL; + + name = str; + + if (!parse_host_and_port (&name, &port)) + { + GT->DBGFN (GT, "error parsing hostname \"%s\"", str); + free (str); + return NULL; + } + + if (!(host = gt_dns_lookup (name))) + { + free (str); + return NULL; + } + + /* ip is in network-order already */ + memcpy (&ip, host->h_addr, MIN (host->h_length, sizeof (ip))); + + if (net_match_host (ip, "LOCAL")) + { + free (str); + ban_webcache (req, "Resolved to local IP"); + return NULL; + } + + c = tcp_open (ip, port, FALSE); + if (!c) + { + GT->DBGFN (GT, "couldn't open connection to %s [%s]: %s", + http_name, net_ip_str (ip), GIFT_NETERROR()); + } + + free (str); + return c; +} + +/* return the name we have to lookup */ +static char *get_http_name (char *name) +{ + char *proxy; + char *host; + + host = name; + proxy = HTTP_PROXY; + + string_trim (proxy); + + if (proxy && !string_isempty (proxy)) + { + /* connect to the proxy instead */ + if (STRCMP (proxy, gt_proxy_server) != 0) + { + GT->DBGFN (GT, "using proxy server %s", proxy); + free (gt_proxy_server); + gt_proxy_server = STRDUP (proxy); + } + + host = proxy; + } + + return host; +} + +static void check_dns_error (const char *name, HttpRequest *req) +{ + int error; + + error = gt_dns_get_errno (); + + if (!error) + return; + + GT->DBGFN (GT, "lookup failed on \"%s\": %s", name, gt_dns_strerror(error)); + + /* ban the host, but only if not using a proxy server */ + if (error == HOST_NOT_FOUND && gt_proxy_server == NULL) + { + GT->DBGFN (GT, "webcache \"%s\" not in DNS. banning", name); + ban_webcache (req, "Host not found in DNS"); + return; + } +} + +static BOOL make_request (char *host_name, char *remote_path, char *request) +{ + HttpRequest *req; + TCPC *c; + char *resolve_name; + char *url; + + url = stringf_dup ("http://%s/%s", host_name, STRING_NOTNULL(remote_path)); + + if (!(req = gt_http_request_new (url, request))) + { + free (url); + return FALSE; + } + + free (url); + + resolve_name = get_http_name (host_name); + + gt_dns_set_errno (0); + + if (!(c = open_http_connection (req, resolve_name))) + { + check_dns_error (resolve_name, req); + gt_http_request_close (req, -1); + return FALSE; + } + + GT->DBGFN (GT, "opening connection to %s [%s]", + resolve_name, net_ip_str (c->host)); + + req->recv_func = handle_recv; + req->add_header_func = handle_add_headers; + req->close_req_func = handle_close_request; + req->redirect_func = handle_redirect; + + gt_http_request_set_conn (req, c); /* setup references */ + gt_http_request_set_proxy (req, gt_proxy_server); /* maybe use proxy */ + gt_http_request_set_timeout (req, 2 * MINUTES); /* don't wait forever */ + gt_http_request_set_max_len (req, 65536); /* don't read forever */ + + input_add (c->fd, c, INPUT_WRITE, + (InputCallback)gt_http_request_handle, TIMEOUT_DEF); + + return TRUE; +} + +/*****************************************************************************/ + +struct find_rand_args +{ + int n; + time_t now; + char *url; + char *field; +}; + +/* get a random cache from the webcaches dataset */ +static void foreach_rand_cache (ds_data_t *key, ds_data_t *value, + struct find_rand_args *args) +{ + time_t atime; + float range = args->n; + char *str; + char *url = key->data; + char *hostname, *path; + int ret; + + if (!parse_web_cache_value (value->data, &atime)) + return; + + /* skip the cache entirely if we've retried too soon */ + if (args->now - atime < CACHE_RETRY_TIME) + return; + + /* + * Make sure the cache has a parseable url + * + * TODO: This is ugly, it really should be parsed into a + * a data structure once instead. + */ + str = STRDUP (url); + ret = gt_http_url_parse (str, &hostname, &path); + free (str); + + if (!ret) + { + GT->warn (GT, "bad webcache url \"%s\" from %s/gwebcaches", + key->data, gift_conf_path ("Gnutella")); + return; + } + + /* decrease probability of selecting the next web cache */ + args->n++; + + /* + * Select this webcache with probability 1/n. + * + * Also select this cache if we haven't chosen one yet, which may be the + * case on if the index of the cache is > 0 when there are banned caches. + */ + if (args->url == NULL || + range * rand() / (RAND_MAX + 1.0) < 1.0) + { + char *keystr = key->data; + char *valuestr = value->data; + + /* check if this is a bad gwebcache */ + if (file_cache_lookup (bad_caches, url)) + { +#if 1 + GT->warn (GT, "skipping webcache %s, in bad gwebcaches", url); +#endif + /* pretend we didn't select this to ensure equal distribution */ + args->n--; + + return; + } + + /* free the old values */ + free (args->url); + free (args->field); + + args->url = STRDUP (keystr); + args->field = STRDUP (valuestr); + } +} + +static BOOL get_random_cache (time_t now, char **r_host_name, + char **r_remote_path) +{ + int ret; + struct find_rand_args args; + + args.n = 1; /* initial probability */ + args.now = now; /* current time */ + args.url = NULL; + args.field = NULL; + + dataset_foreach (web_caches->d, DS_FOREACH(foreach_rand_cache), &args); + + if (!args.url) + { + GT->DBGFN (GT, "couldn't find random cache"); + return FALSE; + } + + ret = gt_http_url_parse (args.url, r_host_name, r_remote_path); + + if (!*r_host_name || !*r_remote_path) + { + free (args.url); + free (args.field); + return FALSE; + } + + *r_host_name = STRDUP (*r_host_name); + *r_remote_path = STRDUP (*r_remote_path); + + /* free the original buffer */ + free (args.url); + free (args.field); + + return ret; +} + +static void access_gwebcaches (void) +{ + int len; + char *host_name; + char *remote_path; + time_t now; + int host_requests = 0; +#if 0 + int url_requests = 0; +#endif + int max_requests = 1; + BOOL ret; + BOOL need_sync; + + /* + * We may get called while a check of the gwebcaches is already + * in progress. + */ + if (checking_caches) + { + GT->DBGFN (GT, "Access already in progress"); + return; + } + + now = time (NULL); + + len = dataset_length (web_caches->d); + + if (max_requests > len) + max_requests = len; + + need_sync = FALSE; + + while (host_requests < max_requests) + { + if (!get_random_cache (now, &host_name, &remote_path)) + { + GT->DBGFN (GT, "error looking up cache"); + break; + } + +#if 0 + /* make a url request sometimes to keep the cache file up to date, but + * mostly ask for hosts */ + if (10.0 * rand() / (RAND_MAX + 1.0) < 1.0) + { + ret = make_request (host_name, remote_path, + "urlfile=1&client=GIFT&version=" GT_VERSION); + url_requests++; + } + else +#endif + { + ret = make_request (host_name, remote_path, + "hostfile=1&client=GIFT&version=" GT_VERSION); + + if (ret) + checking_caches = TRUE; + + host_requests++; + } + + if (ret) + { + GT->DBGFN (GT, "hitting web cache [total cache hits %u] " + "(cache: http://%s/%s)", cache_hits, + host_name, STRING_NOTNULL(remote_path)); + + cache_hits++; + need_sync = TRUE; + + /* reset the atime for the cache */ + insert_webcache (host_name, remote_path, now); + } + + free (host_name); + free (remote_path); + } + + /* only sync when we successfully accessed a cache */ + if (need_sync) + file_cache_sync (web_caches); +} + +static BOOL webcache_update (void *udata) +{ + char *webcache_file; + int web_exists; + time_t now; + size_t nodes_len; + struct stat st; + + if (GNUTELLA_LOCAL_MODE) + return TRUE; + + now = time (NULL); + nodes_len = gt_conn_length (GT_NODE_NONE, GT_NODE_ANY); + + /* + * If we've already accessed the caches successfully, we won't + * allow another access to go through, _unless_ the node list + * is small enough, in which case it could be we really do need + * to access the caches. + */ + if (now < next_atime && nodes_len >= 20) + return FALSE; + + webcache_file = STRDUP (gift_conf_path ("Gnutella/gwebcaches")); + web_exists = file_stat (webcache_file, &st); + + if (!web_exists) + { + GIFT_ERROR (("gwebcaches file doesn't exist")); + return FALSE; + } + + /* + * next_atime, the absolute next time we allow ourselves to contact the + * caches, gets set when we sucessfully access the caches, and if we + * manage to get some hosts from a cache we access in an exponentially + * decreasing interval. + */ + access_gwebcaches (); + + free (webcache_file); + return TRUE; +} + +/*****************************************************************************/ + +void gt_web_cache_update (void) +{ + webcache_update (NULL); +} + +BOOL gt_web_cache_init (void) +{ + /* + * Copy the gwebcaches file to from the data dir to + * ~/.giFT/Gnutella if it is newer or if ~/.giFT/Gnutella/gwebcaches + * doesn't exist. + */ + gt_config_load_file ("Gnutella/gwebcaches", TRUE, FALSE); + + web_caches = file_cache_new (gift_conf_path ("Gnutella/gwebcaches")); + bad_caches = file_cache_new (gift_conf_path ("Gnutella/bad_gwebcaches")); + + if (!web_caches) + return FALSE; + + return TRUE; +} + +void gt_web_cache_cleanup (void) +{ + file_cache_free (web_caches); + web_caches = NULL; + + file_cache_free (bad_caches); + bad_caches = NULL; + + cache_hits = 0; + next_atime = 0; + + checking_caches = FALSE; +} diff -r 000000000000 -r d39e1d0d75b6 src/gt_web_cache.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/gt_web_cache.h Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,52 @@ +/* + * $Id: gt_web_cache.h,v 1.8 2004/02/23 04:18:43 hipnod Exp $ + * + * Copyright (C) 2001-2003 giFT project (gift.sourceforge.net) + * + * 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. + */ + +#ifndef GIFT_GT_WEB_CACHE_H_ +#define GIFT_GT_WEB_CACHE_H_ + +/*****************************************************************************/ + +/* this should be in http_request.c instead */ +#define HTTP_PROXY gt_config_get_str("http/proxy") + +/*****************************************************************************/ + +typedef struct gt_web_cache +{ + /* host name of the web_cache */ + char *host_name; + + /* xxxx in http://foo.com/xxxx */ + char *remote_path; + + /* last time we visited this webcache */ + time_t visited_time; +} Gt_WebCache; + +/*****************************************************************************/ + +/* initialize the gwebcaches from the ~/.giFT/Gnutella/gwebcaches file */ +BOOL gt_web_cache_init (void); + +/* cleanup any data allocated for gwebcaches */ +void gt_web_cache_cleanup (void); + +/* talk to the web caches to find more nodes (and webcaches) */ +void gt_web_cache_update (void); + +/*****************************************************************************/ + +#endif /* GIFT_GT_WEB_CACHE_H_ */ diff -r 000000000000 -r d39e1d0d75b6 src/gt_xfer.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/gt_xfer.c Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,1183 @@ +/* + * $Id: gt_xfer.c,v 1.103 2005/01/05 14:08:40 mkern Exp $ + * + * Copyright (C) 2001-2003 giFT project (gift.sourceforge.net) + * + * 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. + */ + +#include "gt_gnutella.h" + +#include "gt_xfer_obj.h" +#include "gt_xfer.h" +#include "gt_http_client.h" +#include "gt_http_server.h" +#include "gt_share.h" +#include "gt_share_file.h" +#include "gt_packet.h" +#include "gt_node.h" +#include "gt_node_list.h" +#include "gt_netorg.h" +#include "gt_connect.h" +#include "gt_bind.h" +#include "gt_utils.h" + +#include "encoding/url.h" + +#include "transfer/source.h" + +/******************************************************************************/ + +/* maximum number of push connections in limbo each remote user */ +#define PUSH_MAX_LIMBO gt_config_get_int("transfer/push_max_in_limbo=5") + +/******************************************************************************/ + +/* an alternative to carrying the push TTL around in the source url */ +#define PUSH_MAX_TTL 12 + +/* maximum time to keep push connections in "limbo" while awaiting giftd + * to reissue Chunks */ +#define PUSH_LIMBO_TIMEOUT (4 * MINUTES) + +/* how long to wait for a PUSH reply before timing out in order to free the + * Chunk */ +#define PUSH_WAIT_INTERVAL (30 * SECONDS) + +/* minimum interval between pushes */ +#define PUSH_MIN_DEFER_TIME (30 * ESECONDS) + +/* maximum amount of time a push will be forced to wait before being sent */ +#define PUSH_MAX_DEFER_TIME (10 * EMINUTES) + +/*****************************************************************************/ + +/* this stores information about an indirect ("pushed") download */ +typedef struct gt_push_source +{ + gt_guid_t *guid; + in_addr_t ip; + in_addr_t src_ip; /* whether this push was to a local source */ + List *xfers; /* xfers for this source */ + List *connections; /* connection for this source */ + time_t last_sent; /* time of last push sent to this source */ + double defer_time; /* min time to wait before sending another push + * doubles every push to PUSH_MAX_DEFER_TIME */ +} GtPushSource; + +/*****************************************************************************/ + +/* Maps guid->{list of unique GtPushSources} */ +static Dataset *gt_push_requests; + +/******************************************************************************/ + +static void push_source_reset_last_sent (GtPushSource *push_src); +static void push_source_set_last_sent (gt_guid_t *guid, in_addr_t ip); +static BOOL push_source_should_send (gt_guid_t *guid, in_addr_t ip); + +/*****************************************************************************/ + +/* + * The source URL is stored on disk and could be outdated if the format has + * changed. This updates it with any changes when we first read it from + * the state file on startup. + */ +static void replace_url (Source *src, GtSource *gt) +{ + char *url; + + if (!(url = gt_source_serialize (gt))) + return; + + /* swap urls */ + FREE (src->url); + src->url = url; +} + +/******************************************************************************/ + +static FileShare *lookup_index (GtTransfer *xfer, char *request) +{ + FileShare *file; + char *index_str; + char *filename; + char *decoded; + uint32_t index; + + filename = request; + index_str = string_sep (&filename, "/"); + + if (!filename || !index_str) + return NULL; + + index = ATOUL (index_str); + + decoded = gt_url_decode (filename); + file = gt_share_local_lookup_by_index (index, decoded); + + free (decoded); + + /* the filename may or may not be url encoded */ + if (!file) + file = gt_share_local_lookup_by_index (index, filename); + + return file; +} + +static FileShare *lookup_urns (GtTransfer *xfer, char *urns) +{ + FileShare *file = NULL; + char *urn; + + /* + * Try to lookup all urns provided in the header, + * until one is found. + */ + while (!file && !string_isempty (urns)) + { + urn = string_sep_set (&urns, ", "); + file = gt_share_local_lookup_by_urn (urn); + } + + return file; +} + +static FileShare *lookup_uri_res (GtTransfer *xfer, char *request) +{ + FileShare *file = NULL; + char *resolver = NULL; + char *urn; + + resolver = string_sep (&request, "?"); + urn = string_sep (&request, " "); + + if (resolver && !strcasecmp (resolver, "N2R")) + { + string_trim (request); + file = lookup_urns (xfer, urn); + } + + if (file && HTTP_DEBUG) + GT->dbg (GT, "file=%s", share_get_hpath (file)); + + return file; +} + +static Share *lookup_hpath (char *namespace, GtTransfer *xfer, char *request) +{ + char *hpath; + Share *share; + + /* + * Reconstruct the hpath + */ + if (!(hpath = stringf_dup ("/%s/%s", namespace, request))) + return NULL; + + if (HTTP_DEBUG) + GT->dbg (GT, "request by hpath: %s", hpath); + + share = GT->share_lookup (GT, SHARE_LOOKUP_HPATH, hpath); + free (hpath); + + return share; +} + +/* Take a request for a file, i.e. everything after GET in: + * + * "GET /get/1279/filename.mp3" + * + * and convert it to a localized path to a file. + * + * Path has been "secured" already if necessary. + * + * The path returned must be static. + * TODO: this interface is a bit bizarre */ +char *gt_localize_request (GtTransfer *xfer, char *s_path, int *authorized) +{ + static char open_path[PATH_MAX]; + char *namespace; + char *path, *path0; + char *content_urns; + FileShare *file; + + /* TODO: use authorized for Browse Host (BH) requests */ + if (!STRCMP (s_path, "/")) + { + /* *authorized = TRUE; */ + if (HTTP_DEBUG) + GT->DBGFN (GT, "received unimplemented Browse Host request"); + + return NULL; + } + + if (authorized) + *authorized = FALSE; + + if (!(path0 = path = STRDUP (s_path))) + return NULL; + + if (HTTP_DEBUG) + GT->dbg (GT, "path=%s", path); + + /* get rid of leading slash */ + string_sep (&path, "/"); + namespace = string_sep (&path, "/"); + + if (!namespace || !path) + { + GT->DBGFN (GT, "null namespace or path: %s %s\n", namespace, path); + free (path0); + return NULL; + } + + /* + * If the client supplied "X-Gnutella-Content-URN: ", lookup + * by that instead of the request. + */ + content_urns = dataset_lookupstr (xfer->header, "x-gnutella-content-urn"); + + if (content_urns) + file = lookup_urns (xfer, content_urns); + else if (!strcasecmp (namespace, "get")) + file = lookup_index (xfer, path); + else if (!strcasecmp (namespace, "uri-res")) + file = lookup_uri_res (xfer, path); + else + file = lookup_hpath (namespace, xfer, path); + + /* + * Set xfer->content_urn [which replies with 'X-Gnutella-Content-URN'] + * to a comma-separated list of all URNs for this file. + */ + xfer->content_urns = gt_share_local_get_urns (file); + + if (!file) + { + if (HTTP_DEBUG) + GT->DBGFN (GT, "bad request: /%s/%s", namespace, path); + + free (path0); + return NULL; + } + + free (path0); + + if (!share_complete (file)) + return NULL; + + /* argh, need to return static data */ + snprintf (open_path, sizeof (open_path) - 1, "%s", share_get_hpath (file)); + + /* try to fill in the hash */ + xfer->hash = share_dsp_hash (file, "SHA1"); + + return open_path; +} + +/******************************************************************************/ + +static char *index_request (char *request, size_t size, + uint32_t index, const char *filename) +{ + /* + * The filename may not have ever been set. Fail the request in + * this case. + */ + if (!filename || string_isempty (filename)) + return NULL; + + /* + * Filename is encoded, we don't support sending unecoded requests + * anymore. NOTE: filename doesnt have leading '/' here, that may change + */ + snprintf (request, size - 1, "/get/%u/%s", index, filename); + return request; +} + +/* + * Setup a request string. Try request-by-hash (/uri-res/N2R?urn:sha1:..), + * but if there are any problems, fallback to a "/get//" + * request. + */ +static char *request_str (Source *source, uint32_t index, char *filename) +{ + static char request[RW_BUFFER]; + char *hash = source->hash; + GtSource *gt; + + gt = source->udata; + assert (gt != NULL); + + /* + * Do a uri-res request unless one has failed already or + * if we have no filename and thus no choice but to use the hash. + * (doesn't happen currently but will for download-mesh sources + * that only have the hash and no filename) + */ + if (hash && (!gt->uri_res_failed || string_isempty (filename))) + { + char *str0, *str; + + if (!(str0 = STRDUP (hash))) + return index_request (request, sizeof (request), index, filename); + + str = str0; + string_sep (&str, ":"); + + /* hashes are canonically uppercase on the gnet */ + string_upper (str); + + if (str) + { + snprintf (request, sizeof (request) - 1, + "/uri-res/N2R?urn:sha1:%s", str); + free (str0); + return request; + } + + free (str0); + } + + return index_request (request, sizeof (request), index, filename); +} + +/*****************************************************************************/ +/* PUSH HANDLING */ + +/* + * This code has to deal with some tricky race conditions involving + * chunk timeouts and pushes. + */ + +static GtPushSource *gt_push_source_new (gt_guid_t *guid, in_addr_t ip, + in_addr_t src_ip) +{ + GtPushSource *src; + + if (!(src = MALLOC (sizeof (GtPushSource)))) + return NULL; + + src->guid = gt_guid_dup (guid); + src->ip = ip; + src->src_ip = src_ip; + src->xfers = NULL; + src->connections = NULL; + + push_source_reset_last_sent (src); + + return src; +} + +static void gt_push_source_free (GtPushSource *src) +{ + if (!src) + return; + + assert (src->xfers == NULL); + assert (src->connections == NULL); + + free (src->guid); + free (src); +} + +/*****************************************************************************/ + +/* TODO: break this into two parts, first part looks in the + * list for matching ip. If none is found, look for + * a firewalled (local ip) push source. */ +static int find_ip (GtPushSource *src, in_addr_t *ip) +{ + /* If the source is a local IP address behind a non-local one, + * authorize by just the client guid. Otherwise, use the IP. */ + if (gt_is_local_ip (src->ip, src->src_ip) || src->ip == *ip) + return 0; + + return -1; +} + +static List *lookup_source_list (gt_guid_t *guid) +{ + List *src_list; + + if (!(src_list = dataset_lookup (gt_push_requests, guid, 16))) + return NULL; + + return src_list; +} + +static GtPushSource *push_source_lookup (gt_guid_t *guid, in_addr_t ip) +{ + List *requests; + List *list; + + if (!(requests = lookup_source_list (guid))) + return NULL; + + list = list_find_custom (requests, &ip, (ListForeachFunc)find_ip); + return list_nth_data (list, 0); +} + +/*****************************************************************************/ + +static void insert_source_list (gt_guid_t *guid, List *src_list) +{ + if (!gt_push_requests) + gt_push_requests = dataset_new (DATASET_HASH); + + dataset_insert (>_push_requests, guid, 16, src_list, 0); +} + +static void add_push_source (List *pushes, gt_guid_t *guid, in_addr_t ip, + in_addr_t src_ip) +{ + GtPushSource *src; + List *old_list; + + if (!(src = gt_push_source_new (guid, ip, src_ip))) + return; + + if ((old_list = list_find_custom (pushes, &ip, (ListForeachFunc)find_ip))) + { + /* push source is already there */ + gt_push_source_free (src); + return; + } + + pushes = list_prepend (pushes, src); + insert_source_list (guid, pushes); +} + +void gt_push_source_add (gt_guid_t *guid, in_addr_t ip, in_addr_t src_ip) +{ + List *pushes; + + pushes = lookup_source_list (guid); + add_push_source (pushes, guid, ip, src_ip); +} + +/*****************************************************************************/ +/* Timing controls for push requests */ + +static void push_source_reset_last_sent (GtPushSource *push_src) +{ + push_src->last_sent = gt_uptime (); /* wrong */ + push_src->defer_time = 0.0; +} + +static void push_source_set_last_sent (gt_guid_t *guid, in_addr_t ip) +{ + GtPushSource *src; + + if (!(src = push_source_lookup (guid, ip))) + return; + + time (&src->last_sent); +} + +static BOOL push_source_should_send (gt_guid_t *guid, in_addr_t ip) +{ + GtPushSource *src; + double deferred; + time_t now; + + time (&now); + + if (!(src = push_source_lookup (guid, ip))) + return FALSE; + + deferred = difftime (now, src->last_sent); + + /* randomize the defer time a bit in order to not send pushes for all + * downloads at once */ + if (deferred < src->defer_time + -10.0 + 20.0 * rand() / (RAND_MAX + 1.0)) + return FALSE; + + /* + * Double the defer time interval (the minimum time between sent + * pushes for this source). + */ + src->defer_time *= 2; + if (src->defer_time >= PUSH_MAX_DEFER_TIME) + src->defer_time = PUSH_MAX_DEFER_TIME; + + if (src->defer_time == 0) + src->defer_time = PUSH_MIN_DEFER_TIME; + + return TRUE; +} + +/*****************************************************************************/ + +static void flush_inputs (TCPC *c) +{ + int ret; + + assert (c->fd >= 0); + + /* queued writes arent used by the HTTP system in this plugin, + * so this should always be true */ + ret = tcp_flush (c, TRUE); + assert (ret == 0); + + input_remove_all (c->fd); +} + +static void continue_download (GtPushSource *push_src, GtTransfer *xfer, + TCPC *c) +{ + Chunk *chunk; + + chunk = gt_transfer_get_chunk (xfer); + + /* remove all previous inputs */ + flush_inputs (c); + + /* HACK: remove the detach timeout */ + timer_remove_zero (&xfer->detach_timer); + + /* connect the TCPC and GtTransfer */ + gt_transfer_set_tcpc (xfer, c); + + /* update the IP and port for placing in Host: */ + peer_addr (c->fd, &xfer->ip, &xfer->port); + + /* the connection and the chunk have met up */ + gt_transfer_status (xfer, SOURCE_WAITING, "Received GIV response"); + + if (HTTP_DEBUG) + GT->DBGSOCK (GT, c, "Continuing download for %s", xfer->request); + + input_add (c->fd, xfer, INPUT_WRITE, + (InputCallback)gt_http_client_start, TIMEOUT_DEF); +} + +static void reset_conn (int fd, input_id id, TCPC *c) +{ + /* + * We should only get here if some data was sent, or if it timed out. In + * which case we should close this connection, because it shouldn't be + * sending anything. + */ + if (HTTP_DEBUG) + { + if (fd == -1) + GT->DBGSOCK (GT, c, "connection timed out"); + else + GT->DBGSOCK (GT, c, "connection closed or sent invalid data"); + } + + gt_push_source_remove_conn (c); + tcp_close (c); +} + +static void store_conn (GtPushSource *src, TCPC *c) +{ + flush_inputs (c); + + input_add (c->fd, c, INPUT_READ, + (InputCallback)reset_conn, PUSH_LIMBO_TIMEOUT); + + assert (!list_find (src->connections, c)); + src->connections = list_prepend (src->connections, c); + + if (HTTP_DEBUG) + GT->DBGSOCK (GT, c, "storing connection"); +} + +BOOL gt_push_source_add_conn (gt_guid_t *guid, in_addr_t ip, TCPC *c) +{ + GtTransfer *xfer; + GtPushSource *push_src; + + if (!(push_src = push_source_lookup (guid, ip))) + { + if (HTTP_DEBUG) + { + GT->err (GT, "couldn't find push source %s:[%s]", + gt_guid_str (guid), net_ip_str (ip)); + } + + tcp_close (c); + return FALSE; + } + + /* + * Don't allow too many connections in flight from the same remote user. + */ + if (list_length (push_src->connections) >= PUSH_MAX_LIMBO) + { + if (HTTP_DEBUG) + { + GT->DBGSOCK (GT, c, "too many push connections from %s, closing", + gt_guid_str (guid)); + } + + tcp_close (c); + return FALSE; + } + + /* + * Since we now know this push source is alive, reset the push send + * tracking time: in case the connection is lost, we'll resend the push + * right away instead of waiting. + */ + push_source_reset_last_sent (push_src); + + /* + * Store the connection if there are no GtTransfer requests from + * giFT at the moment. + */ + if (!push_src->xfers) + { + store_conn (push_src, c); + return FALSE; + } + + xfer = list_nth_data (push_src->xfers, 0); + push_src->xfers = list_remove (push_src->xfers, xfer); + + continue_download (push_src, xfer, c); + return TRUE; +} + +/* return TRUE if there's a connection residing on this push source */ +static BOOL push_source_lookup_conn (gt_guid_t *guid, in_addr_t ip) +{ + GtPushSource *push_src; + + if (!(push_src = push_source_lookup (guid, ip))) + return FALSE; + + if (push_src->connections) + { + if (HTTP_DEBUG) + GT->DBGFN (GT, "found push connection for %s", net_ip_str (ip)); + + return TRUE; + } + + return FALSE; +} + +static void store_xfer (GtPushSource *src, GtTransfer *xfer) +{ + assert (!list_find (src->xfers, xfer)); + src->xfers = list_prepend (src->xfers, xfer); +} + +BOOL gt_push_source_add_xfer (gt_guid_t *guid, in_addr_t ip, + in_addr_t src_ip, GtTransfer *xfer) +{ + TCPC *c; + GtPushSource *push_src; + + assert (xfer != NULL); + + /* create the source if it doesn't exist already */ + gt_push_source_add (guid, ip, src_ip); + + if (!(push_src = push_source_lookup (guid, ip))) + { + if (HTTP_DEBUG) + { + GT->err (GT, "couldn't find push source (%s:[%s]) for chunk %s", + gt_guid_str (guid), net_ip_str (ip), xfer->request); + } + + return FALSE; + } + + /* + * Store the GtTransfer if there are no connections to service it + * at the moment. + */ + if (!push_src->connections) + { + store_xfer (push_src, xfer); + return FALSE; + } + + c = list_nth_data (push_src->connections, 0); + push_src->connections = list_remove (push_src->connections, c); + + continue_download (push_src, xfer, c); + return TRUE; +} + +/*****************************************************************************/ + +static BOOL remove_xfer (GtPushSource *src, GtTransfer *xfer) +{ + src->xfers = list_remove (src->xfers, xfer); + return FALSE; +} + +static void remove_xfer_list (ds_data_t *key, ds_data_t *value, + GtTransfer *xfer) +{ + List *src_list = value->data; + + list_foreach (src_list, (ListForeachFunc)remove_xfer, xfer); +} + +/* + * The chunk is being cancelled, so remove it from being tracked. + * + * After this, if the push recipient connects, we will have to wait + * for another chunk timeout before transmitting. + */ +void gt_push_source_remove_xfer (GtTransfer *xfer) +{ + if (!xfer) + return; + + dataset_foreach (gt_push_requests, DS_FOREACH(remove_xfer_list), xfer); +} + +static BOOL remove_conn (GtPushSource *src, TCPC *c) +{ + src->connections = list_remove (src->connections, c); + return FALSE; +} + +static void remove_conn_list (ds_data_t *key, ds_data_t *value, TCPC *c) +{ + List *src_list = value->data; + + list_foreach (src_list, (ListForeachFunc)remove_conn, c); +} + +/* + * The connection from this push download closed + */ +void gt_push_source_remove_conn (TCPC *c) +{ + if (!c) + return; + + dataset_foreach (gt_push_requests, DS_FOREACH(remove_conn_list), c); +} + +static BOOL cleanup_xfer (GtTransfer *xfer, void *udata) +{ + gt_push_source_remove_xfer (xfer); + return TRUE; +} + +static BOOL cleanup_conn (TCPC *c, void *udata) +{ + gt_push_source_remove_conn (c); + tcp_close (c); + return TRUE; +} + +static void remove_push_source (GtPushSource *src) +{ + List *src_list; + + src_list = lookup_source_list (src->guid); + src_list = list_remove (src_list, src); + + insert_source_list (src->guid, src_list); +} + +void gt_push_source_remove (gt_guid_t *guid, in_addr_t ip, in_addr_t src_ip) +{ + GtPushSource *src; + + if (!(src = push_source_lookup (guid, ip))) + return; + + /* cleanup all the chunks and connections */ + src->xfers = + list_foreach_remove (src->xfers, (ListForeachFunc)cleanup_xfer, + NULL); + src->connections = + list_foreach_remove (src->connections, (ListForeachFunc)cleanup_conn, + NULL); + + /* remove this source from the global list */ + remove_push_source (src); + + gt_push_source_free (src); +} + +/*****************************************************************************/ + +static BOOL detach_timeout (void *udata) +{ + GtTransfer *xfer = udata; + + /* Added this on 2004-12-22 to track observed assertion failure in + * gt_transfer_get_chunk. -- mkern + */ + if (!xfer->chunk || xfer->chunk->udata != xfer) + { + GT->DBGFN (GT, "Detach timeout troubles. status = %d, " + "text = %s, xfer->ip = %s, " + "xfer = %p, xfer->chunk->udata = %p, " + "xfer->detach_timer = 0x%X", + xfer->detach_status, xfer->detach_msgtxt, + net_ip_str (xfer->ip), xfer, + xfer->chunk->udata, xfer->detach_timer); + } + + /* Sometimes gt_transfer_status will trigger an + * assert (xfer->chunk->udata == xfer) failure in gt_transfer_get_chunk. + * But why? Is xfer already freed? Does it have another chunk and the + * timer was not removed? + */ + gt_transfer_status (xfer, xfer->detach_status, xfer->detach_msgtxt); + gt_transfer_close (xfer, TRUE); + + return FALSE; +} + +/* + * Attach a timer that will "detach" the GtTransfer from the Chunk by + * cancelling it, but pretend that the Source is in some other state besides + * "cancelled" or "timed out" by changing the status text. + * + * This is useful to keep a semi-consistent UI in certain situations, such as + * sending out push requests, and cancelling requests when the remote side has + * queued our request. + */ +static void detach_transfer_in (GtTransfer *xfer, SourceStatus status, + char *status_txt, time_t interval) +{ + char *msg; + + msg = STRDUP (status_txt); + + gt_transfer_status (xfer, status, msg); + xfer->detach_status = status; + + free (xfer->detach_msgtxt); + xfer->detach_msgtxt = msg; + + xfer->detach_timer = timer_add (interval, + (TimerCallback)detach_timeout, xfer); +} + +/* + * Detach an GtTransfer from its Chunk. + */ +static void detach_transfer (GtTransfer *xfer, SourceStatus status, + char *msgtxt) +{ + /* + * Cancelling from p->download_start will cause download_pause() to crash. + * So, the detach must happen from timer context. + */ + detach_transfer_in (xfer, status, msgtxt, 2 * SECONDS); +} + +/*****************************************************************************/ + +static void send_push (GtTransfer *xfer, GtSource *gt, TCPC *server) +{ + GtPacket *packet; + + if (!(packet = gt_packet_new (GT_MSG_PUSH, PUSH_MAX_TTL, NULL))) + return; + + gt_packet_put_ustr (packet, gt->guid, 16); + gt_packet_put_uint32 (packet, gt->index); + gt_packet_put_ip (packet, GT_NODE(server)->my_ip); + gt_packet_put_port (packet, GT_SELF->gt_port); + + if (gt_packet_error (packet)) + { + gt_packet_free (packet); + return; + } + + gt_packet_send (server, packet); + gt_packet_free (packet); + + /* + * Don't wait for the whole Chunk timeout -- that keeps the Chunk + * occupied for too long if there are other active sources (the Chunk + * also times out longer and longer each time, so this gets worse + * the longer the transfer is inactive). + * + * This is really an infelicity of the Chunk system. + */ + detach_transfer_in (xfer, SOURCE_QUEUED_REMOTE, "Sent PUSH request", + PUSH_WAIT_INTERVAL); + + /* set the last time we sent a push to now */ + push_source_set_last_sent (gt->guid, gt->user_ip); +} + +static BOOL send_push_to_server (in_addr_t server_ip, in_port_t server_port, + GtTransfer *xfer, GtSource *gt) +{ + GtNode *server; + + if (!(server = gt_node_lookup (server_ip, server_port))) + { + server = gt_node_register (server_ip, server_port, + GT_NODE_ULTRA); + } + + if (!server) + { + GT->err (GT, "couldn't register server"); + return FALSE; + } + + if (server->state & (GT_NODE_CONNECTED | GT_NODE_CONNECTING_2)) + { + assert (GT_CONN(server) != NULL); + + /* Server is in a state for receiving packets -- send the push */ + send_push (xfer, gt, GT_CONN(server)); + return TRUE; + } + else if (server->state & GT_NODE_CONNECTING_1) + { + /* dont try to connect again; wait till we're connected */ + return FALSE; + } + else if (gt_conn_need_connections (GT_NODE_ULTRA) > 0 && + !server->tried_connect && + gt_connect (server) >= 0) + { + /* + * We've tried to connect to the server so we could deliver the push + * request eventually NOTE: this doesnt send a push until the next + * chunk timeout. + */ + return FALSE; + } + + return FALSE; +} + +static void handle_push_download (Chunk *chunk, GtTransfer *xfer, GtSource *gt) +{ + GtNode *server; + + /* + * If this succeeds, we already have a connection to this + * user and the transfer will continue by using that connection. + * + * TODO: the gt_push_source_add() should be used by some + * per-source data structure + */ + if (gt_push_source_add_xfer (gt->guid, gt->user_ip, gt->server_ip, xfer)) + return; + + /* + * Dont send pushes too often. Maybe should use a global queue instead. + * + * NOTE: we can't free the xfer here because we have stored it. + */ + if (push_source_should_send (gt->guid, gt->user_ip) == FALSE) + { + /* don't occupy the Chunk forever */ + detach_transfer_in (xfer, SOURCE_QUEUED_REMOTE, "Awaiting connection", + PUSH_WAIT_INTERVAL); + return; + } + + /* + * Next, try to find the server that supplied this result, + * and send them a push. + */ + if (send_push_to_server (gt->server_ip, gt->server_port, xfer, gt)) + return; + + /* + * Finally, try sending to a random connected server. + * + * TODO: these should be rate-limited, either globally or + * per-source. + */ + if ((server = gt_conn_random (GT_NODE_ULTRA, GT_NODE_CONNECTED))) + { + send_push_to_server (server->ip, server->gt_port, xfer, gt); + return; + } + + detach_transfer (xfer, SOURCE_QUEUED_REMOTE, "No PUSH route"); +} + +static BOOL set_request (GtTransfer *xfer, Chunk *chunk, Source *source, + GtSource *gt_src) +{ + char *request; + + if (!chunk || !xfer) + return FALSE; + + request = request_str (source, gt_src->index, gt_src->filename); + + if (!gt_transfer_set_request (xfer, request)) + { + GT->DBGFN (GT, "UI made an invalid request for '%s'", request); + return FALSE; + } + + /* connect the xfer and the chunk */ + gt_transfer_set_chunk (xfer, chunk); + + return TRUE; +} + +static BOOL should_push (GtSource *gt) +{ + TCPC *persistent; + + /* we cannot push if there is no guid to send the push to */ + if (gt_guid_is_empty (gt->guid)) + return FALSE; + + persistent = gt_http_connection_lookup (GT_TRANSFER_DOWNLOAD, + gt->user_ip, + gt->user_port); + + /* need to close the connection to re-add it to the list, because + * _lookup removes it from the persistent connection list */ + gt_http_connection_close (GT_TRANSFER_DOWNLOAD, persistent, FALSE); + + /* if we already have a connection don't send a push */ + if (persistent) + return FALSE; + + /* now check for a persistent "pushed" connection, which would be stored + * separately from a directly connected one */ + if (push_source_lookup_conn (gt->guid, gt->user_ip)) + return TRUE; + + /* send a push if the IP is local */ + if (gt_is_local_ip (gt->user_ip, gt->server_ip)) + return TRUE; + + /* don't send a push if we cannot receive incoming connections */ + if (gt_bind_is_firewalled()) + return FALSE; + + /* send a push if they set the firewalled bit */ + if (gt->firewalled) + return TRUE; + + /* the last connection attempt failed, so try a push */ + if (gt->connect_failed) + return TRUE; + + return FALSE; +} + +static void handle_download (Chunk *chunk, GtTransfer *xfer, GtSource *gt) +{ + /* + * Send a push, or connect directly. + */ + if (should_push (gt)) + { + /* (possibly) retry a connection attempt next time */ + gt->connect_failed = FALSE; + + handle_push_download (chunk, xfer, gt); + } + else + { + gt_http_client_get (chunk, xfer); + } +} + +static BOOL download_is_queued (GtSource *gt) +{ + /* back out if the request is still too early */ + if (time (NULL) < gt->retry_time) + return TRUE; + + return FALSE; +} + +int gnutella_download_start (Protocol *p, Transfer *transfer, Chunk *chunk, + Source *source) +{ + GtTransfer *xfer; + GtSource *gt; + off_t start; + off_t stop; + + gt = source->udata; + assert (gt != NULL); + + /* giftd should send us only deactivated Chunks */ + assert (chunk->udata == NULL); + + /* free the Source URL and update it with any format changes */ + replace_url (source, gt); + + /* thank you, pretender :) */ + start = chunk->start + chunk->transmit; + stop = chunk->stop; + + if (!(xfer = gt_transfer_new (GT_TRANSFER_DOWNLOAD, source, + gt->user_ip, gt->user_port, start, stop))) + { + GT->DBGFN (GT, "gt_transfer_new failed"); + return FALSE; + } + + if (!set_request (xfer, chunk, source, gt)) + { + gt_transfer_close (xfer, TRUE); + return FALSE; + } + + if (download_is_queued (gt)) + { + detach_transfer (xfer, SOURCE_QUEUED_REMOTE, gt->status_txt); + return TRUE; + } + + handle_download (chunk, xfer, gt); + + return TRUE; +} + +void gnutella_download_stop (Protocol *p, Transfer *transfer, Chunk *chunk, + Source *source, BOOL complete) +{ + gt_download_cancel (chunk, NULL); +} + +int gnutella_upload_start (Protocol *p, Transfer *transfer, Chunk *chunk, + Source *source, unsigned long avail) +{ + return TRUE; +} + +void gnutella_upload_stop (Protocol *p, Transfer *transfer, Chunk *chunk, + Source *source) +{ + gt_upload_cancel (chunk, NULL); +} + +int gnutella_chunk_suspend (Protocol *p, Transfer *transfer, Chunk *chunk, + Source *source) +{ + return gt_chunk_suspend (chunk, transfer, NULL); +} + +int gnutella_chunk_resume (Protocol *p, Transfer *transfer, Chunk *chunk, + Source *source) +{ + return gt_chunk_resume (chunk, transfer, NULL); +} diff -r 000000000000 -r d39e1d0d75b6 src/gt_xfer.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/gt_xfer.h Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,74 @@ +/* + * $Id: gt_xfer.h,v 1.27 2004/05/05 10:30:12 hipnod Exp $ + * + * Copyright (C) 2001-2003 giFT project (gift.sourceforge.net) + * + * 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. + */ + +#ifndef GIFT_GT_XFER_H_ +#define GIFT_GT_XFER_H_ + +/*****************************************************************************/ + +struct transfer; +struct source; +struct chunk; + +struct gt_transfer; + +/*****************************************************************************/ + +char *gt_localize_request (struct gt_transfer *xfer, char *s_path, + BOOL *authorized); + +/*****************************************************************************/ +/* Push handling routines */ + +void gt_push_source_add (gt_guid_t *guid, in_addr_t ip, + in_addr_t src_ip); +void gt_push_source_remove (gt_guid_t *guid, in_addr_t ip, + in_addr_t src_ip); +BOOL gt_push_source_add_xfer (gt_guid_t *guid, in_addr_t ip, + in_addr_t src_ip, + struct gt_transfer *xfer); +BOOL gt_push_source_add_conn (gt_guid_t *guid, in_addr_t ip, TCPC *c); + +void gt_push_source_remove_xfer (struct gt_transfer *xfer); +void gt_push_source_remove_conn (TCPC *c); + +/*****************************************************************************/ + +int gnutella_download_start (struct protocol *p, struct transfer *transfer, + struct chunk *chunk, struct source *source); +void gnutella_download_stop (struct protocol *p, struct transfer *transfer, + struct chunk *chunk, struct source *source, + BOOL complete); + +/*****************************************************************************/ + +int gnutella_upload_start (struct protocol *p, struct transfer *transfer, + struct chunk *chunk, struct source *source, + unsigned long avail); +void gnutella_upload_stop (struct protocol *p, struct transfer *transfer, + struct chunk *chunk, struct source *source); +void gnutella_upload_avail (struct protocol *p, unsigned long avail); + +/*****************************************************************************/ + +int gnutella_chunk_suspend (Protocol *p, struct transfer *transfer, + struct chunk *chunk, struct source *source); +int gnutella_chunk_resume (Protocol *p, struct transfer *transfer, + struct chunk *chunk, struct source *source); + +/*****************************************************************************/ + +#endif /* GIFT_GT_XFER_H_ */ diff -r 000000000000 -r d39e1d0d75b6 src/gt_xfer_obj.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/gt_xfer_obj.c Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,867 @@ +/* + * $Id: gt_xfer_obj.c,v 1.48 2004/12/19 12:38:42 mkern Exp $ + * + * acts as a gateway between giFT and the HTTP implementation + * + * Copyright (C) 2001-2003 giFT project (gift.sourceforge.net) + * + * 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. + */ + +#include "gt_gnutella.h" + +#include "gt_xfer_obj.h" +#include "gt_xfer.h" +#include "gt_http_server.h" +#include "gt_http_client.h" +#include "gt_share.h" + +#include "encoding/url.h" + +#include "transfer/source.h" + +/*****************************************************************************/ + +static List *upload_connections = NULL; +static List *download_connections = NULL; + +/*****************************************************************************/ +/* HTTP COMMUNICATION */ + +static BOOL header_read_timeout (GtTransfer *xfer) +{ + gt_transfer_status (xfer, SOURCE_TIMEOUT, "Timed out"); + gt_transfer_close (xfer, TRUE); + return FALSE; +} + +GtTransfer *gt_transfer_new (GtTransferType type, Source *source, + in_addr_t ip, in_port_t port, + off_t start, off_t stop) +{ + GtTransfer *xfer; + GtTransferCB cb; + + if (!(xfer = malloc (sizeof (GtTransfer)))) + return NULL; + + memset (xfer, 0, sizeof (GtTransfer)); + + if (type == GT_TRANSFER_UPLOAD) + cb = gt_upload; + else if (type == GT_TRANSFER_DOWNLOAD) + cb = gt_download; + else + abort (); + + xfer->type = type; + xfer->callback = cb; + xfer->source = source; + + /* parsed information about the source */ + xfer->ip = ip; + xfer->port = port; + + xfer->start = start; + xfer->stop = stop; + + xfer->shared = TRUE; + + xfer->detach_timer = TIMER_NONE; + xfer->detach_msgtxt = NULL; + + /* set the size of this http request */ + xfer->remaining_len = xfer->stop - xfer->start; + + /* give this GtTransfer a maximum amount of time before cancelling */ + xfer->header_timer = timer_add (1 * MINUTES, + (TimerCallback)header_read_timeout, + xfer); + + return xfer; +} + +static void gt_transfer_free (GtTransfer *xfer) +{ + if (!xfer) + return; + + free (xfer->command); + free (xfer->request); + free (xfer->request_path); + free (xfer->content_urns); + free (xfer->detach_msgtxt); + + if (xfer->header) + dataset_clear (xfer->header); + +#if 0 + if (xfer->share_authd && xfer->shared_authd_free) + share_free (xfer->share_authd); +#endif + + timer_remove (xfer->detach_timer); + timer_remove (xfer->header_timer); + + /* uploads use these */ + free (xfer->open_path); + free (xfer->hash); + free (xfer->version); + + if (xfer->f) + fclose (xfer->f); + + /* whee */ + free (xfer); +} + +/*****************************************************************************/ + +void gt_transfer_set_tcpc (GtTransfer *xfer, TCPC *c) +{ + assert (c->udata == NULL); + assert (xfer->c == NULL); + + c->udata = xfer; + xfer->c = c; +} + +void gt_transfer_set_chunk (GtTransfer *xfer, Chunk *chunk) +{ + assert (chunk->udata == NULL); + assert (xfer->chunk == NULL); + + xfer->chunk = chunk; + chunk->udata = xfer; +} + +Chunk *gt_transfer_get_chunk (GtTransfer *xfer) +{ + assert (xfer->chunk != NULL); + assert (xfer->chunk->udata == xfer); + + return xfer->chunk; +} + +TCPC *gt_transfer_get_tcpc (GtTransfer *xfer) +{ + assert (xfer->c != NULL); + assert (xfer->c->udata == xfer); + + return xfer->c; +} + +/*****************************************************************************/ + +GtSource *gt_transfer_get_source (GtTransfer *xfer) +{ + Source *source = xfer->source; + + /* could be null for uploads */ + if (!source) + return NULL; + + assert (source->udata != NULL); + return source->udata; +} + +/*****************************************************************************/ + +/* + * giftd may change the Chunk size. This routine will reset the range of the + * transfer we'll ask the remote end for. It should be called before we've + * transmitted the HTTP headers that include the Range: request. + */ +void gt_transfer_set_length (GtTransfer *xfer, Chunk *chunk) +{ + TCPC *c; + off_t old_start; + off_t old_stop; + off_t old_len; + + c = gt_transfer_get_tcpc (xfer); + + /* don't call me if you've already transmitted headers */ + assert (!xfer->transmitted_hdrs); + + old_start = xfer->start; + old_stop = xfer->stop; + old_len = xfer->remaining_len; + + xfer->start = chunk->start + chunk->transmit; + xfer->stop = chunk->stop; + + xfer->remaining_len = xfer->stop - xfer->start; + + /* i believe this is true even for push downloads... */ + assert (xfer->start == old_start); + + if (xfer->stop != old_stop) + { + assert (xfer->remaining_len != old_len); + + GT->DBGSOCK (GT, c, "(%s) old chunk range: [%lu,%lu) " + "new range: [%lu,%lu) old len: %lu new len: %lu", + xfer->request, (long)old_start,(long)old_stop, + (long)xfer->start, (long)xfer->stop, + (long)old_len, (long)xfer->remaining_len); + } +} + +/*****************************************************************************/ + +/* + * Cancels a possibly active HTTP transfer + * + * NOTE: + * This function may be called recursively if you don't do what giFT expects + * of you. This is a feature, not a bug, trust me. + */ +static void gt_transfer_cancel (Chunk *chunk, TransferType type) +{ + GtTransfer *xfer; + BOOL force_close = FALSE; + + if (!chunk) + return; + + xfer = chunk->udata; + + /* each time this function is called we _MUST_ uncouple the transfer + * and the chunk or the code to follow will eventually call this func + * again!! */ + if (!xfer) + return; + + /* do not emit a callback signal */ + xfer->callback = NULL; + gt_transfer_close (xfer, force_close); +} + +/*****************************************************************************/ + +static void close_http_connection (TCPC *c, BOOL force_close, + GtTransferType type, GtSource *gt_src) +{ + if (!c) + return; + + /* + * If this is an incoming indirect download that we sent a push out + * for, then don't store the connection in the HTTP connection cache, + * store it in the separate push connection cache that uses the client + * id as well as the IP address to identify the node. + */ + if (!force_close && type == GT_TRANSFER_DOWNLOAD && !c->outgoing) + { + if (gt_src != NULL) + { + if (HTTP_DEBUG) + GT->DBGSOCK (GT, c, "Keeping push connection"); + + /* nullify the previous data on this connection */ + c->udata = NULL; + + gt_push_source_add_conn (gt_src->guid, gt_src->user_ip, c); + return; + } + + /* + * This could happen if the chunk has no source url to parse + * at the moment. Argh, GtTransfer should always have a GtSource + * if xfer->type == GT_TRANSFER_DOWNLOAD. + */ + if (HTTP_DEBUG) + GT->DBGSOCK (GT, c, "Closing pushed connection! ARGH!"); + + force_close = TRUE; + } + + gt_http_connection_close (type, c, force_close); +} + +/* + * This function is very critical to OpenFT's transfer system. It is called + * anytime either the client or server HTTP implementations need to "cleanup" + * all data associated. This includes disconnecting the socket, unlinking + * itself from the chunk system and registering this status with giFT, just + * in case this is premature. If anything is leaking or fucking up, blame + * this :) + */ +void gt_transfer_close (GtTransfer *xfer, BOOL force_close) +{ + TCPC *c; + Chunk *chunk; + GtSource *gt_src = NULL; + char *conn_hdr; + + if (!xfer) + return; + + c = xfer->c; + chunk = xfer->chunk; + + assert (xfer != NULL); + + /* remove the xfer from the indirect src list */ + gt_push_source_remove_xfer (xfer); + + /* get this source if this was a download */ + if (xfer->type == GT_TRANSFER_DOWNLOAD && chunk && chunk->source) + gt_src = gt_source_unserialize (chunk->source->url); + + /* if we have associated a chunk with this transfer we need to make sure + * we remove cleanly detach */ + if (chunk) + { + chunk->udata = NULL; + + /* + * notify the transfer callback that we have terminated this + * connection. let giFT handle the rest + * + * NOTE: + * see gt_transfer_cancel for some warnings about this code + */ + if (xfer->callback) + (*xfer->callback) (chunk, NULL, 0); + + /* WARNING: chunk is free'd in the depths of xfer->callback! */ + } + + /* HTTP/1.0 does not support persist connections or something...i dunno */ + if (!STRCASECMP (xfer->version, "HTTP/1.0")) + force_close = TRUE; + + /* older gnutella clients send a plain "HTTP" version, that is + * not persistent */ + if (!STRCASECMP (xfer->version, "HTTP")) + force_close = TRUE; + + /* + * We must force a socket close if there is still data waiting to + * be read on this transfer. + */ + if (!xfer->transmitted_hdrs || xfer->remaining_len != 0) + force_close = TRUE; + + /* close the connection if "Connection: close" was supplied */ + conn_hdr = dataset_lookupstr (xfer->header, "connection"); + if (!STRCASECMP (conn_hdr, "close")) + force_close = TRUE; + + close_http_connection (c, force_close, xfer->type, gt_src); + + gt_source_free (gt_src); + + gt_transfer_free (xfer); +} + +void gt_transfer_status (GtTransfer *xfer, SourceStatus status, char *text) +{ + Chunk *chunk; + GtSource *gt_src; + char *next_status; + + if (!xfer || !text) + return; + + /* Added this on 2004-12-19 to track observed assertion failure in + * gt_transfer_get_chunk. -- mkern + */ + if (!xfer->chunk || xfer->chunk->udata != xfer) + { + GT->DBGFN (GT, "This is where we say good bye. status = %d, " + "text = %s, xfer->request_path = %s, xfer->ip = %s", + status, text, xfer->request_path, net_ip_str (xfer->ip)); + } + + chunk = gt_transfer_get_chunk (xfer); + + GT->source_status (GT, chunk->source, status, text); + + /* + * HACK: Store the status message on the GtSource, + * so we can reuse it sometimes. + */ + if (!xfer->source || !(gt_src = xfer->source->udata)) + return; + + /* allocate first so it's ok to call this function with an old value of + * gt_src->status_txt */ + next_status = STRDUP (text); + free (gt_src->status_txt); + gt_src->status_txt = next_status; +} + +/*****************************************************************************/ +/* PERSISTENT HTTP HANDLING */ + +struct conn_info +{ + in_addr_t ip; + in_port_t port; + size_t count; +}; + +static int conn_cmp (TCPC *c, struct conn_info *info) +{ + if (info->port != c->port) + return -1; + + if (net_peer (c->fd) != info->ip) + return 1; + + return 0; +} + +TCPC *gt_http_connection_lookup (GtTransferType type, in_addr_t ip, + in_port_t port) +{ + List *link; + List **connlist_ptr; + TCPC *c = NULL; + struct conn_info info; + + info.ip = ip; + info.port = port; + + if (type == GT_TRANSFER_DOWNLOAD) + connlist_ptr = &download_connections; + else + connlist_ptr = &upload_connections; + + link = list_find_custom (*connlist_ptr, &info, (CompareFunc)conn_cmp); + + if (link) + { + c = link->data; + + GT->DBGFN (GT, "using previous connection to %s:%hu", + net_ip_str (ip), port); + + /* remove from the open list */ + *connlist_ptr = list_remove_link (*connlist_ptr, link); + input_remove_all (c->fd); + } + + return c; +} + +/* + * Handles outgoing HTTP connections. This function is capable of + * retrieving an already connected socket that was left over from a previous + * transfer. + */ +TCPC *gt_http_connection_open (GtTransferType type, in_addr_t ip, + in_port_t port) +{ + TCPC *c; + + if (!(c = gt_http_connection_lookup (type, ip, port))) + c = tcp_open (ip, port, FALSE); + + return c; +} + +static BOOL count_open (TCPC *c, struct conn_info *info) +{ + if (info->ip == net_peer (c->fd)) + info->count++; + + return FALSE; +} + +size_t gt_http_connection_length (GtTransferType type, in_addr_t ip) +{ + struct conn_info info; + List *list; + + info.ip = ip; + info.port = 0; + info.count = 0; + + assert (type == GT_TRANSFER_DOWNLOAD || type == GT_TRANSFER_UPLOAD); + list = (type == GT_TRANSFER_DOWNLOAD ? download_connections : + upload_connections); + + list_foreach (list, (ListForeachFunc)count_open, &info); + + return info.count; +} + +void gt_http_connection_close (GtTransferType type, TCPC *c, BOOL force_close) +{ + List **connlist_ptr; + + if (!c) + return; + + switch (type) + { + case GT_TRANSFER_DOWNLOAD: + { + gt_http_client_reset (c); + connlist_ptr = &download_connections; + } + break; + + case GT_TRANSFER_UPLOAD: + { + gt_http_server_reset (c); + connlist_ptr = &upload_connections; + } + break; + + default: + abort (); + } + + if (force_close) + { + *connlist_ptr = list_remove (*connlist_ptr, c); + + if (HTTP_DEBUG) + GT->DBGSOCK (GT, c, "force closing"); + + tcp_close (c); + return; + } + + /* remove the data associated with this connection */ + c->udata = NULL; + + /* + * This condition will happen because the server doesn't remove the + * connection from the persistent list until the connection fails. + */ + if (list_find (*connlist_ptr, c)) + { + assert (type == GT_TRANSFER_UPLOAD); + return; + } + + /* track it */ + *connlist_ptr = list_prepend (*connlist_ptr, c); +} + +/*****************************************************************************/ + +static char *localize_request (GtTransfer *xfer, BOOL *authorized) +{ + char *open_path; + char *s_path; + int auth = FALSE; + int need_free = FALSE; + + if (!xfer || !xfer->request) + return NULL; + + /* dont call secure_path if they dont even care if it's a secure + * lookup */ + s_path = + (authorized ? file_secure_path (xfer->request) : xfer->request); + + if (authorized) + need_free = TRUE; + + open_path = gt_localize_request (xfer, s_path, &auth); + + if (need_free || !open_path) + free (s_path); + + if (authorized) + *authorized = auth; + + /* we need a unix style path for authorization */ + return open_path; +} + +/* + * request is expected in the form: + * /shared/Fuck%20Me%20Hard.mpg + */ +BOOL gt_transfer_set_request (GtTransfer *xfer, char *request) +{ +#if 0 + FileShare *file; + char *shared_path; +#endif + + free (xfer->request); + xfer->request = NULL; + + /* lets keep this sane shall we */ + if (!request || *request != '/') + return FALSE; + + xfer->request = STRDUP (request); + xfer->request_path = gt_url_decode (request); /* storing here for opt */ + + return TRUE; +} + +/* attempts to open the requested file locally. + * NOTE: this handles verification */ +FILE *gt_transfer_open_request (GtTransfer *xfer, int *code) +{ + FILE *f; + char *shared_path; + char *full_path = NULL; + char *host_path; + int auth = FALSE; + int code_l = 200; + + if (code) + *code = 404; /* Not Found */ + + if (!xfer || !xfer->request) + return NULL; + + if (!(shared_path = localize_request (xfer, &auth))) + { + /* + * If we havent finished syncing shares, that may be why the + * request failed. If so, return 503 here. + */ + if (!gt_share_local_sync_is_done () && code != NULL) + *code = 503; + + return NULL; + } + + /* needs more work for virtual requests */ +#if 0 + /* check to see if we matched a special OpenFT condition. If we did, the + * localized path is in the wrong order, so convert it (just to be + * converted back again...it's easier to maintain this way :) */ + if (auth) + { + xfer->shared = FALSE; + full_path = file_unix_path (shared_path); + } + else +#endif + { + Share *share; + int reason = UPLOAD_AUTH_NOTSHARED; + upload_auth_t cond; + + /* + * NOTE: the user string is not consistent with the one + * echoed through search results, which prefixes the IP + * with the GUID, if this node is firewalled. + */ + if ((share = GT->share_lookup (GT, SHARE_LOOKUP_HPATH, shared_path))) + reason = GT->upload_auth (GT, net_ip_str (xfer->ip), share, &cond); + + xfer->share_authd = share; + + switch (reason) + { + case UPLOAD_AUTH_STALE: + code_l = 500; /* Internal Server Error */ + break; + case UPLOAD_AUTH_NOTSHARED: + code_l = 404; /* Not Found */ + break; + case UPLOAD_AUTH_ALLOW: + code_l = 200; /* OK */ + xfer->open_path_size = share->size; + xfer->content_type = share->mime; + full_path = STRDUP (share->path); + break; + case UPLOAD_AUTH_MAX: + case UPLOAD_AUTH_MAX_PERUSER: + case UPLOAD_AUTH_HIDDEN: + default: + code_l = 503; /* Service Unavailable */ + xfer->queue_pos = cond.queue_pos; + xfer->queue_ttl = cond.queue_ttl; + break; + } + } + + if (code) + *code = code_l; + + /* error of some kind, get out of here */ + if (code_l != 200) + return NULL; + + /* figure out the actual filename that we should be opening */ + host_path = file_host_path (full_path); + free (full_path); + + /* needs more work for virtual requests */ +#if 0 + /* complete the rest of the data required */ + if (auth) + { + struct stat st; + + if (!file_stat (host_path, &st)) + { + free (host_path); + return NULL; + } + + xfer->open_path_size = st.st_size; + xfer->content_type = mime_type (host_path); + } +#endif + + if (!(f = fopen (host_path, "rb"))) + { + *code = 500; + return NULL; + } + + /* NOTE: gt_transfer_close will be responsible for freeing this now */ + xfer->open_path = host_path; + + if (code) + *code = 200; /* OK */ + + return f; +} + +/*****************************************************************************/ + +/* + * The callbacks here are from within the HTTP system, centralized for + * maintainability. + */ + +/* report back the progress of this download chunk */ +void gt_download (Chunk *chunk, unsigned char *segment, size_t len) +{ + GT->chunk_write (GT, chunk->transfer, chunk, chunk->source, + segment, len); +} + +/* report back the progress of this upload chunk */ +void gt_upload (Chunk *chunk, unsigned char *segment, size_t len) +{ + GT->chunk_write (GT, chunk->transfer, chunk, chunk->source, + segment, len); +} + +void gt_transfer_write (GtTransfer *xfer, Chunk *chunk, + unsigned char *segment, size_t len) +{ + /* + * Cap the data at the remaining size of the xfer. Note that this is + * the size of the HTTP request issued, _NOT_ the chunk size, which may + * have been altered by giFT in splitting up chunks. I think giFT + * handles that case properly, but we also have to guard against + * remaining_len becoming less than 0. Note that p->chunk_write + * will cancel the transfer if remaining_len goes to 0. + * + * TODO: remaining_len is off_t, make sure this is handled right wrt + * negative file sizes (do big files become negative sizes?) + */ + if (len > xfer->remaining_len) + len = xfer->remaining_len; + + xfer->remaining_len -= len; + (*xfer->callback) (chunk, segment, len); +} + +/*****************************************************************************/ + +static BOOL throttle_suspend (Chunk *chunk, int s_opt, float factor) +{ + GtTransfer *xfer; + + if (!chunk) + return FALSE; + + xfer = chunk->udata; + + if (!xfer || !xfer->c) + { + GT->DBGFN (GT, "no connection found to suspend"); + return FALSE; + } + + input_suspend_all (xfer->c->fd); + + if (factor) + net_sock_adj_buf (xfer->c->fd, s_opt, factor); + + return TRUE; +} + +static BOOL throttle_resume (Chunk *chunk, int s_opt, float factor) +{ + GtTransfer *xfer = NULL; + + if (!chunk) + return FALSE; + + xfer = chunk->udata; + + if (!xfer || !xfer->c) + { + GT->DBGFN (GT, "no connection found to resume"); + return FALSE; + } + + input_resume_all (xfer->c->fd); + +#if 0 + if (factor) + net_sock_adj_buf (xfer->c->fd, s_opt, factor); +#endif + + return TRUE; +} + +/*****************************************************************************/ + +void gt_download_cancel (Chunk *chunk, void *data) +{ + gt_transfer_cancel (chunk, TRANSFER_DOWNLOAD); +} + +/* cancel the transfer associate with the chunk giFT gave us */ +void gt_upload_cancel (Chunk *chunk, void *data) +{ + gt_transfer_cancel (chunk, TRANSFER_UPLOAD); +} + +static int throttle_sopt (Transfer *transfer) +{ + int sopt = 0; + + switch (transfer_direction (transfer)) + { + case TRANSFER_DOWNLOAD: + sopt = SO_RCVBUF; + break; + case TRANSFER_UPLOAD: + sopt = SO_SNDBUF; + break; + } + + return sopt; +} + +BOOL gt_chunk_suspend (Chunk *chunk, Transfer *transfer, void *data) +{ + return throttle_suspend (chunk, throttle_sopt (transfer), 0.0); +} + +BOOL gt_chunk_resume (Chunk *chunk, Transfer *transfer, void *data) +{ + return throttle_resume (chunk, throttle_sopt (transfer), 0.0); +} diff -r 000000000000 -r d39e1d0d75b6 src/gt_xfer_obj.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/gt_xfer_obj.h Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,159 @@ +/* + * $Id: gt_xfer_obj.h,v 1.23 2004/05/05 10:30:12 hipnod Exp $ + * + * Copyright (C) 2001-2003 giFT project (gift.sourceforge.net) + * + * 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. + */ + +#ifndef GIFT_GT_XFER_OBJ_H_ +#define GIFT_GT_XFER_OBJ_H_ + +/*****************************************************************************/ + +#define HTTP_DEBUG gt_config_get_int("http/debug=0") + +#define HTTP_MAX_PERUSER_UPLOAD_CONNS \ + gt_config_get_int("http/max_peruser_upload_connections=5") + +/*****************************************************************************/ + +struct gt_source; + +typedef enum gt_transfer_type +{ + GT_TRANSFER_UPLOAD, + GT_TRANSFER_DOWNLOAD, +} GtTransferType; + +typedef void (*GtTransferCB) (Chunk *chunk, unsigned char *data, size_t len); + +typedef struct gt_transfer +{ + TCPC *c; /* see gt_transfer_ref */ + Chunk *chunk; /* ... */ + Source *source; /* source for this transfer */ + + GtTransferCB callback; /* where to report progress + * see gt_download and gt_upload in + * xfer.c */ + GtTransferType type; /* which direction this transfer is in */ + + Dataset *header; /* HTTP headers */ + int code; /* HTTP status code last seen */ + + in_addr_t ip; /* address of the user who is either + * leeching our node or is being leeched + * by it */ + in_port_t port; /* used only by the client routines */ + + char *command; /* request operator (GET, PUSH, ...) */ + char *request; /* exact request operand, url encoded */ + char *version; /* HTTP version resembling HTTP/1.1 */ + char *request_path; /* url decoded copy of request */ + + char *content_type; /* Content-Type: send from server or + * to client */ + char *content_urns; /* X-Gnutella-Content-URN: if requested + * by urn */ + BOOL transmitted_hdrs; /* transfer completed reading HTTP + * headers */ + off_t remaining_len; /* size of content remaining to be + * read */ + + off_t start; /* range begin */ + off_t stop; /* range stop. 0 is an exception which + * will be translated to the total file + * size as soon as known */ + timer_id header_timer; /* timeout for reading complete header */ + + timer_id detach_timer; /* fires to detach xfer and chunk */ + SourceStatus detach_status; /* next status if detach_timer hits */ + char *detach_msgtxt; /* next msg if detach_timer hits */ + + /* used by the server routines for uploading */ + FILE *f; /* used only by the server routines */ + Share *share_authd; /* hack for the new sharing + * interface...ugh */ + + char *open_path; /* path opened by the server */ + off_t open_path_size; /* size of the file on disk described + * by open_path */ + char *hash; /* openft's hash to deliever to the + * interface protocol when we register + * this upload */ + unsigned int queue_pos; /* position in upload queue */ + unsigned int queue_ttl; /* size of queue */ + + unsigned char shared : 1; /* see interface proto docs */ +} GtTransfer; + +/*****************************************************************************/ + +#include "gt_http_client.h" +#include "gt_http_server.h" + +/*****************************************************************************/ + +GtTransfer *gt_transfer_new (GtTransferType type, Source *source, + in_addr_t ip, in_port_t port, + off_t start, off_t stop); +void gt_transfer_close (GtTransfer *xfer, BOOL force_close); +void gt_transfer_status (GtTransfer *xfer, SourceStatus status, + char *text); + +void gt_transfer_write (GtTransfer *xfer, Chunk *chunk, + unsigned char *segment, size_t len); + +/*****************************************************************************/ + +void gt_transfer_set_tcpc (GtTransfer *xfer, TCPC *c); +void gt_transfer_set_chunk (GtTransfer *xfer, Chunk *chunk); + +TCPC *gt_transfer_get_tcpc (GtTransfer *xfer); +Chunk *gt_transfer_get_chunk (GtTransfer *xfer); + +struct gt_source *gt_transfer_get_source (GtTransfer *xfer); +void gt_transfer_set_length (GtTransfer *xfer, Chunk *chunk); + +/*****************************************************************************/ + +void gt_http_connection_close (GtTransferType type, TCPC *c, + BOOL force_close); +TCPC *gt_http_connection_open (GtTransferType type, in_addr_t ip, + in_port_t port); +TCPC *gt_http_connection_lookup (GtTransferType type, + in_addr_t ip, in_port_t port); +size_t gt_http_connection_length (GtTransferType type, in_addr_t ip); + +/*****************************************************************************/ + +BOOL gt_transfer_set_request (GtTransfer *xfer, char *request); +FILE *gt_transfer_open_request (GtTransfer *xfer, int *code); + +/*****************************************************************************/ + +void gt_download (Chunk *chunk, unsigned char *segment, size_t len); +void gt_upload (Chunk *chunk, unsigned char *segment, size_t len); + +/*****************************************************************************/ + +void gt_download_cancel (Chunk *chunk, void *data); +void gt_upload_cancel (Chunk *chunk, void *data); + +/*****************************************************************************/ + +BOOL gt_chunk_suspend (Chunk *chunk, Transfer *transfer, void *data); +BOOL gt_chunk_resume (Chunk *chunk, Transfer *transfer, void *data); + +/*****************************************************************************/ + +#endif /* GIFT_GT_XFER_OBJ_H_ */ diff -r 000000000000 -r d39e1d0d75b6 src/http_request.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/http_request.c Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,687 @@ +/* + * $Id: http_request.c,v 1.25 2005/01/04 15:03:41 mkern Exp $ + * + * Copyright (C) 2001-2003 giFT project (gift.sourceforge.net) + * + * 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. + */ + +#include "gt_gnutella.h" +#include "gt_version.h" + +#include "gt_accept.h" +#include "gt_web_cache.h" + +#include "http_request.h" + +/*****************************************************************************/ + +#define MAX_REDIRECTS (5) + +/*****************************************************************************/ + +static void decode_chunked_data (int fd, input_id id, TCPC *c); +static void read_chunked_header (int fd, input_id id, TCPC *c); + +/*****************************************************************************/ + +/* + * Dummy callbacks + */ + +static void dummy_close (HttpRequest *r, int code) +{ + return; +} + +static BOOL dummy_recv (HttpRequest *r, char *d, size_t l) +{ + return TRUE; +} + +static BOOL dummy_add_header (HttpRequest *r, Dataset **d) +{ + return TRUE; +} + +static BOOL dummy_redirect (HttpRequest *r, const char *h, const char *p) +{ + return TRUE; +} + +/*****************************************************************************/ + +BOOL gt_http_url_parse (char *value, char **r_host, char **r_path) +{ + char *host_name; + + if (r_host) + *r_host = NULL; + if (r_path) + *r_path = NULL; + + string_sep (&value, "http://"); + + /* divide the url in two parts */ + host_name = string_sep (&value, "/"); + + if (r_host) + *r_host = host_name; + + if (r_path) + *r_path = STRING_NOTNULL (value); + + if (!host_name || host_name[0] == 0) + return FALSE; + + return TRUE; +} + +static void setup_dummy_functbl (HttpRequest *r) +{ + r->close_req_func = dummy_close; + r->recv_func = dummy_recv; + r->add_header_func = dummy_add_header; + r->redirect_func = dummy_redirect; +} + +HttpRequest *gt_http_request_new (const char *url, const char *request) +{ + HttpRequest *req; + char *dup; + char *host; + char *path; + + if (!(dup = STRDUP (url))) + return NULL; + + if (!gt_http_url_parse (dup, &host, &path) || + !(req = MALLOC (sizeof (HttpRequest)))) + { + free (dup); + return NULL; + } + + req->host = STRDUP (host); + req->path = STRDUP (path); + req->request = STRDUP (request); + req->timeout = 0; + req->redirects = 0; + req->headers = NULL; + + /* setup functbl */ + setup_dummy_functbl (req); + + free (dup); + + return req; +} + +static void gt_http_request_free (HttpRequest *req) +{ + if (!req) + return; + + dataset_clear (req->headers); + + free (req->host); + free (req->path); + free (req->request); + + free (req); +} + +void gt_http_request_close (HttpRequest *req, int error_code) +{ + /* notify the callback */ + req->close_req_func (req, error_code); + + if (req->c) + tcp_close (req->c); + + timer_remove_zero (&req->timeout); + + gt_http_request_free (req); +} + +/*****************************************************************************/ + +static BOOL request_timeout (HttpRequest *req) +{ + GT->DBGFN (GT, "request to %s timed out", req->host); + gt_http_request_close (req, -1); + return FALSE; +} + +void gt_http_request_set_timeout (HttpRequest *req, time_t time) +{ + if (!req) + return; + + if (req->timeout) + timer_remove (req->timeout); + + req->timeout = timer_add (time, (TimerCallback)request_timeout, req); +} + +void gt_http_request_set_proxy (HttpRequest *req, const char *proxy) +{ + free (req->proxy); + req->proxy = NULL; + + if (!proxy) + return; + + req->proxy = STRDUP (proxy); +} + +void gt_http_request_set_conn (HttpRequest *req, TCPC *c) +{ + assert (c->udata == NULL); + assert (req->c == NULL); + + req->c = c; + c->udata = req; +} + +void gt_http_request_set_max_len (HttpRequest *req, size_t max_len) +{ + req->max_len = max_len; +} + +/*****************************************************************************/ + +static BOOL write_data (HttpRequest *req, char *data, size_t len) +{ + if (!req) + return FALSE; + + req->recvd_len += len; + + /* check if we overflowed the max length the user wants to receive */ + if (req->max_len > 0 && req->recvd_len > req->max_len) + { + GT->DBGFN (GT, "%s sent %lu bytes overflowing max length of %lu", + req->host, req->recvd_len, req->max_len); + gt_http_request_close (req, -1); + return FALSE; + } + + /* send the data to the listener */ + if (req->recv_func (req, data, len) == FALSE) + { + gt_http_request_close (req, -1); + return FALSE; + } + + return TRUE; +} + +/*****************************************************************************/ + +static void write_header (ds_data_t *key, ds_data_t *value, String *s) +{ + char *header = key->data; + char *field = value->data; + + string_appendf (s, "%s: %s\r\n", header, field); +} + +static int http_send (TCPC *c, char *command, char *request, + Dataset *headers) +{ + String *s; + int ret; + + if (!command || !request) + return -1; + + if (!(s = string_new (NULL, 0, 0, TRUE))) + return -1; + + string_appendf (s, "%s %s HTTP/1.1\r\n", command, request); + + dataset_foreach (headers, DS_FOREACH(write_header), s); + string_append (s, "\r\n"); + + GT->DBGSOCK (GT, c, " sending:\n%s", s->str); + + ret = tcp_send (c, s->str, s->len); + string_free (s); + + return ret; +} + +static HttpRequest *get_request (TCPC *c) +{ + return c->udata; +} + +/*****************************************************************************/ + +static void decode_chunked_data (int fd, input_id id, TCPC *c) +{ + HttpRequest *req; + FDBuf *buf; + char *data; + int data_len = 0; + int n; + + req = get_request (c); + + if (!req->size) + { + gt_http_request_close (req, 200); + return; + } + + buf = tcp_readbuf (c); + + if ((n = fdbuf_fill (buf, req->size)) < 0) + { + GT->DBGFN (GT, "error on host %s: %s", req->host, GIFT_NETERROR ()); + gt_http_request_close (req, -1); + return; + } + + if (gt_fdbuf_full (buf)) + { + gt_http_request_close (req, -1); + return; + } + + if (n > 0) + return; + + data = fdbuf_data (buf, &data_len); + fdbuf_release (buf); + + if (!write_data (req, data, data_len)) + return; + + input_remove (id); + input_add (fd, c, INPUT_READ, + (InputCallback)read_chunked_header, TIMEOUT_DEF); +} + +static void read_chunked_header (int fd, input_id id, TCPC *c) +{ + HttpRequest *req; + FDBuf *buf; + char *response; + int n; + + req = get_request (c); + buf = tcp_readbuf (c); + + if ((n = fdbuf_delim (buf, "\n")) < 0) + { + GT->DBGFN (GT, "error on %s: %s", req->host, GIFT_NETERROR ()); + gt_http_request_close (req, -1); + return; + } + + if (gt_fdbuf_full (buf)) + { + gt_http_request_close (req, -1); + return; + } + + if (n > 0) + return; + + response = fdbuf_data (buf, NULL); + fdbuf_release (buf); + + /* read the chunk size, its a hexadecimal integer */ + req->size = strtoul (response, NULL, 16); + GT->DBGFN (GT, "server sent chunk size of %lu", req->size); + + if (req->size == ULONG_MAX) + { + GT->DBGFN (GT, "overflow reading chunk size: %s", GIFT_STRERROR ()); + gt_http_request_close (req, -1); + return; + } + + if (req->size == 0) + { + /* ok, done */ + if (!write_data (req, NULL, 0)) + return; + + /* there could be a CRLF at the end. should we read it? + * To avoid screwing up persistent http, yes.. */ + gt_http_request_close (req, 200); + return; + } + + input_remove (id); + input_add (fd, c, INPUT_READ, + (InputCallback)decode_chunked_data, TIMEOUT_DEF); +} + +/* read the amount of data specified by Content-Length: */ +static void read_file (int fd, input_id id, TCPC *c) +{ + HttpRequest *req; + FDBuf *buf; + int n; + size_t len; + unsigned char *data; + + req = get_request (c); + + if (!req->size) + { + gt_http_request_close (req, 200); + return; + } + + buf = tcp_readbuf (c); + + if ((n = fdbuf_fill (buf, req->size)) < 0) + { + GT->DBGFN (GT, "error from %s: %s", req->host, GIFT_NETERROR ()); + gt_http_request_close (req, -1); + return; + } + + if (n > 0) + return; + + data = fdbuf_data (buf, &len); + fdbuf_release (buf); + + if (!write_data (req, data, len)) + return; + + /* + * We've read all the data, the total length of the request being provided + * by fdbuf_fill(). Now send the closing notification to our callback. + */ + if (!write_data (req, NULL, 0)) + return; + + /* success */ + gt_http_request_close (req, 200); +} + +/* callback to read when no Content-Length: header is provided */ +static void read_until_eof (int fd, input_id id, TCPC *c) +{ + char data[RW_BUFFER]; + int n; + HttpRequest *req; + + req = get_request (c); + + if ((n = tcp_recv (c, data, sizeof (data) - 1)) < 0) + { + GT->DBGFN (GT, "error from %s: %s", req->host, GIFT_NETERROR()); + gt_http_request_close (req, -1); + return; + } + + /* terminate the buffer */ + data[n] = 0; + + if (n == 0) + { + /* signal to the listener that EOF was reached */ + if (!write_data (req, NULL, 0)) + return; + + gt_http_request_close (req, 200); + return; + } + + if (!write_data (req, data, n)) + return; +} + +static void reset_request (HttpRequest *req, const char *host, + const char *path) +{ + free (req->host); + free (req->path); + req->host = STRDUP (host); + req->path = STRDUP (path); + + dataset_clear (req->headers); + req->headers = NULL; +} + +/* + * This will do a limited redirect on the same connection. + * One bug is it doesn't care if the Location header posts a different port, + */ +static void handle_redirect (HttpRequest *req, int code) +{ + char *new_host; + char *new_path; + char *location; + + /* make sure the Location: header points to the same host */ + location = dataset_lookupstr (req->headers, "location"); + + /* butchers Location header, but it will be freed soon anyway */ + if (!location || + !gt_http_url_parse (location, &new_host, &new_path)) + { + gt_http_request_close (req, code); + return; + } + + assert (new_host != NULL); + + if (++req->redirects >= MAX_REDIRECTS) + { + GT->DBGSOCK (GT, req->c, "Too many redirects"); + gt_http_request_close (req, code); + return; + } + + /* + * Let the caller know we're redirecting so it can reset it's ancilliary + * data. + */ + if (req->redirect_func (req, new_host, new_path) == FALSE) + { + gt_http_request_close (req, code); + return; + } + + /* setup the new request */ + reset_request (req, new_host, new_path); + + /* restart the request */ + input_remove_all (req->c->fd); + input_add (req->c->fd, req->c, INPUT_WRITE, + (InputCallback)gt_http_request_handle, TIMEOUT_DEF); +} + +static BOOL parse_server_response (char *reply, HttpRequest *req) +{ + char *response; + int code; /* 200, 404, ... */ + + response = string_sep (&reply, "\r\n"); + + if (!response) + return FALSE; + + /* */ string_sep (&response, " "); /* shift past HTTP/1.1 */ + code = ATOI (string_sep (&response, " ")); /* shift past 200 */ + + /* parse the headers */ + gt_http_header_parse (reply, &req->headers); + + if (code >= 200 && code <= 299) + return TRUE; + + /* redirection */ + if (code >= 300 && code <= 399) + { + handle_redirect (req, code); + return FALSE; /* stop this request */ + } + + /* request error: could blacklist the server in recv_callback */ + GT->DBGFN (GT, "error parsing response from %s, closing", req->host); + gt_http_request_close (req, code); + + return FALSE; +} + +static void read_headers (int fd, input_id id, TCPC *c) +{ + HttpRequest *req; + FDBuf *buf; + char *response; + size_t response_len = 0; + char *encoding; + char *len_str; + int n; + + req = get_request (c); + buf = tcp_readbuf (c); + + if ((n = fdbuf_delim (buf, "\n")) < 0) + { + GT->DBGFN (GT, "error reading from %s: %s", net_peer_ip (c->fd), + GIFT_NETERROR ()); + gt_http_request_close (req, -1); + return; + } + + if (gt_fdbuf_full (buf)) + { + gt_http_request_close (req, -1); + return; + } + + if (n > 0) + return; + + response = fdbuf_data (buf, &response_len); + + if (response_len >= req->max_len) + { + GT->DBGFN (GT, "headers too large(%lu)", (long)response_len); + gt_http_request_close (req, -1); + } + + if (!gt_http_header_terminated (response, response_len)) + return; + + fdbuf_release (buf); + GT->DBGFN (GT, "response=\n%s", response); + + if (!parse_server_response (response, req)) + return; + + input_remove (id); + + encoding = dataset_lookupstr (req->headers, "transfer-encoding"); + + if (encoding && !strcasecmp (encoding, "chunked")) + { + input_add (fd, c, INPUT_READ, + (InputCallback)read_chunked_header, TIMEOUT_DEF); + return; + } + + if (!(len_str = dataset_lookupstr (req->headers, "content-length"))) + { + GT->warn (GT, "no Content-Length header from %s", req->host); + input_add (fd, c, INPUT_READ, + (InputCallback)read_until_eof, TIMEOUT_DEF); + return; + } + + req->size = ATOUL (len_str); + + if (req->max_len > 0 && req->size >= req->max_len) + { + GT->DBGFN (GT, "bad size (%s) in content length field for %s", + len_str, req->host); + gt_http_request_close (req, -1); + return; + } + + input_add (fd, c, INPUT_READ, + (InputCallback)read_file, TIMEOUT_DEF); +} + +/* + * Determine the part after the GET. If proxied, this need to be a complete + * URL, and otherwise should be a simple path. + */ +static void append_request_line (String *s, HttpRequest *req) +{ + if (req->proxy) + string_appendf (s, "http://%s", req->host); + + string_appendf (s, "/%s", STRING_NOTNULL(req->path)); +} + +static int send_request (HttpRequest *req) +{ + Dataset *headers = NULL; + String *s; + int ret; + + if (!(s = string_new (NULL, 0, 0, TRUE))) + return -1; + + append_request_line (s, req); + + if (!string_isempty (req->request)) + string_appendf (s, "?%s", req->request); + + dataset_insertstr (&headers, "Host", req->host); /* required by HTTP/1.1 */ + dataset_insertstr (&headers, "User-Agent", gt_version ()); + + if (req->add_header_func (req, &headers) == FALSE) + { + /* Hmm, this is our error, what should the error code be */ + gt_http_request_close (req, -1); + dataset_clear (headers); + string_free (s); + return -1; + } + + ret = http_send (req->c, "GET", s->str, headers); + + dataset_clear (headers); + string_free (s); + + return ret; +} + +void gt_http_request_handle (int fd, input_id id, TCPC *c) +{ + HttpRequest *req; + + req = get_request (c); + + if (send_request (req) <= 0) + { + GT->DBGFN (GT, "send failed: %s", GIFT_NETERROR()); + gt_http_request_close (req, -1); + return; + } + + input_remove (id); + input_add (fd, c, INPUT_READ, + (InputCallback)read_headers, TIMEOUT_DEF); +} diff -r 000000000000 -r d39e1d0d75b6 src/http_request.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/http_request.h Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,87 @@ +/* + * $Id: http_request.h,v 1.11 2004/03/24 06:20:48 hipnod Exp $ + * + * Copyright (C) 2001-2003 giFT project (gift.sourceforge.net) + * + * 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. + */ + +#ifndef GIFT_GT_HTTP_REQUEST_H_ +#define GIFT_GT_HTTP_REQUEST_H_ + +/*****************************************************************************/ + +struct gt_http_request; + +/*****************************************************************************/ + +typedef void (*HttpCloseFunc) (struct gt_http_request *req, int error_code); + +typedef BOOL (*HttpReceiveFunc) (struct gt_http_request *req, char *data, + size_t len); +typedef BOOL (*HttpAddHeaderFunc) (struct gt_http_request *req, + Dataset **headers); +typedef BOOL (*HttpRedirectFunc) (struct gt_http_request *req, + const char *host, const char *path); + +/*****************************************************************************/ + +typedef struct gt_http_request +{ + char *host; + char *path; + char *request; + char *proxy; + + TCPC *c; + Dataset *headers; + timer_id timeout; + + /* amount of data to expect: + * (1) in the chunk, when Transfer-Encoding: Chunked is used + * (2) in the body, from the Content-Length: header */ + unsigned long size; + size_t max_len; + size_t recvd_len; + + /* number of redirects tried already */ + int redirects; + + HttpReceiveFunc recv_func; + HttpAddHeaderFunc add_header_func; + HttpCloseFunc close_req_func; + HttpRedirectFunc redirect_func; + void *data; + +} HttpRequest; + +/*****************************************************************************/ + +HttpRequest *gt_http_request_new (const char *url, + const char *request); +void gt_http_request_close (HttpRequest *req, int code); +BOOL gt_http_url_parse (char *url, char **r_host, + char **r_path); + +/*****************************************************************************/ + +void gt_http_request_set_conn (HttpRequest *req, TCPC *c); +void gt_http_request_set_proxy (HttpRequest *req, const char *proxy); +void gt_http_request_set_timeout (HttpRequest *req, time_t interval); +void gt_http_request_set_max_len (HttpRequest *req, size_t max_len); + +/*****************************************************************************/ + +void gt_http_request_handle (int fd, input_id id, TCPC *c); + +/*****************************************************************************/ + +#endif /* GIFT_GT_HTTP_REQUEST_H_ */ diff -r 000000000000 -r d39e1d0d75b6 src/io/Makefile.am --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/io/Makefile.am Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,24 @@ +# $Id: Makefile.am,v 1.5 2004/01/29 11:36:03 hipnod Exp $ + +AM_CFLAGS = \ + $(GNUTELLA_CFLAGS) + +INCLUDES = \ + -I$(top_srcdir)/src + +noinst_LTLIBRARIES = \ + libgt_io.la + +libgt_io_la_SOURCES = \ + io_buf.c io_buf.h \ + rx_inflate.c rx_inflate.h \ + rx_layer.c rx_layer.h \ + rx_link.c rx_link.h \ + rx_packet.c rx_packet.h \ + rx_stack.c rx_stack.h \ + tx_layer.c tx_layer.h \ + tx_link.c tx_link.h \ + tx_deflate.c \ + tx_packet.c \ + tx_stack.c tx_stack.h + diff -r 000000000000 -r d39e1d0d75b6 src/io/Makefile.in --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/io/Makefile.in Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,463 @@ +# Makefile.in generated by automake 1.7.9 from Makefile.am. +# @configure_input@ + +# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 +# 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@ + +# $Id: Makefile.am,v 1.5 2004/01/29 11:36:03 hipnod Exp $ + +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 = : +host_triplet = @host@ +ACLOCAL = @ACLOCAL@ +AMDEP_FALSE = @AMDEP_FALSE@ +AMDEP_TRUE = @AMDEP_TRUE@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +GNUTELLA_CFLAGS = @GNUTELLA_CFLAGS@ +GNUTELLA_LIBS = @GNUTELLA_LIBS@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIBXML2_CFLAGS = @LIBXML2_CFLAGS@ +LIBXML2_LIBS = @LIBXML2_LIBS@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ +MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ +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@ +PKG_CONFIG = @PKG_CONFIG@ +PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ +RANLIB = @RANLIB@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +USE_ZLIB = @USE_ZLIB@ +VERSION = @VERSION@ +XML2_CONFIG = @XML2_CONFIG@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +ac_ct_RANLIB = @ac_ct_RANLIB@ +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@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +datadir = @datadir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +oldincludedir = @oldincludedir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ + +AM_CFLAGS = \ + $(GNUTELLA_CFLAGS) + + +INCLUDES = \ + -I$(top_srcdir)/src + + +noinst_LTLIBRARIES = \ + libgt_io.la + + +libgt_io_la_SOURCES = \ + io_buf.c io_buf.h \ + rx_inflate.c rx_inflate.h \ + rx_layer.c rx_layer.h \ + rx_link.c rx_link.h \ + rx_packet.c rx_packet.h \ + rx_stack.c rx_stack.h \ + tx_layer.c tx_layer.h \ + tx_link.c tx_link.h \ + tx_deflate.c \ + tx_packet.c \ + tx_stack.c tx_stack.h + +subdir = src/io +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) + +libgt_io_la_LDFLAGS = +libgt_io_la_LIBADD = +am_libgt_io_la_OBJECTS = io_buf.lo rx_inflate.lo rx_layer.lo rx_link.lo \ + rx_packet.lo rx_stack.lo tx_layer.lo tx_link.lo tx_deflate.lo \ + tx_packet.lo tx_stack.lo +libgt_io_la_OBJECTS = $(am_libgt_io_la_OBJECTS) + +DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/io_buf.Plo \ +@AMDEP_TRUE@ ./$(DEPDIR)/rx_inflate.Plo ./$(DEPDIR)/rx_layer.Plo \ +@AMDEP_TRUE@ ./$(DEPDIR)/rx_link.Plo ./$(DEPDIR)/rx_packet.Plo \ +@AMDEP_TRUE@ ./$(DEPDIR)/rx_stack.Plo ./$(DEPDIR)/tx_deflate.Plo \ +@AMDEP_TRUE@ ./$(DEPDIR)/tx_layer.Plo ./$(DEPDIR)/tx_link.Plo \ +@AMDEP_TRUE@ ./$(DEPDIR)/tx_packet.Plo ./$(DEPDIR)/tx_stack.Plo +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) \ + $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +DIST_SOURCES = $(libgt_io_la_SOURCES) +DIST_COMMON = $(srcdir)/Makefile.in Makefile.am +SOURCES = $(libgt_io_la_SOURCES) + +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4) + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu src/io/Makefile +Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in $(top_builddir)/config.status + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe) + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" = "$$p" && dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libgt_io.la: $(libgt_io_la_OBJECTS) $(libgt_io_la_DEPENDENCIES) + $(LINK) $(libgt_io_la_LDFLAGS) $(libgt_io_la_OBJECTS) $(libgt_io_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) core *.core + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/io_buf.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rx_inflate.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rx_layer.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rx_link.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rx_packet.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rx_stack.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tx_deflate.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tx_layer.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tx_link.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tx_packet.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tx_stack.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \ +@am__fastdepCC_TRUE@ -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \ +@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ +@am__fastdepCC_TRUE@ fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$< + +.c.obj: +@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \ +@am__fastdepCC_TRUE@ -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \ +@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ +@am__fastdepCC_TRUE@ fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi` + +.c.lo: +@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \ +@am__fastdepCC_TRUE@ -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; \ +@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ +@am__fastdepCC_TRUE@ fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Plo' tmpdepfile='$(DEPDIR)/$*.TPlo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +distclean-libtool: + -rm -f libtool +uninstall-info-am: + +ETAGS = etags +ETAGSFLAGS = + +CTAGS = ctags +CTAGSFLAGS = + +tags: TAGS + +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: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(ETAGS_ARGS)$$tags$$unique" \ + || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique + +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) + +top_distdir = ../.. +distdir = $(top_distdir)/$(PACKAGE)-$(VERSION) + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ + list='$(DISTFILES)'; for file in $$list; do \ + case $$file in \ + $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ + $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ + esac; \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test "$$dir" != "$$file" && test "$$dir" != "."; then \ + dir="/$$dir"; \ + $(mkinstalldirs) "$(distdir)$$dir"; \ + else \ + dir=''; \ + fi; \ + if test -d $$d/$$file; then \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) + +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-libtool distclean-tags + +dvi: dvi-am + +dvi-am: + +info: info-am + +info-am: + +install-data-am: + +install-exec-am: + +install-info: install-info-am + +install-man: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-info-am + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLTLIBRARIES ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am info info-am install \ + install-am install-data install-data-am install-exec \ + install-exec-am install-info install-info-am install-man \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool pdf \ + pdf-am ps ps-am tags uninstall uninstall-am uninstall-info-am + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff -r 000000000000 -r d39e1d0d75b6 src/io/io_buf.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/io/io_buf.c Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,126 @@ +/* + * $Id: io_buf.c,v 1.2 2003/09/17 17:44:11 hipnod Exp $ + * + * Copyright (C) 2003 giFT project (gift.sourceforge.net) + * + * 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. + */ + +#include "gt_gnutella.h" + +#include "io_buf.h" + +/*****************************************************************************/ + +struct io_buf *io_buf_new (size_t size) +{ + struct io_buf *buf; + uint8_t *data; + + if (!(data = gift_malloc (size + 1))) + return NULL; + + if (!(buf = gift_malloc (sizeof (struct io_buf)))) + { + free (data); + return NULL; + } + + buf->data = data; + buf->size = size; + buf->r_offs = 0; + buf->w_offs = 0; + + /* null terminate the buffer */ + buf->data[size] = 0; + + return buf; +} + +void io_buf_free (struct io_buf *buf) +{ + uint8_t *data; + + if (!buf) + return; + + data = io_buf_free_keep (buf); + free (data); +} + +uint8_t *io_buf_free_keep (struct io_buf *buf) +{ + uint8_t *data; + + data = buf->data; + free (buf); + + return data; +} + +/* + * Resize the underlying buffer. This includes +1 for the null terminator. + */ +BOOL io_buf_resize (struct io_buf *buf, size_t len) +{ + uint8_t *resized; + + if (buf->size >= len) + return TRUE; + + if (!(resized = gift_realloc (buf->data, len + 1))) + return FALSE; + + buf->data = resized; + buf->size = len; + + /* ensure null-termination */ + buf->data[len] = 0; + + return TRUE; +} + +void io_buf_reset (struct io_buf *buf) +{ + buf->w_offs = 0; + buf->r_offs = 0; +} + +void io_buf_push (struct io_buf *buf, size_t len) +{ + assert (len + buf->w_offs <= buf->size); + buf->w_offs += len; +} + +void io_buf_pop (struct io_buf *buf, size_t len) +{ + assert (len + buf->r_offs <= buf->w_offs); + buf->r_offs += len; +} + +size_t io_buf_copy (struct io_buf *dst, struct io_buf *src, size_t len) +{ + size_t src_avail = io_buf_read_avail (src); + size_t dst_avail = io_buf_write_avail (dst); + + if (len > src_avail) + len = src_avail; + + if (len > dst_avail) + len = dst_avail; + + memcpy (dst->data + dst->w_offs, src->data + src->r_offs, len); + + dst->w_offs += len; + src->r_offs += len; + + return len; +} diff -r 000000000000 -r d39e1d0d75b6 src/io/io_buf.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/io/io_buf.h Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,74 @@ +/* + * $Id: io_buf.h,v 1.2 2003/09/17 17:44:11 hipnod Exp $ + * + * Copyright (C) 2003 giFT project (gift.sourceforge.net) + * + * 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. + */ + +#ifndef GIFT_GT_IO_BUF_H_ +#define GIFT_GT_IO_BUF_H_ + +/*****************************************************************************/ + +/* + * This duplicates libgift's String somewhat... + */ +struct io_buf +{ + uint8_t *data; + size_t size; + size_t r_offs; + size_t w_offs; +}; + +/*****************************************************************************/ + +/* + * Macros for accessing particular things about an I/O buf... + */ + +#define io_buf_read_avail(io_buf) \ + ((io_buf)->w_offs - (io_buf)->r_offs) + +#define io_buf_len(io_buf) \ + ((io_buf)->w_offs) + +#define io_buf_size(io_buf) \ + ((io_buf)->size) + +#define io_buf_write_avail(io_buf) \ + ((io_buf)->size - (io_buf)->w_offs) + +#define io_buf_write_ptr(io_buf) \ + (&(io_buf)->data[(io_buf)->w_offs]) + +#define io_buf_read_ptr(iobuf) \ + (&(iobuf)->data[(iobuf)->r_offs]) + +/*****************************************************************************/ + +struct io_buf *io_buf_new (size_t len); +void io_buf_free (struct io_buf *buf); +uint8_t *io_buf_free_keep (struct io_buf *buf); + +BOOL io_buf_resize (struct io_buf *buf, size_t len); +void io_buf_reset (struct io_buf *buf); + +void io_buf_push (struct io_buf *buf, size_t len); +void io_buf_pop (struct io_buf *buf, size_t len); + +size_t io_buf_copy (struct io_buf *dst, struct io_buf *src, + size_t len); + +/*****************************************************************************/ + +#endif /* GIFT_GT_IO_BUF_H_ */ diff -r 000000000000 -r d39e1d0d75b6 src/io/rx_inflate.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/io/rx_inflate.c Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,192 @@ +/* + * $Id: rx_inflate.c,v 1.10 2004/04/05 07:56:54 hipnod Exp $ + * + * Copyright (C) 2003 giFT project (gift.sourceforge.net) + * + * 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. + */ + +#include "gt_gnutella.h" + +#include "rx_stack.h" +#include "rx_layer.h" + +#include + +/*****************************************************************************/ + +/* this is small for testing purposes */ +#define RX_INFLATE_BUFSIZE 256 + +#define RX_INFLATE(rx) \ + ((struct rx_inflate *) (((rx)->udata))) + +struct rx_inflate +{ + z_stream z; + BOOL init_done; +}; + +/*****************************************************************************/ + +static BOOL rx_inflate_init (struct rx_layer *rx, void *udata) +{ + struct rx_inflate *rx_inflate; + + if (!(rx_inflate = NEW (struct rx_inflate))) + return FALSE; + + /* inflateInit() may touch these variables */ + rx_inflate->z.zalloc = Z_NULL; + rx_inflate->z.zfree = Z_NULL; + rx_inflate->z.opaque = Z_NULL; + rx_inflate->z.next_in = Z_NULL; + rx_inflate->z.avail_in = 0; + + if (inflateInit (&rx_inflate->z) != Z_OK) + { + gt_rx_stack_abort (rx->stack); + return FALSE; + } + + rx->udata = rx_inflate; + + rx_inflate->init_done = TRUE; + + return TRUE; +} + +static void rx_inflate_destroy (struct rx_layer *rx) +{ + struct rx_inflate *rx_inflate = RX_INFLATE(rx); + + /* + * We don't check the error here, there could very well be leftover data + * and it would be annoying to print a message every time. + */ + inflateEnd (&rx_inflate->z); + rx_inflate->init_done = FALSE; + + FREE (rx_inflate); +} + +static void rx_inflate_enable (struct rx_layer *rx) +{ + /* nothing -- we only process data when it comes towards us */ +} + +static void rx_inflate_disable (struct rx_layer *rx) +{ + /* nothing */ +} + +/* + * Handle the data from the lower layer, decompress it, and pass + * it to the upper layer. + */ +static struct io_buf *read_buf (struct rx_layer *rx, struct io_buf *io_buf) +{ + struct rx_inflate *rx_inflate = RX_INFLATE(rx); + struct io_buf *out_msg; + z_streamp inz; + int ret; + size_t uncompressed_size; + size_t compressed_read; + size_t out_size = RX_INFLATE_BUFSIZE; + size_t avail; + static size_t running_cnt = 0; + static int msg_count = 0; + + avail = io_buf_read_avail (io_buf); + + if (avail == 0) + return NULL; + + if (!(out_msg = io_buf_new (out_size))) + { + GT->dbg (GT, "couldn't allocate memory for recv buf"); + gt_rx_stack_abort (rx->stack); + return NULL; + } + + assert (rx_inflate->init_done); + inz = &rx_inflate->z; + + inz->next_in = io_buf_read_ptr (io_buf); + inz->avail_in = avail; + inz->next_out = io_buf_write_ptr (out_msg); + inz->avail_out = out_size; + + ret = inflate (inz, Z_SYNC_FLUSH); + + if (ret != Z_OK) + { + if (IO_DEBUG) + GT->dbg (GT, "zlib recv error: %d", ret); + + gt_rx_stack_abort (rx->stack); + io_buf_free (out_msg); + return NULL; + } + + uncompressed_size = out_size - inz->avail_out; + compressed_read = avail - inz->avail_in; + + running_cnt += uncompressed_size; + if (IO_DEBUG && ++msg_count % 50 == 0) + { + GT->dbg (GT, "uncompressed %u bytes", running_cnt); + running_cnt = 0; + } + + /* add the bytes we read to the new messge */ + io_buf_push (out_msg, uncompressed_size); + + /* pop the old bytes we read off the incoming message */ + io_buf_pop (io_buf, compressed_read); + + return out_msg; +} + +/* + * Parse the data into buffers, and send it to the upper layers. packets to + */ +static void rx_inflate_recv (struct rx_layer *rx, struct io_buf *io_buf) +{ + struct io_buf *msg; + + while (rx->enabled && (msg = read_buf (rx, io_buf))) + { + assert (msg != NULL); + gt_rx_layer_recv (rx, msg); + + /* + * NOTE: gt_rx_layer_recv() may abort the stack here... there's not much + * we can do about that, but in practice that doesn't happen and we + * won't access freed memory because the stack doesn't get freed until + * the lowest rx layer is notified of the abort...pretty hacky. + */ + } + + /* we have to free the buffer */ + io_buf_free (io_buf); +} + +/*****************************************************************************/ + +struct rx_layer_ops gt_rx_inflate_ops = +{ + rx_inflate_init, + rx_inflate_destroy, + rx_inflate_enable, + rx_inflate_disable, + rx_inflate_recv, +}; diff -r 000000000000 -r d39e1d0d75b6 src/io/rx_inflate.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/io/rx_inflate.h Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,26 @@ +/* + * $Id: rx_inflate.h,v 1.3 2004/01/31 13:33:17 hipnod Exp $ + * + * Copyright (C) 2003 giFT project (gift.sourceforge.net) + * + * 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. + */ + +#ifndef GIFT_GT_IO_RX_INFLATE_H_ +#define GIFT_GT_IO_RX_INFLATE_H_ + +/*****************************************************************************/ + +extern struct rx_layer_ops gt_rx_inflate_ops; + +/*****************************************************************************/ + +#endif /* GIFT_GT_IO_RX_INFLATE_H_ */ diff -r 000000000000 -r d39e1d0d75b6 src/io/rx_layer.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/io/rx_layer.c Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,106 @@ +/* + * $Id: rx_layer.c,v 1.4 2004/02/01 08:17:12 hipnod Exp $ + * + * Copyright (C) 2003 giFT project (gift.sourceforge.net) + * + * 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. + */ + +#include "gt_gnutella.h" + +#include "rx_layer.h" + +/*****************************************************************************/ + +void gt_rx_layer_disable (struct rx_layer *rx) +{ + if (!rx) + return; + + rx->enabled = FALSE; + rx->ops->disable (rx); +} + +void gt_rx_layer_enable (struct rx_layer *rx) +{ + if (!rx) + return; + + rx->enabled = TRUE; + rx->ops->enable (rx); +} + +void gt_rx_layer_recv (struct rx_layer *rx, struct io_buf *io_buf) +{ + struct rx_layer *upper; + + /* let the stack know we've started to receive some data */ + gt_rx_stack_recv_start (rx->stack); + + upper = rx->upper; + assert (rx->upper != NULL); + + upper->ops->recv (upper, io_buf); + + /* + * Let the stack know we're done. Currently, this will free the stack if + * rx_stack_abort() was called while we were receiving data. + * + * (Also note, the stack itself doesn't actually call free, but calls + * to the higher level callback's cleanup function, that calls + * gt_rx_stack_free(). + */ + gt_rx_stack_recv_end (rx->stack); +} + +/*****************************************************************************/ + +struct rx_layer *gt_rx_layer_new (GtRxStack *stack, const char *name, + struct rx_layer_ops *ops, void *udata) +{ + struct rx_layer *rx; + + if (!(rx = NEW (struct rx_layer))) + return NULL; + + rx->name = name; + rx->ops = ops; /* should we memdup this? */ + rx->udata = udata; + rx->stack = stack; + + /* + * Call the child initialization function. + */ + if (!ops->init (rx, udata)) + { + free (rx); + return NULL; + } + + return rx; +} + +void gt_rx_layer_free (struct rx_layer *rx) +{ + if (!rx) + return; + + /* tell the layer to free its data */ + rx->ops->destroy (rx); + + /* ops structues are global */ +#if 0 + free (rx->ops); +#endif + + /* we free the layer itself here, at the top */ + FREE (rx); +} diff -r 000000000000 -r d39e1d0d75b6 src/io/rx_layer.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/io/rx_layer.h Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,68 @@ +/* + * $Id: rx_layer.h,v 1.3 2004/02/01 08:17:12 hipnod Exp $ + * + * Copyright (C) 2003 giFT project (gift.sourceforge.net) + * + * 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. + */ + +#ifndef GIFT_GT_RX_LAYER_H_ +#define GIFT_GT_RX_LAYER_H_ + +/*****************************************************************************/ + +#include "rx_stack.h" +#include "io_buf.h" + +/*****************************************************************************/ + +struct gt_rx_stack; +struct rx_layer; + +struct rx_layer_ops +{ + BOOL (*init) (struct rx_layer *layer, void *udata); + void (*destroy) (struct rx_layer *layer); + void (*enable) (struct rx_layer *layer); + void (*disable) (struct rx_layer *layer); + void (*recv) (struct rx_layer *layer, struct io_buf *io_buf); +}; + +struct rx_layer +{ + const char *name; + void *udata; + struct rx_layer_ops *ops; + BOOL enabled; + + struct rx_layer *upper; + struct rx_layer *lower; + + struct gt_rx_stack *stack; +}; + +/*****************************************************************************/ + +struct rx_layer *gt_rx_layer_new (struct gt_rx_stack *stack, + const char *name, + struct rx_layer_ops *ops, void *udata); +void gt_rx_layer_free (struct rx_layer *layer); + +void gt_rx_layer_disable (struct rx_layer *layer); +void gt_rx_layer_enable (struct rx_layer *layer); + +/* pass a message buffer up to preceding layers */ +void gt_rx_layer_recv (struct rx_layer *layer, + struct io_buf *io_buf); + +/*****************************************************************************/ + +#endif /* GIFT_GT_RX_LAYER_H_ */ diff -r 000000000000 -r d39e1d0d75b6 src/io/rx_link.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/io/rx_link.c Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,227 @@ +/* + * $Id: rx_link.c,v 1.7 2004/02/01 08:17:12 hipnod Exp $ + * + * Copyright (C) 2003 giFT project (gift.sourceforge.net) + * + * 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. + */ + +#include "gt_gnutella.h" + +#include "rx_layer.h" +#include "rx_link.h" + +/*****************************************************************************/ + +struct rx_link +{ + /* TODO when the tx stack is implemented also + * right now cleanup is too hard */ +#if 0 + struct io_source *ios; +#endif + TCPC *c; + input_id id; +}; + +/*****************************************************************************/ + +/* Some macros for readability */ + +#define RX_LINK(rx) \ + ((struct rx_link *)((rx)->udata)) + +#define IO_SOURCE(rx_link) \ + ((rx_link)->ios) + +/*****************************************************************************/ + +/* TODO: implement cached allocation */ +#define RX_LINK_BUFSIZE 512 + +/* + * This implementation is for bootstrapping the code onto + * the present system. + * + * The low-level details of what we are actually reading + * from should be abstracted away. + */ +static void read_data (int fd, input_id id, struct rx_layer *rx) +{ + struct rx_link *rx_link = RX_LINK(rx); + struct io_buf *io_buf; + ssize_t n; + + /* we're processing data, we'd better be enabled */ + assert (rx->enabled); + + if (!(io_buf = io_buf_new (RX_LINK_BUFSIZE))) + { + gt_rx_stack_abort (rx->stack); + return; + } + + if ((n = tcp_recv (rx_link->c, io_buf_write_ptr (io_buf), + RX_LINK_BUFSIZE)) <= 0) + { + if (IO_DEBUG) + { + if (n < 0) + GT->DBGSOCK (GT, rx_link->c, "recv error: %s", GIFT_NETERROR()); + else + GT->DBGSOCK (GT, rx_link->c, "recv error: socket closed"); + } + + io_buf_free (io_buf); + gt_rx_stack_abort (rx->stack); + return; + } + + /* set the data as having been read */ + io_buf_push (io_buf, n); + + /* + * Pass the data up the stack. + */ + gt_rx_layer_recv (rx, io_buf); +} + +#if 0 +/* + * Receive data from the I/O source, and pass it up the stack + */ +static void recv_data (struct io_source *ios, struct io_buf *io_buf) +{ + struct rx_layer *rx; + struct rx_link *rx_link; + ssize_t n; + + rx = ios->recv_data; + rx_link = RX_LINK(rx); + + /* + * Pass the data to an upper layer. + */ + gt_rx_layer_recv (rx, io_buf); + + /* + * ?? we have to free io_buf here ?? No. + * gtk-gnutella passes off responsibility to the upper layers, + * but why.. + */ +#if 0 + return n; +#endif + /* + * Think i may understand why gtk-gnutella does it that way now: + * in the partial packet case there may be unread data on the packet, + * so we have to store that partial packet data in the intermediate + * layers. + * + * I still wonder if its possible to use a static buffer at each layer + * though... + */ +} +#endif + +static void init_input (struct rx_layer *rx, struct rx_link *rx_link) +{ + assert (rx_link->id == 0); + rx_link->id = input_add (rx_link->c->fd, rx, INPUT_READ, + (InputCallback)read_data, 0); +} + +static void free_input (struct rx_layer *rx, struct rx_link *rx_link) +{ + /* + * This could be called multiple times on cleanup, + * so we don't assert the id is 0 here. + */ + if (rx_link->id) + { + input_remove (rx_link->id); + rx_link->id = 0; + } +} + +static void rx_link_enable (struct rx_layer *rx) +{ + struct rx_link *rx_link = RX_LINK(rx); + +#if 0 + /* set the callback for getting data */ + io_source_enable (IO_SOURCE(rx_link), IO_SOURCE_OP_RECV, recv_data, rx); +#endif + + init_input (rx, rx_link); +} + +static void rx_link_disable (struct rx_layer *rx) +{ + struct rx_link *rx_link = RX_LINK(rx); + +#if 0 + io_source_disable (IO_SOURCE(rx_link), IO_SOURCE_OP_RECV); +#endif + free_input (rx, rx_link); +} + +static BOOL rx_link_init (struct rx_layer *rx, void *udata) +{ + struct rx_link *rx_link; + TCPC *c = (TCPC *) udata; /* ewwww */ + + if (!(rx_link = NEW (struct rx_link))) + return FALSE; + + /* store the connection which we get from the upper layer...gross */ + rx_link->c = c; + + /* store our data in the rx structure */ + rx->udata = rx_link; + + return TRUE; +} + +static void rx_link_destroy (struct rx_layer *rx) +{ + struct rx_link *rx_link = RX_LINK(rx); + + /* + * rx_link_disable() should be called first + */ + assert (rx_link->id == 0); + + /* + * We would free the connection here, but its shared with + * a GtNode that frees it also at the moment. + */ +#if 0 + tcp_close (rx->c); +#endif + +#if 0 + io_source_free (rx_link->ios); +#endif + + FREE (rx_link); +} + +/*****************************************************************************/ + +struct rx_layer_ops gt_rx_link_ops = +{ + rx_link_init, + rx_link_destroy, + rx_link_enable, + rx_link_disable, + NULL, /* rx_link_recv */ +}; diff -r 000000000000 -r d39e1d0d75b6 src/io/rx_link.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/io/rx_link.h Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,26 @@ +/* + * $Id: rx_link.h,v 1.3 2004/01/31 13:33:17 hipnod Exp $ + * + * Copyright (C) 2003 giFT project (gift.sourceforge.net) + * + * 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. + */ + +#ifndef GIFT_GT_RX_LINK_H_ +#define GIFT_GT_RX_LINK_H_ + +/*****************************************************************************/ + +extern struct rx_layer_ops gt_rx_link_ops; + +/*****************************************************************************/ + +#endif /* GIFT_GT_RX_LINK_H_ */ diff -r 000000000000 -r d39e1d0d75b6 src/io/rx_packet.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/io/rx_packet.c Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,289 @@ +/* + * $Id: rx_packet.c,v 1.7 2004/02/15 04:53:38 hipnod Exp $ + * + * Copyright (C) 2003 giFT project (gift.sourceforge.net) + * + * 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. + */ + +#include "gt_gnutella.h" + +#include "rx_stack.h" +#include "rx_layer.h" + +#include "gt_packet.h" +#include "rx_packet.h" + +/*****************************************************************************/ + +struct rx_packet +{ + struct io_buf *partial; + rx_packet_handler_t handler; + void *udata; +}; + +/*****************************************************************************/ + +#define RX_PACKET(rx) \ + ((struct rx_packet *) ((rx)->udata)) + +/*****************************************************************************/ + +static void null_packet_handler (void *udata, GtPacket *packet) +{ + gt_packet_free (packet); +} + +static BOOL rx_packet_init (struct rx_layer *rx, void *udata) +{ + struct rx_packet *rx_packet; + + if (!(rx_packet = NEW (struct rx_packet))) + return FALSE; + + rx->udata = rx_packet; + + /* discard the packets received */ + rx_packet->handler = null_packet_handler; + return TRUE; +} + +static void rx_packet_destroy (struct rx_layer *rx) +{ + struct rx_packet *rx_packet = RX_PACKET(rx); + + io_buf_free (rx_packet->partial); + FREE (rx_packet); +} + +static void rx_packet_disable (struct rx_layer *rx) +{ + /* NOP: lower layer will stop sending us data -- it'd better + * stop now */ +} + +static void rx_packet_enable (struct rx_layer *rx) +{ + /* NOP: the lower layer will start sending us data again */ +} + +/*****************************************************************************/ + +static GtPacket *make_packet (struct rx_layer *rx, struct rx_packet *rx_packet, + size_t packet_size) +{ + GtPacket *packet; + struct io_buf *pbuf = rx_packet->partial; + + assert (io_buf_len (pbuf) == packet_size); + assert (packet_size < GT_PACKET_MAX); + + /* construct a complete packet from the data in the binary buf */ + packet = gt_packet_unserialize (pbuf->data, packet_size); + + /* + * TODO: gt_packet_unserialize() currently copies the data, but should + * really take ownership of the data in place. That would also allow the + * null terminator in the io_buf to terminate the last string in the + * packet, if any. + */ + io_buf_free (pbuf); + rx_packet->partial = NULL; + + if (!packet) + { + gt_rx_stack_abort (rx->stack); + return NULL; + } + + return packet; +} + +static BOOL fill_up_to (struct rx_layer *rx, struct io_buf *dst, + struct io_buf *src, size_t fill_size) +{ + size_t new_len; + size_t old_len; + size_t len_to_read; + + old_len = io_buf_len (dst); + new_len = io_buf_len (src); + + /* skip if we already have enough */ + if (old_len >= fill_size) + return TRUE; + + len_to_read = MIN (fill_size - old_len, new_len); + + /* ensure the packet has enough room */ + if (!io_buf_resize (dst, old_len + len_to_read)) + { + gt_rx_stack_abort (rx->stack); + return FALSE; + } + + io_buf_copy (dst, src, len_to_read); + + if (io_buf_len (dst) >= fill_size) + return TRUE; + + return FALSE; +} + +static BOOL fill_header (struct rx_layer *rx, struct rx_packet *rx_packet, + struct io_buf *io_buf) +{ + struct io_buf *dst = rx_packet->partial; + struct io_buf *src = io_buf; + + if (!fill_up_to (rx, dst, src, GNUTELLA_HDR_LEN)) + { + /* this would fail if there was an alloc failure */ + assert (io_buf_read_avail (io_buf) == 0); + return FALSE; + } + + return TRUE; +} + +/* + * We must read all the data the lower layer has sent and buffer + * partial packets, because otherwise we would poll the CPU if the + * packet were bigger than the buffer size of one of the layer + * layers under this one. + */ +static BOOL read_packet (struct rx_layer *rx, struct rx_packet *rx_packet, + struct io_buf *io_buf, GtPacket **ret) +{ + uint32_t payload_len; + size_t partial_len; + uint32_t packet_size; + struct io_buf *partial = rx_packet->partial; + GtPacket *pkt; + + *ret = NULL; + + partial_len = io_buf_len (partial); + assert (partial_len >= GNUTELLA_HDR_LEN); + + /* + * The partial packet is now at least 23 bytes. Look in the header for + * the payload length so we know how much we need to read before the + * packet is complete. + */ + payload_len = get_payload_len (partial->data); + packet_size = payload_len + GNUTELLA_HDR_LEN; + + /* + * Check for wraparound, and reset the packet size to its payload len. + * Its likely we've experienced a protocol de-sync here. Set the size so + * the connection will be closed. + */ + if (packet_size < GNUTELLA_HDR_LEN) + packet_size = GT_PACKET_MAX; + + if (packet_size >= GT_PACKET_MAX) + { + if (IO_DEBUG) + GT->dbg (GT, "received too large packet(%d)", packet_size); + + /* TODO: should send a BYE message here */ + gt_rx_stack_abort (rx->stack); + return FALSE; + } + + if (!fill_up_to (rx, partial, io_buf, packet_size)) + { + /* this would fail if there was an alloc failure */ + assert (io_buf_read_avail (io_buf) == 0); + return FALSE; + } + + /* yay, read a packet */ + pkt = make_packet (rx, rx_packet, packet_size); + *ret = pkt; + + return (pkt == NULL ? FALSE : TRUE); +} + +/* + * Receive a message buffer from the lower layer, parse it into as many + * packets as it contains, and pass those to our handler function. + * + * This is meant to be the top layer of the rx stack only. + * + * TODO: A handler could be implemented as another layer, should think + * about this approach instead. + */ +static void rx_packet_recv (struct rx_layer *rx, struct io_buf *io_buf) +{ + GtPacket *packet = NULL; + struct rx_packet *rx_packet; + + rx_packet = RX_PACKET(rx); + + while (rx->enabled && io_buf_read_avail (io_buf) > 0) + { + /* allocate a new partial buffer, if one is not present yet */ + if (!rx_packet->partial && + !(rx_packet->partial = io_buf_new (GNUTELLA_HDR_LEN))) + { + gt_rx_stack_abort (rx->stack); + break; + } + + /* try to read the first 23 bytes */ + if (!fill_header (rx, rx_packet, io_buf)) + break; + + /* + * Read the payload. If there arent enough bytes to complete the + * packet, we finish it later. + */ + if (!read_packet (rx, rx_packet, io_buf, &packet)) + { + assert (packet == NULL); + break; + } + + assert (packet != NULL); + (*rx_packet->handler) (rx_packet->udata, packet); + + /* freeing the packet here means the callback must make its own + * provisions for storing the packet's data */ + gt_packet_free (packet); + packet = NULL; + } + + io_buf_free (io_buf); +} + +/*****************************************************************************/ + +struct rx_layer_ops gt_rx_packet_ops = +{ + rx_packet_init, + rx_packet_destroy, + rx_packet_enable, + rx_packet_disable, + rx_packet_recv, +}; + +void gt_rx_packet_set_handler (struct rx_layer *rx, + rx_packet_handler_t handler, + void *udata) +{ + struct rx_packet *rx_packet = RX_PACKET(rx); + + rx_packet->handler = handler; + rx_packet->udata = udata; +} diff -r 000000000000 -r d39e1d0d75b6 src/io/rx_packet.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/io/rx_packet.h Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,32 @@ +/* + * $Id: rx_packet.h,v 1.3 2004/01/31 13:33:17 hipnod Exp $ + * + * Copyright (C) 2003 giFT project (gift.sourceforge.net) + * + * 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. + */ + +#ifndef GIFT_GT_IO_RX_PACKET_H_ +#define GIFT_GT_IO_RX_PACKET_H_ + +/*****************************************************************************/ + +typedef void (*rx_packet_handler_t) (void *udata, struct gt_packet *packet); + +extern struct rx_layer_ops gt_rx_packet_ops; + +void gt_rx_packet_set_handler (struct rx_layer *rx, + rx_packet_handler_t handler, + void *udata); + +/*****************************************************************************/ + +#endif /* GIFT_GT_IO_RX_PACKET_H_ */ diff -r 000000000000 -r d39e1d0d75b6 src/io/rx_stack.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/io/rx_stack.c Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,318 @@ +/* + * $Id: rx_stack.c,v 1.8 2004/02/01 08:17:12 hipnod Exp $ + * + * Copyright (C) 2003 giFT project (gift.sourceforge.net) + * + * 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. + */ + +#include "gt_gnutella.h" +#include "gt_node.h" + +#include "rx_stack.h" +#include "rx_layer.h" +#include "rx_link.h" +#include "rx_inflate.h" +#include "rx_packet.h" + +/*****************************************************************************/ + +struct gt_rx_stack +{ + TCPC *c; + BOOL inflated; + + int depth; /* how deep in the stack we have + currently called into the stack */ + BOOL aborted; /* one of our layers bailed out */ + BOOL free_delayed; /* somebody called free during + message emission, and we delayed + it for later */ + void *udata; + struct rx_layer *layers; + + GtRxStackHandler handler; + GtRxStackCleanup cleanup; +}; + +static struct use_layer +{ + const char *name; + struct rx_layer_ops *ops; +} layers[] = +{ + { "rx_link", >_rx_link_ops }, + { "rx_inflate", >_rx_inflate_ops }, + { "rx_packet", >_rx_packet_ops }, +}; + +/*****************************************************************************/ + +static void foreach_child (struct rx_layer *rx, + void (*exec)(struct rx_layer *rx, void *udata), + void *udata) +{ + struct rx_layer *next; + + while (rx != NULL) + { + /* grab the next element first so the callback can call free */ + next = rx->lower; + + exec (rx, udata); + + rx = next; + } +} + +static void disable_layer (struct rx_layer *rx, void *udata) +{ + gt_rx_layer_disable (rx); +} + +static void destroy_foreach (struct rx_layer *rx, void *udata) +{ + gt_rx_layer_free (rx); +} + +static void disable_all (GtRxStack *stack) +{ + struct rx_layer *layers = stack->layers; + + /* we must be at the top layer already */ + assert (layers->upper == NULL); + + foreach_child (layers, disable_layer, NULL); +} + +/*****************************************************************************/ + +static struct rx_layer *push_layer (struct rx_layer *below, + struct rx_layer *above) +{ + if (above) + above->lower = below; + + if (below) + below->upper = above; + + return above; +} + +static void free_all_layers (GtRxStack *stack) +{ + struct rx_layer *layers; + + if (!stack) + return; + + layers = stack->layers; + + if (!layers) + return; + + /* make sure we've stopped all processing on this layer */ + disable_all (stack); + + /* call each layer's destroy method */ + foreach_child (layers, destroy_foreach, NULL); +} + +static struct rx_layer *alloc_layers (GtRxStack *stack, TCPC *c, + BOOL rx_inflated) +{ + struct rx_layer *layer = NULL; + struct rx_layer *new_layer = NULL; + void *udata = NULL; + int i; + + for (i = 0; i < sizeof(layers) / sizeof(layers[0]); i++) + { + /* XXX */ + if (!strcmp (layers[i].name, "rx_link")) + udata = c; + + if (!strcmp (layers[i].name, "rx_inflate") && !rx_inflated) + continue; + + if (!(new_layer = gt_rx_layer_new (stack, layers[i].name, + layers[i].ops, udata))) + { + foreach_child (layer, destroy_foreach, NULL); + return NULL; + } + + layer = push_layer (layer, new_layer); + udata = NULL; + } + + return layer; +} + +/*****************************************************************************/ + +static void enable_layer (struct rx_layer *rx, void *udata) +{ + gt_rx_layer_enable (rx); +} + +GtRxStack *gt_rx_stack_new (GtNode *node, TCPC *c, BOOL rx_inflated) +{ + GtRxStack *stack; + int size; + + if (!(stack = NEW (GtRxStack))) + return NULL; + + stack->c = c; + stack->inflated = rx_inflated; + + if (!(stack->layers = alloc_layers (stack, c, rx_inflated))) + { + free (stack); + return NULL; + } + + /* set the receive buf to a not large value */ + size = 4096; + + if (setsockopt (c->fd, SOL_SOCKET, SO_RCVBUF, &size, sizeof (size)) != 0) + GT->DBGSOCK (GT, c, "Error setting rcvbuf size: %s", GIFT_NETERROR()); + + /* enable each layer */ + foreach_child (stack->layers, enable_layer, NULL); + + return stack; +} + +/*****************************************************************************/ + +/* + * Cleanup handling. This is a bit tricky, because both the owner of the + * stack and the stack itself may want to free the stack, and they both have + * to coordinate so only one of them does the free(). + * + * Also, the stack has to worry about the free happening whilst a message + * emission is taking place, and so has to unwind the stack to the top level + * to make sure it doesn't reference freed memory. + */ + +static void free_stack (GtRxStack *stack) +{ + /* + * ->cleanup gets called from the lower layers, and only + * if something bad happened (socket close, etc). + */ + free_all_layers (stack); + FREE (stack); +} + +void gt_rx_stack_free (GtRxStack *stack) +{ + if (!stack) + return; + + /* + * If we in the middle of a reception when someone calls this function + * [say by calling gt_node_disconenct()], we can't free right now + * because the data structures are still in use in the reception stack. + * + * So we queue the removal in that case, by setting free_delayed and + * freeing when the stack unwinds, just like when waiting to notify the + * stack's listener about gt_rx_stack_abort(). + */ + if (stack->depth > 0) + { + /* we'll defer the real free until later */ + stack->free_delayed = TRUE; + + /* we must stop processing */ + gt_rx_stack_abort (stack); + + return; + } + + free_stack (stack); +} + +/* notify the user of the stack it's time to clean up this stack */ +static void cleanup_notify (GtRxStack *stack) +{ + /* + * First, we check if our owner tried to call ->free on us already. + * If so, we don't notify them because they already are well aware we are + * on our way to oblivion. + */ + if (stack->free_delayed) + { + free_stack (stack); + return; + } + + if (stack->aborted) + stack->cleanup (stack->udata); +} + +void gt_rx_stack_recv_start (GtRxStack *stack) +{ + assert (stack->depth >= 0); + stack->depth++; +} + +void gt_rx_stack_recv_end (GtRxStack *stack) +{ + assert (stack->depth > 0); + + if (--stack->depth == 0) + cleanup_notify (stack); +} + +/* + * RX layers call this function when something bad happens and they need + * to abort the stack processing. + * + * In other words, this is the "oh shit" function. + */ +void gt_rx_stack_abort (GtRxStack *stack) +{ + disable_all (stack); + + /* set the flag indicated this stack has been aborted while processing */ + stack->aborted = TRUE; + + /* + * If we are in the middle of receiving some data, set stack->aborted + * so when the reception unwinds, we'll notify the owner of the + * stack's cleanup function. + */ + if (stack->depth > 0) + return; + + /* + * This can happen from the bottom layer, if it hasn't passed any data to + * upper layers yet. TODO: if the bottom layer was driven by the RX stack + * instead of rx_link, this wouldn't need to be here, i think.. + */ + cleanup_notify (stack); +} + +void gt_rx_stack_set_handler (GtRxStack *stack, GtRxStackHandler handler, + GtRxStackCleanup cleanup, void *udata) +{ + stack->udata = udata; + stack->handler = handler; + stack->cleanup = cleanup; + + /* + * The topmost layer is rx_packet, so we can simply set the data. + */ + gt_rx_packet_set_handler (stack->layers, handler, udata); +} diff -r 000000000000 -r d39e1d0d75b6 src/io/rx_stack.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/io/rx_stack.h Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,57 @@ +/* + * $Id: rx_stack.h,v 1.3 2003/09/19 00:10:30 hipnod Exp $ + * + * Copyright (C) 2003 giFT project (gift.sourceforge.net) + * + * 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. + */ + +#ifndef GIFT_GT_RX_STACK_H_ +#define GIFT_GT_RX_STACK_H_ + +/*****************************************************************************/ + +#include "gt_gnutella.h" + +/*****************************************************************************/ + +#define IO_DEBUG gt_config_get_int("io/debug=0") + +/*****************************************************************************/ + +struct gt_rx_stack; +struct gt_node; +struct gt_packet; + +typedef struct gt_rx_stack GtRxStack; + +typedef void (*GtRxStackHandler) (void *udata, struct gt_packet *packet); +typedef void (*GtRxStackCleanup) (void *udata); + +/*****************************************************************************/ + +GtRxStack *gt_rx_stack_new (struct gt_node *node, TCPC *c, + BOOL rx_inflated); +void gt_rx_stack_free (GtRxStack *stack); + +void gt_rx_stack_set_handler (GtRxStack *stack, + GtRxStackHandler handler, + GtRxStackCleanup cleanup, + void *udata); + +void gt_rx_stack_recv_start (GtRxStack *stack); +void gt_rx_stack_recv_end (GtRxStack *stack); + +void gt_rx_stack_abort (GtRxStack *stack); + +/*****************************************************************************/ + +#endif /* GIFT_GT_RX_STACK_H_ */ diff -r 000000000000 -r d39e1d0d75b6 src/io/tx_deflate.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/io/tx_deflate.c Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,638 @@ +/* + * $Id: tx_deflate.c,v 1.15 2004/05/02 08:55:00 hipnod Exp $ + * + * Copyright (C) 2004 giFT project (gift.sourceforge.net) + * + * 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. + */ + +#include "gt_gnutella.h" +#include "gt_packet.h" /* packet manipulation macros */ + +#include "io/tx_stack.h" +#include "io/tx_layer.h" +#include "io/io_buf.h" + +#include + +/*****************************************************************************/ + +#define DEFLATE_DEBUG 0 + +#if DEFLATE_DEBUG +#define DEFLATE_TRACEFN(tx) \ + GT->DBGSOCK (GT, tx->stack->c, "entered") + +#define DEFLATE_DUMP(tx_deflate) \ +{ \ + if (DEFLATE_DEBUG) \ + { \ + float percent = ((float)tx_deflate->nbytes_in - \ + tx_deflate->nbytes_out - tx_deflate->nbytes_unflushed) / \ + (float)tx_deflate->nbytes_in; \ +\ + GT->DBGSOCK (GT, tx->stack->c, "in %lu out %lu flushed %lu unflushed %lu (flushing %d) " \ + "ratio %.2f%% avg %.2f", \ + (long)tx_deflate->nbytes_in, (long)tx_deflate->nbytes_out, \ + (long)tx_deflate->nbytes_flushed, \ + (long)tx_deflate->nbytes_unflushed, \ + (long)tx_deflate->flushing, percent * 100.0, \ + (double)tx_deflate->nbytes_out / \ + difftime (time (NULL), tx->stack->start_time)); \ + } \ +} +#else /* !DEFLATE_DEBUG */ +#define DEFLATE_TRACEFN(tx) +#define DEFLATE_DUMP(tx_deflate) +#endif /* DEFLATE_DEBUG */ + +/*****************************************************************************/ + +#define TX_DEFLATE_BUFSIZE (1024 - 1) /* -1 for auto-nullification */ + +#define FLUSH_AFTER (4096) /* flush after this many bytes */ + +#define NAGLE_TIMEOUT (200 * MSEC) /* 200 milliseconds */ + +/*****************************************************************************/ + +struct tx_deflate +{ + /* zlib data */ + z_stream z; + + /* compressed buffer */ + struct io_buf *buf; + + /* Nagle timer that sends stored data after NAGLE_TIMEOUT milliseconds */ + timer_id nagle_timer; + + size_t nbytes_in; /* total uncompressed bytes */ + size_t nbytes_out; /* total compressed bytes */ + size_t nbytes_flushed; /* total bytes written to lower layer */ + size_t nbytes_unflushed; /* bytes currently waiting in z_stream */ + + /* + * Whether the zstream is currently being flushed, and so whether deflate + * must receive a Z_SYNC_FLUSH parameter to continue flushing. The flush + * ends when deflate returns with avail_out > 0. + */ + BOOL flushing; + + /* + * When doing a flush, it's possible that there will be a partially + * filled buffer leftover. If there's no new data that comes in, the data + * will be delayed again until more data comes from the upper layer. This + * flag is set when this happens, so we know that we should flush the + * buffer to the lower layer as soon as possible, even if it isn't + * completely full. + */ + BOOL delayed; +}; + +/*****************************************************************************/ + +static void start_nagle_timer (struct tx_layer *tx, struct tx_deflate *deflate); +static void stop_nagle_timer (struct tx_layer *tx, struct tx_deflate *deflate); + +/*****************************************************************************/ + +static void tx_deflate_enable (struct tx_layer *tx) +{ + /* TODO */ +} + +static void tx_deflate_disable (struct tx_layer *tx) +{ + /* TODO */ +} + +/*****************************************************************************/ + +static void tx_deflate_toggle (struct tx_layer *tx, BOOL stop) +{ + /* nothing, we do not consume packets, only pass along */ +} + +/*****************************************************************************/ + +static BOOL alloc_buffer (struct tx_deflate *tx_deflate) +{ + if (tx_deflate->buf) + return TRUE; + + if (!(tx_deflate->buf = io_buf_new (TX_DEFLATE_BUFSIZE))) + return FALSE; + + return TRUE; +} + +static void finish_flush (struct tx_deflate *tx_deflate) +{ + tx_deflate->nbytes_unflushed = 0; + tx_deflate->flushing = FALSE; +} + +static tx_status_t flush_buffer (struct tx_layer *tx, + struct tx_deflate *tx_deflate) +{ + tx_status_t ret; + size_t n; + + DEFLATE_TRACEFN(tx); + + n = io_buf_read_avail (tx_deflate->buf); + + /* + * The buffer filled up. Try to send again until the lower + * layer is saturated. + */ + ret = gt_tx_layer_queue (tx, tx_deflate->buf); + assert (ret != TX_EMPTY); + + if (ret == TX_ERROR || ret == TX_FULL) + return ret; + + tx_deflate->nbytes_flushed += n; + assert (ret == TX_OK); + + stop_nagle_timer (tx, tx_deflate); + + tx_deflate->buf = NULL; + tx_deflate->delayed = FALSE; + + return TX_OK; +} + +/* + * Try to flush the data inside the z_stream and send it to the layer beneath + * this one. + */ +static tx_status_t flush_stream (struct tx_layer *tx, + struct tx_deflate *tx_deflate) +{ + z_stream *z = &tx_deflate->z; + tx_status_t ret; + int zret; + size_t wlen, old_avail; + + DEFLATE_TRACEFN(tx); + + if (!alloc_buffer (tx_deflate)) + return TX_ERROR; + + old_avail = io_buf_write_avail (tx_deflate->buf); + + z->avail_in = 0; + z->next_in = NULL; /* don't disrupt anything else */ + z->next_out = io_buf_write_ptr (tx_deflate->buf); + z->avail_out = old_avail; + + zret = deflate (z, Z_SYNC_FLUSH); + + /* + * If this is true we've already flushed all possible data. + */ + if (zret == Z_BUF_ERROR) + { + tx_deflate->flushing = FALSE; + + /* send the stored data */ + if (io_buf_read_avail (tx_deflate->buf) > 0) + return flush_buffer (tx, tx_deflate); + + return TX_EMPTY; + } + + if (zret != Z_OK) + return TX_ERROR; + + wlen = old_avail - z->avail_out; + + io_buf_push (tx_deflate->buf, wlen); + tx_deflate->nbytes_out += wlen; + + tx_deflate->flushing = TRUE; + + /* if there is space, the flush completed successfully */ + if (z->avail_out > 0) + finish_flush (tx_deflate); + + if ((ret = flush_buffer (tx, tx_deflate) != TX_OK)) + return ret; + + /* stop when the flush completes */ + if (!tx_deflate->flushing) + return TX_OK; + + /* tail recurse until the flush completes */ + return flush_stream (tx, tx_deflate); +} + +static BOOL deflate_nagle_timeout (struct tx_layer *tx) +{ + struct tx_deflate *tx_deflate = tx->udata; + tx_status_t ret; + + DEFLATE_TRACEFN(tx); + + /* this assertion means we have to disarm the timer when sending the + * buffer */ + assert (tx_deflate->buf != NULL); + + ret = flush_stream (tx, tx_deflate); + + /* no matter what, we disable the Nagle timer after this */ + stop_nagle_timer (tx, tx_deflate); + + if (ret == TX_ERROR) + { + gt_tx_stack_abort (tx->stack); + return FALSE; + } + + if (DEFLATE_DEBUG) + GT->DBGSOCK (GT, tx->stack->c, "buffer delayed?: %d", tx_deflate->delayed); + + return FALSE; +} + +static void start_nagle_timer (struct tx_layer *tx, + struct tx_deflate *tx_deflate) +{ + if (DEFLATE_DEBUG) + GT->DBGSOCK (GT, tx->stack->c, "nagle timer=%d", tx_deflate->nagle_timer); + + if (tx_deflate->nagle_timer != 0) + return; + + tx_deflate->nagle_timer = timer_add (NAGLE_TIMEOUT, + (TimerCallback)deflate_nagle_timeout, + tx); +} + +static void stop_nagle_timer (struct tx_layer *tx, + struct tx_deflate *tx_deflate) +{ + if (DEFLATE_DEBUG) + GT->DBGSOCK (GT, tx->stack->c, "nagle timer=%d", tx_deflate->nagle_timer); + + timer_remove_zero (&tx_deflate->nagle_timer); +} + +/*****************************************************************************/ + +/* + * The upper layer has sent us a buffer to process. + */ +static tx_status_t tx_deflate_queue (struct tx_layer *tx, struct io_buf *msg) +{ + struct tx_deflate *tx_deflate = tx->udata; + z_stream *z = &tx_deflate->z; + BOOL flush_completed = FALSE; + int ret; + + DEFLATE_TRACEFN(tx); + + /* + * Deflate the incoming message, adding it to the buffer. + * + * If our buffer is currently full, return TX_FULL. + */ + + if (!alloc_buffer (tx_deflate)) + { + io_buf_free (msg); + return TX_ERROR; + } + + z->next_in = io_buf_read_ptr (msg); + z->avail_in = io_buf_read_avail (msg); + z->next_out = io_buf_write_ptr (tx_deflate->buf); + z->avail_out = io_buf_write_avail (tx_deflate->buf); + + if (z->avail_out == 0) + return TX_FULL; + + while (io_buf_read_avail (msg) > 0 && z->avail_out > 0) + { + size_t rlen, wlen; + + assert (z->next_in == io_buf_read_ptr (msg)); + assert (z->next_out == io_buf_write_ptr (tx_deflate->buf)); + + /* begin flushing after a certain amount */ + if (tx_deflate->nbytes_unflushed >= FLUSH_AFTER) + tx_deflate->flushing = TRUE; + + ret = deflate (z, tx_deflate->flushing ? Z_SYNC_FLUSH : 0); + + if (ret != Z_OK) + { + GT->DBGFN (GT, "deflate: error %d", ret); + io_buf_free (msg); + return TX_ERROR; + } + + rlen = io_buf_read_avail (msg) - z->avail_in; + wlen = io_buf_write_avail (tx_deflate->buf) - z->avail_out; + assert (rlen > 0 || wlen > 0); /* hmm, is this true when flushing? */ +#if 0 + assert (wlen > 0); +#endif + + tx_deflate->nbytes_in += rlen; + tx_deflate->nbytes_unflushed += rlen; + tx_deflate->nbytes_out += wlen; + + DEFLATE_DUMP(tx_deflate); + + /* update the buffer lengths */ + io_buf_push (tx_deflate->buf, wlen); + io_buf_pop (msg, rlen); + + if (z->avail_out == 0) + break; + + /* + * If we have available output space and no more input space, + * we know the flush completed, so unset flush mode. + * + * NOTE: there might be a bug here. The flush may fit exactly + * everytime, causing us to never leave flush mode. I think zlib may + * try to prevent this itself, though. + */ + if (tx_deflate->flushing && z->avail_in == 0) + { + flush_completed = TRUE; + finish_flush (tx_deflate); + } + } + + /* + * If we completed a flush, and the buffer isn't full, set the delayed + * flag so that service_deflate() will write the buffer immediately to + * reduce latency, as it has already endured a Nagle timeout period. + */ + if (flush_completed && + io_buf_read_avail (tx_deflate->buf) < TX_DEFLATE_BUFSIZE) + { + if (DEFLATE_DEBUG) + { + GT->DBGSOCK (GT, tx->stack->c, "setting ->delayed flag on buf(%d)", + io_buf_read_avail (tx_deflate->buf)); + } + + tx_deflate->delayed = TRUE; + } + + /* + * If the message buffer was only partially emptied, don't free + * it and let tx_layer.c know to handle it specially. + */ + if (io_buf_read_avail (msg) > 0) + return TX_PARTIAL; + + io_buf_free (msg); + + return TX_OK; +} + +/*****************************************************************************/ + +/* + * Get more data to write. + */ +static tx_status_t get_buffers (struct tx_layer *tx, + struct tx_deflate *tx_deflate) +{ + if (tx_deflate->buf && io_buf_write_avail (tx_deflate->buf) == 0) + return TX_OK; + + return gt_tx_layer_ready (tx); +} + +/* + * This is the most complicated part of the whole stack: + * + * [1] Call upper layer's ready routine to grab a buffer (gt_tx_layer_ready). + * + * [2] That function will call tx_deflate_queue, which compresses the data to + * a buffer, as many times as it can while there's more data to process. + * + * [3] If we didn't fill the buffer, or there was no data, return TX_EMPTY + * telling the lower layer there is no data. + * + * [4] If there's no data in the upper layer, but we're in flush mode, call + * flush_stream() to send whatever data is stored inside the z_stream, + * and stop. + * + * [5] If we filled the buffer, or if we have a paritally filled buffer that + * was delayed in deflate_nagle_timeout(), send it to the lower layer with + * flush_buffer(). If the lower layer returns TX_FULL, stop and return + * TX_OK. Otherwise, continue by calling this function recursively. + * + * NOTE: The buffer is filled in tx_deflate_queue but sent in this + * function (or from the Nagle timer if the buffer isn't full). + * + * The caller of this function has to setup a Nagle timer if any data was + * written and TX_FULL was not encountered. + */ +static tx_status_t service_deflate (struct tx_layer *tx, + struct tx_deflate *tx_deflate) +{ + tx_status_t ret; + + DEFLATE_TRACEFN(tx); + + /* [1] + [2] */ + ret = get_buffers (tx, tx_deflate); + + if (ret == TX_ERROR) + return TX_ERROR; + + /* [3] */ + if (ret == TX_EMPTY) + { + assert (ret == TX_EMPTY); + + /* [4]: continue flush even if no data avail */ + if (tx_deflate->flushing) + ret = flush_stream (tx, tx_deflate); + + return ret; + } + + assert (tx_deflate->buf != NULL); + + if (DEFLATE_DEBUG) + { + if (tx_deflate->delayed) + { + GT->DBGSOCK (GT, tx->stack->c, "flushing delayed buf(%d)", + io_buf_read_avail (tx_deflate->buf)); + } + } + + assert (ret == TX_OK); + + /* + * [5] + * + * flush_buffer will stop the Nagle timer if the buffer was + * successfully sent. + * + * We must also flush the buffer if it contains partial data from a + * previous flush that was delayed in the Nagle timer due to having no + * space. + */ + if (tx_deflate->delayed || io_buf_write_avail (tx_deflate->buf) == 0) + ret = flush_buffer (tx, tx_deflate); + + if (ret != TX_OK) + return ret; + + /* tail recurse until the lower layer is saturated */ + return service_deflate (tx, tx_deflate); +} + +/* + * The lower layer is ready to write. + */ +static tx_status_t tx_deflate_ready (struct tx_layer *tx) +{ + struct tx_deflate *tx_deflate = tx->udata; + size_t old_flushed; + tx_status_t ret; + + /* keep track of how much was previously flushed */ + old_flushed = tx_deflate->nbytes_flushed; + + ret = service_deflate (tx, tx_deflate); + + if (ret == TX_ERROR || ret == TX_FULL) + { + if (ret == TX_FULL) + { + /* flush buffer shouldve deactivated the Nagle timer */ + assert (tx_deflate->nagle_timer == 0); + + /* we wrote something -- let caller know it's ok */ + ret = TX_OK; + } + + return ret; + } + + assert (ret == TX_OK || ret == TX_EMPTY); + + /* + * If the lower layer was not saturated (evidenced by _not_ returning + * TX_FULL), and there is a partially completed buffer, the Nagle + * timer must be armed. This ensures the data waiting in this layer will + * go out in a timely manner. If the lower layer was saturated, we don't + * need to arm the timer because there is no buffer space to flush to + * anyway, and when the lower layer unsaturates it will reinvoke this + * layer to write more data. + * + * TODO: Still need to flush if there is some urgent data waiting. So, + * should add a ->flush callback. + * + * XXX: Using tx_deflate->buf != NULL as a hacky way to recognize that + * some data was written to the z_stream. + */ + if (tx_deflate->buf != NULL) + start_nagle_timer (tx, tx_deflate); + + if (DEFLATE_DEBUG) + { + GT->DBGSOCK (GT, tx->stack->c, "buf waiting=[%d] ret=%s", + tx_deflate->buf ? io_buf_read_avail (tx_deflate->buf) : 0, + ret == TX_EMPTY ? "TX_EMPTY" : "TX_OK"); + } + + DEFLATE_DUMP(tx_deflate); + + /* + * For the return value from this function, decipher whether + * service_deflate() wrote some data. + * + * If nothing was written, then we should stop sending now, by returning + * TX_EMPTY. That will remove the input in tx_link.c that's calling this + * layer, which kind of sucks, because this could be the case a lot of the + * time when the whole buffer hasn't been filled up, leading to a removing + * and adding the input a lot. + * + * Otherwise, return TX_OK if something was sent to the lower layer. + */ + if (old_flushed == tx_deflate->nbytes_flushed) + return TX_EMPTY; + + return TX_OK; +} + +/*****************************************************************************/ + +static BOOL tx_deflate_init (struct tx_layer *tx) +{ + struct tx_deflate *tx_deflate; + + if (!(tx_deflate = malloc (sizeof(*tx_deflate)))) + return FALSE; + + /* zlib documents these variables as needing initialization before + * deflateInit() */ + tx_deflate->z.zalloc = Z_NULL; + tx_deflate->z.zfree = Z_NULL; + tx_deflate->z.opaque = Z_NULL; + + if (deflateInit (&tx_deflate->z, Z_DEFAULT_COMPRESSION) != Z_OK) + { + FREE (tx_deflate); + return FALSE; + } + + tx_deflate->buf = NULL; + tx_deflate->nagle_timer = 0; + tx_deflate->nbytes_in = 0; + tx_deflate->nbytes_out = 0; + tx_deflate->nbytes_flushed = 0; + tx_deflate->nbytes_unflushed = 0; + tx_deflate->flushing = FALSE; + tx_deflate->delayed = FALSE; + + tx->udata = tx_deflate; + return TRUE; +} + +static void tx_deflate_destroy (struct tx_layer *tx) +{ + struct tx_deflate *tx_deflate = tx->udata; + + io_buf_free (tx_deflate->buf); + timer_remove (tx_deflate->nagle_timer); + + deflateEnd (&tx_deflate->z); + FREE (tx_deflate); +} + +/*****************************************************************************/ + +struct tx_layer_ops gt_tx_deflate_ops = +{ + tx_deflate_init, + tx_deflate_destroy, + tx_deflate_toggle, + tx_deflate_queue, + tx_deflate_ready, + tx_deflate_enable, + tx_deflate_disable, +}; diff -r 000000000000 -r d39e1d0d75b6 src/io/tx_layer.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/io/tx_layer.c Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,150 @@ +/* + * $Id: tx_layer.c,v 1.7 2004/03/24 06:37:30 hipnod Exp $ + * + * Copyright (C) 2003 giFT project (gift.sourceforge.net) + * + * 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. + */ + +#include "gt_gnutella.h" + +#include "io/tx_stack.h" +#include "io/tx_layer.h" +#include "io/io_buf.h" + +/*****************************************************************************/ + +struct tx_layer *gt_tx_layer_new (GtTxStack *stack, const char *name, + struct tx_layer_ops *ops) +{ + struct tx_layer *tx; + + if (!(tx = NEW (struct tx_layer))) + return NULL; + + tx->ops = ops; + tx->name = name; + tx->stack = stack; + tx->partial_buf = NULL; + + if (!ops->init (tx)) + { + free (tx); + return NULL; + } + + return tx; +} + +void gt_tx_layer_free (struct tx_layer *layer) +{ + if (!layer) + return; + + io_buf_free (layer->partial_buf); + + layer->ops->destroy (layer); + + FREE (layer); +} + +/*****************************************************************************/ + +static tx_status_t queue_data (struct tx_layer *tx, struct io_buf *io_buf) +{ + tx_status_t ret; + + ret = tx->ops->queue (tx, io_buf); + + /* + * If the message didn't get completely written, buffer the partial + * message buffer until it's finished. + */ + if (ret == TX_PARTIAL) + { + assert (io_buf_read_avail (io_buf) > 0); + + tx->partial_buf = io_buf; + return TX_OK; + } + + return ret; +} + +/* send a message to the layer underneath this one */ +tx_status_t gt_tx_layer_queue (struct tx_layer *tx, struct io_buf *io_buf) +{ + struct tx_layer *lower = tx->lower; + + if (lower->partial_buf) + return TX_FULL; + + return queue_data (lower, io_buf); +} + +/* let upper layer know we're writable and get data from it */ +tx_status_t gt_tx_layer_ready (struct tx_layer *tx) +{ + struct tx_layer *upper; + tx_status_t ret; + + upper = tx->upper; + + /* + * If there is a partially written buffer on the layer, try to finish it + * off before asking for more data by pretending the upper layer tried to + * write it. + * + * Doing this avoids a special case in each layer where a partial buffer + * is kept set aside and checked before calling gt_tx_layer_ready(), leading + * to less code. + */ + if (tx->partial_buf) + { + struct io_buf *io_buf = tx->partial_buf; + + tx->partial_buf = NULL; + + /* this ends up calling this layer's queue func */ + ret = queue_data (tx, io_buf); + + /* + * Can't happen because layer wouldn't have invoked us. + */ + assert (ret != TX_FULL); + assert (ret != TX_EMPTY); + + /* + * Upper layer can't be safely invoked again, even if the partial + * buffer was completed, because we don't know if the lower layer has + * any more room. So, the lower layer must reinvoke tx_layer_ready() + * to write more data. + */ + return ret; + } + + ret = upper->ops->ready (upper); + assert (ret != TX_FULL); + + return ret; +} + +/*****************************************************************************/ + +void gt_tx_layer_enable (struct tx_layer *layer) +{ + layer->ops->enable (layer); +} + +void gt_tx_layer_disable (struct tx_layer *layer) +{ + layer->ops->disable (layer); +} diff -r 000000000000 -r d39e1d0d75b6 src/io/tx_layer.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/io/tx_layer.h Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,96 @@ +/* + * $Id: tx_layer.h,v 1.5 2004/01/31 13:33:17 hipnod Exp $ + * + * Copyright (C) 2003 giFT project (gift.sourceforge.net) + * + * 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. + */ + +#ifndef GIFT_GT_TX_LAYER_H_ +#define GIFT_GT_TX_LAYER_H_ + +/*****************************************************************************/ + +struct tx_layer_ops; +struct tx_layer; + +struct io_buf; +struct gt_tx_stack; + +/* + * Return codes from the TX stack functions that lets the caller know + * what processing occured. + */ +typedef enum tx_status +{ + TX_OK, + TX_FULL, /* lower layer became saturated */ + TX_EMPTY, /* no waiting data */ + TX_PARTIAL, /* buffer partially read */ + TX_ERROR, /* general error */ +} tx_status_t; + +struct tx_layer_ops +{ + BOOL (*init) (struct tx_layer *tx); + void (*destroy) (struct tx_layer *tx); + + /* + * If the layer is capable of consuming data (for example + * by sending it out on a connection), begin or stop flushing by obeying + * the 'stop' argument. Only the bottommost layer in a stack + * should implement this. + */ + void (*toggle) (struct tx_layer *tx, BOOL stop); + + /* upper layer has sent us a buffer */ + tx_status_t (*queue) (struct tx_layer *tx, struct io_buf *io_buf); + + /* lower layer wants us to send a buffer */ + tx_status_t (*ready) (struct tx_layer *tx); /* lower layer wants data */ + + /* enable/disable this layer completely */ + void (*enable) (struct tx_layer *tx); + void (*disable) (struct tx_layer *tx); +}; + +struct tx_layer +{ + void *udata; + struct tx_layer_ops *ops; + + struct tx_layer *upper; + struct tx_layer *lower; + + /* leftovers from previous queue operations */ + struct io_buf *partial_buf; + + struct gt_tx_stack *stack; + const char *name; +}; + +/*****************************************************************************/ + +struct tx_layer *gt_tx_layer_new (struct gt_tx_stack *stack, + const char *name, + struct tx_layer_ops *ops); +void gt_tx_layer_free (struct tx_layer *layer); + +void gt_tx_layer_enable (struct tx_layer *layer); +void gt_tx_layer_disable (struct tx_layer *layer); + +tx_status_t gt_tx_layer_queue (struct tx_layer *layer, + struct io_buf *buf); +tx_status_t gt_tx_layer_ready (struct tx_layer *layer); + +/*****************************************************************************/ + +#endif /* GIFT_GT_TX_LAYER_H_ */ diff -r 000000000000 -r d39e1d0d75b6 src/io/tx_link.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/io/tx_link.c Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,279 @@ +/* + * $Id: tx_link.c,v 1.10 2004/05/02 08:55:00 hipnod Exp $ + * + * Copyright (C) 2003 giFT project (gift.sourceforge.net) + * + * 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. + */ + +#include "gt_gnutella.h" + +#include "io/tx_stack.h" +#include "io/tx_layer.h" +#include "io/io_buf.h" + +/*****************************************************************************/ + +#define LINK_DEBUG 0 + +/*****************************************************************************/ + +struct tx_link +{ + input_id id; + struct io_buf *buf; +#if 0 + TCPC *c; +#endif +}; + +/*****************************************************************************/ + +static void deactivate_queue (struct tx_layer *tx); +static void activate_queue (struct tx_layer *tx); + +/*****************************************************************************/ + +static BOOL tx_link_init (struct tx_layer *tx) +{ + struct tx_link *tx_link; + + if (!(tx_link = NEW (struct tx_link))) + return FALSE; + + tx_link->id = 0; + tx_link->buf = NULL; + + /* store our layer-specific info in the toplevel layer */ + tx->udata = tx_link; + + return TRUE; +} + +static void tx_link_destroy (struct tx_layer *tx) +{ + struct tx_link *tx_link = tx->udata; + + input_remove (tx_link->id); + tx_link->id = 0; + + io_buf_free (tx_link->buf); + + FREE (tx_link); +} + +/*****************************************************************************/ + +static const char *tx_status_str (tx_status_t ret) +{ + switch (ret) + { + case TX_EMPTY: return "TX_EMPTY"; + case TX_FULL: return "TX_FULL"; + case TX_ERROR: return "TX_ERROR"; + case TX_OK: return "TX_OK"; + case TX_PARTIAL: return "TX_PARTIAL"; + default: return "TX_UNKNOWN"; + } +} + +static tx_status_t request_more_data (struct tx_layer *tx) +{ + int ret; + + /* + * Ask the layer above this one to send this layer data. + */ + if ((ret = gt_tx_layer_ready (tx)) == TX_ERROR) + return TX_ERROR; + + if (LINK_DEBUG) + GT->DBGSOCK (GT, tx->stack->c, "ret=%s", tx_status_str (ret)); + + return ret; +} + +static tx_status_t tx_link_process (struct tx_layer *tx, struct io_buf *io_buf) +{ + uint8_t *ptr; + size_t len; + int n; + + ptr = io_buf_read_ptr (io_buf); + len = io_buf_read_avail (io_buf); + + /* + * gt_tx_stack_send() calls tcp_send() to send the data on the + * connection. This is done because no interface for passing parameters + * like a TCPC is exposed anywhere to users of GtTxStack. + */ + if ((n = gt_tx_stack_send (tx->stack, ptr, len)) <= 0) + return TX_ERROR; + + /* + * Pop whatever bytes were written off the buffer. This may be less than + * the the whole buffer in the case of a short write. In that case we + * don't remove the buffer, but continue writing it later. + */ + io_buf_pop (io_buf, n); + + return TX_OK; +} + +/* + * The packet-sending input callback. + */ +static void tx_link_send_data (int fd, input_id id, struct tx_layer *tx) +{ + struct tx_link *tx_link = tx->udata; + struct io_buf *io_buf; + size_t len; + + /* + * If there's no data to write, request more from the upper layer. + */ + if (!(io_buf = tx_link->buf)) + { + tx_status_t ret; + + if ((ret = request_more_data (tx)) == TX_ERROR) + { + gt_tx_stack_abort (tx->stack); + return; + } + + /* deactivate the queue until more data arrives */ + if (ret == TX_EMPTY) + { + if (LINK_DEBUG) + GT->DBGSOCK (GT, tx->stack->c, "empty, deactivating"); + + assert (tx_link->buf == NULL); + deactivate_queue (tx); + return; + } + + /* upper layer must have called our queue function */ + assert (tx_link->buf != NULL); + io_buf = tx_link->buf; + + /* fall through and send the buffer */ + } + + len = io_buf_read_avail (io_buf); + + /* + * It is safe to abort the tx-stack if we encountered an error because + * there are no other callers into it currently. + */ + if (tx_link_process (tx, io_buf) == TX_ERROR) + { + gt_tx_stack_abort (tx->stack); + return; + } + + if (io_buf_read_avail (io_buf) > 0) + { + assert (io_buf_read_avail (io_buf) < len); + return; + } + + /* + * The complete buffer was written. This input callback will continue + * grabbing data from the upper layer until gt_tx_layer_ready() returns + * TX_EMPTY or TX_ERROR. + */ + io_buf_free (io_buf); + tx_link->buf = NULL; +} + +static void activate_queue (struct tx_layer *tx) +{ + struct tx_link *tx_link = tx->udata; + + /* skip if input already active */ + if (tx_link->id) + return; + + tx_link->id = input_add (tx->stack->c->fd, tx, INPUT_WRITE, + (InputCallback)tx_link_send_data, 0); +} + +static void deactivate_queue (struct tx_layer *tx) +{ + struct tx_link *tx_link = tx->udata; + + if (!tx_link->id) + return; + + input_remove (tx_link->id); + tx_link->id = 0; +} + +/* begin or end consuming data in this layer */ +static void tx_link_toggle (struct tx_layer *tx, BOOL stop) +{ + if (stop) + deactivate_queue (tx); + else + activate_queue (tx); +} + +/*****************************************************************************/ + +static tx_status_t tx_link_queue (struct tx_layer *tx, struct io_buf *io_buf) +{ + struct tx_link *tx_link = tx->udata; + + if (tx_link->buf != NULL) + { + /* this layer is "saturated" with its single packet */ + return TX_FULL; + } + + tx_link->buf = io_buf; + activate_queue (tx); + + /* TODO: need to change this if we change to writing as much + * as possible synchronously instead of one message from the handler */ + return TX_OK; +} + +static tx_status_t tx_link_ready (struct tx_layer *tx) +{ + abort (); /* can't handle layers underneath us */ + return TX_ERROR; +} + +/*****************************************************************************/ + +static void tx_link_enable (struct tx_layer *tx) +{ + activate_queue (tx); +} + +static void tx_link_disable (struct tx_layer *tx) +{ + deactivate_queue (tx); +} + +/*****************************************************************************/ + +struct tx_layer_ops gt_tx_link_ops = +{ + tx_link_init, + tx_link_destroy, + tx_link_toggle, + tx_link_queue, + tx_link_ready, + tx_link_enable, + tx_link_disable, +}; diff -r 000000000000 -r d39e1d0d75b6 src/io/tx_link.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/io/tx_link.h Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,20 @@ +/* + * $Id: tx_link.h,v 1.2 2003/09/17 17:44:11 hipnod Exp $ + * + * Copyright (C) 2003 giFT project (gift.sourceforge.net) + * + * 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. + */ + +#ifndef GIFT_GT_TX_LINK_H_ +#define GIFT_GT_TX_LINK_H_ + +#endif /* GIFT_GT_TX_LINK_H_ */ diff -r 000000000000 -r d39e1d0d75b6 src/io/tx_packet.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/io/tx_packet.c Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,415 @@ +/* + * $Id: tx_packet.c,v 1.10 2005/01/04 14:59:23 mkern Exp $ + * + * Copyright (C) 2004 giFT project (gift.sourceforge.net) + * + * 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. + */ + +#include "gt_gnutella.h" +#include "gt_packet.h" /* packet manipulation macros */ + +#include "io/tx_stack.h" +#include "io/tx_layer.h" +#include "io/io_buf.h" + +/*****************************************************************************/ + +#define TX_PACKET_DEBUG 0 + +/*****************************************************************************/ + +/* + * Relative packet priority ratios. These control how many packets of a + * certain type are sent prior to looking for other types. For each type we + * maintain an independent FIFO queue. Each time a packet can be sent, each + * queue is checked. + * + * Packets in a queue will be sent while the ratio is greater than zero, and + * there are no higher priority packets waiting. Once there are no queues + * with both waiting packets and a non-zero ratio, the queue priority ratios + * are reset so that more packets can be sent. This process continues until + * the lower layer becomes saturated. + * + * Note that it is bad idea to reset the priority ratios only when all the + * ratios are zero, because this could lead to starvation for some packet + * types. + * + * Pushes have the highest priorty of normal messages. Also, there is a + * special 'urgent' queue that has higher priority, that includes replies to + * keepalive pings and other important high-priority messages. + */ +#define URGENT_RATIO INT_MAX +#define PUSH_RATIO 5 +#define QHIT_RATIO 4 +#define QUERY_RATIO 3 +#define PONG_RATIO 2 +#define PING_RATIO 1 +#define MISC_RATIO 1 + +#define NR_QUEUES (7) + +/*****************************************************************************/ + +struct packet_queue +{ + gt_packet_type_t msg_type; + size_t ratio; /* how many packets left on this turn? */ + size_t bytes_queued; /* total bytes queued */ + List *queue; +}; + +struct tx_packet +{ + struct packet_queue queues[NR_QUEUES]; + int total_pkts; /* used to quickly test if empty */ +}; + +/*****************************************************************************/ +/* DEBUGGING/TRACING */ + +#if TX_PACKET_DEBUG +/* ripped from gt_packet.c */ +static const char *packet_command_str (uint8_t cmd) +{ + static char buf[16]; + + switch (cmd) + { + case GT_MSG_PING: return "PING"; + case GT_MSG_PING_REPLY: return "PONG"; + case GT_MSG_BYE: return "BYE"; + case GT_MSG_QUERY_ROUTE: return "QROUTE"; + case GT_MSG_VENDOR: return "VMSG"; + case GT_MSG_VENDOR_STD: return "VMSG-S"; + case GT_MSG_PUSH: return "PUSH"; + case GT_MSG_QUERY: return "QUERY"; + case GT_MSG_QUERY_REPLY: return "HITS"; + + default: + snprintf (buf, sizeof (buf), "[<%02hx>]", cmd); + return buf; + } +} + +static void dump_packet (struct io_buf *buf, String *str) +{ + uint8_t cmd = get_command (buf->data); + string_appendf (str, "%s,", packet_command_str (cmd)); +} + +static void trace_queue_list (List *queue, String *str) +{ + list_foreach (queue, (ListForeachFunc)dump_packet, str); +} +#endif /* TX_PACKET_DEBUG */ + +static void trace_queue (struct tx_layer *tx, const char *id) +{ +#if TX_PACKET_DEBUG + struct tx_packet *tx_packet = tx->udata; + int i; + String *s; + TCPC *c; + + if (!(s = string_new (NULL, 0, 0, TRUE))) + return; + + c = tx->stack->c; + string_appendf (s, "{%s totalpkts=%d ", id, tx_packet->total_pkts); + + for (i = 0; i < NR_QUEUES; i++) + trace_queue_list (tx_packet->queues[i].queue, s); + + string_append (s, "}"); + + GT->DBGSOCK (GT, c, "%s", s->str); + string_free (s); +#endif +} + +/*****************************************************************************/ + +/* return the queue on which this message should go */ +static size_t get_queue (struct io_buf *msg) +{ + uint8_t cmd; + + cmd = get_command (msg->data); + + switch (cmd) + { + default: + abort (); + + case GT_MSG_VENDOR: + case GT_MSG_VENDOR_STD: + case GT_MSG_QUERY_ROUTE: + return 6; + + case GT_MSG_PING: + { + /* queue keep-alive pings in the urgent queue */ + if (get_ttl (msg->data) == 1 && get_hops (msg->data) == 0) + return 0; + } + return 5; + + case GT_MSG_PING_REPLY: + { + /* + * Queue replies to keep-alive ping in the urgent queue. + * + * This allows the remote end to starve it's own connection + * with a series of keep-alive pings. Only flow-control + * can handle this. + */ + if (get_ttl (msg->data) == 1 && get_hops (msg->data) == 0) + return 0; + } + return 4; + + case GT_MSG_QUERY: + { + /* make queries from this node more important */ + if (get_ttl (msg->data) == 1 && get_hops (msg->data) == 0) + return 1; + } + return 3; + + case GT_MSG_QUERY_REPLY: + return 2; + + case GT_MSG_PUSH: + return 1; + + case GT_MSG_BYE: + return 0; + } + + abort (); +} + +static void enqueue_packet (struct packet_queue *pkt_queue, struct io_buf *msg) +{ + pkt_queue->queue = list_append (pkt_queue->queue, msg); +} + +/* + * Called from upper layer when it wants to send us a message buffer. + */ +static tx_status_t tx_packet_queue (struct tx_layer *tx, struct io_buf *io_buf) +{ + struct tx_packet *tx_packet = tx->udata; + size_t queue_nr; + + queue_nr = get_queue (io_buf); + + assert (queue_nr < NR_QUEUES); + enqueue_packet (&tx_packet->queues[queue_nr], io_buf); + + tx_packet->total_pkts++; + assert (tx_packet->total_pkts > 0); + + trace_queue (tx, "*0*"); + + return TX_OK; +} + +/*****************************************************************************/ + +static void set_queue (struct packet_queue *queue, gt_packet_type_t msg_type, + size_t prio) +{ + queue->msg_type = msg_type; + queue->ratio = prio; +} + +static void reset_ratios (struct packet_queue *queue, size_t len) +{ + set_queue (&queue[0], 0xff, URGENT_RATIO); + set_queue (&queue[1], GT_MSG_PUSH, PUSH_RATIO); + set_queue (&queue[2], GT_MSG_QUERY_REPLY, QHIT_RATIO); + set_queue (&queue[3], GT_MSG_QUERY, QUERY_RATIO); + set_queue (&queue[4], GT_MSG_PING_REPLY, PONG_RATIO); + set_queue (&queue[5], GT_MSG_PING, PING_RATIO); + set_queue (&queue[6], 0xff, MISC_RATIO); +} + +/*****************************************************************************/ + +/* + * Try to send a single message buffer from the packet queue to the lower + * layer. If the lower layer has become saturated, return FALSE. + * + * The lower layer takes responsibility for the messages sent to it in + * entirety in gt_tx_layer_queue() unless it is full. In that case it + * returns TX_FULL. + */ +static tx_status_t shift_queue (struct tx_layer *tx, + struct tx_packet *tx_packet, + struct packet_queue *pkt_queue) +{ + List *msg_l; + struct io_buf *msg; + tx_status_t ret; + + msg_l = list_nth (pkt_queue->queue, 0); + msg = msg_l->data; + + ret = gt_tx_layer_queue (tx, msg); + + if (ret != TX_OK) + { + assert (ret != TX_EMPTY); /* impossible to be empty */ + return ret; + } + + /* shift this packet off the queue */ + pkt_queue->queue = list_remove_link (pkt_queue->queue, msg_l); + + tx_packet->total_pkts--; + assert (tx_packet->total_pkts >= 0); + + if (TX_PACKET_DEBUG) + trace_queue (tx, "*2*"); + + return ret; +} + +static tx_status_t service_queues (struct tx_layer *layer, + struct tx_packet *tx_packet) +{ + int i; + tx_status_t ret; + + for (i = 0; i < NR_QUEUES; i++) + { + struct packet_queue *pkt_queue = &tx_packet->queues[i]; + + /* skip if ratio is small */ + while (pkt_queue->ratio > 0 && pkt_queue->queue != NULL) + { + ret = shift_queue (layer, tx_packet, pkt_queue); + pkt_queue->ratio--; + + if (ret == TX_FULL) + return TX_OK; + + if (ret != TX_OK) + return ret; + } + } + + /* reset the ratios to write more data */ + reset_ratios (tx_packet->queues, NR_QUEUES); + + /* we wrote something, so return ok */ + if (tx_packet->total_pkts == 0) + return TX_OK; + + /* tail recurse until lower layer is saturated */ + return service_queues (layer, tx_packet); +} + +/* + * Gets called when the lower layer is writable. + */ +static tx_status_t tx_packet_ready (struct tx_layer *tx) +{ + struct tx_packet *tx_packet = tx->udata; + + if (tx_packet->total_pkts == 0) + return TX_EMPTY; + + if (TX_PACKET_DEBUG) + trace_queue (tx, "*1*"); + + return service_queues (tx, tx_packet); +} + +/*****************************************************************************/ + +static BOOL tx_packet_init (struct tx_layer *tx) +{ + struct tx_packet *tx_packet; + int i; + + if (!(tx_packet = malloc (sizeof (struct tx_packet)))) + return FALSE; + + tx_packet->total_pkts = 0; + + for (i = 0; i < NR_QUEUES; i++) + { + tx_packet->queues[i].queue = NULL; + tx_packet->queues[i].bytes_queued = 0; + } + + reset_ratios (tx_packet->queues, NR_QUEUES); + + tx->udata = tx_packet; + + return TRUE; +} + +static BOOL free_io_buf (struct io_buf *io_buf, void *udata) +{ + io_buf_free (io_buf); + return TRUE; +} + +static void flush_packets (struct packet_queue *pkt_queue) +{ + list_foreach_remove (pkt_queue->queue, (ListForeachFunc)free_io_buf, NULL); + pkt_queue = NULL; +} + +static void tx_packet_destroy (struct tx_layer *tx) +{ + struct tx_packet *tx_packet = tx->udata; + int i; + + for (i = 0; i < NR_QUEUES; i++) + flush_packets (&tx_packet->queues[i]); + + FREE (tx_packet); +} + +static void tx_packet_consume (struct tx_layer *tx, BOOL stop) +{ + /* nothing */ +} + +/*****************************************************************************/ + +static void tx_packet_enable (struct tx_layer *tx) +{ + /* TODO */ +} + +static void tx_packet_disable (struct tx_layer *tx) +{ + /* TODO */ +} + +/*****************************************************************************/ + +struct tx_layer_ops gt_tx_packet_ops = +{ + tx_packet_init, + tx_packet_destroy, + tx_packet_consume, + tx_packet_queue, + tx_packet_ready, + tx_packet_enable, + tx_packet_disable, +}; diff -r 000000000000 -r d39e1d0d75b6 src/io/tx_stack.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/io/tx_stack.c Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,255 @@ +/* + * $Id: tx_stack.c,v 1.12 2004/04/17 06:07:33 hipnod Exp $ + * + * Copyright (C) 2003 giFT project (gift.sourceforge.net) + * + * 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. + */ + +#include "gt_gnutella.h" +#include "gt_packet.h" /* gt_packet_log XXX */ + +#include "io/tx_stack.h" +#include "io/tx_layer.h" +#include "io/io_buf.h" + +/*****************************************************************************/ + +extern struct tx_layer_ops gt_tx_packet_ops; +extern struct tx_layer_ops gt_tx_deflate_ops; +extern struct tx_layer_ops gt_tx_link_ops; + +/*****************************************************************************/ + +static struct use_tx_layer +{ + const char *name; + struct tx_layer_ops *ops; +} tx_layers[] = +{ + { "tx_link", >_tx_link_ops, }, + { "tx_deflate", >_tx_deflate_ops }, + { "tx_packet", >_tx_packet_ops }, +}; + +/*****************************************************************************/ + +static void foreach_tx_child (struct tx_layer *tx, + void (*exec) (struct tx_layer *tx)) +{ + struct tx_layer *next; + + while (tx != NULL) + { + /* grab the next element first so the callback can call free */ + next = tx->lower; + + exec (tx); + + tx = next; + } +} + +static struct tx_layer *tx_push_layer (struct tx_layer *below, + struct tx_layer *above) +{ + if (above) + above->lower = below; + + if (below) + below->upper = above; + + return above; +} + +static void destroy_tx (struct tx_layer *tx) +{ + gt_tx_layer_free (tx); +} + +static void disable_tx (struct tx_layer *tx) +{ + gt_tx_layer_disable (tx); +} + +static void disable_all_tx_layers (struct tx_layer *layers) +{ + if (!layers) + return; + + assert (layers->upper == NULL); + + foreach_tx_child (layers, disable_tx); +} + +static void free_all_tx_layers (struct tx_layer *layers) +{ + if (!layers) + return; + + disable_all_tx_layers (layers); + foreach_tx_child (layers, destroy_tx); +} + +static struct tx_layer *alloc_tx_layers (GtTxStack *stack, BOOL tx_deflated) +{ + struct tx_layer *new_layer; + struct tx_layer *layer = NULL; + int i; + + for (i = 0; i < sizeof(tx_layers) / sizeof(tx_layers[0]); i++) + { + if (!strcmp (tx_layers[i].name, "tx_deflate") && !tx_deflated) + continue; + + if (!(new_layer = gt_tx_layer_new (stack, tx_layers[i].name, + tx_layers[i].ops))) + { + foreach_tx_child (layer, destroy_tx); + return NULL; + } + + layer = tx_push_layer (layer, new_layer); + } + + return layer; +} + +GtTxStack *gt_tx_stack_new (TCPC *c, BOOL tx_deflated) +{ + struct gt_tx_stack *stack; + int size; + + if (!(stack = NEW (struct gt_tx_stack))) + return NULL; + + if (!(stack->layers = alloc_tx_layers (stack, tx_deflated))) + { + free (stack); + return NULL; + } + + /* set the send buffer to a not too high value */ + size = 256; + + if (setsockopt (c->fd, SOL_SOCKET, SO_SNDBUF, &size, sizeof (size)) != 0) + GT->DBGSOCK (GT, c, "Error setting sndbuf size: %s", GIFT_NETERROR()); + + stack->c = c; + stack->start_time = time (NULL); + + return stack; +} + +/*****************************************************************************/ + +void gt_tx_stack_free (GtTxStack *stack) +{ + if (!stack) + return; + + free_all_tx_layers (stack->layers); + FREE (stack); +} + +void gt_tx_stack_abort (GtTxStack *stack) +{ + stack->cleanup (stack, stack->udata); +} + +/*****************************************************************************/ + +static void activate_tx (struct tx_layer *tx) +{ + tx->ops->toggle (tx, FALSE); +} + +/* + * Start sending data down the stack. Called asynchronously by the topmost + * layer. + */ +void gt_tx_stack_activate (GtTxStack *stack) +{ + foreach_tx_child (stack->layers, activate_tx); +} + +static void deactivate_tx (struct tx_layer *tx) +{ + tx->ops->toggle (tx, TRUE); +} + +void gt_tx_stack_deactivate (GtTxStack *stack) +{ + foreach_tx_child (stack->layers, deactivate_tx); +} + +/*****************************************************************************/ + +BOOL gt_tx_stack_queue (GtTxStack *stack, const uint8_t *data, size_t len) +{ + struct io_buf *io_buf; + struct tx_layer *tx; + uint8_t *ptr; + tx_status_t ret; + GtPacket pkt; + + if (!(io_buf = io_buf_new (len))) + return FALSE; + + ptr = io_buf_write_ptr (io_buf); + + memcpy (ptr, data, len); + io_buf_push (io_buf, len); + + tx = stack->layers; + + /* send the data on its way down the stack */ + if ((ret = tx->ops->queue (tx, io_buf)) != TX_OK) + { + GT->DBGSOCK (GT, stack->c, "bad txstatus: %d", ret); + gt_tx_stack_abort (stack); + return FALSE; + } + + pkt.data = (unsigned char *)data; + pkt.len = len; + + gt_packet_log (&pkt, stack->c, TRUE); + + /* + * Activate the stack if not active already. NOTE: this actually + * sucks bad when using compression because we end up enabling, then + * disabling right away until some data is compressed by nagle timer. + */ + gt_tx_stack_activate (stack); + + return TRUE; +} + +int gt_tx_stack_send (GtTxStack *stack, const uint8_t *data, size_t len) +{ + int ret; + + /* check if the file descriptor has an error */ + if (net_sock_error (stack->c->fd)) + return -1; + + ret = tcp_send (stack->c, (unsigned char *)data, len); + + return ret; +} + +void gt_tx_stack_set_handler (GtTxStack *stack, GtTxStackCleanup cleanup, + void *udata) +{ + stack->cleanup = cleanup; + stack->udata = udata; +} diff -r 000000000000 -r d39e1d0d75b6 src/io/tx_stack.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/io/tx_stack.h Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,58 @@ +/* + * $Id: tx_stack.h,v 1.6 2004/04/17 06:07:33 hipnod Exp $ + * + * Copyright (C) 2003 giFT project (gift.sourceforge.net) + * + * 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. + */ + +#ifndef GIFT_GT_TX_STACK_H_ +#define GIFT_GT_TX_STACK_H_ + +/*****************************************************************************/ + +typedef struct gt_tx_stack GtTxStack; + +typedef void (*GtTxStackCleanup) (GtTxStack *stack, void *udata); + +struct gt_tx_stack +{ + struct tx_layer *layers; + GtTxStackCleanup cleanup; + + TCPC *c; + void *udata; + + time_t start_time; +}; + +/*****************************************************************************/ + +GtTxStack *gt_tx_stack_new (TCPC *c, BOOL tx_deflated); +void gt_tx_stack_free (GtTxStack *stack); + +void gt_tx_stack_abort (GtTxStack *stack); + +void gt_tx_stack_set_handler (GtTxStack *stack, + GtTxStackCleanup cleanup, + void *udata); + +BOOL gt_tx_stack_queue (GtTxStack *stack, const uint8_t *data, + size_t len); + +/* used by tx_link to send data on the connection...argh, i can't + * come up with a good interface for this */ +int gt_tx_stack_send (GtTxStack *stack, const uint8_t *data, + size_t len); + +/*****************************************************************************/ + +#endif /* GIFT_GT_TX_STACK_H_ */ diff -r 000000000000 -r d39e1d0d75b6 src/message/Makefile.am --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/message/Makefile.am Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,25 @@ +# $Id: Makefile.am,v 1.4 2004/01/07 07:24:43 hipnod Exp $ + +AM_CFLAGS = \ + $(LIBXML2_CFLAGS) \ + $(GNUTELLA_CFLAGS) + +INCLUDES = \ + -I$(top_srcdir)/src + +noinst_LTLIBRARIES = \ + libgt_message.la + +libgt_message_la_SOURCES = \ + bye.c \ + gt_message.c \ + gt_message.h \ + msg_handler.h \ + ping.c \ + ping_reply.c \ + push.c \ + query.c \ + query_reply.c \ + query_route.c \ + vendor.c + diff -r 000000000000 -r d39e1d0d75b6 src/message/Makefile.in --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/message/Makefile.in Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,460 @@ +# Makefile.in generated by automake 1.7.9 from Makefile.am. +# @configure_input@ + +# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 +# 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@ + +# $Id: Makefile.am,v 1.4 2004/01/07 07:24:43 hipnod Exp $ + +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 = : +host_triplet = @host@ +ACLOCAL = @ACLOCAL@ +AMDEP_FALSE = @AMDEP_FALSE@ +AMDEP_TRUE = @AMDEP_TRUE@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +GNUTELLA_CFLAGS = @GNUTELLA_CFLAGS@ +GNUTELLA_LIBS = @GNUTELLA_LIBS@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIBXML2_CFLAGS = @LIBXML2_CFLAGS@ +LIBXML2_LIBS = @LIBXML2_LIBS@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ +MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ +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@ +PKG_CONFIG = @PKG_CONFIG@ +PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ +RANLIB = @RANLIB@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +USE_ZLIB = @USE_ZLIB@ +VERSION = @VERSION@ +XML2_CONFIG = @XML2_CONFIG@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +ac_ct_RANLIB = @ac_ct_RANLIB@ +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@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +datadir = @datadir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +oldincludedir = @oldincludedir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ + +AM_CFLAGS = \ + $(LIBXML2_CFLAGS) \ + $(GNUTELLA_CFLAGS) + + +INCLUDES = \ + -I$(top_srcdir)/src + + +noinst_LTLIBRARIES = \ + libgt_message.la + + +libgt_message_la_SOURCES = \ + bye.c \ + gt_message.c \ + gt_message.h \ + msg_handler.h \ + ping.c \ + ping_reply.c \ + push.c \ + query.c \ + query_reply.c \ + query_route.c \ + vendor.c + +subdir = src/message +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) + +libgt_message_la_LDFLAGS = +libgt_message_la_LIBADD = +am_libgt_message_la_OBJECTS = bye.lo gt_message.lo ping.lo ping_reply.lo \ + push.lo query.lo query_reply.lo query_route.lo vendor.lo +libgt_message_la_OBJECTS = $(am_libgt_message_la_OBJECTS) + +DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/bye.Plo ./$(DEPDIR)/gt_message.Plo \ +@AMDEP_TRUE@ ./$(DEPDIR)/ping.Plo ./$(DEPDIR)/ping_reply.Plo \ +@AMDEP_TRUE@ ./$(DEPDIR)/push.Plo ./$(DEPDIR)/query.Plo \ +@AMDEP_TRUE@ ./$(DEPDIR)/query_reply.Plo \ +@AMDEP_TRUE@ ./$(DEPDIR)/query_route.Plo ./$(DEPDIR)/vendor.Plo +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) \ + $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +DIST_SOURCES = $(libgt_message_la_SOURCES) +DIST_COMMON = $(srcdir)/Makefile.in Makefile.am +SOURCES = $(libgt_message_la_SOURCES) + +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4) + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu src/message/Makefile +Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in $(top_builddir)/config.status + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe) + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" = "$$p" && dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libgt_message.la: $(libgt_message_la_OBJECTS) $(libgt_message_la_DEPENDENCIES) + $(LINK) $(libgt_message_la_LDFLAGS) $(libgt_message_la_OBJECTS) $(libgt_message_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) core *.core + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bye.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gt_message.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ping.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ping_reply.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/push.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/query.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/query_reply.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/query_route.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vendor.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \ +@am__fastdepCC_TRUE@ -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \ +@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ +@am__fastdepCC_TRUE@ fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$< + +.c.obj: +@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \ +@am__fastdepCC_TRUE@ -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \ +@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ +@am__fastdepCC_TRUE@ fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi` + +.c.lo: +@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \ +@am__fastdepCC_TRUE@ -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; \ +@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ +@am__fastdepCC_TRUE@ fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Plo' tmpdepfile='$(DEPDIR)/$*.TPlo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +distclean-libtool: + -rm -f libtool +uninstall-info-am: + +ETAGS = etags +ETAGSFLAGS = + +CTAGS = ctags +CTAGSFLAGS = + +tags: TAGS + +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: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(ETAGS_ARGS)$$tags$$unique" \ + || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique + +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) + +top_distdir = ../.. +distdir = $(top_distdir)/$(PACKAGE)-$(VERSION) + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ + list='$(DISTFILES)'; for file in $$list; do \ + case $$file in \ + $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ + $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ + esac; \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test "$$dir" != "$$file" && test "$$dir" != "."; then \ + dir="/$$dir"; \ + $(mkinstalldirs) "$(distdir)$$dir"; \ + else \ + dir=''; \ + fi; \ + if test -d $$d/$$file; then \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) + +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-libtool distclean-tags + +dvi: dvi-am + +dvi-am: + +info: info-am + +info-am: + +install-data-am: + +install-exec-am: + +install-info: install-info-am + +install-man: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-info-am + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLTLIBRARIES ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am info info-am install \ + install-am install-data install-data-am install-exec \ + install-exec-am install-info install-info-am install-man \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool pdf \ + pdf-am ps ps-am tags uninstall uninstall-am uninstall-info-am + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff -r 000000000000 -r d39e1d0d75b6 src/message/bye.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/message/bye.c Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,40 @@ +/* + * $Id: bye.c,v 1.2 2004/01/07 07:27:18 hipnod Exp $ + * + * Copyright (C) 2001-2003 giFT project (gift.sourceforge.net) + * + * 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. + */ + +#include "gt_gnutella.h" +#include "message/msg_handler.h" + +/* sent upon connection-close by some nodes */ +GT_MSG_HANDLER(gt_msg_bye) +{ + uint16_t code; + char *reason; + + code = gt_packet_get_uint16 (packet); + reason = gt_packet_get_str (packet); + + /* log the message and code and be done with it */ + if (MSG_DEBUG) + { + GT->DBGFN (GT, "%s:%hu sent bye packet: code %hu, reason: %s", + net_ip_str (GT_NODE(c)->ip), GT_NODE(c)->gt_port, + code, reason); + } + + /* we incur the TIME_WAIT penalty instead of the remote node if we + * close before they do */ + gt_node_disconnect (c); +} diff -r 000000000000 -r d39e1d0d75b6 src/message/gt_message.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/message/gt_message.c Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,251 @@ +/* + * $Id: gt_message.c,v 1.6 2004/01/07 07:24:43 hipnod Exp $ + * + * Copyright (C) 2001-2003 giFT project (gift.sourceforge.net) + * + * 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. + */ + +#include "gt_gnutella.h" +#include "msg_handler.h" + +#include "gt_netorg.h" +#include "gt_connect.h" + +#include "gt_utils.h" + +#include "io/rx_stack.h" /* gt_rx_stack_new */ +#include "io/tx_stack.h" /* gt_tx_stack_new */ + +#include "gt_message.h" + +/*****************************************************************************/ + +extern void gt_vmsg_send_supported (GtNode *node); /* vendor.c */ + +/*****************************************************************************/ + +extern GT_MSG_HANDLER(gt_msg_ping); +extern GT_MSG_HANDLER(gt_msg_ping_reply); +extern GT_MSG_HANDLER(gt_msg_bye); +extern GT_MSG_HANDLER(gt_msg_push); +extern GT_MSG_HANDLER(gt_msg_query_route); +extern GT_MSG_HANDLER(gt_msg_query); +extern GT_MSG_HANDLER(gt_msg_query_reply); +extern GT_MSG_HANDLER(gt_msg_vendor); + +static struct msg_handler +{ + uint8_t command; + GtMessageHandler func; +} +msg_handler_table[] = +{ + /* table listed not in numerical order, but by frequency of messages */ + { GT_MSG_QUERY, gt_msg_query }, + { GT_MSG_QUERY_REPLY, gt_msg_query_reply }, + { GT_MSG_PING_REPLY, gt_msg_ping_reply }, + { GT_MSG_PING, gt_msg_ping }, + { GT_MSG_PUSH, gt_msg_push }, + { GT_MSG_QUERY_ROUTE, gt_msg_query_route }, + { GT_MSG_VENDOR, gt_msg_vendor }, + { GT_MSG_VENDOR_STD, gt_msg_vendor }, /* same as non-standard */ + { GT_MSG_BYE, gt_msg_bye }, + { 0x00, NULL } +}; + +/*****************************************************************************/ + +static BOOL handle_message (TCPC *c, GtPacket *packet) +{ + struct msg_handler *handler; + uint8_t command; + + if (!packet) + return FALSE; + + command = gt_packet_command (packet); + + /* locate the handler */ + for (handler = msg_handler_table; handler->func; handler++) + { + if (command == handler->command) + { + handler->func (GT_NODE(c), c, packet); + return TRUE; + } + } + + GIFT_ERROR (("[%s] found no handler for cmd %hx, payload %hx", + net_ip_str (GT_NODE(c)->ip), command, + gt_packet_payload_len (packet))); + + return FALSE; +} + +static void cleanup_node_rx (GtNode *node) +{ + TCPC *c = GT_CONN(node); + + assert (GT_NODE(c) == node); + gt_node_disconnect (c); +} + +/* TODO: make this the same type as cleanup_node_rx */ +static void cleanup_node_tx (GtTxStack *stack, GtNode *node) +{ + TCPC *c = GT_CONN(node); + + assert (GT_NODE(c) == node); + gt_node_disconnect (c); +} + +static void recv_packet (GtNode *node, GtPacket *packet) +{ + assert (packet != NULL); + + gt_packet_log (packet, GT_CONN(node), FALSE); + (void)handle_message (node->c, packet); +} + +/* Find out what our IP is */ +static in_addr_t get_self_ip (TCPC *c) +{ + in_addr_t our_ip; + char *ip_str; + + if ((ip_str = dataset_lookupstr (GT_NODE(c)->hdr, "remote-ip"))) + { + /* + * Since we may be firewalled, we may not know what our ip is. So set + * the ip from what the other node thinks it is. + * + * Doing this allows you to setup port forwarding on a firewall + * and accept incoming connections. + */ + our_ip = net_ip (ip_str); + } + else + { + struct sockaddr_in saddr; + int len = sizeof (saddr); + + if (getsockname (c->fd, (struct sockaddr *)&saddr, &len) == 0) + our_ip = saddr.sin_addr.s_addr; + else + our_ip = net_ip ("127.0.0.1"); + } + + return our_ip; +} + +/* + * Begin a node connection with the peer on the specified TCPC. + * + * We arrive here from either an incoming or outgoing connection. + * This is the entrance point to the main packet-reading loop. + * + * After setting up the connection, we send the node a ping. + * If it doesn't respond after a timeout, we will destroy the + * connection. + */ +void gnutella_start_connection (int fd, input_id id, TCPC *c) +{ + GtPacket *ping; + GtNode *node; + + node = GT_NODE(c); + assert (GT_CONN(node) == c); + + /* remove the old input handler first -- need to before sending data */ + input_remove (id); + + if (net_sock_error (c->fd)) + { + if (HANDSHAKE_DEBUG) + gt_node_error (c, NULL); + + gt_node_disconnect (c); + return; + } + + /* if this is the crawler, disconnect */ + if (dataset_lookupstr (GT_NODE(c)->hdr, "crawler")) + { + if (HANDSHAKE_DEBUG) + GT->DBGSOCK (GT, c, "closing crawler connection"); + + gt_node_disconnect (c); + return; + } + + if (!(node->rx_stack = gt_rx_stack_new (node, c, node->rx_inflated))) + { + if (HANDSHAKE_DEBUG) + GT->DBGSOCK (GT, c, "error allocating rx_stack"); + + gt_node_disconnect (c); + return; + } + + if (!(node->tx_stack = gt_tx_stack_new (c, node->tx_deflated))) + { + if (HANDSHAKE_DEBUG) + GT->DBGSOCK (GT, c, "error allocating tx stack"); + + gt_node_disconnect (c); + return; + } + + /* determine the other node's opinion of our IP address */ + node->my_ip = get_self_ip (c); + + /* determine the other ends port */ + peer_addr (c->fd, NULL, &node->peer_port); + + if (HANDSHAKE_DEBUG) + { + GT->DBGSOCK (GT, c, "self IP=[%s]", net_ip_str (node->my_ip)); + GT->DBGSOCK (GT, c, "peer port=%hu", node->peer_port); + } + + if (!(ping = gt_packet_new (GT_MSG_PING, 1, NULL))) + { + gt_node_disconnect (c); + return; + } + + /* set the state as intermediately connecting and mark the node connected + * only when it replies to our ping */ + gt_node_state_set (node, GT_NODE_CONNECTING_2); + + /* give the connection some more time */ + gnutella_set_handshake_timeout (c, TIMEOUT_3 * SECONDS); + + /* + * Setup our packet handlers, for both receiving and sending packets. + */ + gt_rx_stack_set_handler (node->rx_stack, + (GtRxStackHandler)recv_packet, + (GtRxStackCleanup)cleanup_node_rx, + node); + + gt_tx_stack_set_handler (node->tx_stack, + (GtTxStackCleanup)cleanup_node_tx, + node); + + /* send first ping */ + gt_packet_send (c, ping); + gt_packet_free (ping); + + /* send MessagesSupported Vendor message, if this node supports it */ + gt_vmsg_send_supported (node); +} diff -r 000000000000 -r d39e1d0d75b6 src/message/gt_message.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/message/gt_message.h Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,31 @@ +/* + * $Id: gt_message.h,v 1.3 2004/03/24 06:21:13 hipnod Exp $ + * + * Copyright (C) 2001-2003 giFT project (gift.sourceforge.net) + * + * 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. + */ + +#ifndef GIFT_GT_MESSAGE_H_ +#define GIFT_GT_MESSAGE_H_ + +/*****************************************************************************/ + +void gnutella_start_connection (int fd, input_id id, TCPC *c); + +/*****************************************************************************/ + +/* HACK: this isn't available in libgift, but giftd */ +extern unsigned long upload_availability (void); + +/*****************************************************************************/ + +#endif /* GIFT_GT_MESSAGE_H_ */ diff -r 000000000000 -r d39e1d0d75b6 src/message/msg_handler.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/message/msg_handler.h Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,71 @@ +/* + * $Id: msg_handler.h,v 1.3 2004/01/07 07:24:43 hipnod Exp $ + * + * Copyright (C) 2001-2003 giFT project (gift.sourceforge.net) + * + * 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. + */ + +#ifndef GIFT_GT_MSG_HANDLER_H_ +#define GIFT_GT_MSG_HANDLER_H_ + +/*****************************************************************************/ + +#define MSG_DEBUG gt_config_get_int("message/debug=0") + +/*****************************************************************************/ + +/* Erm, ugly node state encoded in a query-hit */ +typedef enum gt_eqhd_type1 +{ + EQHD1_EMPTY = 0x00, /* no flags set */ + EQHD1_PUSH_FLAG = 0x01, /* send a push request for this result */ + EQHD1_HAS_BAD = 0x02, /* bad flag in qhd[2] is signficant,always 0? */ + EQHD1_HAS_BUSY = 0x04, /* busy ... */ + EQHD1_HAS_STABLE = 0x08, /* stable ... */ + EQHD1_HAS_SPEED = 0x10, /* speed ... */ + EQHD1_HAS_GGEP = 0x20, /* query-hit has GGEP encoded block */ +} gt_eqhd1_t; + +typedef enum gt_eqhd_type2 +{ + EQHD2_EMPTY = 0x00, /* no flags set */ + EQHD2_HAS_PUSH = 0x01, /* set if push flag is significant */ + EQHD2_BAD_FLAG = 0x02, /* always 0? */ + EQHD2_BUSY_FLAG = 0x04, /* set if for no availability */ + EQHD2_STABLE_FLAG = 0x08, /* set if transmitted an upload */ + EQHD2_SPEED_FLAG = 0x10, /* if set, speed is max attained upload speed */ + EQHD2_HAS_GGEP = 0x20, /* packet has GGEP */ +} gt_eqhd2_t; + +/*****************************************************************************/ + +#include "gt_node.h" +#include "gt_packet.h" + +#include "message/gt_message.h" + +/*****************************************************************************/ + +/* + * A message handler function. + */ +typedef void (*GtMessageHandler) (GtNode *node, TCPC *c, GtPacket *packet); + +#define MSG_HANDLER_ARG_NAMES \ + node, c, packet + +#define GT_MSG_HANDLER(func) \ + void func (GtNode *node, TCPC *c, GtPacket *packet) + +/*****************************************************************************/ + +#endif /* GIFT_GT_MSG_HANDLER_H_ */ diff -r 000000000000 -r d39e1d0d75b6 src/message/ping.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/message/ping.c Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,196 @@ +/* + * $Id: ping.c,v 1.4 2004/03/05 17:49:40 hipnod Exp $ + * + * Copyright (C) 2001-2003 giFT project (gift.sourceforge.net) + * + * 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. + */ + +#include "gt_gnutella.h" +#include "message/msg_handler.h" + +#include "gt_node_list.h" +#include "gt_bind.h" +#include "gt_netorg.h" + +#include "gt_stats.h" +#include "gt_share.h" + +/******************************************************************************/ + +BOOL gt_is_pow2 (uint32_t num) +{ + return BOOL_EXPR (num > 0 && (num & (num-1)) == 0); +} + +static uint32_t get_shared_size (unsigned long size_mb) +{ + uint32_t size_kb; + + size_kb = size_mb * 1024; + + if (GT_SELF->klass & GT_NODE_ULTRA) + /* TODO: round up to nearest power of two >= 8 here */; + else if (gt_is_pow2 (size_kb)) + size_kb += 5; /* unmakes all powers of two, including 1 */ + + return size_kb; +} + +/* reply to a ping packet */ +static void ping_reply_self (GtPacket *packet, TCPC *c) +{ + unsigned long files, size_kb; + double size_mb; + GtPacket *reply; + + share_index (&files, &size_mb); + size_kb = get_shared_size (size_mb); + + if (!(reply = gt_packet_reply (packet, GT_MSG_PING_REPLY))) + return; + + gt_packet_put_port (reply, GT_SELF->gt_port); + gt_packet_put_ip (reply, GT_NODE(c)->my_ip); + gt_packet_put_uint32 (reply, (uint32_t)files); + gt_packet_put_uint32 (reply, (uint32_t)size_kb); + + if (gt_packet_error (reply)) + { + gt_packet_free (reply); + return; + } + + gt_packet_send (c, reply); + gt_packet_free (reply); +} + +/* send info about node dst to node c */ +static TCPC *send_status (TCPC *c, GtNode *node, void **data) +{ + GtPacket *pkt = (GtPacket *) data[0]; + TCPC *dst = (TCPC *) data[1]; + GtPacket *reply; + + /* don't send a ping for the node itself */ + if (c == dst) + return NULL; + + if (!(reply = gt_packet_reply (pkt, GT_MSG_PING_REPLY))) + return NULL; + + gt_packet_put_port (reply, node->gt_port); + gt_packet_put_ip (reply, node->ip); + gt_packet_put_uint32 (reply, node->files); + gt_packet_put_uint32 (reply, node->size_kb); + + /* set the number of hops travelled to 1 */ + gt_packet_set_hops (reply, 1); + + if (gt_packet_error (reply)) + { + gt_packet_free (reply); + return NULL; + } + + gt_packet_send (dst, reply); + gt_packet_free (reply); + + return NULL; +} + +static void handle_crawler_ping (GtPacket *packet, TCPC *c) +{ + void *data[2]; + + data[0] = packet; + data[1] = c; + + /* reply ourselves */ + ping_reply_self (packet, c); + + /* send pings from connected hosts */ + gt_conn_foreach (GT_CONN_FOREACH(send_status), data, + GT_NODE_NONE, GT_NODE_CONNECTED, 0); +} + +static BOOL need_connections (void) +{ + BOOL am_ultrapeer; + + am_ultrapeer = GT_SELF->klass & GT_NODE_ULTRA; + + /* send a pong if we need connections, but do this + * only if this is a search node: leaves shouldnt send pongs */ + if (gt_conn_need_connections (GT_NODE_ULTRA) > 0 && am_ultrapeer) + return TRUE; + + /* pretend we need connections temporarily even if we don't in order to + * figure out whether we are firewalled or not */ + if (gt_uptime () < 10 * EMINUTES && GT_SELF->firewalled) + return TRUE; + + return FALSE; +} + +GT_MSG_HANDLER(gt_msg_ping) +{ + time_t last_ping_time, now; + uint8_t ttl, hops; + + now = time (NULL); + + ttl = gt_packet_ttl (packet); + hops = gt_packet_hops (packet); + + last_ping_time = GT_NODE(c)->last_ping_time; + GT_NODE(c)->last_ping_time = now; + + if ((ttl == 1 && (hops == 0 || hops == 1)) /* tests if host is up */ + || GT_NODE(c)->state == GT_NODE_CONNECTING_2 /* need to reply */ + || need_connections ()) /* we need connections */ + { + ping_reply_self (packet, c); + + if (ttl == 1) + return; + } + else if (ttl == 2 && hops == 0) + { + /* crawler ping: respond with all connected nodes */ + handle_crawler_ping (packet, c); + return; + } + + /* dont re-broadcast pings from search nodes if we are not one */ + if ((GT_NODE(c)->klass & GT_NODE_ULTRA) && !(GT_SELF->klass & GT_NODE_ULTRA)) + return; + +#if 0 + /* notify this host when the pong cache gets full */ + pong_cache_waiter_add (c, packet); +#endif + + /* dont accept pings too often */ + if (now - last_ping_time < 30 * ESECONDS) + return; + +#if 0 + if (!pong_cache_reply (c, packet)) + { + /* refill the pong cache */ + pong_cache_refill (); + return; + } + + pong_cache_waiter_remove (c); +#endif +} diff -r 000000000000 -r d39e1d0d75b6 src/message/ping_reply.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/message/ping_reply.c Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,156 @@ +/* + * $Id: ping_reply.c,v 1.7 2005/01/04 15:00:52 mkern Exp $ + * + * Copyright (C) 2001-2003 giFT project (gift.sourceforge.net) + * + * 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. + */ + +#include "gt_gnutella.h" +#include "message/msg_handler.h" + +#include "gt_node_cache.h" +#include "gt_connect.h" +#include "gt_bind.h" + +#include "gt_search.h" +#include "gt_share_state.h" +#include "gt_query_route.h" +#include "gt_stats.h" + +/*****************************************************************************/ + +extern BOOL gt_is_pow2 (uint32_t num); /* ping.c */ + +/*****************************************************************************/ + +/* + * Update the port on the first pong or when the pong contains a different + * pong. + */ +static void update_port (GtNode *node, in_port_t new_port) +{ + /* update the port */ + node->gt_port = new_port; + + /* + * Test if the node is connectable. This will play with the node's + * ->verified and ->firewalled bits. + * + * This is only important if this node is running as an ultrapeer, because + * it lets us know whether we should route queries from firewalled peers + * to the remote node. + */ + if (GT_SELF->klass & GT_NODE_ULTRA) + gt_connect_test (node, node->gt_port); +} + +/* + * Transition the node into state 'connected', and do various things. This + * has become a bit crufty and miscellaneous. TODO: change this to a callback + * registration system in gt_node.c, register the callbacks in gt_gnutella.c + */ +static BOOL complete_connection (GtNode *node) +{ + /* mark this node as now connected */ + gt_node_state_set (node, GT_NODE_CONNECTED); + + /* submit the routing table */ + if ((node->klass & GT_NODE_ULTRA) && + !(GT_SELF->klass & GT_NODE_ULTRA)) + { + query_route_table_submit (GT_CONN(node)); + } + + /* submit unfinished searches soon */ + gt_searches_submit (GT_CONN(node), 30 * SECONDS); + + /* let the bind subsystem send a ConnectBack for tracking firewalled + * status */ + gt_bind_completed_connection (node); + + if (!(node->share_state = gt_share_state_new ())) + return FALSE; + + gt_share_state_update (node); + + return TRUE; +} + +GT_MSG_HANDLER(gt_msg_ping_reply) +{ + in_port_t port; + in_addr_t ip; + uint32_t files; + uint32_t size_kb; + gt_node_class_t klass; + + port = gt_packet_get_port (packet); + ip = gt_packet_get_ip (packet); + files = gt_packet_get_uint32 (packet); + size_kb = gt_packet_get_uint32 (packet); + + /* this will keep the node from being disconnected by idle-check loop */ + if (node->pings_with_noreply > 0) + node->pings_with_noreply = 0; + + /* update stats and port */ + if (gt_packet_ttl (packet) == 1 && gt_packet_hops (packet) == 0) + { + /* check if this is the first ping response on this connection */ + if (node->state == GT_NODE_CONNECTING_2) + { + if (!complete_connection (node)) + { + gt_node_disconnect (c); + return; + } + } + + if (ip == node->ip) + { + if (node->gt_port != port || !node->verified) + update_port (node, port); + + /* update stats information */ + node->size_kb = size_kb; + node->files = files; + + /* don't add this node to the cache */ + return; + } + + /* + * Morpheus nodes send pongs for other nodes with Hops=1. If + * the IP doesn't equal the observed IP, then add the node to the + * node cache. This may create problems with trying to connect twice + * to some users, though. + */ + } + + /* add this node to the cache */ + klass = GT_NODE_LEAF; + + /* LimeWire marks ultrapeer pongs by making files size a power of two */ + if (size_kb >= 8 && gt_is_pow2 (size_kb)) + klass = GT_NODE_ULTRA; + + /* don't register this node if its local and the peer isnt */ + if (gt_is_local_ip (ip, node->ip)) + return; + + /* keep track of stats from pongs */ + gt_stats_accumulate (ip, port, node->ip, files, size_kb); + + /* TODO: check uptime GGEP extension and add it here */ + gt_node_cache_add_ipv4 (ip, port, klass, time (NULL), 0, node->ip); + gt_node_cache_trace (); +} diff -r 000000000000 -r d39e1d0d75b6 src/message/push.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/message/push.c Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,216 @@ +/* + * $Id: push.c,v 1.3 2004/03/24 06:36:12 hipnod Exp $ + * + * Copyright (C) 2001-2003 giFT project (gift.sourceforge.net) + * + * 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. + */ + +#include "gt_gnutella.h" +#include "msg_handler.h" + +#include "gt_accept.h" +#include "gt_share_file.h" +#include "gt_share.h" + +/*****************************************************************************/ + +typedef struct giv_connect +{ + uint32_t index; + char *filename; +} giv_connect_t; + +/*****************************************************************************/ + +static giv_connect_t *giv_connect_alloc (uint32_t index, const char *filename) +{ + giv_connect_t *giv; + + if (!(giv = malloc (sizeof(giv_connect_t)))) + return NULL; + + if (filename) + giv->filename = STRDUP (filename); + else + giv->filename = NULL; + + giv->index = index; + + return giv; +} + +static void giv_connect_free (giv_connect_t *giv) +{ + if (!giv) + return; + + free (giv->filename); + free (giv); +} + +static char *giv_connect_str (giv_connect_t *giv) +{ + String *s; + + if (!(s = string_new (NULL, 0, 0, TRUE))) + return NULL; + + string_append (s, "GIV "); + string_appendf (s, "%u:", giv->index); + string_appendf (s, "%s/", gt_guid_str (GT_SELF_GUID)); + + if (giv->filename && !string_isempty (giv->filename)) + string_append (s, giv->filename); + + string_append (s, "\n\n"); + + return string_free_keep (s); +} + +/*****************************************************************************/ + +static void handle_giv_connect (int fd, input_id id, TCPC *c, + giv_connect_t *giv) +{ + char *str; + int ret; + + if (MSG_DEBUG) + GT->DBGFN (GT, "entered"); + + if (net_sock_error (fd)) + { + if (MSG_DEBUG) + GT->DBGFN (GT, "error connecting back: %s", GIFT_NETERROR ()); + + tcp_close (c); + return; + } + + /* restore the index */ + c->udata = NULL; + str = giv_connect_str (giv); + + if (MSG_DEBUG) + GT->DBGSOCK (GT, c, "sending GIV response: %s", str); + + ret = tcp_send (c, str, strlen (str)); + free (str); + + if (ret <= 0) + { + if (MSG_DEBUG) + GT->DBGFN (GT, "error sending: %s", GIFT_NETERROR ()); + + tcp_close (c); + return; + } + + /* use this connection for something */ + input_remove (id); + input_add (c->fd, c, INPUT_READ, + (InputCallback)gt_handshake_dispatch_incoming, TIMEOUT_DEF); +} + +static void giv_connect (int fd, input_id id, TCPC *c) +{ + giv_connect_t *giv; + + giv = c->udata; + handle_giv_connect (fd, id, c, giv); + + giv_connect_free (giv); +} + +static void gt_giv_request (GtNode *src, uint32_t index, in_addr_t ip, + in_port_t port, uint8_t hops) +{ + giv_connect_t *giv; + char *filename = NULL; + Share *share; + GtShare *gt_share; + TCPC *c; + + if (MSG_DEBUG) + GT->DBGFN (GT, "entered"); + + /* if the pushed IP address is local, forget about it */ + if (gt_is_local_ip (ip, src->ip)) + return; + + /* special case: if the node we got the giv from is local + * and the giv is from them (hops=0), don't connect to the + * external address but the internal */ + if (hops == 0 && gt_is_local_ip (src->ip, ip)) + ip = src->ip; + + /* + * Look for the index in the local shared database, if it is found + * keep track of the filename. + */ + if ((share = gt_share_local_lookup_by_index (index, NULL)) != NULL && + (gt_share = share_get_udata (share, GT->name)) != NULL) + { + filename = gt_share->filename; + } + + if (!(giv = giv_connect_alloc (index, filename))) + return; + + if (!(c = tcp_open (ip, port, FALSE))) + { + giv_connect_free (giv); + return; + } + + c->udata = giv; + + input_add (c->fd, c, INPUT_WRITE, + (InputCallback)giv_connect, TIMEOUT_DEF); +} + +GT_MSG_HANDLER(gt_msg_push) +{ + gt_guid_t *client_guid; + uint32_t index; + uint32_t ip; + uint16_t port; + uint8_t hops; + + if (MSG_DEBUG) + GT->DBGFN (GT, "entered"); + + client_guid = gt_packet_get_ustr (packet, 16); + index = gt_packet_get_uint32 (packet); + ip = gt_packet_get_ip (packet); + port = gt_packet_get_port (packet); + + hops = gt_packet_hops (packet); + + if (MSG_DEBUG) + { + GT->DBGSOCK (GT, c, "client_guid=%s index=%d ip=%s port=%hu", + gt_guid_str (client_guid), index, net_ip_str (ip), port); + } + + if (gt_guid_cmp (client_guid, GT_SELF_GUID) == 0) + { + /* TODO: we should not respond if we get a lot of these */ + gt_giv_request (GT_NODE(c), index, ip, port, hops); + return; + } + +#if 0 + if ((dst_c = push_cache_lookup (client->guid))) + gt_route_forward_packet (dst_c, packet); +#endif +} diff -r 000000000000 -r d39e1d0d75b6 src/message/query.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/message/query.c Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,529 @@ +/* + * $Id: query.c,v 1.10 2004/06/04 15:44:59 hipnod Exp $ + * + * Copyright (C) 2001-2003 giFT project (gift.sourceforge.net) + * + * 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. + */ + +#include "gt_gnutella.h" +#include "message/msg_handler.h" + +#include "sha1.h" +#include "xml.h" + +#include "gt_share.h" +#include "gt_share_file.h" +#include "gt_share_state.h" + +#include "gt_search.h" +#include "gt_search_exec.h" +#include "gt_urn.h" + +#include "transfer/push_proxy.h" + +/*****************************************************************************/ + +#define LOG_RESULT_PACKETS gt_config_get_int("search/log_result_packets=0") + +/*****************************************************************************/ + +typedef struct gt_search_reply +{ + uint8_t ttl; + uint8_t results; /* number of results on the current packet */ + GtPacket *packet; /* the current packet to stack results on */ + gt_guid_t *guid; +} gt_search_reply_t; + +/*****************************************************************************/ + +/* cache of recent queries TODO: flush this on plugin unload */ +static Dataset *query_cache = NULL; + +/* flushes the old cache entries */ +static timer_id flush_timer = 0; + +/*****************************************************************************/ + +static BOOL is_printable (const char *s) +{ + while (*s) + { + if (!isprint (*s)) + return FALSE; + + s++; + } + + return TRUE; +} + +static void parse_text_meta (const char *data, Dataset **meta) +{ + int rate, freq, min, sec; + int n; + char *lower; + + if (!data) + return; + + /* only ASCII strings are plaintext metadata */ + if (!is_printable (data)) + return; + + /* skip strings that start with "urn:", we know what those are */ + if (!strncasecmp (data, "urn:", 4)) + return; + + if (!(lower = STRDUP (data))) + return; + + string_lower (lower); + n = sscanf (lower, "%d kbps %d khz %d:%d", &rate, &freq, &min, &sec); + + /* try again with a slightly different format if it failed */ + if (n != 4) + n = sscanf (lower, "%d kbps(vbr) %d khz %d:%d", &rate, &freq, &min, &sec); + + free (lower); + + if (n != 4) + { +#if 0 + static int warned = 0; + + if (warned++ < 4) + GT->DBGFN (GT, "unknown plaintext metadata?: %s", data); +#endif + + return; + } + + /* XXX: actually this should be META_DEBUG */ + if (XML_DEBUG) + GT->DBGFN (GT, "parsed %d kbps %d khz %d:%d", rate, freq, min, sec); + + dataset_insertstr (meta, "bitrate", stringf ("%li", rate * 1000)); + dataset_insertstr (meta, "frequency", stringf ("%u", freq * 1000)); + dataset_insertstr (meta, "duration", stringf ("%i", min * 60 + sec)); +} + +void gt_parse_extended_data (char *ext_block, gt_urn_t **r_urn, + Dataset **r_meta) +{ + gt_urn_t *urn = NULL; + char *ext; + + if (r_urn) + *r_urn = NULL; + if (r_meta) + *r_meta = NULL; + + if (!ext_block) + return; + + /* + * 0x1c is the separator character for so-called "GEM" + * (Gnutella-Extension Mechanism) extensions. + */ + while ((ext = string_sep (&ext_block, "\x1c"))) + { + if (string_isempty (ext)) + break; + + if (r_urn && (urn = gt_urn_parse (ext))) + { + free (*r_urn); + *r_urn = urn; + } + + if (r_meta) + { + parse_text_meta (ext, r_meta); + gt_xml_parse (ext, r_meta); + } + } +} + +static BOOL append_result (GtPacket *packet, FileShare *file) +{ + GtShare *share; + Hash *hash; + + if (!(share = share_get_udata (file, GT->name))) + return FALSE; + + /* search results + * format: */ + gt_packet_put_uint32 (packet, share->index); + gt_packet_put_uint32 (packet, file->size); + gt_packet_put_str (packet, share->filename); + + /* + * This is the information that goes "between the nulls" in a + * query hit. The first null comes after the filename. + * + * This is a bit specific and icky. It should be abstracted away. + */ + if ((hash = share_get_hash (file, "SHA1"))) + { + char *sha1; + + assert (hash->len == SHA1_BINSIZE); + + if ((sha1 = sha1_string (hash->data))) + { + char buf[128]; + int len; + + /* make the hash be uppercase */ + string_upper (sha1); + + len = strlen (sha1); + assert (len == SHA1_STRLEN); + + snprintf (buf, sizeof (buf) - 1, "urn:sha1:%s", sha1); + len += strlen ("urn:sha1:"); + + gt_packet_put_ustr (packet, buf, len); + free (sha1); + } + } + + /* put the second null there */ + gt_packet_put_uint8 (packet, 0); + + if (gt_packet_error (packet)) + { + gt_packet_free (packet); + return FALSE; + } + + return TRUE; +} + +/* add a trailer to the packets */ +static void transmit_results (TCPC *c, GtPacket *packet, uint8_t hits) +{ + gt_eqhd1_t eqhd1 = EQHD1_EMPTY; + gt_eqhd2_t eqhd2 = EQHD2_EMPTY; + uint8_t *ggep; + size_t ggep_len; + + /* set the push bit as significant */ + eqhd2 |= EQHD2_HAS_PUSH; + /* set the busy bit as significant */ + eqhd1 |= EQHD1_HAS_BUSY; + + /* + * We shouldnt mark ourselves firewalled if the destination is + * a local ip address and ttl == 1. However, for greater TTLs, + * there's no knowing if we should mark it or not... + */ + if (GT_SELF->firewalled) + eqhd1 |= EQHD1_PUSH_FLAG; + + if (upload_availability () == 0) + eqhd2 |= EQHD2_BUSY_FLAG; + + /* add the query hit descriptor + * */ + gt_packet_put_ustr (packet, (const unsigned char *)"GIFT", 4); + gt_packet_put_uint8 (packet, 2); + gt_packet_put_uint8 (packet, eqhd1); + gt_packet_put_uint8 (packet, eqhd2); + + /* append GGEP block (only contains PUSH proxies for now) */ + if (gt_push_proxy_get_ggep_block (&ggep, &ggep_len)) + gt_packet_put_ustr (packet, ggep, ggep_len); + + /* client identifier */ + gt_packet_put_ustr (packet, GT_SELF_GUID, 16); + + if (gt_packet_error (packet)) + { + gt_packet_free (packet); + return; + } + +#if 0 + GT->DBGFN (GT, "packet before twiddling result number: (will twiddle %i)", hits); + TRACE_MEM (packet->data, packet->len); +#endif + + /* rewind the packet to the search hit count and replace the hitcount + * it is the first byte after the header + * XXX: this should use a facility of gt_packet */ + packet->data[GNUTELLA_HDR_LEN] = hits; + +#if 0 + GT->DBGFN (GT, "packet after twiddling:"); + TRACE_MEM (packet->data, packet->len); +#endif + + if (LOG_RESULT_PACKETS) + GT->dbg (GT, "transmitting %i", hits); + + /* send the reply along the path to the node that queried us */ + gt_packet_send (c, packet); + gt_packet_free (packet); +} + +static BOOL query_request_result (TCPC *c, FileShare *file, + gt_search_reply_t *reply) +{ + GtPacket *packet; + + if (!file) + { + /* send any remaining data */ + if (reply->packet) + transmit_results (c, reply->packet, reply->results); + + return FALSE; + } + + packet = reply->packet; + + if (packet) + { + /* send the packet if the max results per packet is reached + * or the size of the packet is large */ + if (reply->results == 255 || gt_packet_payload_len (packet) > 2000) + { + transmit_results (c, packet, reply->results); + + reply->packet = NULL; + reply->results = 0; + + /* handle this item again */ + return TRUE; + } + + if (append_result (packet, file)) + reply->results++; + + return FALSE; + } + + /* allocate a packet */ + if (!(packet = gt_packet_new (GT_MSG_QUERY_REPLY, reply->ttl, reply->guid))) + { + GIFT_ERROR (("mem failure?")); + return FALSE; + } + + /* setup the search header */ + gt_packet_put_uint8 (packet, 0); + gt_packet_put_port (packet, GT_SELF->gt_port); + gt_packet_put_ip (packet, GT_NODE(c)->my_ip); + gt_packet_put_uint32 (packet, 0); /* speed (kbits) */ + + if (gt_packet_error (packet)) + { + GIFT_ERROR (("failed seting up search result packet")); + gt_packet_free (packet); + return FALSE; + } + + reply->packet = packet; + + /* handle this item again */ + return TRUE; +} + +static BOOL query_request_result_free (TCPC *c, FileShare *file, + gt_search_reply_t *reply) +{ + GtShare *share; + + if (!file) + { + free (reply->guid); + free (reply); + return FALSE; + } + + /* just a sanity check */ + if (file && !(share = share_get_udata (file, GT->name))) + return FALSE; + + return FALSE; +} + +/* This emulates the old queue interface */ +static BOOL send_result (FileShare *file, void **args) +{ + TCPC *c = args[0]; + gt_search_reply_t *reply = args[1]; + + while (query_request_result (c, file, reply)) + ; + + query_request_result_free (c, file, reply); + return TRUE; +} + +static void send_results (TCPC *c, List *results, gt_search_reply_t *reply) +{ + void *args[2]; + + args[0] = c; + args[1] = reply; + + results = list_foreach_remove (results, (ListForeachFunc)send_result, args); + assert (results == NULL); + + query_request_result (c, NULL, reply); + query_request_result_free (c, NULL, reply); +} + +static int flush_old (ds_data_t *key, ds_data_t *value, time_t *now) +{ + time_t *timestamp = value->data; + + if (*now - *timestamp >= 10 * EMINUTES) + return DS_CONTINUE | DS_REMOVE; + + return DS_CONTINUE; +} + +static BOOL flush_qcache (Dataset *cache) +{ + time_t now = time (NULL); + + assert (query_cache != NULL); + dataset_foreach_ex (query_cache, DS_FOREACH_EX(flush_old), &now); + + return TRUE; +} + +/* TODO: need to break up this file soon to isolate these things */ +static BOOL query_cache_lookup (gt_guid_t *guid) +{ + time_t now; + + if (dataset_lookup (query_cache, guid, GT_GUID_LEN)) + return TRUE; + + /* limit the maximum length the query cache can grow */ + if (dataset_length (query_cache) >= 2000) + return FALSE; + + /* add the guid for catching duplicates next time */ + now = time (NULL); + dataset_insert (&query_cache, guid, GT_GUID_LEN, &now, sizeof (now)); + + if (!flush_timer) + { + flush_timer = timer_add (5 * MINUTES, (TimerCallback)flush_qcache, + NULL); + } + + return FALSE; +} + +GT_MSG_HANDLER(gt_msg_query) +{ + char *query; + char *extended; + gt_guid_t *guid; + gt_urn_t *urn; + List *list; + uint8_t ttl; + uint8_t hops; + unsigned char *hash; + gt_query_flags_t flags; + gt_search_type_t type; + gt_search_reply_t *reply; + + flags = gt_packet_get_uint16 (packet); + query = gt_packet_get_str (packet); + extended = gt_packet_get_str (packet); + + guid = gt_packet_guid (packet); + + /* + * TODO: node->share_state can be null here, if the node hasn't + * successfully handshaked yet. Should fix this by storing messages until + * handshake is complete. + */ + if (node->share_state && node->share_state->hidden) + return; + + /* don't reply if the host is firewalled and we are too */ + if ((flags & QF_HAS_FLAGS) && (flags & QF_ONLY_NON_FW) && + GT_SELF->firewalled) + { + return; + } + + /* don't reply if this is our own search -- TODO: substitute a + * full-fledged routing table */ + if (gt_search_find (guid)) + { + if (MSG_DEBUG) + { + GT->dbg (GT, "not searching, own search (guid %s)", + gt_guid_str (guid)); + } + + return; + } + + /* check if we've handled this search already */ + if (query_cache_lookup (guid)) + { + if (MSG_DEBUG) + GT->DBGSOCK (GT, c, "duplicate search (%s)", gt_guid_str (guid)); + + return; + } + + gt_parse_extended_data (extended, &urn, NULL); + + /* WARNING: this assumes sha1 */ + hash = gt_urn_data (urn); + + if (hash) + type = GT_SEARCH_HASH; + else + type = GT_SEARCH_KEYWORD; + +#if 0 + GT->DBGFN (GT, "min_speed = %hu, query = '%s', extended data = '%s'", + min_speed, query, extended); +#endif + + ttl = gt_packet_ttl (packet); + hops = gt_packet_hops (packet); + + list = gt_search_exec (query, type, urn, ttl, hops); + free (urn); + + if (!list) + return; + + if (!(reply = MALLOC (sizeof (gt_search_reply_t)))) + { + list_free (list); + return; + } + + /* set the ttl of the reply to be +1 the hops the request travelled */ + reply->ttl = gt_packet_hops (packet) + 1; + + /* use the guid of the packet in replying to results */ + reply->guid = gt_guid_dup (guid); + + send_results (c, list, reply); +} diff -r 000000000000 -r d39e1d0d75b6 src/message/query_reply.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/message/query_reply.c Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,324 @@ +/* + * $Id: query_reply.c,v 1.3 2004/03/24 06:35:10 hipnod Exp $ + * + * Copyright (C) 2001-2003 giFT project (gift.sourceforge.net) + * + * 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. + */ + +#include "gt_gnutella.h" +#include "message/msg_handler.h" + +#include "sha1.h" +#include "xml.h" + +#include "gt_search.h" + +#include "gt_urn.h" +#include "gt_ban.h" + +#include "gt_share_file.h" + +#include + +/*****************************************************************************/ + +/* + * Whether to attach the number of hops each result travelled as a metadata + * field "Hops". Interesting to see but probably not too useful for the + * average user, and so disabled by default. + */ +#define HOPS_AS_META gt_config_get_int("search/hops_as_meta=0") + +/*****************************************************************************/ + +extern void gt_parse_extended_data (char *ext_block, gt_urn_t **r_urn, + Dataset **r_meta); /* query.c */ + +/*****************************************************************************/ + +static void add_meta (ds_data_t *key, ds_data_t *value, FileShare *file) +{ + char *keystr = key->data; + char *valuestr = value->data; + + share_set_meta (file, keystr, valuestr); +} + +/* parse XML data right before the client guid */ +static void parse_xml_block (GtPacket *packet, size_t xml_bin_len, + Share **results, size_t hits) +{ + int old_offset; + char *xml; + uint8_t savechr; + + /* if the length is one there is only the null terminator */ + if (xml_bin_len < 1) + return; + + /* + * Look for the XML before the client guid. Subtract the length of the + * client guid and the size of the XML. + */ + old_offset = gt_packet_seek (packet, packet->len - 16 - xml_bin_len); + + /* hopefully, if xml_bin_len is bogus this will fail */ + if (old_offset < 0) + return; + + xml = gt_packet_get_ustr (packet, xml_bin_len); + + if (!xml) + return; + + /* + * Null terminate the packet even if the remote end didn't. We know this + * is safe because the client GUID resides after the XML, and is 16 bytes + * long. + * + * Note that the null char should be at xml[xml_bin_len - 1], so we end up + * actually null-terminating twice if the XML is already terminated. + * gt_xml_parse_indexed must take this into account (and it does by + * largely ignoring xml_bin_len when the XML is plaintext). + */ + savechr = xml[xml_bin_len]; + xml[xml_bin_len] = 0; + + if (XML_DEBUG) + GT->dbg (GT, "xmldata=%s", xml); + + /* + * The XML before the client guid that we are parsing has a special + * property "index" indicating which share the XML property corresponds + * to, and so needs to be handled differently from XML appearing in + * each individual hit. + */ + gt_xml_parse_indexed (xml, xml_bin_len, results, hits); + + /* put the saved character back */ + xml[xml_bin_len] = savechr; +} + +/* + * Attach the travelled hops as a metadata field. + */ +static void attach_hops (Share *share, int hops) +{ + char buf[12]; + + if (!HOPS_AS_META) + return; + + snprintf (buf, sizeof (buf) - 1, "%u", hops); + share_set_meta (share, "Hops", buf); +} + +void gt_query_hits_parse (GtPacket *packet, GtSearch *search, + TCPC *c, gt_guid_t *client_guid) +{ + uint8_t count; + in_port_t port; + in_addr_t host; + uint32_t speed; + Share *results[255]; + uint16_t xml_len = 0; + int i, availability = 1; + BOOL firewalled = FALSE; + int total; + + count = gt_packet_get_uint8 (packet); + port = gt_packet_get_port (packet); + host = gt_packet_get_ip (packet); + speed = gt_packet_get_uint32 (packet); + + /* check if this host is banned */ + if (gt_ban_ipv4_is_banned (host)) + { + GT->dbg (GT, "discarding search results from %s [address banned]", + net_ip_str (host)); + return; + } + + for (i = 0; i < count; i++) + { + uint32_t index; + uint32_t size; + char *fname, *data; + gt_urn_t *urn = NULL; + Dataset *meta = NULL; + Share *file; + + index = gt_packet_get_uint32 (packet); + size = gt_packet_get_uint32 (packet); + fname = gt_packet_get_str (packet); + data = gt_packet_get_str (packet); + + /* If there was an error parsing the packet (not enough results), + * stop parsing */ + if (gt_packet_error (packet)) + break; + + if (!fname || string_isempty (fname)) + { + results[i] = NULL; + continue; + } + + gt_parse_extended_data (data, &urn, &meta); + + /* + * WARNING: calling gt_urn_data here assumes sha1. + * + * TODO: this is a potential bug if gt_share_new() makes assumptions + * about the hash data's size and gt_urn_t changes to be multiple + * sizes later. + */ + if (!(file = gt_share_new (fname, index, size, gt_urn_data (urn)))) + { + GIFT_ERROR (("error making fileshare, why?")); + + dataset_clear (meta); + free (urn); + + /* make sure we find out about it if we're missing results ;) */ + assert (0); + + results[i] = NULL; + continue; + } + + /* HACK: set the mimetype from the file extension */ + share_set_mime (file, mime_type (fname)); + + dataset_foreach (meta, DS_FOREACH(add_meta), file); + + /* Attach the hops the search travelled as a metadata field */ + attach_hops (file, gt_packet_hops (packet)); + + dataset_clear (meta); + free (urn); + + results[i] = file; + } + + total = i; + + /* look for the query hit descriptor */ + if (!gt_packet_error (packet) && + packet->len - packet->offset >= 16 + 7 /* min qhd len */) + { + unsigned char *vendor; + uint8_t eqhd_len; + uint8_t eqhd[2]; + + vendor = gt_packet_get_ustr (packet, 4); + eqhd_len = gt_packet_get_uint8 (packet); + eqhd[0] = gt_packet_get_uint8 (packet); + eqhd[1] = gt_packet_get_uint8 (packet); + + /* set availability to 0 or 1 depending on the busy flag */ + availability = ((eqhd[0] & EQHD1_HAS_BUSY) && + !(eqhd[1] & EQHD2_BUSY_FLAG)) ? 1 : 0; + + /* set firewalled status based on the PUSH flag */ + firewalled = BOOL_EXPR ((eqhd[0] & EQHD1_PUSH_FLAG) && + (eqhd[1] & EQHD2_HAS_PUSH)); + + /* + * Check for an XML metadata block, that is usually present + * when the size of the "public area" is 4 + */ + if (eqhd_len >= 4) + xml_len = gt_packet_get_uint16 (packet); + + if (xml_len > 0) + { + if (XML_DEBUG) + { + char str[5] = { 0 }; + + if (vendor) + memcpy (str, vendor, 4); + + GT->dbg (GT, "(%s) xml_len=%d", str, xml_len); + } + + parse_xml_block (packet, xml_len, results, total); + } + +#if 0 + if (MSG_DEBUG) + { + GT->DBGFN (GT, "vendor = %s, qhd_len = %u, qhd_0 = %x, qhd_1 = %x," + " availability = %i, firewalled = %i", + make_str (vendor, 4), qhd_len, qhd[0], qhd[1], + availability, firewalled); + } +#endif + } + + /* send the results to the interface protocol */ + for (i = 0; i < total; i++) + { + if (results[i]) + { + gt_search_reply (search, c, host, port, client_guid, availability, + firewalled, results[i]); + + gt_share_unref (results[i]); + } + } +} + +/* should split this up into two routines */ +GT_MSG_HANDLER(gt_msg_query_reply) +{ + GtSearch *search; + int save_offset; + gt_guid_t *client_guid; + + /* Each client has a unique identifier at the end of the + * packet. Grab that first. */ + if (packet->len < 16) + { + if (MSG_DEBUG) + GT->DBGSOCK (GT, c, "illegal query response packet, < 16 bytes"); + + return; + } + + /* hack the offset in the packet */ + save_offset = packet->offset; + packet->offset = packet->len - 16; + + client_guid = gt_packet_get_ustr (packet, 16); + + /* put the offset back */ + packet->offset = save_offset; + + if (!(search = gt_search_find (gt_packet_guid (packet))) + /*&& query_cache_lookup (packet->guid)*/) + { + /* TODO: support forwarding of query responses by + * looking up their destinations in the guid cache */ + + /*gt_route_forward_packet (packet, c);*/ + + /* add the client GUID to the push cache: in case of a + * push request we know where to send it */ + /*push_cache_add (client_guid, c);*/ + + return; + } + + gt_query_hits_parse (packet, search, c, client_guid); +} diff -r 000000000000 -r d39e1d0d75b6 src/message/query_route.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/message/query_route.c Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,82 @@ +/* + * $Id: query_route.c,v 1.1 2004/01/04 03:57:53 hipnod Exp $ + * + * Copyright (C) 2001-2003 giFT project (gift.sourceforge.net) + * + * 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. + */ + +#include "gt_gnutella.h" +#include "msg_handler.h" + +#include "gt_query_route.h" + +/*****************************************************************************/ + +/* create a table for routing queries from a child node + * disabled for now because ultrapeer mode doesnt work yet */ +GT_MSG_HANDLER(gt_msg_query_route) +{ +#if 0 + uint8_t type; + uint32_t len; + uint8_t largest_val; + uint8_t seq_no; + uint8_t seq_size; + uint8_t compressed; + uint8_t bits; + size_t size; + + GT->DBGFN (GT, "entered"); + + type = gt_packet_get_uint8 (packet); + + /* TODO: rate-limit clients calling query_route; timeouts */ + + switch (type) + { + case 0: /* reset table */ + len = gt_packet_get_uint32 (packet); + largest_val = gt_packet_get_uint8 (packet); + + if (GT_NODE(c)->query_router) + query_router_free (GT_NODE(c)->query_router); + + GT_NODE(c)->query_router = query_router_new (len, largest_val); + + GT->DBGFN (GT, "reset table: len = %u, largest val = %u", + len, largest_val); + break; + + case 1: /* patch table */ + seq_no = gt_packet_get_uint8 (packet); + seq_size = gt_packet_get_uint8 (packet); + compressed = gt_packet_get_uint8 (packet); + bits = gt_packet_get_uint8 (packet); + + GT->DBGFN (GT, "patch table: seq_no=%i seq_size=%i compressed=%i bits=%i", + seq_no, seq_size, compressed, bits); + + /* size of the patch is the packet length minus len of patch header */ + size = gt_packet_payload_len (packet) - 5; + + GT->DBGFN (GT, "size = %u, packet->offset = %u", size, packet->offset); + query_router_update (GT_NODE(c)->query_router, seq_no, seq_size, + compressed, bits, &packet->data[packet->offset], + size); + break; + + default: + GT->DBGFN (GT, "unknown query-route message type: %d", type); + break; + } +#endif +} diff -r 000000000000 -r d39e1d0d75b6 src/message/vendor.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/message/vendor.c Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,283 @@ +/* + * $Id: vendor.c,v 1.6 2004/03/26 11:44:13 hipnod Exp $ + * + * Copyright (C) 2001-2003 giFT project (gift.sourceforge.net) + * + * 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. + */ + +#include "gt_gnutella.h" +#include "message/msg_handler.h" + +#include "gt_connect.h" /* gt_connect_test */ +#include "gt_bind.h" + +#include "gt_utils.h" /* make_str */ + +#include "transfer/push_proxy.h" + +/*****************************************************************************/ + +#define EMPTY_VENDOR { 0, 0, 0, 0 } + +#define vmsg_name(name) \ + name##_struct + +#define declare_vmsg(name,vendor,id) \ + const struct gt_vendor_msg vmsg_name(name) = { vendor, id }; \ + const struct gt_vendor_msg *name = &name##_struct; + +/* Globally visible vendor message structs */ +declare_vmsg(GT_VMSG_MESSAGES_SUPP, EMPTY_VENDOR, 0); +declare_vmsg(GT_VMSG_HOPS_FLOW, "BEAR", 4); +declare_vmsg(GT_VMSG_TCP_CONNECT_BACK, "BEAR", 7); +declare_vmsg(GT_VMSG_PUSH_PROXY_REQ, "LIME", 21); +declare_vmsg(GT_VMSG_PUSH_PROXY_ACK, "LIME", 22); + +/*****************************************************************************/ + +static GT_MSG_HANDLER(gt_msg_messages_supported); +static GT_MSG_HANDLER(gt_msg_hops_flow); +static GT_MSG_HANDLER(gt_msg_tcp_connect_back); +static GT_MSG_HANDLER(gt_msg_push_proxy_request); +static GT_MSG_HANDLER(gt_msg_push_proxy_acknowledgement); + +/*****************************************************************************/ + +struct gt_vendor_table +{ + const struct gt_vendor_msg *msg; + GtMessageHandler func; + uint16_t version; + BOOL in_msgs_supported; /* inside MessagesSupported */ +}; + +static struct gt_vendor_table vendor_table[] = +{ + { &vmsg_name(GT_VMSG_MESSAGES_SUPP), gt_msg_messages_supported, + 1, FALSE }, + { &vmsg_name(GT_VMSG_HOPS_FLOW), gt_msg_hops_flow, + 1, FALSE /*TODO: support receving*/ }, + { &vmsg_name(GT_VMSG_TCP_CONNECT_BACK), gt_msg_tcp_connect_back, + 1, TRUE }, + { &vmsg_name(GT_VMSG_PUSH_PROXY_REQ), gt_msg_push_proxy_request, + 2, TRUE }, + { &vmsg_name(GT_VMSG_PUSH_PROXY_ACK), gt_msg_push_proxy_acknowledgement, + 2, FALSE }, +}; + +static const size_t nr_vmsgs = sizeof(vendor_table) / sizeof(vendor_table[0]); + +/*****************************************************************************/ + +static void vmsg_init (struct gt_vendor_msg *msg, + unsigned char *vendor_id, uint16_t id) +{ + /* initialize to zero because of potential structure alignment issues */ + memset (msg, 0, sizeof(struct gt_vendor_msg)); + + memcpy (&msg->vendor_id, vendor_id, 4); + msg->id = id; +} + +static void append_vmsg (GtPacket *pkt, const struct gt_vendor_msg *msg, + uint16_t ver) +{ + gt_packet_put_ustr (pkt, msg->vendor_id, 4); + gt_packet_put_uint16 (pkt, msg->id); + gt_packet_put_uint16 (pkt, ver); +} + +void gt_vmsg_send_supported (GtNode *node) +{ + GtPacket *pkt; + int i; + uint16_t vector_len = 0; + + if (!dataset_lookupstr (node->hdr, "vendor-message")) + return; + + if (!(pkt = gt_packet_vendor (GT_VMSG_MESSAGES_SUPP))) + return; + + gt_packet_put_uint16 (pkt, 0); + + for (i = 0; i < nr_vmsgs; i++) + { + if (vendor_table[i].in_msgs_supported) + { + vector_len++; + append_vmsg (pkt, vendor_table[i].msg, vendor_table[i].version); + } + } + + /* XXX: packet put_xxx functions don't work with gt_packet_seek :( */ + vector_len = htovl (vector_len); + memcpy (&pkt->data[GNUTELLA_HDR_LEN + VMSG_HDR_LEN], &vector_len, 2); + + if (gt_packet_error (pkt)) + { + gt_packet_free (pkt); + return; + } + + GT->DBGSOCK (GT, GT_CONN(node), "sending MessagesSupported"); + + gt_packet_send (GT_CONN(node), pkt); + gt_packet_free (pkt); +} + +/*****************************************************************************/ + +GT_MSG_HANDLER(gt_msg_vendor) +{ + struct gt_vendor_msg vmsg; + unsigned char *vendor; + int i; + uint16_t id; + uint16_t version; + + if (gt_packet_hops (packet) != 0 && gt_packet_ttl (packet) != 1) + return; + + vendor = gt_packet_get_ustr (packet, 4); + id = gt_packet_get_uint16 (packet); + version = gt_packet_get_uint16 (packet); + + /* initialize a copy for making a single call to memcmp */ + vmsg_init (&vmsg, vendor, id); + + if (gt_packet_error (packet)) + { + if (MSG_DEBUG) + GT->DBGSOCK (GT, c, "Error parsing vendor message"); + + return; + } + + for (i = 0; i < nr_vmsgs; i++) + { + if (memcmp (vendor_table[i].msg, &vmsg, sizeof(vmsg)) == 0 && + version <= vendor_table[i].version) + { + vendor_table[i].func (MSG_HANDLER_ARG_NAMES); + return; + } + } + + if (MSG_DEBUG) + { + GT->DBGSOCK (GT, c, "No handler for vendor message %s/%dv%d", + make_str (vendor, 4), id, version); + } +} + +/*****************************************************************************/ + +static struct gt_vendor_table *find_in_vmsg_table (gt_vendor_msg_t *vmsg) +{ + int i; + + for (i = 0; i < nr_vmsgs; i++) + { + if (memcmp (vendor_table[i].msg, vmsg, sizeof(*vmsg)) == 0) + return &vendor_table[i]; + } + + return NULL; +} + +static GT_MSG_HANDLER(gt_msg_messages_supported) +{ + gt_vendor_msg_t vmsg; + unsigned char *vendor_id; + int i; + uint16_t id; + uint16_t version; + uint16_t vector_len; + + vector_len = gt_packet_get_uint16 (packet); + + if (gt_packet_error (packet)) + return; + + /* + * Track the supported messages in a dataset on this node. + */ + for (i = 0; i < vector_len; i++) + { + struct gt_vendor_table *entry; + + vendor_id = gt_packet_get_ustr (packet, 4); + id = gt_packet_get_uint16 (packet); + version = gt_packet_get_uint16 (packet); + + if (gt_packet_error (packet)) + break; + + vmsg_init (&vmsg, vendor_id, id); + + if (!(entry = find_in_vmsg_table (&vmsg))) + continue; + + /* only send the minimum supported by both ends to this node */ + version = MIN (version, entry->version); + + /* track support for this vendor message */ + dataset_insert (&node->vmsgs_supported, &vmsg, sizeof(vmsg), + &version, sizeof(version)); + } + + /* send our batch of vendor messages now */ + gt_bind_completed_connection (node); +} + +/*****************************************************************************/ + +static GT_MSG_HANDLER(gt_msg_hops_flow) +{ +} + +/*****************************************************************************/ + +static GT_MSG_HANDLER(gt_msg_tcp_connect_back) +{ + in_port_t port; + + port = gt_packet_get_port (packet); + + if (!port) + return; + + gt_connect_test (node, port); +} + +/*****************************************************************************/ + +static GT_MSG_HANDLER(gt_msg_push_proxy_request) +{ + return; +} + +static GT_MSG_HANDLER(gt_msg_push_proxy_acknowledgement) +{ + in_addr_t ip; + in_port_t port; + + ip = gt_packet_get_ip (packet); + port = gt_packet_get_port (packet); + + if (gt_packet_error (packet)) + return; + + gt_push_proxy_del (node); + gt_push_proxy_add (node, ip, port); +} diff -r 000000000000 -r d39e1d0d75b6 src/sha1.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/sha1.c Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,490 @@ +/* + * $Id: sha1.c,v 1.18 2006/07/09 13:05:20 mkern Exp $ + * + * (PD) 2001 The Bitzi Corporation + * Please see http://bitzi.com/publicdomain for more info. + * + * NIST Secure Hash Algorithm + * heavily modified by Uwe Hollerbach + * from Peter C. Gutmann's implementation as found in + * Applied Cryptography by Bruce Schneier + * Further modifications to include the "UNRAVEL" stuff, below + * + * New, faster sha1 code. The original code was from Bitzi corporation, and + * was in the public domain. [The original header is included.] + * + * This code is in the public domain. + */ + +#include +#include + +#include "gt_gnutella.h" + +#include "sha1.h" +#include "encoding/base32.h" + +/*****************************************************************************/ + +typedef struct sha1_state SHA_INFO; + +/* define the functions to names private to this plugin */ +#define sha_init gt_sha1_init +#define sha_update gt_sha1_append +#define sha_final gt_sha1_finish + +/*****************************************************************************/ + +void sha_init(SHA_INFO *); +void sha_update(SHA_INFO *, const void *, size_t); +void sha_final(SHA_INFO *, unsigned char [20]); + +/*****************************************************************************/ + +/* SHA f()-functions */ + +#define f1(x,y,z) ((x & y) | (~x & z)) +#define f2(x,y,z) (x ^ y ^ z) +#define f3(x,y,z) ((x & y) | (x & z) | (y & z)) +#define f4(x,y,z) (x ^ y ^ z) + +/* SHA constants */ + +#define CONST1 0x5a827999L +#define CONST2 0x6ed9eba1L +#define CONST3 0x8f1bbcdcL +#define CONST4 0xca62c1d6L + +/* truncate to 32 bits -- should be a null op on 32-bit machines */ + +#define T32(x) ((x) & 0xffffffffL) + +/* 32-bit rotate */ + +#define R32(x,n) T32(((x << n) | (x >> (32 - n)))) + +/* the generic case, for when the overall rotation is not unraveled */ + +#define FG(n) \ + T = T32(R32(A,5) + f##n(B,C,D) + E + *WP++ + CONST##n); \ + E = D; D = C; C = R32(B,30); B = A; A = T + +/* specific cases, for when the overall rotation is unraveled */ + +#define FA(n) \ + T = T32(R32(A,5) + f##n(B,C,D) + E + *WP++ + CONST##n); B = R32(B,30) + +#define FB(n) \ + E = T32(R32(T,5) + f##n(A,B,C) + D + *WP++ + CONST##n); A = R32(A,30) + +#define FC(n) \ + D = T32(R32(E,5) + f##n(T,A,B) + C + *WP++ + CONST##n); T = R32(T,30) + +#define FD(n) \ + C = T32(R32(D,5) + f##n(E,T,A) + B + *WP++ + CONST##n); E = R32(E,30) + +#define FE(n) \ + B = T32(R32(C,5) + f##n(D,E,T) + A + *WP++ + CONST##n); D = R32(D,30) + +#define FT(n) \ + A = T32(R32(B,5) + f##n(C,D,E) + T + *WP++ + CONST##n); C = R32(C,30) + +/*****************************************************************************/ + +#ifndef WIN32 + +/* sigh */ +#ifdef WORDS_BIGENDIAN +# if SIZEOF_LONG == 4 +# define SHA_BYTE_ORDER 4321 +# elif SIZEOF_LONG == 8 +# define SHA_BYTE_ORDER 87654321 +# endif +#else +# if SIZEOF_LONG == 4 +# define SHA_BYTE_ORDER 1234 +# elif SIZEOF_LONG == 8 +# define SHA_BYTE_ORDER 12345678 +# endif +#endif + +#else /* WIN32 */ + +#define SHA_BYTE_ORDER 1234 + +#endif /* !WIN32 */ + + +/* do SHA transformation */ +static void sha_transform(SHA_INFO *sha_info) +{ + int i; + uint8_t *dp; + unsigned long T, A, B, C, D, E, W[80], *WP; + + dp = sha_info->data; + +/* +the following makes sure that at least one code block below is +traversed or an error is reported, without the necessity for nested +preprocessor if/else/endif blocks, which are a great pain in the +nether regions of the anatomy... +*/ +#undef SWAP_DONE + +#if (SHA_BYTE_ORDER == 1234) +#define SWAP_DONE + for (i = 0; i < 16; ++i) { + T = *((unsigned long *) dp); + dp += 4; + W[i] = ((T << 24) & 0xff000000) | ((T << 8) & 0x00ff0000) | + ((T >> 8) & 0x0000ff00) | ((T >> 24) & 0x000000ff); + } +#endif /* SHA_BYTE_ORDER == 1234 */ + +#if (SHA_BYTE_ORDER == 4321) +#define SWAP_DONE + for (i = 0; i < 16; ++i) { + T = *((unsigned long *) dp); + dp += 4; + W[i] = T32(T); + } +#endif /* SHA_BYTE_ORDER == 4321 */ + +#if (SHA_BYTE_ORDER == 12345678) +#define SWAP_DONE + for (i = 0; i < 16; i += 2) { + T = *((unsigned long *) dp); + dp += 8; + W[i] = ((T << 24) & 0xff000000) | ((T << 8) & 0x00ff0000) | + ((T >> 8) & 0x0000ff00) | ((T >> 24) & 0x000000ff); + T >>= 32; + W[i+1] = ((T << 24) & 0xff000000) | ((T << 8) & 0x00ff0000) | + ((T >> 8) & 0x0000ff00) | ((T >> 24) & 0x000000ff); + } +#endif /* SHA_BYTE_ORDER == 12345678 */ + +#if (SHA_BYTE_ORDER == 87654321) +#define SWAP_DONE + for (i = 0; i < 16; i += 2) { + T = *((unsigned long *) dp); + dp += 8; + W[i] = T32(T >> 32); + W[i+1] = T32(T); + } +#endif /* SHA_BYTE_ORDER == 87654321 */ + +#ifndef SWAP_DONE +#error Unknown byte order -- you need to add code here +#endif /* SWAP_DONE */ + + for (i = 16; i < 80; ++i) { + W[i] = W[i-3] ^ W[i-8] ^ W[i-14] ^ W[i-16]; + W[i] = R32(W[i], 1); + } + + A = sha_info->digest[0]; + B = sha_info->digest[1]; + C = sha_info->digest[2]; + D = sha_info->digest[3]; + E = sha_info->digest[4]; + WP = W; + + FA(1); FB(1); FC(1); FD(1); FE(1); FT(1); FA(1); FB(1); FC(1); FD(1); + FE(1); FT(1); FA(1); FB(1); FC(1); FD(1); FE(1); FT(1); FA(1); FB(1); + FC(2); FD(2); FE(2); FT(2); FA(2); FB(2); FC(2); FD(2); FE(2); FT(2); + FA(2); FB(2); FC(2); FD(2); FE(2); FT(2); FA(2); FB(2); FC(2); FD(2); + FE(3); FT(3); FA(3); FB(3); FC(3); FD(3); FE(3); FT(3); FA(3); FB(3); + FC(3); FD(3); FE(3); FT(3); FA(3); FB(3); FC(3); FD(3); FE(3); FT(3); + FA(4); FB(4); FC(4); FD(4); FE(4); FT(4); FA(4); FB(4); FC(4); FD(4); + FE(4); FT(4); FA(4); FB(4); FC(4); FD(4); FE(4); FT(4); FA(4); FB(4); + + sha_info->digest[0] = T32(sha_info->digest[0] + E); + sha_info->digest[1] = T32(sha_info->digest[1] + T); + sha_info->digest[2] = T32(sha_info->digest[2] + A); + sha_info->digest[3] = T32(sha_info->digest[3] + B); + sha_info->digest[4] = T32(sha_info->digest[4] + C); +} + +/* initialize the SHA digest */ +void sha_init(SHA_INFO *sha_info) +{ + sha_info->digest[0] = 0x67452301L; + sha_info->digest[1] = 0xefcdab89L; + sha_info->digest[2] = 0x98badcfeL; + sha_info->digest[3] = 0x10325476L; + sha_info->digest[4] = 0xc3d2e1f0L; + sha_info->count_lo = 0L; + sha_info->count_hi = 0L; + sha_info->local = 0; +} + +/* update the SHA digest */ +void sha_update(SHA_INFO *sha_info, const void *data, size_t count) +{ + int i; + unsigned long clo; + const uint8_t *buffer = data; + + clo = T32(sha_info->count_lo + ((unsigned long) count << 3)); + if (clo < sha_info->count_lo) { + ++sha_info->count_hi; + } + sha_info->count_lo = clo; + sha_info->count_hi += (unsigned long) count >> 29; + if (sha_info->local) { + i = SHA_BLOCKSIZE - sha_info->local; + if (i > count) { + i = count; + } + memcpy(sha_info->data + sha_info->local, buffer, i); + count -= i; + buffer += i; + sha_info->local += i; + if (sha_info->local == SHA_BLOCKSIZE) { + sha_transform(sha_info); + } else { + return; + } + } + while (count >= SHA_BLOCKSIZE) { + memcpy(sha_info->data, buffer, SHA_BLOCKSIZE); + buffer += SHA_BLOCKSIZE; + count -= SHA_BLOCKSIZE; + sha_transform(sha_info); + } + memcpy(sha_info->data, buffer, count); + sha_info->local = count; +} + +/* finish computing the SHA digest */ +void sha_final(SHA_INFO *sha_info, unsigned char *digest) +{ + int count; + unsigned long lo_bit_count, hi_bit_count; + + lo_bit_count = sha_info->count_lo; + hi_bit_count = sha_info->count_hi; + count = (int) ((lo_bit_count >> 3) & 0x3f); + sha_info->data[count++] = 0x80; + if (count > SHA_BLOCKSIZE - 8) { + memset(sha_info->data + count, 0, SHA_BLOCKSIZE - count); + sha_transform(sha_info); + memset(sha_info->data, 0, SHA_BLOCKSIZE - 8); + } else { + memset(sha_info->data + count, 0, + SHA_BLOCKSIZE - 8 - count); + } + sha_info->data[56] = (unsigned char) ((hi_bit_count >> 24) & 0xff); + sha_info->data[57] = (unsigned char) ((hi_bit_count >> 16) & 0xff); + sha_info->data[58] = (unsigned char) ((hi_bit_count >> 8) & 0xff); + sha_info->data[59] = (unsigned char) ((hi_bit_count >> 0) & 0xff); + sha_info->data[60] = (unsigned char) ((lo_bit_count >> 24) & 0xff); + sha_info->data[61] = (unsigned char) ((lo_bit_count >> 16) & 0xff); + sha_info->data[62] = (unsigned char) ((lo_bit_count >> 8) & 0xff); + sha_info->data[63] = (unsigned char) ((lo_bit_count >> 0) & 0xff); + sha_transform(sha_info); + digest[ 0] = (unsigned char) ((sha_info->digest[0] >> 24) & 0xff); + digest[ 1] = (unsigned char) ((sha_info->digest[0] >> 16) & 0xff); + digest[ 2] = (unsigned char) ((sha_info->digest[0] >> 8) & 0xff); + digest[ 3] = (unsigned char) ((sha_info->digest[0] ) & 0xff); + digest[ 4] = (unsigned char) ((sha_info->digest[1] >> 24) & 0xff); + digest[ 5] = (unsigned char) ((sha_info->digest[1] >> 16) & 0xff); + digest[ 6] = (unsigned char) ((sha_info->digest[1] >> 8) & 0xff); + digest[ 7] = (unsigned char) ((sha_info->digest[1] ) & 0xff); + digest[ 8] = (unsigned char) ((sha_info->digest[2] >> 24) & 0xff); + digest[ 9] = (unsigned char) ((sha_info->digest[2] >> 16) & 0xff); + digest[10] = (unsigned char) ((sha_info->digest[2] >> 8) & 0xff); + digest[11] = (unsigned char) ((sha_info->digest[2] ) & 0xff); + digest[12] = (unsigned char) ((sha_info->digest[3] >> 24) & 0xff); + digest[13] = (unsigned char) ((sha_info->digest[3] >> 16) & 0xff); + digest[14] = (unsigned char) ((sha_info->digest[3] >> 8) & 0xff); + digest[15] = (unsigned char) ((sha_info->digest[3] ) & 0xff); + digest[16] = (unsigned char) ((sha_info->digest[4] >> 24) & 0xff); + digest[17] = (unsigned char) ((sha_info->digest[4] >> 16) & 0xff); + digest[18] = (unsigned char) ((sha_info->digest[4] >> 8) & 0xff); + digest[19] = (unsigned char) ((sha_info->digest[4] ) & 0xff); +} + +/*****************************************************************************/ + +#define BLOCK_SIZE 8192 + +#if 0 +/* compute the SHA digest of a FILE stream */ +static void sha_stream(unsigned char digest[20], SHA_INFO *sha_info, FILE *fin) +{ + int i; + uint8_t data[BLOCK_SIZE]; + + sha_init(sha_info); + while ((i = fread(data, 1, BLOCK_SIZE, fin)) > 0) { + sha_update(sha_info, data, i); + } + sha_final(sha_info, digest); +} + +/* print a SHA digest */ +static void sha_print(unsigned char digest[20]) +{ + int i, j; + + for (j = 0; j < 5; ++j) { + for (i = 0; i < 4; ++i) { + printf("%02x", *digest++); + } + printf("%c", (j < 4) ? ' ' : '\n'); + } +} +#endif + +/*****************************************************************************/ + +/* + * Hash a file with the sha1 algorithm using fread. Hash the whole file if + * size == 0. + */ +static unsigned char *sha1_hash_fread (const char *file, off_t size) +{ + FILE *f; + unsigned char *hash; + sha1_state_t state; + off_t len; + ssize_t n; + struct stat st; + char buf[BLOCK_SIZE]; + + if (!(f = fopen (file, "rb"))) + return NULL; + + sha_init (&state); + + if (stat (file, &st) == -1) + { + fclose (f); + return NULL; + } + + if (size == 0) + size = st.st_size; + + while (size > 0) + { + len = MIN (sizeof (buf), size); + + n = fread (buf, 1, len, f); + + if (n == 0 || n != len) + break; + + sha_update (&state, (unsigned char *) buf, len); + size -= len; + } + + fclose (f); + + if (size != 0) + return NULL; + + if ((hash = malloc (SHA1_BINSIZE))) + sha_final (&state, hash); + + return hash; +} + +/*****************************************************************************/ + +/* return a base32 representation of a sha1 hash */ +char *sha1_string (const unsigned char *sha1) +{ + char *base32; + + base32 = malloc (SHA1_STRLEN + 1); + + if (!base32) + return NULL; + + gt_base32_encode (sha1, SHA1_BINSIZE, base32, SHA1_STRLEN); + base32[32] = 0; + + return base32; +} + +/*****************************************************************************/ + +unsigned char *sha1_bin (const char *ascii) +{ + unsigned char *bin; + size_t len; + + /* TODO: maybe this should copy the string and pad up to the min length if + * it's less than 32? */ + len = strlen (ascii); + assert (len >= SHA1_STRLEN); + + if (!gt_base32_valid (ascii, SHA1_STRLEN)) + return NULL; + + if (!(bin = malloc (SHA1_BINSIZE))) + return NULL; + + gt_base32_decode (ascii, SHA1_STRLEN, bin, SHA1_BINSIZE); + return bin; +} + +/*****************************************************************************/ + +unsigned char *sha1_digest (const char *file, off_t size) +{ + unsigned char *hash; + + if (!file) + return NULL; + + hash = sha1_hash_fread (file, size); + + return hash; +} + +unsigned char *sha1_dup (const unsigned char *sha1) +{ + unsigned char *new_sha1; + + if (!(new_sha1 = malloc (SHA1_BINSIZE))) + return NULL; + + memcpy (new_sha1, sha1, SHA1_BINSIZE); + + return new_sha1; +} + +/*****************************************************************************/ + +#if 0 +#include + +int main (int argc, char **argv) +{ + int i; + + for (i = 1; i < argc; i++) + { + unsigned char *bin; + char *str; + + if (!(bin = sha1_digest (argv[i], 0))) + { + perror ("sha1_digest"); + continue; + } + + if ((str = sha1_string (bin))) + printf ("%s\t%s\n", basename (argv[i]), str); + + free (str); + free (bin); + } + + return 0; +} +#endif diff -r 000000000000 -r d39e1d0d75b6 src/sha1.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/sha1.h Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,57 @@ +/* + * $Id: sha1.h,v 1.10 2004/03/05 17:47:29 hipnod Exp $ + * + * Copyright (C) 2001-2004 giFT project (gift.sourceforge.net) + * + * 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. + */ + +#ifndef GIFT_GT_SHA1_H_ +#define GIFT_GT_SHA1_H_ + +/*****************************************************************************/ + +#define SHA_BLOCKSIZE 64 +#define SHA_DIGESTSIZE 20 + +#define SHA1_BINSIZE 20 +#define SHA1_STRLEN 32 + +/*****************************************************************************/ + +struct sha1_state +{ + unsigned long digest[5]; /* message digest */ + unsigned long count_lo, count_hi; /* 64-bit bit count */ + uint8_t data[SHA_BLOCKSIZE]; /* SHA data buffer */ + int local; /* unprocessed amount in data */ +}; + +typedef struct sha1_state sha1_state_t; + +/*****************************************************************************/ + +/* TODO: prefix these suckers */ +char *sha1_string (const unsigned char *sha1); +unsigned char *sha1_digest (const char *file, off_t size); +unsigned char *sha1_bin (const char *ascii); +unsigned char *sha1_dup (const unsigned char *sha1); + +/*****************************************************************************/ + +void gt_sha1_init (sha1_state_t *state); +void gt_sha1_append (sha1_state_t *state, const void *data, + size_t len); +void gt_sha1_finish (sha1_state_t *state, unsigned char *hash); + +/*****************************************************************************/ + +#endif /* GIFT_GT_SHA1_H_ */ diff -r 000000000000 -r d39e1d0d75b6 src/transfer/Makefile.am --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/transfer/Makefile.am Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,13 @@ +AM_CFLAGS = \ + $(GNUTELLA_CFLAGS) + +INCLUDES = \ + -I$(top_srcdir)/src + +noinst_LTLIBRARIES = \ + libgt_transfer.la + +libgt_transfer_la_SOURCES = \ + download.c download.h \ + push_proxy.c push_proxy.h \ + source.c source.h diff -r 000000000000 -r d39e1d0d75b6 src/transfer/Makefile.in --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/transfer/Makefile.in Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,438 @@ +# Makefile.in generated by automake 1.7.9 from Makefile.am. +# @configure_input@ + +# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 +# Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +top_builddir = ../.. + +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +INSTALL = @INSTALL@ +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +host_triplet = @host@ +ACLOCAL = @ACLOCAL@ +AMDEP_FALSE = @AMDEP_FALSE@ +AMDEP_TRUE = @AMDEP_TRUE@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +GNUTELLA_CFLAGS = @GNUTELLA_CFLAGS@ +GNUTELLA_LIBS = @GNUTELLA_LIBS@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIBXML2_CFLAGS = @LIBXML2_CFLAGS@ +LIBXML2_LIBS = @LIBXML2_LIBS@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ +MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ +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@ +PKG_CONFIG = @PKG_CONFIG@ +PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ +RANLIB = @RANLIB@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +USE_ZLIB = @USE_ZLIB@ +VERSION = @VERSION@ +XML2_CONFIG = @XML2_CONFIG@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +ac_ct_RANLIB = @ac_ct_RANLIB@ +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@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +datadir = @datadir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +oldincludedir = @oldincludedir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +AM_CFLAGS = \ + $(GNUTELLA_CFLAGS) + + +INCLUDES = \ + -I$(top_srcdir)/src + + +noinst_LTLIBRARIES = \ + libgt_transfer.la + + +libgt_transfer_la_SOURCES = \ + download.c download.h \ + push_proxy.c push_proxy.h \ + source.c source.h + +subdir = src/transfer +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) + +libgt_transfer_la_LDFLAGS = +libgt_transfer_la_LIBADD = +am_libgt_transfer_la_OBJECTS = download.lo push_proxy.lo source.lo +libgt_transfer_la_OBJECTS = $(am_libgt_transfer_la_OBJECTS) + +DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/download.Plo \ +@AMDEP_TRUE@ ./$(DEPDIR)/push_proxy.Plo ./$(DEPDIR)/source.Plo +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) \ + $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +DIST_SOURCES = $(libgt_transfer_la_SOURCES) +DIST_COMMON = $(srcdir)/Makefile.in Makefile.am +SOURCES = $(libgt_transfer_la_SOURCES) + +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4) + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu src/transfer/Makefile +Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in $(top_builddir)/config.status + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe) + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" = "$$p" && dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libgt_transfer.la: $(libgt_transfer_la_OBJECTS) $(libgt_transfer_la_DEPENDENCIES) + $(LINK) $(libgt_transfer_la_LDFLAGS) $(libgt_transfer_la_OBJECTS) $(libgt_transfer_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) core *.core + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/download.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/push_proxy.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/source.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \ +@am__fastdepCC_TRUE@ -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \ +@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ +@am__fastdepCC_TRUE@ fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$< + +.c.obj: +@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \ +@am__fastdepCC_TRUE@ -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \ +@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ +@am__fastdepCC_TRUE@ fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi` + +.c.lo: +@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \ +@am__fastdepCC_TRUE@ -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; \ +@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ +@am__fastdepCC_TRUE@ fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Plo' tmpdepfile='$(DEPDIR)/$*.TPlo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +distclean-libtool: + -rm -f libtool +uninstall-info-am: + +ETAGS = etags +ETAGSFLAGS = + +CTAGS = ctags +CTAGSFLAGS = + +tags: TAGS + +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: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(ETAGS_ARGS)$$tags$$unique" \ + || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique + +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) + +top_distdir = ../.. +distdir = $(top_distdir)/$(PACKAGE)-$(VERSION) + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ + list='$(DISTFILES)'; for file in $$list; do \ + case $$file in \ + $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ + $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ + esac; \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test "$$dir" != "$$file" && test "$$dir" != "."; then \ + dir="/$$dir"; \ + $(mkinstalldirs) "$(distdir)$$dir"; \ + else \ + dir=''; \ + fi; \ + if test -d $$d/$$file; then \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) + +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-libtool distclean-tags + +dvi: dvi-am + +dvi-am: + +info: info-am + +info-am: + +install-data-am: + +install-exec-am: + +install-info: install-info-am + +install-man: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-info-am + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLTLIBRARIES ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am info info-am install \ + install-am install-data install-data-am install-exec \ + install-exec-am install-info install-info-am install-man \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool pdf \ + pdf-am ps ps-am tags uninstall uninstall-am uninstall-info-am + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff -r 000000000000 -r d39e1d0d75b6 src/transfer/download.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/transfer/download.c Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,104 @@ +/* + * $Id: download.c,v 1.2 2004/04/17 06:06:46 hipnod Exp $ + * + * Copyright (C) 2004 giFT project (gift.sourceforge.net) + * + * 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. + */ + +#include "gt_gnutella.h" +#include "transfer/download.h" + +/*****************************************************************************/ + +static Dataset *gt_downloads; + +/*****************************************************************************/ + +void gt_download_add (Transfer *transfer, Source *source) +{ + Dataset *d; + + d = dataset_lookup (gt_downloads, &transfer, sizeof(transfer)); + dataset_insert (&d, &source, sizeof(source), source, 0); + + dataset_insert (>_downloads, &transfer, sizeof(transfer), d, 0); +} + +void gt_download_remove (Transfer *transfer, Source *source) +{ + Dataset *d; + + d = dataset_lookup (gt_downloads, &transfer, sizeof(transfer)); + dataset_remove (d, &source, sizeof(source)); + + if (dataset_length (d) == 0) + { + dataset_clear (d); + dataset_remove (gt_downloads, &transfer, sizeof(transfer)); + } + + if (dataset_length (gt_downloads) == 0) + { + dataset_clear (gt_downloads); + gt_downloads = NULL; + } +} + +/*****************************************************************************/ + +static int ds_find_hash (ds_data_t *key, ds_data_t *value, void *udata) +{ + Array *a = udata; + char *sha1; + Source **ret; + Source *src = value->data; + int n; + + n = array_list (&a, &sha1, &ret, NULL); + assert (n == 2); + + if (!src->hash) + return DS_CONTINUE; + + /* NOTE: the hash is prefixed with giftd's hash here */ + if (strcmp (src->hash, sha1) == 0) + { + *ret = src; + return DS_BREAK; + } + + return DS_CONTINUE; +} + +static int ds_traverse_transfer (ds_data_t *key, ds_data_t *value, void *udata) +{ + Dataset *d = value->data; + + dataset_foreach_ex (d, ds_find_hash, udata); + return DS_CONTINUE; +} + +Source *gt_download_lookup (const char *sha1) +{ + Array *a; + Source *ret = NULL; + + a = array_new ((void *)sha1, &ret, NULL); + + if (!a) + return NULL; + + dataset_foreach_ex (gt_downloads, ds_traverse_transfer, a); + array_unset (&a); + + return ret; +} diff -r 000000000000 -r d39e1d0d75b6 src/transfer/download.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/transfer/download.h Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,29 @@ +/* + * $Id: download.h,v 1.1 2004/01/18 05:42:55 hipnod Exp $ + * + * Copyright (C) 2004 giFT project (gift.sourceforge.net) + * + * 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. + */ + +#ifndef GIFT_GT_DOWNLOAD_H_ +#define GIFT_GT_DOWNLOAD_H_ + +/*****************************************************************************/ + +void gt_download_add (Transfer *transfer, Source *source); +void gt_download_remove (Transfer *transfer, Source *source); + +Source *gt_download_lookup (const char *sha1); + +/*****************************************************************************/ + +#endif /* GIFT_GT_DOWNLOAD_H_ */ diff -r 000000000000 -r d39e1d0d75b6 src/transfer/push_proxy.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/transfer/push_proxy.c Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,292 @@ +/* + * $Id: push_proxy.c,v 1.2 2004/06/02 07:13:02 hipnod Exp $ + * + * Copyright (C) 2004 giFT project (gift.sourceforge.net) + * + * 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. + */ + +#include "gt_gnutella.h" + +#include "gt_node.h" +#include "gt_packet.h" /* htovs() */ + +#include "transfer/push_proxy.h" + +/*****************************************************************************/ + +/* + * All this GGEP stuff will move somewhere else soon. Just haven't decided + * where to put it. + */ + +/*****************************************************************************/ + +#define PROXY_DEBUG gt_config_get_int("push_proxy/debug=0") + +/*****************************************************************************/ + +#define GGEP_HDR_LEN (1) /* 0xc3 */ +#define GGEP_EXT_MAX_LEN (63) /* use only a single len chunk for now */ + +enum ggep_length_flags +{ + GGEP_LEN_NOT_LAST = 0x80, /* not the last chunk */ + GGEP_LEN_LAST = 0x40, /* last length chunk flag */ +}; + +enum ggep_extension_flags +{ + GGEP_EXTF_LAST = 0x80, /* last extension */ + GGEP_EXTF_COBS_ENCODED = 0x40, /* encoded with COBS-encoding */ + GGEP_EXTF_COMPRESSED = 0x20, /* compressed */ + GGEP_EXTF_RESERVED = 0x10, /* reserved */ + + /* lower 4 bits is identifier length */ +}; + +/*****************************************************************************/ + +struct proxy_addr +{ + in_addr_t ipv4; + in_port_t port; +}; + +typedef struct ggep +{ + uint8_t *block; + size_t block_len; + size_t offset; + size_t last_ext_offset; + BOOL error; +} ggep_t; + +/*****************************************************************************/ + +static ggep_t proxy_block; +static Dataset *proxies; + +/*****************************************************************************/ + +static BOOL ggep_grow (ggep_t *ggep, size_t sz) +{ + uint8_t *new_block; + size_t new_size; + + new_size = ggep->block_len + sz; + if (!(new_block = realloc (ggep->block, new_size))) + return FALSE; + + ggep->block = new_block; + ggep->block_len = new_size; + + return TRUE; +} + +static BOOL ggep_init (ggep_t *ggep) +{ + ggep->block_len = 1; + ggep->offset = 1; + ggep->last_ext_offset = 0; + ggep->error = FALSE; + + if (!(ggep->block = malloc (1))) + return FALSE; + + /* append magic byte */ + ggep->block[0] = 0xc3; + + return TRUE; +} + +static void ggep_append (ggep_t *ggep, const void *data, size_t data_size) +{ + if (ggep_grow (ggep, data_size) == FALSE) + { + ggep->error = TRUE; + return; + } + + assert (ggep->offset + data_size <= ggep->block_len); + memcpy (&ggep->block[ggep->offset], data, data_size); + ggep->offset += data_size; +} + +/* TODO: this should use a writev()-like interface */ +static BOOL ggep_append_extension (ggep_t *ggep, const char *id, + const uint8_t *data, size_t data_len) +{ + uint8_t id_len; + uint8_t ext_flags; + uint8_t ext_data_len; + + id_len = strlen (id) & 0x0f; + + /* disable Encoding, Compression, LastExtension bits, len in low 4 bits */ + ext_flags = id_len; + + /* track position of last extension for setting LastExtension bit */ + ggep->last_ext_offset = ggep->offset; + + /* extension flag header */ + ggep_append (ggep, &ext_flags, 1); + + /* extension identifier */ + ggep_append (ggep, id, id_len); + + assert (data_len <= GGEP_EXT_MAX_LEN); + ext_data_len = data_len | GGEP_LEN_LAST; /* add last length chunk flag */ + + /* the extension length */ + ggep_append (ggep, &ext_data_len, 1); + + /* the extension data */ + ggep_append (ggep, data, data_len); + + if (ggep->error) + return FALSE; + + return TRUE; +} + +static BOOL ggep_seal (ggep_t *ggep) +{ + if (ggep->last_ext_offset == 0) + return FALSE; + + /* set the LastExtension bit on the last extension */ + ggep->block[ggep->last_ext_offset] |= GGEP_EXTF_LAST; + return TRUE; +} + +static void ggep_finish (ggep_t *ggep) +{ + free (ggep->block); +} + +/*****************************************************************************/ + +static void ds_add_proxy (ds_data_t *key, ds_data_t *value, void **cmp) +{ + uint8_t *push_ext = cmp[0]; + size_t *push_ext_len = cmp[1]; + in_port_t port; + struct proxy_addr *proxy = value->data; + + port = htovs (proxy->port); + + if (*push_ext_len + 6 >= GGEP_EXT_MAX_LEN) + return; + + /* build the PUSH extension */ + memcpy (&push_ext[*push_ext_len], &proxy->ipv4, 4); *push_ext_len += 4; + memcpy (&push_ext[*push_ext_len], &port, 2); *push_ext_len += 2; +} + +static void update_block (ggep_t *ggep) +{ + uint8_t push_ext[GGEP_EXT_MAX_LEN]; /* ugh */ + size_t push_ext_len; /* double ugh */ + void *cmp[2]; + + ggep_finish (ggep); + + if (ggep_init (ggep) == FALSE) + return; + + cmp[0] = push_ext; + cmp[1] = &push_ext_len; + + push_ext_len = 0; + dataset_foreach (proxies, DS_FOREACH(ds_add_proxy), cmp); + assert (push_ext_len <= GGEP_EXT_MAX_LEN); + + if (ggep_append_extension (ggep, "PUSH", push_ext, push_ext_len) == FALSE) + return; + + ggep_seal (ggep); +} + +/*****************************************************************************/ + +static void push_proxy_change (GtNode *node, in_addr_t ipv4, + in_port_t port, BOOL add) +{ + struct proxy_addr addr; + struct proxy_addr *stored; + + addr.ipv4 = ipv4; + addr.port = port; + + stored = dataset_lookup (proxies, &node, sizeof(node)); + if (PROXY_DEBUG) + { + if (add && !stored) + GT->DBGFN (GT, "adding push proxy %s:%hu", net_ip_str (ipv4), port); + else if (!add && stored) + GT->DBGFN (GT, "rming push proxy %s:%hu", net_ip_str (ipv4), port); + } + + if (add) + dataset_insert (&proxies, &node, sizeof(node), &addr, sizeof(addr)); + else + dataset_remove (proxies, &node, sizeof(node)); + + update_block (&proxy_block); +} + +void gt_push_proxy_add (GtNode *node, in_addr_t ipv4, in_port_t port) +{ + assert (node->push_proxy_ip == 0); + assert (node->push_proxy_port == 0); + + push_proxy_change (node, ipv4, port, TRUE); + node->push_proxy_ip = ipv4; + node->push_proxy_port = port; +} + +/* + * This must be called if the port changes, or if the proxy disconnects. + */ +void gt_push_proxy_del (GtNode *node) +{ + push_proxy_change (node, node->push_proxy_ip, + node->push_proxy_port, FALSE); + node->push_proxy_ip = 0; + node->push_proxy_port = 0; +} + +BOOL gt_push_proxy_get_ggep_block (uint8_t **block, size_t *block_len) +{ + if (dataset_length (proxies) == 0) + return FALSE; + + *block = proxy_block.block; + *block_len = proxy_block.block_len; + + return TRUE; +} + +/*****************************************************************************/ + +void gt_push_proxy_init (void) +{ + ggep_init (&proxy_block); +} + +void gt_push_proxy_cleanup (void) +{ + dataset_clear (proxies); + proxies = NULL; + + ggep_finish (&proxy_block); +} diff -r 000000000000 -r d39e1d0d75b6 src/transfer/push_proxy.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/transfer/push_proxy.h Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,34 @@ +/* + * $Id: push_proxy.h,v 1.1 2004/03/24 06:33:09 hipnod Exp $ + * + * Copyright (C) 2004 giFT project (gift.sourceforge.net) + * + * 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. + */ + +#ifndef GIFT_GT_PUSH_PROXY_H_ +#define GIFT_GT_PUSH_PROXY_H_ + +/*****************************************************************************/ + +void gt_push_proxy_add (GtNode *node, in_addr_t ipv4, + in_port_t port); +void gt_push_proxy_del (GtNode *node); +BOOL gt_push_proxy_get_ggep_block (uint8_t **block, size_t *block_len); + +/*****************************************************************************/ + +void gt_push_proxy_init (void); +void gt_push_proxy_cleanup (void); + +/*****************************************************************************/ + +#endif /* GIFT_GT_PUSH_PROXY_H_ */ diff -r 000000000000 -r d39e1d0d75b6 src/transfer/source.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/transfer/source.c Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,754 @@ +/* + * $Id: source.c,v 1.12 2005/01/04 14:31:44 mkern Exp $ + * + * Copyright (C) 2002-2003 giFT project (gift.sourceforge.net) + * + * 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. + */ + +#include "gt_gnutella.h" +#include "gt_share_file.h" + +#include "encoding/url.h" + +#include "transfer/source.h" +#include "transfer/download.h" + +/*****************************************************************************/ + +/* + * Most of the goop in this file is for specifying each parameter for the giFT + * source URL. The source URL is supposed to encode all the information + * necessary for contacting a source. + */ + +/*****************************************************************************/ + +typedef BOOL (*UnserializeFunc) (GtSource *gt, const char *key, + const char *value); +typedef BOOL (*SerializeFunc) (GtSource *gt, String *s); + +#define URL_OPT_SERIALIZE(name) \ + BOOL gt_src_spew_##name (GtSource *gt, String *s) + +#define URL_OPT_UNSERIALIZE(name) \ + BOOL gt_src_parse_##name (GtSource *gt, const char *key, const char *value) + +#define DECLARE_URL_OPT(name) \ + static URL_OPT_SERIALIZE(name); \ + static URL_OPT_UNSERIALIZE(name) + +/*****************************************************************************/ + +DECLARE_URL_OPT(ip); +DECLARE_URL_OPT(port); +DECLARE_URL_OPT(server_ip); +DECLARE_URL_OPT(server_port); +DECLARE_URL_OPT(guid); +DECLARE_URL_OPT(fw); +DECLARE_URL_OPT(index); +DECLARE_URL_OPT(name); + +/* + * Options that can go in our source URL format. + */ +static struct url_option +{ + const char *key; /* key in url (i.e. "port" in "port=6346") */ + SerializeFunc serialize; + UnserializeFunc unserialize; +} gt_source_url_options[] = +{ + { "ip", gt_src_spew_ip, gt_src_parse_ip }, + { "port", gt_src_spew_port, gt_src_parse_port }, + { "sip", gt_src_spew_server_ip, gt_src_parse_server_ip }, + { "sport", gt_src_spew_server_port, gt_src_parse_server_port }, + { "fw", gt_src_spew_fw, gt_src_parse_fw }, + { "guid", gt_src_spew_guid, gt_src_parse_guid }, + { "index", gt_src_spew_index, gt_src_parse_index }, + { "name", gt_src_spew_name, gt_src_parse_name }, + { NULL, NULL, NULL } +}; + +/*****************************************************************************/ + +/* + * These functions return TRUE if they produced some output. + */ + +static URL_OPT_SERIALIZE(ip) +{ + if (!gt->user_ip) + return FALSE; + + string_appendf (s, "ip=%s", net_ip_str (gt->user_ip)); + return TRUE; +} + +static URL_OPT_SERIALIZE(port) +{ + if (gt->user_port == 6346) + return FALSE; + + string_appendf (s, "port=%hu", gt->user_port); + return TRUE; +} + +static URL_OPT_SERIALIZE(name) +{ + if (!gt->filename) + return FALSE; + + string_appendf (s, "name=%s", gt->filename); + return TRUE; +} + +static URL_OPT_SERIALIZE(guid) +{ + if (gt_guid_is_empty (gt->guid)) + return FALSE; + + string_appendf (s, "guid=%s", gt_guid_str (gt->guid)); + return TRUE; +} + +static URL_OPT_SERIALIZE(server_ip) +{ + if (!gt->server_ip) + return FALSE; + + string_appendf (s, "sip=%s", net_ip_str (gt->server_ip)); + return TRUE; +} + +static URL_OPT_SERIALIZE(server_port) +{ + if (gt->server_port == 6346) + return FALSE; + + string_appendf (s, "sport=%hu", gt->server_port); + return TRUE; +} + +static URL_OPT_SERIALIZE(fw) +{ + if (!gt->firewalled) + return FALSE; + + string_append (s, "fw=1"); + return TRUE; +} + +static URL_OPT_SERIALIZE(index) +{ + if (!gt->index) + return FALSE; + + string_appendf (s, "index=%u", gt->index); + return TRUE; +} + +/*****************************************************************************/ + +/* + * These functions return TRUE if they were successful. + */ + +static URL_OPT_UNSERIALIZE(ip) +{ + in_addr_t ip; + + ip = net_ip (value); + + if (ip == 0 || ip == INADDR_NONE) + return FALSE; + + gt->user_ip = ip; + return TRUE; +} + +static URL_OPT_UNSERIALIZE(port) +{ + unsigned long port; + + port = gift_strtoul (value); + + if (port == ULONG_MAX || port >= 65536) + return FALSE; + + gt->user_port = port; + return TRUE; +} + +static URL_OPT_UNSERIALIZE(name) +{ + char *name; + + if (!(name = STRDUP (value))) + return FALSE; + + gt->filename = name; + return TRUE; +} + +static URL_OPT_UNSERIALIZE(guid) +{ + gt_guid_t *guid; + + if (!(guid = gt_guid_bin (value))) + return FALSE; + + free (gt->guid); + gt->guid = guid; + + return TRUE; +} + +static URL_OPT_UNSERIALIZE(server_ip) +{ + in_addr_t ip; + + ip = net_ip (value); + + if (ip == 0 || ip == INADDR_NONE) + return FALSE; + + gt->server_ip = ip; + return TRUE; +} + +static URL_OPT_UNSERIALIZE(server_port) +{ + unsigned long port; + + port = gift_strtoul (value); + + if (port == ULONG_MAX || port >= 65536) + return FALSE; + + gt->server_port = port; + return TRUE; +} + +static URL_OPT_UNSERIALIZE(fw) +{ + unsigned long fw; + + fw = gift_strtoul (value); + + if (fw != 0 && fw != 1) + return FALSE; + + if (fw) + gt->firewalled = TRUE; + else + gt->firewalled = FALSE; + + return TRUE; +} + +static URL_OPT_UNSERIALIZE(index) +{ + unsigned long index; + + index = gift_strtoul (value); + + if (index == ULONG_MAX) + return FALSE; + + gt->index = (uint32_t)index; + return TRUE; +} + +/*****************************************************************************/ + +/* + * Old Gnutella URL format: + * + * Gnutella://:@:[[FW]]:// + * + * server_port is the server's gnutella port. This should probably pass + * back both the gnutella port instead and the peer's connecting port, to + * help in disambiguating different users behind the same firewall. + */ +static BOOL parse_old_url (char *url, + uint32_t *r_user_ip, uint16_t *r_user_port, + uint32_t *r_server_ip, uint16_t *r_server_port, + BOOL *firewalled, char **r_pushid, + uint32_t *r_index, char **r_fname) +{ + char *port_and_flags; + char *flag; + + string_sep (&url, "://"); + + /* TODO: check for more errors */ + + *r_user_ip = net_ip (string_sep (&url, ":")); + *r_user_port = gift_strtoul (string_sep (&url, "@")); + *r_server_ip = net_ip (string_sep (&url, ":")); + + /* handle bracketed flags after port. ugh, this is so ugly */ + port_and_flags = string_sep (&url, ":"); + *r_server_port = gift_strtoul (string_sep (&port_and_flags, "[")); + + if (!string_isempty (port_and_flags)) + { + /* grab any flags inside the brackets */ + while ((flag = string_sep_set (&port_and_flags, ",]"))) + { + if (!STRCMP (flag, "FW")) + *firewalled = TRUE; + } + } + + *r_pushid = string_sep (&url, "/"); + *r_index = gift_strtoul (string_sep (&url, "/")); + *r_fname = url; + + return TRUE; +} + +static struct url_option *lookup_url_option (const char *key) +{ + struct url_option *url_opt; + + url_opt = >_source_url_options[0]; + + while (url_opt->key != NULL) + { + if (strcmp (url_opt->key, key) == 0) + return url_opt; + + url_opt++; + } + + return NULL; +} + +/* + * New parameter-based URL format: + * + * Gnutella:?ip=&port=&sip=&sport=[&fw=]... + * + * Parameters we don't understand are placed in gt_src->extra Dataset, so we + * should be forwards and backwards compatible when adding new parameters. + */ +static BOOL parse_new_url (char *url, GtSource *gt) +{ + char *option; + char *key; + char *value; + + /* skip prefix */ + string_sep (&url, ":?"); + + while ((option = string_sep (&url, "&"))) + { + struct url_option *url_opt; + + value = option; + key = string_sep (&value, "="); + + if (string_isempty (key) || string_isempty (value)) + continue; + + /* look up the key in our list of possible options */ + if ((url_opt = lookup_url_option (key))) + { + /* unserialize the specified key */ + if (url_opt->unserialize (gt, key, value)) + continue; + + /* fail through on failure to store failed keys */ + } + + /* store the unfound keys in the extra parameter dataset */ + dataset_insertstr (>->extra, key, value); + } + + return TRUE; +} + +/*****************************************************************************/ + +static GtSource *handle_old_url (char *url) +{ + GtSource *gt; + char *fname = NULL; + char *guid_ascii = NULL; + + if (!(gt = gt_source_new ())) + return NULL; + + if (!parse_old_url (url, >->user_ip, >->user_port, + >->server_ip, >->server_port, + >->firewalled, &guid_ascii, >->index, &fname)) + { + gt_source_free (gt); + return NULL; + } + + gt->filename = NULL; + if (!string_isempty (fname)) + gt->filename = STRDUP (fname); + + gt->guid = NULL; + if (!string_isempty (guid_ascii)) + gt->guid = gt_guid_bin (guid_ascii); + + return gt; +} + +static GtSource *handle_new_url (char *url) +{ + GtSource *gt; + + if (!(gt = gt_source_new ())) + return NULL; + + if (!parse_new_url (url, gt)) + { + gt_source_free (gt); + return NULL; + } + + return gt; +} + +GtSource *gt_source_unserialize (const char *url) +{ + char *t_url; + GtSource *src = NULL; + + if (!url) + return NULL; + + if (!(t_url = STRDUP (url))) + return NULL; + + /* + * Determine whether this is the new format URL (beginning with + * "Gnutella:?") or the old-style (starts with "Gnutella://") + */ + if (strncmp (t_url, "Gnutella://", sizeof ("Gnutella://") - 1) == 0) + { + src = handle_old_url (t_url); + } + else if (strncmp (t_url, "Gnutella:?", sizeof ("Gnutella:?") - 1) == 0) + { + src = handle_new_url (t_url); + } + else + { + /* do nothing */ + } + + FREE (t_url); + + return src; +} + +/* use the old format serialization for now */ +#if 0 +static void unknown_opt (ds_data_t *key, ds_data_t *value, void *udata) +{ + String *str = udata; + string_appendf (str, "%s=%s&", key->data, value->data); +} + +char *gt_source_serialize (GtSource *gt) +{ + struct url_option *opt; + char *url; + size_t len; + String str; + + string_init (&str); + string_appendf (&str, "%s:?", GT->name); + + for (opt = gt_source_url_options; opt->key != NULL; opt++) + { + if (opt->serialize (gt, &str)) + { + /* append separator for next argument */ + string_appendc (&str, '&'); + } + } + + /* copy unknown options to the URL */ + dataset_foreach (gt->extra, unknown_opt, &str); + + len = str.len; + assert (len > 0); + + url = string_finish_keep (&str); + + /* remove trailing separator (may not be there if source is empty) */ + if (url[len - 1] == '&') + url[len - 1] = 0; + + return url; +} +#endif + +/* serialize to the old format for now */ +char *gt_source_serialize (GtSource *gt) +{ + String *str; + + if (!(str = string_new (NULL, 0, 0, TRUE))) + return FALSE; + + string_appendf (str, "Gnutella://%s:%hu", net_ip_str (gt->user_ip), + gt->user_port); + + string_appendf (str, "@%s:%hu", net_ip_str (gt->server_ip), + gt->server_port); + + string_appendc (str, '['); + + if (gt->firewalled) + string_append (str, "FW"); + + string_appendc (str, ']'); + + string_appendf (str, ":%s/%lu", + STRING_NOTNULL (gt_guid_str (gt->guid)), (long)gt->index); + string_appendf (str, "/%s", + STRING_NOTNULL (gt->filename)); /* already encoded */ + + return string_free_keep (str); +} + +/*****************************************************************************/ + +/* + * This is called by the search result code in order to produce + * source URLs. + * + * TODO: This is just wrong -- interface is not very extensible. The search + * result code should probably use GtSource and call gt_source_serialize(). + */ +char *gt_source_url_new (const char *filename, uint32_t index, + in_addr_t user_ip, uint16_t user_port, + in_addr_t server_ip, uint16_t server_port, + BOOL firewalled, const gt_guid_t *client_id) +{ + GtSource *src; + char *url; + + if (!(src = gt_source_new ())) + return NULL; + + gt_source_set_ip (src, user_ip); + gt_source_set_port (src, user_port); + gt_source_set_index (src, index); + gt_source_set_server_ip (src, server_ip); + gt_source_set_server_port (src, server_port); + gt_source_set_firewalled (src, firewalled); + + if (!gt_source_set_guid (src, client_id) || + !gt_source_set_filename (src, filename)) + { + gt_source_free (src); + return NULL; + } + + url = gt_source_serialize (src); + gt_source_free (src); + + return url; +} + +/*****************************************************************************/ + +GtSource *gt_source_new (void) +{ + GtSource *src; + + if (!(src = NEW (GtSource))) + return NULL; + + /* special case: port is 6346 if not specified */ + src->user_port = 6346; + src->server_port = 6346; + + return src; +} + +void gt_source_free (GtSource *gt) +{ + if (!gt) + return; + + free (gt->guid); + free (gt->filename); + free (gt->status_txt); + + FREE (gt); +} + +/*****************************************************************************/ + +void gt_source_set_ip (GtSource *src, in_addr_t ip) +{ + src->user_ip = ip; +} + +void gt_source_set_port (GtSource *src, in_port_t port) +{ + src->user_port = port; +} + +void gt_source_set_index (GtSource *src, uint32_t index) +{ + src->index = index; +} + +void gt_source_set_server_ip (GtSource *src, in_addr_t server_ip) +{ + src->server_ip = server_ip; +} + +void gt_source_set_server_port (GtSource *src, in_port_t server_port) +{ + src->server_port = server_port; +} + +void gt_source_set_firewalled (GtSource *src, BOOL fw) +{ + src->firewalled = fw; +} + +BOOL gt_source_set_filename (GtSource *src, const char *filename) +{ + char *encoded; + + /* special case for no filename */ + if (!filename) + { + free (src->filename); + src->filename = NULL; + return TRUE; + } + + if (!(encoded = gt_url_encode (filename))) + return FALSE; + + src->filename = encoded; + return TRUE; +} + +BOOL gt_source_set_guid (GtSource *src, const gt_guid_t *guid) +{ + gt_guid_t *dup; + + if (!(dup = gt_guid_dup (guid))) + return FALSE; + + src->guid = dup; + return TRUE; +} + +/*****************************************************************************/ + +int gnutella_source_cmp (Protocol *p, Source *a, Source *b) +{ + GtSource *gt_a = NULL; + GtSource *gt_b = NULL; + int ret = 0; + + if (!(gt_a = gt_source_unserialize (a->url)) || + !(gt_b = gt_source_unserialize (b->url))) + { + gt_source_free (gt_a); + gt_source_free (gt_b); + return -1; + } + + if (gt_a->user_ip > gt_b->user_ip) + ret = 1; + else if (gt_a->user_ip < gt_b->user_ip) + ret = -1; + + /* + * Having two sources with the same IP on the same transfer can trigger a + * bug in most versions of giftd. At least as of giftd < 0.11.9, this + * causes sources to be reactivated after download completion due to a bug + * in handle_next_queued called from download_complete. To avoid that, we + * pretend that multiple sources with the same hash from the same user_ip + * are the same here, by ignoring the port. If the sources compare + * equally, then one will replace the other when added, and there won't be + * any dead sources with the same IP available to reactivate when the + * download completes. + * + * It's ok for the client guid to be different, even if the IPs are the + * same, since in that case the guid gets reflected in the user string, so + * the bug in handle_next_queue() won't trigger. + * + * Also, Transfers that don't have hashes are ok since they can only ever + * have one user. So, if either source doesn't have a hash the bug won't + * trigger. + */ +#if 0 + if (gt_a->user_port > gt_b->user_port) + ret = 1; + else if (gt_a->user_port < gt_b->user_port) + ret = -1; +#endif + + /* if both IPs are private match by the guid */ + if (gt_is_local_ip (gt_a->user_ip, gt_a->server_ip) && + gt_is_local_ip (gt_b->user_ip, gt_b->server_ip)) + { + ret = gt_guid_cmp (gt_a->guid, gt_b->guid); + } + + if (ret == 0) + { + /* if the hashes match consider them equal */ + if (a->hash || b->hash) + ret = gift_strcmp (a->hash, b->hash); + else + ret = gift_strcmp (gt_a->filename, gt_b->filename); + } + + gt_source_free (gt_a); + gt_source_free (gt_b); + + return ret; +} + +int gnutella_source_add (Protocol *p, Transfer *transfer, Source *source) +{ + GtSource *src; + + assert (source->udata == NULL); + + if (!(src = gt_source_unserialize (source->url))) + return FALSE; + + source->udata = src; + + /* track this download */ + gt_download_add (transfer, source); + + return TRUE; +} + +void gnutella_source_remove (Protocol *p, Transfer *transfer, Source *source) +{ + gt_download_remove (transfer, source); + + assert (source->udata != NULL); + gt_source_free (source->udata); +} diff -r 000000000000 -r d39e1d0d75b6 src/transfer/source.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/transfer/source.h Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,90 @@ +/* + * $Id: source.h,v 1.4 2003/12/22 02:46:34 hipnod Exp $ + * + * Copyright (C) 2002-2003 giFT project (gift.sourceforge.net) + * + * 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. + */ + +#ifndef GIFT_GT_TRANSFER_SOURCE_H_ +#define GIFT_GT_TRANSFER_SOURCE_H_ + +/*****************************************************************************/ + +struct transfer; +struct source; + +typedef struct gt_source +{ + uint32_t user_ip; + uint16_t user_port; + uint32_t server_ip; + uint16_t server_port; + BOOL firewalled; + gt_guid_t *guid; + uint32_t index; + char *filename; + + /* + * Parameters we don't understand, but were in the source URL. + * Parsed for forwards compatibility reasons, so newer versions + * can play with the same state files as older versions). + */ + Dataset *extra; + + /* + * Fields that get set depending on what happens to this source. + * This should be in a shared per-server structure, actually. + */ + time_t retry_time; /* used for Retry-After; pollMin */ + char *status_txt; /* previous status text message */ + BOOL uri_res_failed; /* uri-res request failed */ + BOOL connect_failed; /* last connection attempt failed */ +} GtSource; + +/*****************************************************************************/ + +GtSource *gt_source_new (void); +void gt_source_free (GtSource *gt); + +char *gt_source_serialize (GtSource *src); +GtSource *gt_source_unserialize (const char *url); + +void gt_source_set_ip (GtSource *src, in_addr_t port); +void gt_source_set_port (GtSource *src, in_port_t port); +void gt_source_set_index (GtSource *src, uint32_t index); +void gt_source_set_server_ip (GtSource *src, in_addr_t server_ip); +void gt_source_set_server_port (GtSource *src, in_port_t server_port); +void gt_source_set_firewalled (GtSource *src, BOOL fw); + +BOOL gt_source_set_filename (GtSource *src, const char *filename); +BOOL gt_source_set_guid (GtSource *src, const gt_guid_t *guid); + +/*****************************************************************************/ + +/* deprecated */ +char *gt_source_url_new (const char *filename, uint32_t index, + in_addr_t user_ip, uint16_t user_port, + in_addr_t server_ip, uint16_t server_port, + BOOL firewalled, + const gt_guid_t *client_id); + +/*****************************************************************************/ + +int gnutella_source_cmp (Protocol *p, struct source *a, struct source *b); +BOOL gnutella_source_add (Protocol *p, struct transfer *transfer, + struct source *source); +void gnutella_source_remove (Protocol *p, struct transfer *transfer, + struct source *source); + +/*****************************************************************************/ + +#endif /* GIFT_GT_TRANSFER_SOURCE_H_ */ diff -r 000000000000 -r d39e1d0d75b6 src/trie.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/trie.c Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,375 @@ +/* + * $Id: trie.c,v 1.6 2005/01/04 14:58:42 mkern Exp $ + * + * Copyright (C) 2001-2003 giFT project (gift.sourceforge.net) + * + * 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. + */ + +#ifdef STANDALONE +#include +#else +#include "gt_gnutella.h" +#endif /* STANDALONE */ + +#include "trie.h" + +/*****************************************************************************/ + +static Trie *trie_alloc (char c) +{ + Trie *trie; + + if (!(trie = MALLOC (sizeof (Trie)))) + return NULL; + + trie->c = c; + + return trie; +} + +Trie *trie_new (void) +{ + /* + * Null won't match any character in the trie, so use + * that as a sentinel in the root node. + */ + return trie_alloc (0); +} + +static int free_children (Trie *trie, void *udata) +{ + trie_free (trie); + return TRUE; +} + +void trie_free (Trie *trie) +{ + List *children; + + if (!trie) + return; + + children = trie->children; + + if (trie->terminal_node) + { + /* the first data item is the data item for this node */ + children = list_remove_link (children, children); + } + + list_foreach_remove (children, (ListForeachFunc)free_children, NULL); + free (trie); +} + +static Trie *find_node (Trie *trie, char c) +{ + List *children; + List *ptr; + + children = trie->children; + + /* + * If this is a terminal node, skip the data list + * that is in the first position. + */ + if (trie->terminal_node) + children = children->next; + + /* + * Could use list_find_custom here, but we want + * this to be as fast as possible. + * + * Should probably use a realloc'd array for the + * child list instead. + */ + for (ptr = children; ptr; ptr = ptr->next) + { + Trie *node = ptr->data; + + if (node->c == c) + break; + } + +#undef TEST_MOVE +#ifdef TEST_MOVE + if (ptr) + { + void *data = ptr->data; + int index; + + /* remove from the old position */ + trie->children = list_remove_link (trie->children, ptr); + + /* insert at the beginning of the list, taking into account data + * list at the head if this is a terminal node */ + index = trie->terminal_node; + trie->children = list_insert (trie->children, index, data); + + return data; + } + + return NULL; +#else + /* we directly access result->data here for efficiency */ + return ptr ? ptr->data : NULL; +#endif +} + +/* + * Find a node in the Trie. + * + * @param trie The Trie to look in + * @param s The string to search for + * @param alloc Whether to allocate space for non-existent nodes during + * lookup + */ +static Trie *t_node_lookup (Trie *trie, char *s, int alloc) +{ + Trie *result; + char c; + + while ((c = *s++)) + { + if (!trie) + break; + + result = find_node (trie, c); + + if (!result && alloc) + { + if (!(result = trie_alloc (c))) + return NULL; + + trie->children = list_append (trie->children, result); + } + + trie = result; + } + + return trie; +} + +void *trie_lookup (Trie *trie, char *s) +{ + Trie *node; + + node = t_node_lookup (trie, s, FALSE); + + if (!node) + return NULL; + + if (node->terminal_node) + return list_nth_data (node->children, 0); + + return NULL; +} + +void trie_insert (Trie *trie, char *s, void *value) +{ + Trie *node; + void *data; + List *head; + + node = t_node_lookup (trie, s, TRUE); + + if (!node) + { + /* must be memory allocation error */ + assert (0); + return; + } + + if (!node->terminal_node) + { + /* could be a mem allocation error here... */ + node->children = list_prepend (node->children, value); + + /* convert this node to a terminal node, with the data list + * in the first position of ->children */ + node->terminal_node = TRUE; + return; + } + + /* + * This should not happen unless the user didn't call + * remove first. That may leak memory, so assert here temporarily. + */ + assert (0); + + head = list_nth (node->children, 0); + data = list_nth_data (node->children, 0); + + /* + * Remove the first item, then insert a new list. + */ + node->children = list_remove_link (node->children, head); + + /* insert the new data list back */ + node->children = list_prepend (node->children, value); +} + +int trie_is_empty (Trie *trie) +{ + if (trie->children == NULL) + return TRUE; + + return FALSE; +} + +static void remove_if_empty (Trie *root, Trie *child) +{ + if (!trie_is_empty (child)) + return; + + root->children = list_remove (root->children, child); + trie_free (child); +} + +static void t_remove_node (Trie *trie) +{ + void *value; + List *value_ptr; + + if (!trie->terminal_node) + return; + +#if 0 + /* this assertion is broken due to duplicates */ + assert (trie->terminal_node == TRUE); +#endif + + value_ptr = list_nth (trie->children, 0); + value = list_nth_data (trie->children, 0); + +#if 0 + /* these will falsely trigger for files that have the same + * token in them twice, and end up getting removed twice */ + assert (list_length (data_list) > 0); + assert (list_find (data_list, value) != NULL); +#endif + + /* remove the old data list */ + trie->children = list_remove_link (trie->children, value_ptr); + trie->terminal_node = FALSE; +} + +void trie_remove (Trie *trie, char *s) +{ + Trie *child; + + /* remove the node if we found it */ + if (string_isempty (s)) + { + t_remove_node (trie); + return; + } + + child = find_node (trie, *s); + s++; + + if (!child) + return; +#if 0 + assert (child != NULL); +#endif + + /* recursively remove all nodes */ + trie_remove (child, s); + + /* remove this node if it has no children anymore */ + remove_if_empty (trie, child); +} + +static void print_children (List *children) +{ + List *ptr; + int printed_open = FALSE; + Trie *trie; + + for (ptr = children; ptr; ptr = list_next (ptr)) + { + if (!printed_open) + { + printf ("{ "); + printed_open = TRUE; + } + + trie = list_nth_data (ptr, 0); + trie_print (trie); + + if (list_next (ptr)) + printf(","); + } + + if (children) + printf (" }"); +} + +void trie_print (Trie *trie) +{ + List *children; + + if (trie->c) + printf ("%c", trie->c); + + children = trie->children; + + if (trie->terminal_node) + { + printf ("*"); + children = list_next (children); + } + + print_children (children); +} + +#ifdef STANDALONE +int main(int argc, char **argv) +{ + List *args = NULL; + List *ptr; + Trie *trie; + int i; + + trie = trie_new (); + + for (i = 1; i < argc; i++) + { + trie_insert (trie, argv[i], argv[i]); + args = list_prepend (args, argv[i]); + } + + trie_print (trie); + printf ("\n"); + + while ((ptr = args)) + { + trie_remove (trie, ptr->data); + args = list_remove_link (args, ptr); + } + + trie_insert (trie, "book", "book"); + trie_insert (trie, "boo", "boo"); + trie_print (trie); + printf ("\n"); + trie_remove (trie, "book"); + trie_remove (trie, "boo"); + + trie_print (trie); + printf ("\n"); +#if 0 + trie_free (trie); +#endif + + return 0; +} +#endif /* STANDALONE */ diff -r 000000000000 -r d39e1d0d75b6 src/trie.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/trie.h Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,43 @@ +/* + * $Id: trie.h,v 1.2 2003/07/09 09:31:52 hipnod Exp $ + * + * Copyright (C) 2001-2003 giFT project (gift.sourceforge.net) + * + * 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. + */ + +#ifndef __GT_TRIE_H__ +#define __GT_TRIE_H__ + +/*****************************************************************************/ + +typedef struct trie +{ + List *children; /* List of children. + The zeroth item is the data list + if this is a terminal node */ + unsigned char terminal_node : 1; /* TRUE if is a terminal node */ + char c; /* Character of this node */ + +} Trie; + +/*****************************************************************************/ + +Trie *trie_new (void); +void trie_free (Trie *trie); +void *trie_lookup (Trie *trie, char *s); +void trie_insert (Trie *trie, char *s, void *value); +void trie_remove (Trie *trie, char *s); +void trie_print (Trie *trie); + +/*****************************************************************************/ + +#endif /* __GT_TRIE_H__ */ diff -r 000000000000 -r d39e1d0d75b6 src/xml.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/xml.c Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,384 @@ +/* + * $Id: xml.c,v 1.10 2004/04/13 07:25:18 hipnod Exp $ + * + * Copyright (C) 2001-2003 giFT project (gift.sourceforge.net) + * + * 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. + */ + +#include "gt_gnutella.h" + +#include + +#ifdef USE_LIBXML2 +#include /* xmlParseMemory() */ +#include /* xmlSetGenericErrorFunc() */ +#endif /* USE_LIBXML2 */ + +#include "xml.h" + +/*****************************************************************************/ + +#ifndef USE_LIBXML2 +BOOL gt_xml_parse (const char *xml, Dataset **ret) +{ + return FALSE; +} + +BOOL gt_xml_parse_indexed (const char *xml, size_t bin_len, Share **shares, + size_t shares_len) +{ + return FALSE; +} +#endif /* !USE_LIBXML2 */ + +/*****************************************************************************/ + +/* the rest of this file is conditional on using libxml */ +#ifdef USE_LIBXML2 + +/*****************************************************************************/ + +#define MAX_XML_BUFSIZE 65536 + +static char *xml_buf; /* for decompressing xml */ +static size_t xml_buf_size; +static z_stream zxml; + +/*****************************************************************************/ + +static void print_nodes (xmlNodePtr node, Dataset **ret) +{ + while (node != NULL) + { + /* + * If this node has no children, it is a leaf node, + * so set the metadata from it. + */ + if (node->xmlChildrenNode) + print_nodes (node->xmlChildrenNode, ret); + else + GT->DBGFN (GT, "name=%s", node->name); + + node = node->next; + } +} + +BOOL gt_xml_parse (const char *xml, Dataset **ret) +{ + xmlDocPtr doc; + + /* disable for now because it doesn't work anyway: need to share + * code with parse_indexed */ + if (!XML_DEBUG) + return FALSE; + + /* only parse documents starting with '<' */ + if (!xml || xml[0] != '<') + return FALSE; + + if (!(doc = xmlParseMemory (xml, strlen (xml)))) + return FALSE; + + print_nodes (doc->xmlChildrenNode, ret); + + xmlFreeDoc (doc); + + return TRUE; +} + +static void add_child (Dataset **children, const char *key, const char *value) +{ + char *dup = NULL; + + if (!key || !value) + return; + + /* + * Hack to map some of the attributes from XML documents found + * on Gnutella to ones peddled by giFT. + */ + if (!strcasecmp (key, "bitrate")) + { + dup = stringf_dup ("%s000", value); + value = dup; + } + else if (!strcasecmp (key, "seconds")) + { + key = "duration"; + } + + dataset_insertstr (children, key, value); + free (dup); +} + +static Dataset *collect_attributes (xmlNode *node) +{ + const xmlAttr *attr; + Dataset *children = NULL; + BOOL do_log = XML_DEBUG; + + for (attr = node->properties; attr != NULL; attr = attr->next) + { + xmlChar *str; + + /* is there an easier way to get attribute content? */ + str = xmlGetProp (node, attr->name); + + if (do_log) + { + GT->dbg (GT, "name=%s content=%s", + (const char *)attr->name, (const char *)str); + } + + /* add the key->value pair to the dataset */ + add_child (&children, (const char *)attr->name, + (const char *)str); + + /* xmlGetProp() allocates memory */ + free (str); + } + + return children; +} + +static void set_meta_foreach (ds_data_t *key, ds_data_t *value, Share *share) +{ + char *meta_key = key->data; + char *meta_val = value->data; + + share_set_meta (share, meta_key, meta_val); +} + +static void set_share_meta (Share **shares, size_t shares_len, + Dataset *children) +{ + char *index_str; + size_t index; + + /* + * Lookup the "index" attribute, and use that to determine + * which Share the XML applies to. + */ + if (!(index_str = dataset_lookupstr (children, "index"))) + return; + + index = gift_strtoul (index_str); + + if (index >= shares_len) + return; + + if (!shares[index]) + return; + + /* skip the index attribute */ + dataset_removestr (children, "index"); + + dataset_foreach (children, DS_FOREACH(set_meta_foreach), shares[index]); +} + +static void set_metadata_from_indexed_xml (Share **shares, size_t shares_len, + xmlDoc *doc) +{ + xmlNode *node; + + if (!(node = xmlDocGetRootElement (doc))) + return; + + for (node = node->xmlChildrenNode; node != NULL; node = node->next) + { + Dataset *children; + + children = collect_attributes (node); + + set_share_meta (shares, shares_len, children); + dataset_clear (children); + } +} + +static int try_inflate_xml (const char *xml, size_t bin_len) +{ + int ret; + + /* set zlib allocation data */ + zxml.zalloc = Z_NULL; + zxml.zfree = Z_NULL; + zxml.opaque = Z_NULL; + + /* set the input parameters */ + zxml.next_in = (char *)xml; + zxml.avail_in = bin_len; + + /* set the output parameters */ + zxml.next_out = xml_buf; + zxml.avail_out = xml_buf_size - 1; + + if ((ret = inflateInit (&zxml)) != Z_OK) + return ret; + + ret = inflate (&zxml, Z_FINISH); + inflateEnd (&zxml); + + return ret; +} + +static const char *inflate_xml (const char *xml, size_t bin_len) +{ + size_t xml_len; + int ret; + + ret = try_inflate_xml (xml, bin_len); + + if (ret == Z_BUF_ERROR && xml_buf_size < MAX_XML_BUFSIZE) + { + size_t newsize = xml_buf_size * 2; + char *newbuf; + + if (!(newbuf = realloc (xml_buf, newsize))) + return NULL; + + xml_buf = newbuf; + xml_buf_size = newsize; + + /* retry with bigger buffer */ + return inflate_xml (xml, bin_len); + } + + if (ret != Z_STREAM_END) + return NULL; + + /* null terminate (the now hopefully plaintext) XML */ + xml_len = (xml_buf_size - 1) - zxml.avail_out; + xml_buf[xml_len] = 0; + + if (XML_DEBUG) + GT->dbg (GT, "inflated xml: %s", xml_buf); + + return xml_buf; +} + +BOOL gt_xml_parse_indexed (const char *xml, size_t bin_len, Share **shares, + size_t shares_len) +{ + xmlDoc *doc; + size_t xml_len; + const char *next; + const char *ptr; + + if (!xml || bin_len <= 4) + return FALSE; + + /* + * Look for the encoding type, currently possible + * encoding values are: "{}" meaning plain text, "{plaintext}", + * and "{deflate}". + */ + + if (!strncmp (xml, "{}", 2)) + { + xml += 2; + } + else if (bin_len >= sizeof("{plaintext}") - 1 && + !strncasecmp (xml, "{plaintext}", sizeof("{plaintext}") - 1)) + { + xml += sizeof("{plaintext}") - 1; + } + else if (bin_len >= sizeof("{deflate}") - 1 && + !strncasecmp (xml, "{deflate}", sizeof("{deflate}") - 1)) + { + /* the len passed here should be bin_len - 1, but some servents (MRPH) + * don't terminate the XML */ + xml = inflate_xml (xml + sizeof("{deflate}") - 1, bin_len); + + if (XML_DEBUG) + assert (xml != NULL); /* assume valid input */ + + if (!xml) + return FALSE; + } + + xml_len = strlen (xml); + + /* + * The XML block is a sequence of XML documents, separated by the document prefix. Parse each one separately. + */ + for (ptr = xml; ptr != NULL; ptr = next) + { + size_t chunk_len; + + if (ptr[0] != '<') + return FALSE; + + next = strstr (ptr + 1, "DBGFN (GT, "xml parse error: %s", buf); +} + +/*****************************************************************************/ + +#endif /* USE_LIBXML2 */ + +/*****************************************************************************/ + +void gt_xml_init (void) +{ +#ifdef USE_LIBXML2 + /* so libxml doesn't print messages on stderr */ + xmlSetGenericErrorFunc (NULL, error_handler_func); + + xml_buf = malloc (32); + assert (xml_buf != NULL); + xml_buf_size = 32; + + memset (&zxml, 0, sizeof (zxml)); +#endif /* USE_LIBXML2 */ +} + +void gt_xml_cleanup (void) +{ +#ifdef USE_LIBXML2 + free (xml_buf); + xml_buf = NULL; + xml_buf_size = 0; +#endif /* USE_LIBXML2 */ +} diff -r 000000000000 -r d39e1d0d75b6 src/xml.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/xml.h Sat Feb 20 21:18:28 2010 -0800 @@ -0,0 +1,35 @@ +/* + * $Id: xml.h,v 1.2 2003/11/08 12:29:55 hipnod Exp $ + * + * Copyright (C) 2001-2003 giFT project (gift.sourceforge.net) + * + * 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. + */ + +#ifndef GIFT_GT_XML_H_ +#define GIFT_GT_XML_H_ + +/*****************************************************************************/ + +#define XML_DEBUG gt_config_get_int("xml/debug=0") + +/*****************************************************************************/ + +BOOL gt_xml_parse (const char *xml, Dataset **ret); +BOOL gt_xml_parse_indexed (const char *xml, size_t bin_len, + Share **shares, size_t shares_len); + +void gt_xml_init (void); +void gt_xml_cleanup (void); + +/*****************************************************************************/ + +#endif /* GIFT_GT_XML_H_ */