diff --git a/AUTHORS b/AUTHORS new file mode 100644 index 0000000..d85c749 --- /dev/null +++ b/AUTHORS @@ -0,0 +1,24 @@ +Main authors and maintainers: + +Andrea Lo Pumo aka AlpT + + +Contributors (in chronological order of initial contribution): + +Andrea Leofreddi wrote the first implementation +of the DNS wrapper code (dns_pkt.cpp, dns_rendian.h, dns_utils.h). + +Enzo Nicosia (Katolaz) wrote the files needed to use +Automake/Autoconf. (Makefile.am configure.ac, src/Makefile.am, +src/man/Makefile.am). + +Federico Tomassini (Efphe) wrote andns, which provides +DNS compatibility for the ANDNA system. He also wrote the interface to the +libiptc. (andns* ntkresolv.* dnslib.[ch] mark.[ch] libiptc/*) + + +Website developers and maintainers: + +Crash , +Entropika , +Black diff --git a/COPYING b/COPYING new file mode 100644 index 0000000..b6f92f3 --- /dev/null +++ b/COPYING @@ -0,0 +1,340 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 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 --git a/ChangeLog b/ChangeLog new file mode 100644 index 0000000..b39703b --- /dev/null +++ b/ChangeLog @@ -0,0 +1,295 @@ +==== 0.0.9b ==== + +New features: + + * ntk-resolv has the new option "-l" + + * An active tcp socket is kept for each rnode, in this way, it is + possible to send them tcp packets without the need of estabilishing + a new tcp connection each time. + + * The qspn packets are now sent using the tcp sockets described above. + + * Since the UDP isn't used anymore for ntk packets, the udp daemon has + been removed. The udp port of the radar daemon is now 269/udp. + The 271/udp port has been deprecated. + + * When we have multiple interfaces to reach the same rnode, send the + QSPN packets from a random device, each time. + + * Code cleaned + +Bug fixes: + + * gcc-4 compilation warnings fixed. + + * SNSD recursion works in ntk-resolv + + +==== 0.0.8b ==== + +New features: + + * The Scattered Name Service Disgregation (NTK_RFC 0009) has been + implemented. + See http://lab.dyne.org/Ntk_SNSD and the man page of andna(8). + + * ntk-resolve has been updated to support SNSD queries. + + * The `netsukuku_d' binary and its man page have been renamed to `ntkd' + `netsukuku_wifi' and its man page have been renamed to `ntk-wifi'. + + * Static binaries and packages are now available. + http://netsukuku.freaknet.org/packages/ + + * Netsukuku has been compiled for OpenWRT: + http://netsukuku.freaknet.org/openwrt/ + + * NetsukukuD compresses automatically packets > 1024 bytes using the + zlib. + + * A pid file is written on /var/run/ntkd.pid. It is used to check if + other instances of ntkd are already running. + + * The new option `use_shared_internet' has been added. It specifies if + ntkd will load balance the Internet traffic of this host using the + Inet connections shared by the Netsukuku nodes. + + * The new command line option `-l' specifies that ntkd should send all + of its messages to the specified file. + + * The scripts ip_masquerade.sh, tc_shaper.sh, rc.ntk, ntk-wifi, are + not dependent on bash anymore. + + * The ANDNA keyring is now saved separately from the lcl_cache. It is + saved in andna_lcl_keyring. + + * The `andna_' prefix is now used for the filename of the andna + caches. + +Bug fixes: + + * A workaround to the gcc 27945 bug + ( http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27945 ) has been + implemented. The nodes affected with bug receive malformed packets + during the hook. + + * The outgoing traffic to a node of the LAN is not shaped anymore. + + * There was a bug that incremented the `hname_updates' counter, in the + andna_cache of a hostname, even if the registration/update was + rejected. Having wrong `hname_updates' counter, led to some + syncronization problems. + + * Ntkd is now able to detect, while running, the remotion of a network + device it was using. + + * Various memory leaks have been fixed. + + * A workaround for the way getopt handles the optional arguments (i.e. + -r in ntkd) has been written. It is now possible to write + ntkd -drdddD without expecting strange behaviours. See + http://www.freaknet.org/alpt/src/patches/getopt-opt-arg/readme + + * The code has been optimized and cleaned. + +Extra: + + * The man page for netsukuku.conf has been written. + netsukuku.conf(5). + +==== 0.0.7b ==== + +New features: + + * Multi-inet-gateways. + The Netsukuku nodes will now automatically use multiple + inet-gateways to connect to the Internet, therefore their Internet + connection will be effectively load-balanced. + + * Anti-loop multi-igw shield. + The nodes which share their Internet connection will also + automatically use the shared connection of the other nodes. Through + a simple marking system, death loops are avoided. + + * Traffic shaping. + The nodes which share their Internet connection can now shape it, in + this way they'll prioritize their local outgoingtraffic and the + lowdelay one (f.e. SSH). + + * The lowdelay TOS is now set in the ANDNA resolve requests. + + +Bug fixes: + + * When all the rnodes die, the radar resets the qspn counters + + * Code cleaned + + * A lot of bugs, which you haven't and you will never heard, have been + fixed. We've already forgotten them. + + +==== 0.0.6b ==== + +New features: + + * The NTK_RFC 0008 has been implemented. + ( http://lab.dyne.org/Ntk_restricted_ip_classes ) + +Bug fixes: + + * The NTK_RFC 0007 has been implemented. It fixes an exploitable bug + in the ANDNA protocol. + + * NetsukukuD has been tested on big endian machines. A lot of + endianness bugs has been fixed during the tests and now it seems to + work gracefully. + A lot of thanks to Vampire ;* + + * The ppp connection to the Internet doesn't set an IP address in the + default route of the kernel but only the used ppp interface, + therefore NetsukukuD has to deduce it from the IP assigned to the + ppp interface, i.e. ppp0. + + * Execute /etc/netsukuku/ip_masquerade.sh only if it is + writable just by root. + + * Execute "/etc/netsukuku/ip_masquerade.sh stop" when NetsukukuD is + closed. + + * Added a timeout of 60 seconds for the reverse resolution request. + + * A possible memory overrun in the rsa (un)packing functions has been + fixed. + + +==== 0.0.5b ==== + +New features: + * The Internet Gateway Search (NTK_RFC 0003) has been implemented. + A node can now share its Internet connection among the other nodes + (only in restricted mode). + ( Read the RFC: http://lab.dyne.org/Ntk_IGS ) + + * Main part of the NTK_RFC 0001 written, the (g)nodes have now the + ability to rehook to avoid IP collision. + ( http://lab.dyne.org/Ntk_gnodes_contiguity ) + + * ANDNS has been implemented. It is a new specification of the DNS + protocol for Netsukuku. It is compatible with the actual DNS + protocol. ( http://lab.dyne.org/Ntk_andna_and_dns ) + + * Multi interfaces multipath: if we can reach a rnode trough multiple + interfaces, use them all with a multipath route. + + * The dns_wrapper code is no more dependent on Boost. + + +Bug fixes: + + * map_rnode doesn't use anymore the timeval struct and map_rnode.rtt was + removed 'cause it was obsolete. In conclusion we gained 12 bytes for + each rnode. + + * Added a check in get_free_nodes to verify the validity of + fn_hdr->ipstart. + For example if the rnode has an IP which doesn't match with + fn_hdr->ipstart there must be some errors. This led to bug 0002. + + * Fixed a bug in the multiif code: the packets destined to gnodes were + sent only from the first device. + + * qspn_remove_deads() removes the routes of the dead nodes from the + routing table of the kernel. + + * Restricted nodes and normal nodes are now invisible to each other. + + * 127.0.0.0/8 banned. + + * The command line options override the ones specified in the config file. + + * code heavily cleaned. + + +==== 0.0.4b ==== + +New features: + + * The multi-interface support was added, now it is possible to use + multiple network interfaces without the need of the bridge, just + specify each interface you want to use with the -i option. (man + netsukuku_d). + + * The multipath support has been enabled for the external map, this + means that more than one route will be used to reach a gnode. In other + words the load balacing has been fully enabled. + + * Endianness fixes: now the packets can be sent between two machines + with different endianness. + + * When the daemon is launched /etc/resolv.conf is modified + automatically, so the "nameserver 127.0.0.1" is added in the first + line of resolv.conf. The old resolv.conf is at /etc/resolv.conf.bak. + When the daemon is closed /etc/resolv.conf.bak is moved to + /etc/resolv.conf. + + * Added CC and CXX options in Scontruct. + Changes provided by Tero Auvinen. + + * At hooking the first radar_scan is retried for three times. + + + * The Make/configure support was added. Now you can use both SCons or + Make to compile and install Netsukuku. + + +Bug fixes: + + * All the the packets are now sent without any alignment. + + * The free_nodes struct has been optimised: to keep the list of free + nodes it uses single bits instead of single bytes, this means that the + list is now of 32 bytes instead of 256. + + * The bug in the load_rh_cache code is now fixed. (It caused crashes + when the daemon was closed). + + * The installation path of the man page is now fixed. + + * The installation paths are changed!! BIN_DIR=/usr/bin/, + MAN_DIR=/usr/man + + * The /usr/share/netsukuku directory is now created by the daemon + itself. + + * Now /sys/net/ipv4/conf/INTERFACE/rp_filter is automatically disabled + for the used network interface. + + * Errors in load_hostnames() fixed. (It crashed if there was an just + an empty '\n'). + + + +==== 0.0.3b ==== + + * The ANDNA code, with its DNS wrapper, is completed and tested. + + * The Netsukuku code was cleaned. Now it's ready to be an API. + + * The Italian to English translation of the document is finished. + + +==== 0.0.2b ==== + + * NetsukukuD goes beta! + + +==== 0.0.1b ==== + + * NetsukukuD compiles, at least. + + +==== 0.0.0a ==== + + * The void and its nulliness filled the existence. diff --git a/INSTALL b/INSTALL new file mode 100644 index 0000000..095b1eb --- /dev/null +++ b/INSTALL @@ -0,0 +1,231 @@ +Installation Instructions +************************* + +Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004 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=PREFIX'. + + You can specify separate installation prefixes for +architecture-specific files and architecture-independent files. If you +give `configure' the option `--exec-prefix=PREFIX', the package will +use PREFIX 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=DIR' 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 --git a/Makefile.am b/Makefile.am new file mode 100644 index 0000000..af437a6 --- /dev/null +++ b/Makefile.am @@ -0,0 +1 @@ +SUBDIRS = src diff --git a/Makefile.in b/Makefile.in new file mode 100644 index 0000000..870f3ac --- /dev/null +++ b/Makefile.in @@ -0,0 +1,560 @@ +# Makefile.in generated by automake 1.8.5 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +top_builddir = . +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +INSTALL = @INSTALL@ +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +host_triplet = @host@ +DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in $(top_srcdir)/configure AUTHORS COPYING \ + ChangeLog INSTALL NEWS TODO config.guess config.sub depcomp \ + install-sh missing +subdir = . +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ + configure.lineno configure.status.lineno +mkinstalldirs = $(mkdir_p) +CONFIG_HEADER = $(top_builddir)/src/config.h +CONFIG_CLEAN_FILES = +SOURCES = +DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-exec-recursive install-info-recursive \ + install-recursive installcheck-recursive installdirs-recursive \ + pdf-recursive ps-recursive uninstall-info-recursive \ + uninstall-recursive +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = $(SUBDIRS) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +distdir = $(PACKAGE)-$(VERSION) +top_distdir = $(distdir) +am__remove_distdir = \ + { test ! -d $(distdir) \ + || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ + && rm -fr $(distdir); }; } +DIST_ARCHIVES = $(distdir).tar.gz +GZIP_ENV = --best +distuninstallcheck_listfiles = find . -type f -print +distcleancheck_listfiles = find . -type f -print +ACLOCAL = @ACLOCAL@ +AMDEP_FALSE = @AMDEP_FALSE@ +AMDEP_TRUE = @AMDEP_TRUE@ +AMTAR = @AMTAR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CONF_DIR = @CONF_DIR@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DATA_DIR = @DATA_DIR@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +IF_METHOD = @IF_METHOD@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KERNEL_METHOD = @KERNEL_METHOD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +OBJEXT = @OBJEXT@ +OTHER_METHOD = @OTHER_METHOD@ +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@ +PID_DIR = @PID_DIR@ +RT_METHOD = @RT_METHOD@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_STRIP = @ac_ct_STRIP@ +am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ +am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ +am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ +am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +datadir = @datadir@ +debug_flags = @debug_flags@ +exec_prefix = @exec_prefix@ +gmp = @gmp@ +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@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +SUBDIRS = src +all: all-recursive + +.SUFFIXES: +am--refresh: + @: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \ + cd $(srcdir) && $(AUTOMAKE) --gnu \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + echo ' $(SHELL) ./config.status'; \ + $(SHELL) ./config.status;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + $(SHELL) ./config.status --recheck + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(srcdir) && $(AUTOCONF) +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) +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 + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + $(am__remove_distdir) + mkdir $(distdir) + $(mkdir_p) $(distdir)/src/conf + @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ + list='$(DISTFILES)'; for file in $$list; do \ + case $$file in \ + $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ + $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ + esac; \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test "$$dir" != "$$file" && test "$$dir" != "."; then \ + dir="/$$dir"; \ + $(mkdir_p) "$(distdir)$$dir"; \ + else \ + dir=''; \ + fi; \ + if test -d $$d/$$file; then \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done + list='$(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-tarZ: distdir + $(AMTAR) chof - $(distdir) | compress -c >$(distdir).tar.Z + $(am__remove_distdir) + +dist-shar: distdir + shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz + $(am__remove_distdir) + +dist-zip: distdir + -rm -f $(distdir).zip + zip -rq $(distdir).zip $(distdir) + $(am__remove_distdir) + +dist dist-all: distdir + $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + $(am__remove_distdir) + +# This target untars the dist file and tries a VPATH configuration. Then +# it guarantees that the distribution is self-contained by making another +# tarfile. +distcheck: dist + case '$(DIST_ARCHIVES)' in \ + *.tar.gz*) \ + GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(AMTAR) xf - ;;\ + *.tar.bz2*) \ + bunzip2 -c $(distdir).tar.bz2 | $(AMTAR) xf - ;;\ + *.tar.Z*) \ + uncompress -c $(distdir).tar.Z | $(AMTAR) xf - ;;\ + *.shar.gz*) \ + GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\ + *.zip*) \ + unzip $(distdir).zip ;;\ + esac + chmod -R a-w $(distdir); chmod a+w $(distdir) + mkdir $(distdir)/_build + mkdir $(distdir)/_inst + chmod a-w $(distdir) + dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ + && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ + && cd $(distdir)/_build \ + && ../configure --srcdir=.. --prefix="$$dc_install_base" \ + $(DISTCHECK_CONFIGURE_FLAGS) \ + && $(MAKE) $(AM_MAKEFLAGS) \ + && $(MAKE) $(AM_MAKEFLAGS) dvi \ + && $(MAKE) $(AM_MAKEFLAGS) check \ + && $(MAKE) $(AM_MAKEFLAGS) install \ + && $(MAKE) $(AM_MAKEFLAGS) installcheck \ + && $(MAKE) $(AM_MAKEFLAGS) uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ + distuninstallcheck \ + && chmod -R a-w "$$dc_install_base" \ + && ({ \ + (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ + distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ + } || { rm -rf "$$dc_destdir"; exit 1; }) \ + && rm -rf "$$dc_destdir" \ + && $(MAKE) $(AM_MAKEFLAGS) dist \ + && rm -rf $(DIST_ARCHIVES) \ + && $(MAKE) $(AM_MAKEFLAGS) distcleancheck + $(am__remove_distdir) + @(echo "$(distdir) archives ready for distribution: "; \ + list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ + sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}' +distuninstallcheck: + @cd $(distuninstallcheck_dir) \ + && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ + || { echo "ERROR: files left after uninstall:" ; \ + if test -n "$(DESTDIR)"; then \ + echo " (check DESTDIR support)"; \ + fi ; \ + $(distuninstallcheck_listfiles) ; \ + exit 1; } >&2 +distcleancheck: distclean + @if test '$(srcdir)' = . ; then \ + echo "ERROR: distcleancheck can only run from a VPATH build" ; \ + exit 1 ; \ + fi + @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ + || { echo "ERROR: files left in build directory after distclean:" ; \ + $(distcleancheck_listfiles) ; \ + exit 1; } >&2 +check-am: all-am +check: check-recursive +all-am: Makefile +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 mostlyclean-am + +distclean: distclean-recursive + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +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 + +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 am--refresh check \ + check-am clean clean-generic clean-recursive ctags \ + ctags-recursive dist dist-all dist-bzip2 dist-gzip dist-shar \ + dist-tarZ dist-zip distcheck distclean distclean-generic \ + distclean-recursive distclean-tags distcleancheck distdir \ + distuninstallcheck dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-exec \ + install-exec-am install-info install-info-am install-man \ + install-strip installcheck installcheck-am installdirs \ + installdirs-am maintainer-clean maintainer-clean-generic \ + maintainer-clean-recursive mostlyclean mostlyclean-generic \ + mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \ + uninstall uninstall-am uninstall-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 --git a/NEWS b/NEWS new file mode 120000 index 0000000..b0936e8 --- /dev/null +++ b/NEWS @@ -0,0 +1 @@ +ChangeLog \ No newline at end of file diff --git a/README b/README new file mode 100644 index 0000000..95d07ea --- /dev/null +++ b/README @@ -0,0 +1,272 @@ + + Netsukuku + + http://netsukuku.freaknet.org + +-- + + 1. What is this? + + 2. Get the code! + + 3. Build and install + + 3.1 Static Binaries and Packages + + 4. Kernel dependencies + + 5. How to use it + + 6. Where to get in touch with us + + 7. Bug report + + 8. Hack the code + + 9. License and that kind of stuff... + +-- + + +** +**** 1. What is this? +** + +Netsukuku is a mesh network or a p2p net system that generates and sustains +itself autonomously. It is designed to handle an unlimited number of nodes +with minimal CPU and memory resources. Thanks to this feature it can be easily +used to build a worldwide distributed, anonymous and not controlled network, +separated from the Internet, without the support of any servers, ISPs or +authority controls. +This net is composed by computers linked physically each other, therefore it +isn't build upon any existing network. Netsukuku builds only the routes which +connects all the computers of the net. +In other words, Netsukuku replaces the level 3 of the model iso/osi with +another routing protocol. +The Domain Name System is also replaced by a decentralised and distributed +system: the Abnormal Netsukuku Domain Name Anarchy. + +The complete features list of Netsukuku is here: +http://netsukuku.freaknet.org/files/doc/misc/Ntk_features_list + + +In order to join to Netsukuku you have to use NetsukukuD, which is the daemon +implementing the Npv7 protocol. + +Before doing anything, please read the documentation in doc/ or in +http://netsukuku.freaknet.org + + +** +**** 2. Get the code! +** + +Get the tarball of the latest stable version from: +http://netsukuku.freaknet.org/files/ + + +If you want to download the development code you have to checkout it from the +cvs repository: +(Warning: It is highly probable the development code will not work!) + +$ cvs -d :pserver:anoncvs@hinezumilabs.org:/home/cvsroot login +or +$ export CVSROOT=":pserver:anoncvs@hinezumilabs.org:/home/cvsroot" +$ cvs login + +then check it out: + +$ cvs -z3 -d :pserver:anoncvs@hinezumilabs.org:/home/cvsroot co netsukuku +or +$ cvs -z3 co netsukuku +(providing the CVSROOT variable was set in the previous step) + + +Once you've checked out a copy of the source tree, you can update +your source tree at any time so it is in sync with the latest and +greatest by running the command: +# cvs -z3 update -d -P + + +** +**** 3. Build and install +** + +To compile the code you can use scons or just go with the old school way: + +# ./configure && make && make install + +But SCons is cooler: +http://www.scons.org/ +(You should have installed at least the 2.4 version of Python in order to +avoid dirty bugs in scons) + + +The code depends also on the libgmp,zlib and openssl. Generally you have +already them installed on your system, but eventually you can retrieve them +here: +for the libgmp: http://www.swox.com/gmp/ +the openssl library here: http://openssl.org +and finally the zlibs: http://zlib.net + +Then go in the src/ directory and type: +$ scons --help + +That will show you all the options you can use in the build and installation +process. Finally execute: + +$ scons + +The code will be compiled. If all went well install NetsukukuD with: + +# scons install + +Now you should give a look at /etc/netsukuku.conf (or wherever you installed +it) and modify it for your needs, but generally the default options are good. + +- Notes: + +If you want to change some scons option to do another installation, (i.e. you +may want to reinstall it with another MANDIR path), you have to run: +$ scons --clean + + +** +**** 3.1 Static Binaries and Packages +** + +If you prefer to just install Netsukuku, without compiling it, you can +download the static binaries suitable to your platform. They come packed in +various formats (.tgz, .deb, .ipk). +The packages repository is at: + http://netsukuku.freaknet.org/packages/ + + +** +**** 4. Kernel dependencies +** + +On Linux be sure to have the following options set in your kernel .config. +These options are taken from linux-2.6.14. + + # + # Networking options + # + CONFIG_PACKET=y + CONFIG_UNIX=y + CONFIG_INET=y + CONFIG_IP_MULTICAST=y + CONFIG_IP_ADVANCED_ROUTER=y + CONFIG_IP_MULTIPLE_TABLES=y + CONFIG_IP_ROUTE_MULTIPATH=y + CONFIG_NET_IPIP=y + CONFIG_NETFILTER=y + +and these from linux-2.6.16.19. + + # + # Core Netfilter Configuration + # + + CONFIG_NETFILTER_XT_MATCH_CONNTRACK=y + NETFILTER_XT_TARGET_CONNMARK=y + + # + # IP: Netfilter Configuration + # + + CONFIG_IP_NF_IPTABLES=y + CONFIG_IP_NF_FILTER=y + CONFIG_IP_NF_TARGET_REJECT=y + CONFIG_IP_NF_NAT=y + CONFIG_IP_NF_NAT_NEEDED=y + CONFIG_IP_NF_TARGET_MASQUERADE=y + +If you are using modules you have to load them before launching the daemon. + + +** +**** 5. How to use it +** + +Before doing anything do: + +$ man ntkd +$ man andna + +when you feel confortable and you are ready to dare type with root +priviledges: + +# ntkd + +then just wait... ^_- + +(For the first times it's cool to use the -D option to see what happens). + +- Note: +The daemon at startup takes the list of all the network interfaces which are +currently UP and it uses all of them to send and receive packets. If you want +to force the daemon to use specific interfaces you should use the B<-i> +option. + + +** +**** 6. Where to get in touch with us +** + +> Mailing list + +Subscribe to the netsukuku mailing to get help, be updated on the latest news +and discuss on its development. + +To subscribe to the list, send a message to: + netsukuku-subscribe@lists.dyne.org +or use the web interface: + http://lists.dyne.org/mailman/listinfo/netsukuku + +You can browse the archive here: + http://lists.dyne.org/netsukuku/ + http://dir.gmane.org/gmane.network.peer-to-peer.netsukuku + + +> IRC + +We live night and day in IRC, come to see us on channel + #netsukuku +on the FreeNode irc server (irc.freenode.org). + + +** +**** 7. Bug report +** + +{ Don't panic! } + +If you encounter any bug, please report it. +Use the online bug track system: + http://bugs.dyne.org/ +or the mailing list: + http://lists.dyne.org/netsukuku/ +and explain what the problem is and if possible a way to reproduce it. + + +** +**** 8. Hack the code +** + +Feel free to debug, patch, modify and eat the code. Then submit your results +to the mailing list ^_- + +There is a lot to code too! If you are a Kung Foo coder, get on board and +help the development writing some nice poems. For a start you can take a look +at the src/TODO file. + + +** +**** 9. License and that kind of stuff... +** + +All the Netsukuku code is released under the GPL-2, please see the COPYING +file for more information. + +The authors of Netsukuku and NetsukukuD are listed in the file AUTHORS. diff --git a/aclocal.m4 b/aclocal.m4 new file mode 100644 index 0000000..7c021bf --- /dev/null +++ b/aclocal.m4 @@ -0,0 +1,932 @@ +# generated automatically by aclocal 1.8.5 -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 +# Free Software Foundation, Inc. +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +# -*- Autoconf -*- +# Copyright (C) 2002, 2003 Free Software Foundation, Inc. +# Generated from amversion.in; do not edit by hand. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA + +# AM_AUTOMAKE_VERSION(VERSION) +# ---------------------------- +# Automake X.Y traces this macro to ensure aclocal.m4 has been +# generated from the m4 files accompanying Automake X.Y. +AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.8"]) + +# 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.8.5])]) + +# AM_AUX_DIR_EXPAND + +# Copyright (C) 2001, 2003 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets +# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to +# `$srcdir', `$srcdir/..', or `$srcdir/../..'. +# +# Of course, Automake must honor this variable whenever it calls a +# tool from the auxiliary directory. The problem is that $srcdir (and +# therefore $ac_aux_dir as well) can be either absolute or relative, +# depending on how configure is run. This is pretty annoying, since +# it makes $ac_aux_dir quite unusable in subdirectories: in the top +# source directory, any form will work fine, but in subdirectories a +# relative path needs to be adjusted first. +# +# $ac_aux_dir/missing +# fails when called from a subdirectory if $ac_aux_dir is relative +# $top_srcdir/$ac_aux_dir/missing +# fails if $ac_aux_dir is absolute, +# fails when called from a subdirectory in a VPATH build with +# a relative $ac_aux_dir +# +# The reason of the latter failure is that $top_srcdir and $ac_aux_dir +# are both prefixed by $srcdir. In an in-source build this is usually +# harmless because $srcdir is `.', but things will broke when you +# start a VPATH build or use an absolute $srcdir. +# +# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, +# iff we strip the leading $srcdir from $ac_aux_dir. That would be: +# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` +# and then we would define $MISSING as +# MISSING="\${SHELL} $am_aux_dir/missing" +# This will work as long as MISSING is not called from configure, because +# unfortunately $(top_srcdir) has no meaning in configure. +# However there are other variables, like CC, which are often used in +# configure, and could therefore not use this "fixed" $ac_aux_dir. +# +# Another solution, used here, is to always expand $ac_aux_dir to an +# absolute PATH. The drawback is that using absolute paths prevent a +# configured tree to be moved without reconfiguration. + +AC_DEFUN([AM_AUX_DIR_EXPAND], +[dnl Rely on autoconf to set up CDPATH properly. +AC_PREREQ([2.50])dnl +# expand $ac_aux_dir to an absolute path +am_aux_dir=`cd $ac_aux_dir && pwd` +]) + +# AM_CONDITIONAL -*- Autoconf -*- + +# Copyright (C) 1997, 2000, 2001, 2003 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +# serial 6 + +# AM_CONDITIONAL(NAME, SHELL-CONDITION) +# ------------------------------------- +# Define a conditional. +AC_DEFUN([AM_CONDITIONAL], +[AC_PREREQ(2.52)dnl + ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], + [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl +AC_SUBST([$1_TRUE]) +AC_SUBST([$1_FALSE]) +if $2; then + $1_TRUE= + $1_FALSE='#' +else + $1_TRUE='#' + $1_FALSE= +fi +AC_CONFIG_COMMANDS_PRE( +[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then + AC_MSG_ERROR([conditional "$1" was never defined. +Usually this means the macro was only invoked conditionally.]) +fi])]) + +# serial 7 -*- Autoconf -*- + +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 +# Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + + +# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be +# written in clear, in which case automake, when reading aclocal.m4, +# will think it sees a *use*, and therefore will trigger all it's +# C support machinery. Also note that it means that autoscan, seeing +# CC etc. in the Makefile, will ask for an AC_PROG_CC use... + + + +# _AM_DEPENDENCIES(NAME) +# ---------------------- +# See how the compiler implements dependency checking. +# NAME is "CC", "CXX", "GCJ", or "OBJC". +# We try a few techniques and use that to set a single cache variable. +# +# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was +# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular +# dependency, and given that the user is not expected to run this macro, +# just rely on AC_PROG_CC. +AC_DEFUN([_AM_DEPENDENCIES], +[AC_REQUIRE([AM_SET_DEPDIR])dnl +AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl +AC_REQUIRE([AM_MAKE_INCLUDE])dnl +AC_REQUIRE([AM_DEP_TRACK])dnl + +ifelse([$1], CC, [depcc="$CC" am_compiler_list=], + [$1], CXX, [depcc="$CXX" am_compiler_list=], + [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], + [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], + [depcc="$$1" am_compiler_list=]) + +AC_CACHE_CHECK([dependency style of $depcc], + [am_cv_$1_dependencies_compiler_type], +[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_$1_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` + fi + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + case $depmode in + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + none) break ;; + esac + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. + if depmode=$depmode \ + source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_$1_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_$1_dependencies_compiler_type=none +fi +]) +AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) +AM_CONDITIONAL([am__fastdep$1], [ + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) +]) + + +# AM_SET_DEPDIR +# ------------- +# Choose a directory name for dependency files. +# This macro is AC_REQUIREd in _AM_DEPENDENCIES +AC_DEFUN([AM_SET_DEPDIR], +[AC_REQUIRE([AM_SET_LEADING_DOT])dnl +AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl +]) + + +# AM_DEP_TRACK +# ------------ +AC_DEFUN([AM_DEP_TRACK], +[AC_ARG_ENABLE(dependency-tracking, +[ --disable-dependency-tracking speeds up one-time build + --enable-dependency-tracking do not reject slow dependency extractors]) +if test "x$enable_dependency_tracking" != xno; then + am_depcomp="$ac_aux_dir/depcomp" + AMDEPBACKSLASH='\' +fi +AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) +AC_SUBST([AMDEPBACKSLASH]) +]) + +# Generate code to set up dependency tracking. -*- Autoconf -*- + +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +#serial 2 + +# _AM_OUTPUT_DEPENDENCY_COMMANDS +# ------------------------------ +AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], +[for mf in $CONFIG_FILES; do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named `Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # So let's grep whole file. + if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then + dirpart=`AS_DIRNAME("$mf")` + else + continue + fi + grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue + # Extract the definition of DEP_FILES from the Makefile without + # running `make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue + # When using ansi2knr, U may be empty or an underscore; expand it + U=`sed -n 's/^U = //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 ' + /^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"]) +]) + +# Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +# serial 7 + +# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. +AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) + +# 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 11 + +# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) +# AM_INIT_AUTOMAKE([OPTIONS]) +# ----------------------------------------------- +# The call with PACKAGE and VERSION arguments is the old style +# call (pre autoconf-2.50), which is being phased out. PACKAGE +# and VERSION should now be passed to AC_INIT and removed from +# the call to AM_INIT_AUTOMAKE. +# We support both call styles for the transition. After +# the next Automake release, Autoconf can make the AC_INIT +# arguments mandatory, and then we can depend on a new Autoconf +# release and drop the old call support. +AC_DEFUN([AM_INIT_AUTOMAKE], +[AC_PREREQ([2.58])dnl +dnl Autoconf wants to disallow AM_ names. We explicitly allow +dnl the ones we care about. +m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl +AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl +AC_REQUIRE([AC_PROG_INSTALL])dnl +# test to see if srcdir already configured +if test "`cd $srcdir && pwd`" != "`pwd`" && + test -f $srcdir/config.status; then + AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi +AC_SUBST([CYGPATH_W]) + +# Define the identity of the package. +dnl Distinguish between old-style and new-style calls. +m4_ifval([$2], +[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl + AC_SUBST([PACKAGE], [$1])dnl + AC_SUBST([VERSION], [$2])], +[_AM_SET_OPTIONS([$1])dnl + AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl + AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl + +_AM_IF_OPTION([no-define],, +[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) + AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl + +# Some tools Automake needs. +AC_REQUIRE([AM_SANITY_CHECK])dnl +AC_REQUIRE([AC_ARG_PROGRAM])dnl +AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) +AM_MISSING_PROG(AUTOCONF, autoconf) +AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) +AM_MISSING_PROG(AUTOHEADER, autoheader) +AM_MISSING_PROG(MAKEINFO, makeinfo) +AM_MISSING_PROG(AMTAR, tar) +AM_PROG_INSTALL_SH +AM_PROG_INSTALL_STRIP +AC_REQUIRE([AM_PROG_MKDIR_P])dnl +# We need awk for the "check" target. The system "awk" is bad on +# some platforms. +AC_REQUIRE([AC_PROG_AWK])dnl +AC_REQUIRE([AC_PROG_MAKE_SET])dnl +AC_REQUIRE([AM_SET_LEADING_DOT])dnl + +_AM_IF_OPTION([no-dependencies],, +[AC_PROVIDE_IFELSE([AC_PROG_CC], + [_AM_DEPENDENCIES(CC)], + [define([AC_PROG_CC], + defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl +AC_PROVIDE_IFELSE([AC_PROG_CXX], + [_AM_DEPENDENCIES(CXX)], + [define([AC_PROG_CXX], + defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl +]) +]) + + +# When config.status generates a header, we must update the stamp-h file. +# This file resides in the same directory as the config header +# that is generated. The stamp files are numbered to have different names. + +# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the +# loop where config.status creates the headers, so we can generate +# our stamp files there. +AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], +[# Compute $1's index in $config_headers. +_am_stamp_count=1 +for _am_header in $config_headers :; do + case $_am_header in + $1 | $1:* ) + break ;; + * ) + _am_stamp_count=`expr $_am_stamp_count + 1` ;; + esac +done +echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) + +# AM_PROG_INSTALL_SH +# ------------------ +# Define $install_sh. + +# Copyright (C) 2001, 2003 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +AC_DEFUN([AM_PROG_INSTALL_SH], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +install_sh=${install_sh-"$am_aux_dir/install-sh"} +AC_SUBST(install_sh)]) + +# -*- Autoconf -*- +# Copyright (C) 2003 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +# serial 1 + +# Check whether the underlying file-system supports filenames +# with a leading dot. For instance MS-DOS doesn't. +AC_DEFUN([AM_SET_LEADING_DOT], +[rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null +AC_SUBST([am__leading_dot])]) + +# Check to see how 'make' treats includes. -*- Autoconf -*- + +# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +# serial 2 + +# AM_MAKE_INCLUDE() +# ----------------- +# Check to see how make treats includes. +AC_DEFUN([AM_MAKE_INCLUDE], +[am_make=${MAKE-make} +cat > confinc << 'END' +am__doit: + @echo done +.PHONY: am__doit +END +# If we don't find an include directive, just comment out the code. +AC_MSG_CHECKING([for style of include used by $am_make]) +am__include="#" +am__quote= +_am_result=none +# First try GNU make style include. +echo "include confinc" > confmf +# We grep out `Entering directory' and `Leaving directory' +# messages which can occur if `w' ends up in MAKEFLAGS. +# In particular we don't look at `^make:' because GNU make might +# be invoked under some other name (usually "gmake"), in which +# case it prints its new name instead of `make'. +if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then + am__include=include + am__quote= + _am_result=GNU +fi +# Now try BSD make style include. +if test "$am__include" = "#"; then + echo '.include "confinc"' > confmf + if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then + am__include=.include + am__quote="\"" + _am_result=BSD + fi +fi +AC_SUBST([am__include]) +AC_SUBST([am__quote]) +AC_MSG_RESULT([$_am_result]) +rm -f confinc confmf +]) + +# -*- Autoconf -*- + + +# Copyright (C) 1997, 1999, 2000, 2001, 2003 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +# serial 3 + +# AM_MISSING_PROG(NAME, PROGRAM) +# ------------------------------ +AC_DEFUN([AM_MISSING_PROG], +[AC_REQUIRE([AM_MISSING_HAS_RUN]) +$1=${$1-"${am_missing_run}$2"} +AC_SUBST($1)]) + + +# AM_MISSING_HAS_RUN +# ------------------ +# Define MISSING if not defined so far and test if it supports --run. +# If it does, set am_missing_run to use it, otherwise, to nothing. +AC_DEFUN([AM_MISSING_HAS_RUN], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" +# Use eval to expand $SHELL +if eval "$MISSING --run true"; then + am_missing_run="$MISSING --run " +else + am_missing_run= + AC_MSG_WARN([`missing' script is too old or missing]) +fi +]) + +# AM_PROG_MKDIR_P +# --------------- +# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise. + +# Copyright (C) 2003, 2004 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories +# created by `make install' are always world readable, even if the +# installer happens to have an overly restrictive umask (e.g. 077). +# This was a mistake. There are at least two reasons why we must not +# use `-m 0755': +# - it causes special bits like SGID to be ignored, +# - it may be too restrictive (some setups expect 775 directories). +# +# Do not use -m 0755 and let people choose whatever they expect by +# setting umask. +# +# We cannot accept any implementation of `mkdir' that recognizes `-p'. +# Some implementations (such as Solaris 8's) are not thread-safe: if a +# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c' +# concurrently, both version can detect that a/ is missing, but only +# one can create it and the other will error out. Consequently we +# restrict ourselves to GNU make (using the --version option ensures +# this.) +AC_DEFUN([AM_PROG_MKDIR_P], +[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then + # Keeping the `.' argument allows $(mkdir_p) to be used without + # argument. Indeed, we sometimes output rules like + # $(mkdir_p) $(somedir) + # where $(somedir) is conditionally defined. + # (`test -n '$(somedir)' && $(mkdir_p) $(somedir)' is a more + # expensive solution, as it forces Make to start a sub-shell.) + mkdir_p='mkdir -p -- .' +else + # On NextStep and OpenStep, the `mkdir' command does not + # recognize any option. It will interpret all options as + # directories to create, and then abort because `.' already + # exists. + for d in ./-p ./--version; + do + test -d $d && rmdir $d + done + # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. + if test -f "$ac_aux_dir/mkinstalldirs"; then + mkdir_p='$(mkinstalldirs)' + else + mkdir_p='$(install_sh) -d' + fi +fi +AC_SUBST([mkdir_p])]) + +# Helper functions for option handling. -*- Autoconf -*- + +# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +# serial 2 + +# _AM_MANGLE_OPTION(NAME) +# ----------------------- +AC_DEFUN([_AM_MANGLE_OPTION], +[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) + +# _AM_SET_OPTION(NAME) +# ------------------------------ +# Set option NAME. Presently that only means defining a flag for this option. +AC_DEFUN([_AM_SET_OPTION], +[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) + +# _AM_SET_OPTIONS(OPTIONS) +# ---------------------------------- +# OPTIONS is a space-separated list of Automake options. +AC_DEFUN([_AM_SET_OPTIONS], +[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) + +# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) +# ------------------------------------------- +# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. +AC_DEFUN([_AM_IF_OPTION], +[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) + +# +# Check to make sure that the build environment is sane. +# + +# Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +# serial 3 + +# AM_SANITY_CHECK +# --------------- +AC_DEFUN([AM_SANITY_CHECK], +[AC_MSG_CHECKING([whether build environment is sane]) +# Just in case +sleep 1 +echo timestamp > conftest.file +# Do `set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` + if test "$[*]" = "X"; then + # -L didn't work. + set X `ls -t $srcdir/configure conftest.file` + fi + rm -f conftest.file + if test "$[*]" != "X $srcdir/configure conftest.file" \ + && test "$[*]" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken +alias in your environment]) + fi + + test "$[2]" = conftest.file + ) +then + # Ok. + : +else + AC_MSG_ERROR([newly created file is older than distributed files! +Check your system clock]) +fi +AC_MSG_RESULT(yes)]) + +# AM_PROG_INSTALL_STRIP + +# Copyright (C) 2001, 2003 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +# One issue with vendor `install' (even GNU) is that you can't +# specify the program used to strip binaries. This is especially +# annoying in cross-compiling environments, where the build's strip +# is unlikely to handle the host's binaries. +# Fortunately install-sh will honor a STRIPPROG variable, so we +# always use install-sh in `make install-strip', and initialize +# STRIPPROG with the value of the STRIP variable (set by the user). +AC_DEFUN([AM_PROG_INSTALL_STRIP], +[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl +# Installed binaries are usually stripped using `strip' when the user +# run `make install-strip'. However `strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the `STRIP' environment variable to overrule this program. +dnl Don't test for $cross_compiling = yes, because it might be `maybe'. +if test "$cross_compiling" != no; then + AC_CHECK_TOOL([STRIP], [strip], :) +fi +INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" +AC_SUBST([INSTALL_STRIP_PROGRAM])]) + diff --git a/config.guess b/config.guess new file mode 100755 index 0000000..686d132 --- /dev/null +++ b/config.guess @@ -0,0 +1,1517 @@ +#! /bin/sh +# Attempt to guess a canonical system name. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. + +timestamp='2005-05-27' + +# 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., 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. + + +# 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, 2002, 2003, 2004, 2005 +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 ;; + --version | -v ) + echo "$version" ; exit ;; + --help | --h* | -h ) + echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" >&2 + exit 1 ;; + * ) + break ;; + esac +done + +if test $# != 0; then + echo "$me: too many arguments$help" >&2 + exit 1 +fi + +trap 'exit 1' 1 2 15 + +# CC_FOR_BUILD -- compiler used by this script. Note that the use of a +# compiler to aid in system detection is discouraged as it requires +# temporary files to be created and, as you can see below, it is a +# headache to deal with in a portable fashion. + +# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still +# use `HOST_CC' if defined, but it is deprecated. + +# Portable tmp directory creation inspired by the Autoconf team. + +set_cc_for_build=' +trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; +trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; +: ${TMPDIR=/tmp} ; + { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || + { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || + { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || + { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; +dummy=$tmp/dummy ; +tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; +case $CC_FOR_BUILD,$HOST_CC,$CC in + ,,) echo "int x;" > $dummy.c ; + for c in cc gcc c89 c99 ; do + if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then + CC_FOR_BUILD="$c"; break ; + fi ; + done ; + if test x"$CC_FOR_BUILD" = x ; then + CC_FOR_BUILD=no_compiler_found ; + fi + ;; + ,,*) CC_FOR_BUILD=$CC ;; + ,*,*) CC_FOR_BUILD=$HOST_CC ;; +esac ;' + +# This is needed to find uname on a Pyramid OSx when run in the BSD universe. +# (ghazi@noc.rutgers.edu 1994-08-24) +if (test -f /.attbin/uname) >/dev/null 2>&1 ; then + PATH=$PATH:/.attbin ; export PATH +fi + +UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown +UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown +UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown +UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown + +if [ "${UNAME_SYSTEM}" = "Linux" ] ; then + eval $set_cc_for_build + cat << EOF > $dummy.c + #include + #ifdef __UCLIBC__ + # ifdef __UCLIBC_CONFIG_VERSION__ + LIBC=uclibc __UCLIBC_CONFIG_VERSION__ + # else + LIBC=uclibc + # endif + #else + LIBC=gnu + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep LIBC= | sed -e 's: ::g'` +fi + +# 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 ;; + amd64:OpenBSD:*:*) + echo x86_64-unknown-openbsd${UNAME_RELEASE} + exit ;; + amiga:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit ;; + cats:OpenBSD:*:*) + echo arm-unknown-openbsd${UNAME_RELEASE} + exit ;; + hp300:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit ;; + luna88k:OpenBSD:*:*) + echo m88k-unknown-openbsd${UNAME_RELEASE} + exit ;; + mac68k:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit ;; + macppc:OpenBSD:*:*) + echo powerpc-unknown-openbsd${UNAME_RELEASE} + exit ;; + mvme68k:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit ;; + mvme88k:OpenBSD:*:*) + echo m88k-unknown-openbsd${UNAME_RELEASE} + exit ;; + mvmeppc:OpenBSD:*:*) + echo powerpc-unknown-openbsd${UNAME_RELEASE} + exit ;; + sgi:OpenBSD:*:*) + echo mips64-unknown-openbsd${UNAME_RELEASE} + exit ;; + sun3:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit ;; + *:OpenBSD:*:*) + echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE} + exit ;; + *:ekkoBSD:*:*) + echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} + exit ;; + macppc:MirBSD:*:*) + echo powerppc-unknown-mirbsd${UNAME_RELEASE} + exit ;; + *:MirBSD:*:*) + echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} + exit ;; + alpha:OSF1:*:*) + case $UNAME_RELEASE in + *4.0) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` + ;; + *5.*) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` + ;; + esac + # According to Compaq, /usr/sbin/psrinfo has been available on + # OSF/1 and Tru64 systems produced since 1995. I hope that + # covers most systems running today. This code pipes the CPU + # types through head -n 1, so we only detect the type of CPU 0. + ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` + case "$ALPHA_CPU_TYPE" in + "EV4 (21064)") + UNAME_MACHINE="alpha" ;; + "EV4.5 (21064)") + UNAME_MACHINE="alpha" ;; + "LCA4 (21066/21068)") + UNAME_MACHINE="alpha" ;; + "EV5 (21164)") + UNAME_MACHINE="alphaev5" ;; + "EV5.6 (21164A)") + UNAME_MACHINE="alphaev56" ;; + "EV5.6 (21164PC)") + UNAME_MACHINE="alphapca56" ;; + "EV5.7 (21164PC)") + UNAME_MACHINE="alphapca57" ;; + "EV6 (21264)") + UNAME_MACHINE="alphaev6" ;; + "EV6.7 (21264A)") + UNAME_MACHINE="alphaev67" ;; + "EV6.8CB (21264C)") + UNAME_MACHINE="alphaev68" ;; + "EV6.8AL (21264B)") + UNAME_MACHINE="alphaev68" ;; + "EV6.8CX (21264D)") + UNAME_MACHINE="alphaev68" ;; + "EV6.9A (21264/EV69A)") + UNAME_MACHINE="alphaev69" ;; + "EV7 (21364)") + UNAME_MACHINE="alphaev7" ;; + "EV7.9 (21364A)") + UNAME_MACHINE="alphaev79" ;; + esac + # A Pn.n version is a patched version. + # A Vn.n version is a released version. + # A Tn.n version is a released field test version. + # A Xn.n version is an unreleased experimental baselevel. + # 1.2 uses "1.2" for uname -r. + echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + exit ;; + 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 ;; + 21064:Windows_NT:50:3) + echo alpha-dec-winnt3.5 + exit ;; + Amiga*:UNIX_System_V:4.0:*) + echo m68k-unknown-sysv4 + exit ;; + *:[Aa]miga[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-amigaos + exit ;; + *:[Mm]orph[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-morphos + exit ;; + *:OS/390:*:*) + echo i370-ibm-openedition + exit ;; + *:z/VM:*:*) + echo s390-ibm-zvmoe + exit ;; + *:OS400:*:*) + echo powerpc-ibm-os400 + exit ;; + arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) + echo arm-acorn-riscix${UNAME_RELEASE} + exit ;; + arm:riscos:*:*|arm:RISCOS:*:*) + echo arm-unknown-riscos + exit ;; + SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) + echo hppa1.1-hitachi-hiuxmpp + exit ;; + 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 ;; + NILE*:*:*:dcosx) + echo pyramid-pyramid-svr4 + exit ;; + DRS?6000:unix:4.0:6*) + echo sparc-icl-nx6 + exit ;; + DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) + case `/usr/bin/uname -p` in + sparc) echo sparc-icl-nx7; exit ;; + esac ;; + sun4H:SunOS:5.*:*) + echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) + echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + i86pc:SunOS:5.*:*) + echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + 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 ;; + 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 ;; + sun3*:SunOS:*:*) + echo m68k-sun-sunos${UNAME_RELEASE} + exit ;; + 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 ;; + aushp:SunOS:*:*) + echo sparc-auspex-sunos${UNAME_RELEASE} + exit ;; + # 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 ;; + atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) + echo m68k-milan-mint${UNAME_RELEASE} + exit ;; + hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) + echo m68k-hades-mint${UNAME_RELEASE} + exit ;; + *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) + echo m68k-unknown-mint${UNAME_RELEASE} + exit ;; + m68k:machten:*:*) + echo m68k-apple-machten${UNAME_RELEASE} + exit ;; + powerpc:machten:*:*) + echo powerpc-apple-machten${UNAME_RELEASE} + exit ;; + RISC*:Mach:*:*) + echo mips-dec-mach_bsd4.3 + exit ;; + RISC*:ULTRIX:*:*) + echo mips-dec-ultrix${UNAME_RELEASE} + exit ;; + VAX*:ULTRIX*:*:*) + echo vax-dec-ultrix${UNAME_RELEASE} + exit ;; + 2020:CLIX:*:* | 2430:CLIX:*:*) + echo clipper-intergraph-clix${UNAME_RELEASE} + exit ;; + 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 && + dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && + SYSTEM_NAME=`$dummy $dummyarg` && + { echo "$SYSTEM_NAME"; exit; } + echo mips-mips-riscos${UNAME_RELEASE} + exit ;; + Motorola:PowerMAX_OS:*:*) + echo powerpc-motorola-powermax + exit ;; + Motorola:*:4.3:PL8-*) + echo powerpc-harris-powermax + exit ;; + Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) + echo powerpc-harris-powermax + exit ;; + Night_Hawk:Power_UNIX:*:*) + echo powerpc-harris-powerunix + exit ;; + m88k:CX/UX:7*:*) + echo m88k-harris-cxux7 + exit ;; + m88k:*:4*:R4*) + echo m88k-motorola-sysv4 + exit ;; + m88k:*:3*:R3*) + echo m88k-motorola-sysv3 + exit ;; + 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 ;; + M88*:DolphinOS:*:*) # DolphinOS (SVR3) + echo m88k-dolphin-sysv3 + exit ;; + M88*:*:R3*:*) + # Delta 88k system running SVR3 + echo m88k-motorola-sysv3 + exit ;; + XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) + echo m88k-tektronix-sysv3 + exit ;; + Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) + echo m68k-tektronix-bsd + exit ;; + *:IRIX*:*:*) + echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` + exit ;; + ????????: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 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' + i*86:AIX:*:*) + echo i386-ibm-aix + exit ;; + 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 ;; + *: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 + if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` + then + echo "$SYSTEM_NAME" + else + echo rs6000-ibm-aix3.2.5 + fi + 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 ;; + *: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 ;; + *:AIX:*:*) + echo rs6000-ibm-aix + exit ;; + ibmrt:4.4BSD:*|romp-ibm:BSD:*) + echo romp-ibm-bsd4.4 + exit ;; + ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and + echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to + exit ;; # report: romp-ibm BSD 4.3 + *:BOSX:*:*) + echo rs6000-bull-bosx + exit ;; + DPX/2?00:B.O.S.:*:*) + echo m68k-bull-sysv3 + exit ;; + 9000/[34]??:4.3bsd:1.*:*) + echo m68k-hp-bsd + exit ;; + hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) + echo m68k-hp-bsd4.4 + exit ;; + 9000/[34678]??:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + case "${UNAME_MACHINE}" in + 9000/31? ) HP_ARCH=m68000 ;; + 9000/[34]?? ) HP_ARCH=m68k ;; + 9000/[678][0-9][0-9]) + if [ -x /usr/bin/getconf ]; then + sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` + sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` + case "${sc_cpu_version}" in + 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 + 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 + 532) # CPU_PA_RISC2_0 + case "${sc_kernel_bits}" in + 32) HP_ARCH="hppa2.0n" ;; + 64) HP_ARCH="hppa2.0w" ;; + '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 + esac ;; + esac + fi + if [ "${HP_ARCH}" = "" ]; then + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + + #define _HPUX_SOURCE + #include + #include + + int main () + { + #if defined(_SC_KERNEL_BITS) + long bits = sysconf(_SC_KERNEL_BITS); + #endif + long cpu = sysconf (_SC_CPU_VERSION); + + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1"); break; + case CPU_PA_RISC2_0: + #if defined(_SC_KERNEL_BITS) + switch (bits) + { + case 64: puts ("hppa2.0w"); break; + case 32: puts ("hppa2.0n"); break; + default: puts ("hppa2.0"); break; + } break; + #else /* !defined(_SC_KERNEL_BITS) */ + puts ("hppa2.0"); break; + #endif + default: puts ("hppa1.0"); break; + } + exit (0); + } +EOF + (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` + test -z "$HP_ARCH" && HP_ARCH=hppa + fi ;; + esac + if [ ${HP_ARCH} = "hppa2.0w" ] + then + # avoid double evaluation of $set_cc_for_build + test -n "$CC_FOR_BUILD" || eval $set_cc_for_build + + # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating + # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler + # generating 64-bit code. GNU and HP use different nomenclature: + # + # $ CC_FOR_BUILD=cc ./config.guess + # => hppa2.0w-hp-hpux11.23 + # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess + # => hppa64-hp-hpux11.23 + + if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | + grep __LP64__ >/dev/null + then + HP_ARCH="hppa2.0w" + else + HP_ARCH="hppa64" + fi + fi + echo ${HP_ARCH}-hp-hpux${HPUX_REV} + exit ;; + ia64:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + echo ia64-hp-hpux${HPUX_REV} + exit ;; + 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 && SYSTEM_NAME=`$dummy` && + { echo "$SYSTEM_NAME"; exit; } + echo unknown-hitachi-hiuxwe2 + exit ;; + 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) + echo hppa1.1-hp-bsd + exit ;; + 9000/8??:4.3bsd:*:*) + echo hppa1.0-hp-bsd + exit ;; + *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) + echo hppa1.0-hp-mpeix + exit ;; + hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) + echo hppa1.1-hp-osf + exit ;; + hp8??:OSF1:*:*) + echo hppa1.0-hp-osf + exit ;; + i*86:OSF1:*:*) + if [ -x /usr/sbin/sysversion ] ; then + echo ${UNAME_MACHINE}-unknown-osf1mk + else + echo ${UNAME_MACHINE}-unknown-osf1 + fi + exit ;; + parisc*:Lites*:*:*) + echo hppa1.1-hp-lites + exit ;; + C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) + echo c1-convex-bsd + exit ;; + C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit ;; + C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) + echo c34-convex-bsd + exit ;; + C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) + echo c38-convex-bsd + exit ;; + C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) + echo c4-convex-bsd + exit ;; + CRAY*Y-MP:*:*:*) + echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + 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 ;; + CRAY*TS:*:*:*) + echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*T3E:*:*:*) + echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*SV1:*:*:*) + echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + *:UNICOS/mp:*:*) + echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + 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 ;; + 5000:UNIX_System_V:4.*:*) + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` + echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; + i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) + echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} + exit ;; + sparc*:BSD/OS:*:*) + echo sparc-unknown-bsdi${UNAME_RELEASE} + exit ;; + *:BSD/OS:*:*) + echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} + exit ;; + *:FreeBSD:*:*) + echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` + exit ;; + i*:CYGWIN*:*) + echo ${UNAME_MACHINE}-pc-cygwin + exit ;; + i*:MINGW*:*) + echo ${UNAME_MACHINE}-pc-mingw32 + exit ;; + i*:windows32*:*) + # uname -m includes "-pc" on this system. + echo ${UNAME_MACHINE}-mingw32 + exit ;; + i*:PW*:*) + echo ${UNAME_MACHINE}-pc-pw32 + exit ;; + x86:Interix*:[34]*) + echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//' + exit ;; + [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) + echo i${UNAME_MACHINE}-pc-mks + exit ;; + 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 ;; + i*:UWIN*:*) + echo ${UNAME_MACHINE}-pc-uwin + exit ;; + amd64:CYGWIN*:*:*) + echo x86_64-unknown-cygwin + exit ;; + p*:CYGWIN*:*) + echo powerpcle-unknown-cygwin + exit ;; + prep*:SunOS:5.*:*) + echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + *:GNU:*:*) + # the GNU system + echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` + exit ;; + *:GNU/*:*:*) + # other systems with GNU libc and userland + echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu + exit ;; + i*86:Minix:*:*) + echo ${UNAME_MACHINE}-pc-minix + exit ;; + arm*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + cris:Linux:*:*) + echo cris-axis-linux-${LIBC} + exit ;; + crisv32:Linux:*:*) + echo crisv32-axis-linux-${LIBC} + exit ;; + frv:Linux:*:*) + echo frv-unknown-linux-${LIBC} + exit ;; + ia64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + m32r*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + m68*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + mips:Linux:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #undef CPU + #undef mips + #undef mipsel + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) + CPU=mipsel + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) + CPU=mips + #else + CPU= + #endif + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } + ;; + mips64:Linux:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #undef CPU + #undef mips64 + #undef mips64el + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) + CPU=mips64el + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) + CPU=mips64 + #else + CPU= + #endif + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } + ;; + ppc:Linux:*:*) + echo powerpc-unknown-linux-${LIBC} + exit ;; + ppc64:Linux:*:*) + echo powerpc64-unknown-linux-${LIBC} + exit ;; + 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="gnulibc1" ; fi + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + 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-${LIBC} ;; + PA8*) echo hppa2.0-unknown-linux-${LIBC} ;; + *) echo hppa-unknown-linux-${LIBC} ;; + esac + exit ;; + parisc64:Linux:*:* | hppa64:Linux:*:*) + echo hppa64-unknown-linux-${LIBC} + exit ;; + s390:Linux:*:* | s390x:Linux:*:*) + echo ${UNAME_MACHINE}-ibm-linux + exit ;; + sh64*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + sh*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + sparc:Linux:*:* | sparc64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + x86_64:Linux:*:*) + echo x86_64-unknown-linux-${LIBC} + exit ;; + 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-${LIBC}" + ;; + a.out-i386-linux) + echo "${UNAME_MACHINE}-pc-linux-${LIBC}aout" + exit ;; + coff-i386) + echo "${UNAME_MACHINE}-pc-linux-${LIBC}coff" + exit ;; + "") + # Either a pre-BFD a.out linker (linux-gnuoldld) or + # one that does not give us useful --help. + echo "${UNAME_MACHINE}-pc-linux-${LIBC}oldld" + exit ;; + esac + if [ "$LIBC" != "gnu" ] ; then echo "$TENTATIVE" && exit 0 ; fi + # Determine whether the default compiler is a.out or elf + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + #ifdef __ELF__ + # ifdef __GLIBC__ + # if __GLIBC__ >= 2 + LIBC=gnu + # else + LIBC=gnulibc1 + # endif + # else + LIBC=gnulibc1 + # endif + #else + #ifdef __INTEL_COMPILER + LIBC=gnu + #else + LIBC=gnuaout + #endif + #endif + #ifdef __dietlibc__ + LIBC=dietlibc + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` + test x"${LIBC}" != x && { + echo "${UNAME_MACHINE}-pc-linux-${LIBC}" + exit + } + test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } + ;; + 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 ;; + 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 ;; + 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 ;; + i*86:XTS-300:*:STOP) + echo ${UNAME_MACHINE}-unknown-stop + exit ;; + i*86:atheos:*:*) + echo ${UNAME_MACHINE}-unknown-atheos + exit ;; + i*86:syllable:*:*) + echo ${UNAME_MACHINE}-pc-syllable + exit ;; + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) + echo i386-unknown-lynxos${UNAME_RELEASE} + exit ;; + i*86:*DOS:*:*) + echo ${UNAME_MACHINE}-pc-msdosdjgpp + exit ;; + 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 ;; + i*86:*:5:[678]*) + # UnixWare 7.x, OpenUNIX and OpenServer 6. + 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 ;; + 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 ;; + 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 ;; + Intel:Mach:3*:*) + echo i386-pc-mach3 + exit ;; + paragon:*:*:*) + echo i860-intel-osf1 + exit ;; + 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 ;; + mini*:CTIX:SYS*5:*) + # "miniframe" + echo m68010-convergent-sysv + exit ;; + mc68k:UNIX:SYSTEM5:3.51m) + echo m68k-convergent-sysv + exit ;; + M680?0:D-NIX:5.3:*) + echo m68k-diab-dnix + exit ;; + M68*:*:R3V[5678]*:*) + test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; + 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*: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; } + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; + 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4; exit; } ;; + m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) + echo m68k-unknown-lynxos${UNAME_RELEASE} + exit ;; + mc68030:UNIX_System_V:4.*:*) + echo m68k-atari-sysv4 + exit ;; + TSUNAMI:LynxOS:2.*:*) + echo sparc-unknown-lynxos${UNAME_RELEASE} + exit ;; + rs6000:LynxOS:2.*:*) + echo rs6000-unknown-lynxos${UNAME_RELEASE} + exit ;; + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) + echo powerpc-unknown-lynxos${UNAME_RELEASE} + exit ;; + SM[BE]S:UNIX_SV:*:*) + echo mips-dde-sysv${UNAME_RELEASE} + exit ;; + RM*:ReliantUNIX-*:*:*) + echo mips-sni-sysv4 + exit ;; + RM*:SINIX-*:*:*) + echo mips-sni-sysv4 + exit ;; + *: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 ;; + PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + # says + echo i586-unisys-sysv4 + exit ;; + *:UNIX_System_V:4*:FTX*) + # From Gerald Hewes . + # How about differentiating between stratus architectures? -djm + echo hppa1.1-stratus-sysv4 + exit ;; + *:*:*:FTX*) + # From seanf@swdc.stratus.com. + echo i860-stratus-sysv4 + exit ;; + i*86:VOS:*:*) + # From Paul.Green@stratus.com. + echo ${UNAME_MACHINE}-stratus-vos + exit ;; + *:VOS:*:*) + # From Paul.Green@stratus.com. + echo hppa1.1-stratus-vos + exit ;; + mc68*:A/UX:*:*) + echo m68k-apple-aux${UNAME_RELEASE} + exit ;; + news*:NEWS-OS:6*:*) + echo mips-sony-newsos6 + exit ;; + 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 ;; + BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. + echo powerpc-be-beos + exit ;; + BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. + echo powerpc-apple-beos + exit ;; + BePC:BeOS:*:*) # BeOS running on Intel PC compatible. + echo i586-pc-beos + exit ;; + SX-4:SUPER-UX:*:*) + echo sx4-nec-superux${UNAME_RELEASE} + exit ;; + SX-5:SUPER-UX:*:*) + echo sx5-nec-superux${UNAME_RELEASE} + exit ;; + SX-6:SUPER-UX:*:*) + echo sx6-nec-superux${UNAME_RELEASE} + exit ;; + Power*:Rhapsody:*:*) + echo powerpc-apple-rhapsody${UNAME_RELEASE} + exit ;; + *:Rhapsody:*:*) + echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} + exit ;; + *:Darwin:*:*) + UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown + case $UNAME_PROCESSOR in + *86) UNAME_PROCESSOR=i686 ;; + unknown) UNAME_PROCESSOR=powerpc ;; + esac + echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} + exit ;; + *: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 ;; + *:QNX:*:4*) + echo i386-pc-qnx + exit ;; + NSE-?:NONSTOP_KERNEL:*:*) + echo nse-tandem-nsk${UNAME_RELEASE} + exit ;; + NSR-?:NONSTOP_KERNEL:*:*) + echo nsr-tandem-nsk${UNAME_RELEASE} + exit ;; + *:NonStop-UX:*:*) + echo mips-compaq-nonstopux + exit ;; + BS2000:POSIX*:*:*) + echo bs2000-siemens-sysv + exit ;; + DS/*:UNIX_System_V:*:*) + echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} + exit ;; + *: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 ;; + *:TOPS-10:*:*) + echo pdp10-unknown-tops10 + exit ;; + *:TENEX:*:*) + echo pdp10-unknown-tenex + exit ;; + KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) + echo pdp10-dec-tops20 + exit ;; + XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) + echo pdp10-xkl-tops20 + exit ;; + *:TOPS-20:*:*) + echo pdp10-unknown-tops20 + exit ;; + *:ITS:*:*) + echo pdp10-unknown-its + exit ;; + SEI:*:*:SEIUX) + echo mips-sei-seiux${UNAME_RELEASE} + exit ;; + *:DragonFly:*:*) + echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` + exit ;; + *:*VMS:*:*) + UNAME_MACHINE=`(uname -p) 2>/dev/null` + case "${UNAME_MACHINE}" in + A*) echo alpha-dec-vms ; exit ;; + I*) echo ia64-dec-vms ; exit ;; + V*) echo vax-dec-vms ; exit ;; + esac ;; + *:XENIX:*:SysV) + echo i386-pc-xenix + exit ;; + i*86:skyos:*:*) + echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' + exit ;; +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\n"); 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 && SYSTEM_NAME=`$dummy` && + { echo "$SYSTEM_NAME"; exit; } + +# Apollos put the system type in the environment. + +test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } + +# 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 ;; + c2*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit ;; + c34*) + echo c34-convex-bsd + exit ;; + c38*) + echo c38-convex-bsd + exit ;; + c4*) + echo c4-convex-bsd + exit ;; + 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 --git a/config.sub b/config.sub new file mode 100755 index 0000000..aff94c6 --- /dev/null +++ b/config.sub @@ -0,0 +1,1598 @@ +#! /bin/sh +# Configuration validation subroutine script. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. + +timestamp='2005-06-02' + +# 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., 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. + + +# 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, 2002, 2003, 2004, 2005 +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 ;; + --version | -v ) + echo "$version" ; exit ;; + --help | --h* | -h ) + echo "$usage"; exit ;; + -- ) # 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 ;; + + * ) + break ;; + esac +done + +case $# in + 0) echo "$me: missing argument$help" >&2 + exit 1;; + 1) ;; + *) echo "$me: too many arguments$help" >&2 + exit 1;; +esac + +# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). +# Here we must recognize all the valid KERNEL-OS combinations. +maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` +case $maybe_os in + nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \ + kfreebsd*-gnu* | knetbsd*-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 | -knuth | -cray) + os= + basic_machine=$1 + ;; + -sim | -cisco | -oki | -wec | -winbond) + os= + basic_machine=$1 + ;; + -scout) + ;; + -wrs) + os=-vxworks + basic_machine=$1 + ;; + -chorusos*) + os=-chorusos + basic_machine=$1 + ;; + -chorusrdb) + os=-chorusrdb + basic_machine=$1 + ;; + -hiux*) + os=-hiuxwe2 + ;; + -sco5) + os=-sco3.2v5 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco4) + os=-sco3.2v4 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2.[4-9]*) + os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2v[4-9]*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco*) + os=-sco3.2v2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -udk*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -isc) + os=-isc2.2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -clix*) + basic_machine=clipper-intergraph + ;; + -isc*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -lynx*) + os=-lynxos + ;; + -ptx*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` + ;; + -windowsnt*) + os=`echo $os | sed -e 's/windowsnt/winnt/'` + ;; + -psos*) + os=-psos + ;; + -mint | -mint[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; +esac + +# Decode aliases for certain CPU-COMPANY combinations. +case $basic_machine in + # Recognize the basic CPU types without company name. + # Some are omitted here because they have special meanings below. + 1750a | 580 \ + | a29k \ + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ + | am33_2.0 \ + | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ + | bfin \ + | c4x | clipper \ + | d10v | d30v | dlx | dsp16xx | dvp \ + | fr30 | frv \ + | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ + | i370 | i860 | i960 | ia64 \ + | ip2k | iq2000 \ + | m32r | m32rle | m68000 | m68k | m88k | maxq | mcore \ + | mips | mipsbe | mipseb | mipsel | mipsle \ + | mips16 \ + | mips64 | mips64el \ + | mips64vr | mips64vrel \ + | mips64orion | mips64orionel \ + | mips64vr4100 | mips64vr4100el \ + | mips64vr4300 | mips64vr4300el \ + | mips64vr5000 | mips64vr5000el \ + | mips64r5900 | mips64r5900el \ + | mipsisa32 | mipsisa32el \ + | mipsisa32r2 | mipsisa32r2el \ + | mipsisa64 | mipsisa64el \ + | mipsisa64r2 | mipsisa64r2el \ + | mipsisa64sb1 | mipsisa64sb1el \ + | mipsisa64sr71k | mipsisa64sr71kel \ + | mipstx39 | mipstx39el \ + | mn10200 | mn10300 \ + | ms1 \ + | msp430 \ + | ns16k | ns32k \ + | openrisc | or32 \ + | pdp10 | pdp11 | pj | pjl \ + | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ + | pyramid \ + | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ + | sh64 | sh64le \ + | sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \ + | sparcv8 | sparcv9 | sparcv9b \ + | strongarm \ + | tahoe | thumb | tic4x | tic80 | tron \ + | v850 | v850e \ + | we32k \ + | x86 | xscale | xscalee[bl] | xstormy16 | xtensa \ + | z8k) + basic_machine=$basic_machine-unknown + ;; + m32c) + 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-* \ + | bfin-* | bs2000-* \ + | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ + | clipper-* | craynv-* | cydra-* \ + | d10v-* | d30v-* | dlx-* \ + | elxsi-* \ + | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ + | h8300-* | h8500-* \ + | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ + | i*86-* | i860-* | i960-* | ia64-* \ + | ip2k-* | iq2000-* \ + | m32r-* | m32rle-* \ + | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ + | m88110-* | m88k-* | maxq-* | mcore-* \ + | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ + | mips16-* \ + | mips64-* | mips64el-* \ + | mips64vr-* | mips64vrel-* \ + | mips64orion-* | mips64orionel-* \ + | mips64vr4100-* | mips64vr4100el-* \ + | mips64vr4300-* | mips64vr4300el-* \ + | mips64vr5000-* | mips64vr5000el-* \ + | mips64r5900-* | mips64r5900el-* \ + | mipsisa32-* | mipsisa32el-* \ + | mipsisa32r2-* | mipsisa32r2el-* \ + | mipsisa64-* | mipsisa64el-* \ + | mipsisa64r2-* | mipsisa64r2el-* \ + | mipsisa64sb1-* | mipsisa64sb1el-* \ + | mipsisa64sr71k-* | mipsisa64sr71kel-* \ + | mipstx39-* | mipstx39el-* \ + | mmix-* \ + | ms1-* \ + | msp430-* \ + | none-* | np1-* | ns16k-* | ns32k-* \ + | orion-* \ + | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ + | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ + | pyramid-* \ + | romp-* | rs6000-* \ + | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \ + | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ + | sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \ + | sparclite-* \ + | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ + | tahoe-* | thumb-* \ + | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ + | tron-* \ + | v850-* | v850e-* | vax-* \ + | we32k-* \ + | x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \ + | xstormy16-* | xtensa-* \ + | ymp-* \ + | z8k-*) + ;; + m32c-*) + ;; + # 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 + ;; + abacus) + basic_machine=abacus-unknown + ;; + adobe68k) + basic_machine=m68010-adobe + os=-scout + ;; + alliant | fx80) + basic_machine=fx80-alliant + ;; + altos | altos3068) + basic_machine=m68k-altos + ;; + am29k) + basic_machine=a29k-none + os=-bsd + ;; + amd64) + basic_machine=x86_64-pc + ;; + amd64-*) + basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + 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 + ;; + craynv) + basic_machine=craynv-cray + os=-unicosmp + ;; + cr16c) + basic_machine=cr16c-unknown + os=-elf + ;; + crds | unos) + basic_machine=m68k-crds + ;; + crisv32 | crisv32-* | etraxfs*) + basic_machine=crisv32-axis + ;; + cris | cris-* | etrax*) + basic_machine=cris-axis + ;; + crx) + basic_machine=crx-unknown + os=-elf + ;; + 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 + ;; + djgpp) + basic_machine=i586-pc + os=-msdosdjgpp + ;; + 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 + ;; + mipsEE* | ee | ps2) + basic_machine=mips64r5900el-scei + case $os in + -linux*) + ;; + *) + os=-elf + ;; + esac + ;; + iop) + basic_machine=mipsel-scei + os=-irx + ;; + dvp) + basic_machine=dvp-scei + os=-elf + ;; + mips3*-*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` + ;; + mips3*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown + ;; + 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 + ;; + os400) + basic_machine=powerpc-ibm + os=-os400 + ;; + OSE68000 | ose68000) + basic_machine=m68000-ericsson + os=-ose + ;; + os68k) + basic_machine=m68k-none + os=-os68k + ;; + pa-hitachi) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + paragon) + basic_machine=i860-intel + os=-osf + ;; + pbd) + basic_machine=sparc-tti + ;; + pbb) + basic_machine=m68k-tti + ;; + pc532 | pc532-*) + basic_machine=ns32k-pc532 + ;; + pentium | p5 | k5 | k6 | nexgen | viac3) + basic_machine=i586-pc + ;; + pentiumpro | p6 | 6x86 | athlon | athlon_*) + basic_machine=i686-pc + ;; + pentiumii | pentium2 | pentiumiii | pentium3) + basic_machine=i686-pc + ;; + pentium4) + basic_machine=i786-pc + ;; + pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) + basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumpro-* | p6-* | 6x86-* | athlon-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentium4-*) + basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pn) + basic_machine=pn-gould + ;; + power) basic_machine=power-ibm + ;; + ppc) basic_machine=powerpc-unknown + ;; + ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppcle | powerpclittle | ppc-le | powerpc-little) + basic_machine=powerpcle-unknown + ;; + ppcle-* | powerpclittle-*) + basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppc64) basic_machine=powerpc64-unknown + ;; + ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppc64le | powerpc64little | ppc64-le | powerpc64-little) + basic_machine=powerpc64le-unknown + ;; + ppc64le-* | powerpc64little-*) + basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ps2) + basic_machine=i386-ibm + ;; + pw32) + basic_machine=i586-unknown + os=-pw32 + ;; + rom68k) + basic_machine=m68k-rom68k + os=-coff + ;; + rm[46]00) + basic_machine=mips-siemens + ;; + rtpc | rtpc-*) + basic_machine=romp-ibm + ;; + s390 | s390-*) + basic_machine=s390-ibm + ;; + s390x | s390x-*) + basic_machine=s390x-ibm + ;; + sa29200) + basic_machine=a29k-amd + os=-udi + ;; + sb1) + basic_machine=mipsisa64sb1-unknown + ;; + sb1el) + basic_machine=mipsisa64sb1el-unknown + ;; + sei) + basic_machine=mips-sei + os=-seiux + ;; + sequent) + basic_machine=i386-sequent + ;; + sh) + basic_machine=sh-hitachi + os=-hms + ;; + sh64) + basic_machine=sh64-unknown + ;; + sparclite-wrs | simso-wrs) + basic_machine=sparclite-wrs + os=-vxworks + ;; + sps7) + basic_machine=m68k-bull + os=-sysv2 + ;; + spur) + basic_machine=spur-unknown + ;; + st2000) + basic_machine=m68k-tandem + ;; + stratus) + basic_machine=i860-stratus + os=-sysv4 + ;; + sun2) + basic_machine=m68000-sun + ;; + sun2os3) + basic_machine=m68000-sun + os=-sunos3 + ;; + sun2os4) + basic_machine=m68000-sun + os=-sunos4 + ;; + sun3os3) + basic_machine=m68k-sun + os=-sunos3 + ;; + sun3os4) + basic_machine=m68k-sun + os=-sunos4 + ;; + sun4os3) + basic_machine=sparc-sun + os=-sunos3 + ;; + sun4os4) + basic_machine=sparc-sun + os=-sunos4 + ;; + sun4sol2) + basic_machine=sparc-sun + os=-solaris2 + ;; + sun3 | sun3-*) + basic_machine=m68k-sun + ;; + sun4) + basic_machine=sparc-sun + ;; + sun386 | sun386i | roadrunner) + basic_machine=i386-sun + ;; + sv1) + basic_machine=sv1-cray + os=-unicos + ;; + symmetry) + basic_machine=i386-sequent + os=-dynix + ;; + t3e) + basic_machine=alphaev5-cray + os=-unicos + ;; + t90) + basic_machine=t90-cray + os=-unicos + ;; + tic54x | c54x*) + basic_machine=tic54x-unknown + os=-coff + ;; + tic55x | c55x*) + basic_machine=tic55x-unknown + os=-coff + ;; + tic6x | c6x*) + basic_machine=tic6x-unknown + os=-coff + ;; + tx39) + basic_machine=mipstx39-unknown + ;; + tx39el) + basic_machine=mipstx39el-unknown + ;; + toad1) + basic_machine=pdp10-xkl + os=-tops20 + ;; + tower | tower-32) + basic_machine=m68k-ncr + ;; + tpf) + basic_machine=s390x-ibm + os=-tpf + ;; + 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 + ;; + xbox) + basic_machine=i686-pc + os=-mingw32 + ;; + 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 + ;; + mmix) + basic_machine=mmix-knuth + ;; + rs6000) + basic_machine=rs6000-ibm + ;; + vax) + basic_machine=vax-dec + ;; + pdp10) + # there are many clones, so DEC is not a safe bet + basic_machine=pdp10-unknown + ;; + pdp11) + basic_machine=pdp11-dec + ;; + we32k) + basic_machine=we32k-att + ;; + sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele) + basic_machine=sh-unknown + ;; + sh64) + basic_machine=sh64-unknown + ;; + sparc | sparcv8 | 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* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \ + | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ + | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ + | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ + | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ + | -chorusos* | -chorusrdb* \ + | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ + | -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \ + | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ + | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ + | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ + | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ + | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ + | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* | -skyos* \ + | -irx* ) + # Remember, each alternative MUST END IN *, to match a version number. + ;; + -qnx*) + case $basic_machine in + x86-* | i*86-*) + ;; + *) + os=-nto$os + ;; + esac + ;; + -nto-qnx*) + ;; + -nto*) + os=`echo $os | sed -e 's|nto|nto-qnx|'` + ;; + -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ + | -windows* | -osx | -abug | -netware* | -os9* | -beos* \ + | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) + ;; + -mac*) + os=`echo $os | sed -e 's|mac|macos|'` + ;; + -linux-dietlibc) + os=-linux-dietlibc + ;; + -linux*) + os=`echo $os | sed -e 's|linux|linux-gnu|'` + ;; + -sunos5*) + os=`echo $os | sed -e 's|sunos5|solaris2|'` + ;; + -sunos6*) + os=`echo $os | sed -e 's|sunos6|solaris3|'` + ;; + -opened*) + os=-openedition + ;; + -os400*) + os=-os400 + ;; + -wince*) + os=-wince + ;; + -osfrose*) + os=-osfrose + ;; + -osf*) + os=-osf + ;; + -utek*) + os=-bsd + ;; + -dynix*) + os=-bsd + ;; + -acis*) + os=-aos + ;; + -atheos*) + os=-atheos + ;; + -syllable*) + os=-syllable + ;; + -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 + ;; + -tpf*) + os=-tpf + ;; + -triton*) + os=-sysv3 + ;; + -oss*) + os=-sysv3 + ;; + -svr4) + os=-sysv4 + ;; + -svr3) + os=-sysv3 + ;; + -sysvr4) + os=-sysv4 + ;; + # This must come after -sysvr4. + -sysv*) + ;; + -ose*) + os=-ose + ;; + -es1800*) + os=-ose + ;; + -xenix) + os=-xenix + ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + os=-mint + ;; + -aros*) + os=-aros + ;; + -kaos*) + os=-kaos + ;; + -zvmoe) + os=-zvmoe + ;; + -none) + ;; + *) + # Get rid of the `-' at the beginning of $os. + os=`echo $os | sed 's/[^-]*-//'` + echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 + exit 1 + ;; +esac +else + +# Here we handle the default operating systems that come with various machines. +# The value should be what the vendor currently ships out the door with their +# machine or put another way, the most popular os provided with the machine. + +# Note that if you're going to try to match "-MANUFACTURER" here (say, +# "-sun"), then you have to tell the case statement up towards the top +# that MANUFACTURER isn't an operating system. Otherwise, code above +# will signal an error saying that MANUFACTURER isn't an operating +# system, and we'll never get to this point. + +case $basic_machine in + *-acorn) + os=-riscix1.2 + ;; + arm*-rebel) + os=-linux + ;; + arm*-semi) + os=-aout + ;; + c4x-* | tic4x-*) + os=-coff + ;; + # This must come before the *-dec entry. + pdp10-*) + os=-tops20 + ;; + pdp11-*) + os=-none + ;; + *-dec | vax-*) + os=-ultrix4.2 + ;; + m68*-apollo) + os=-domain + ;; + i386-sun) + os=-sunos4.0.2 + ;; + m68000-sun) + os=-sunos3 + # This also exists in the configure program, but was not the + # default. + # os=-sunos4 + ;; + m68*-cisco) + os=-aout + ;; + mips*-cisco) + os=-elf + ;; + mips*-*) + os=-elf + ;; + or32-*) + os=-coff + ;; + *-tti) # must be before sparc entry or we get the wrong os. + os=-sysv3 + ;; + sparc-* | *-sun) + os=-sunos4.1.1 + ;; + *-be) + os=-beos + ;; + *-ibm) + os=-aix + ;; + *-knuth) + os=-mmixware + ;; + *-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 + ;; + -os400*) + vendor=ibm + ;; + -ptx*) + vendor=sequent + ;; + -tpf*) + vendor=ibm + ;; + -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 + +# 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 --git a/configure b/configure new file mode 100755 index 0000000..35dc6ca --- /dev/null +++ b/configure @@ -0,0 +1,6749 @@ +#! /bin/sh +# Guess values for system-dependent variables and create Makefiles. +# Generated by GNU Autoconf 2.59 for netsukuku 0.0.9b. +# +# Copyright (C) 2003 Free Software Foundation, Inc. +# This configure script is free software; the Free Software Foundation +# gives unlimited permission to copy, distribute and modify it. +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## + +# Be Bourne compatible +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' +elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then + set -o posix +fi +DUALCASE=1; export DUALCASE # for MKS sh + +# Support unset when possible. +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +fi + + +# Work around bugs in pre-3.0 UWIN ksh. +$as_unset ENV MAIL MAILPATH +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +for as_var in \ + LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ + LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ + LC_TELEPHONE LC_TIME +do + if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then + eval $as_var=C; export $as_var + else + $as_unset $as_var + fi +done + +# Required to use basename. +if expr a : '\(a\)' >/dev/null 2>&1; then + as_expr=expr +else + as_expr=false +fi + +if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + + +# Name of the executable. +as_me=`$as_basename "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)$' \| \ + . : '\(.\)' 2>/dev/null || +echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } + /^X\/\(\/\/\)$/{ s//\1/; q; } + /^X\/\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + + +# PATH needs CR, and LINENO needs CR and PATH. +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" || { + # Find who we are. Look in the path if we contain no path at all + # relative or not. + case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done + + ;; + esac + # We did not find ourselves, most probably we were run as `sh COMMAND' + # in which case we are not to be found in the path. + if test "x$as_myself" = x; then + as_myself=$0 + fi + if test ! -f "$as_myself"; then + { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 + { (exit 1); exit 1; }; } + fi + case $CONFIG_SHELL in + '') + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for as_base in sh bash ksh sh5; do + case $as_dir in + /*) + if ("$as_dir/$as_base" -c ' + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then + $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } + $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } + CONFIG_SHELL=$as_dir/$as_base + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$0" ${1+"$@"} + fi;; + esac + done +done +;; + esac + + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO + # uniformly replaced by the line number. The first 'sed' inserts a + # line-number line before each line; the second 'sed' does the real + # work. The second script uses 'N' to pair each line-number line + # with the numbered line, and appends trailing '-' during + # substitution so that $LINENO is not a special case at line end. + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the + # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) + sed '=' <$as_myself | + sed ' + N + s,$,-, + : loop + s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, + t loop + s,-$,, + s,^['$as_cr_digits']*\n,, + ' >$as_me.lineno && + chmod +x $as_me.lineno || + { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + { (exit 1); exit 1; }; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensible to this). + . ./$as_me.lineno + # Exit status is that of the last command. + exit +} + + +case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in + *c*,-n*) ECHO_N= ECHO_C=' +' ECHO_T=' ' ;; + *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; + *) ECHO_N= ECHO_C='\c' ECHO_T= ;; +esac + +if expr a : '\(a\)' >/dev/null 2>&1; then + as_expr=expr +else + as_expr=false +fi + +rm -f conf$$ conf$$.exe conf$$.file +echo >conf$$.file +if ln -s conf$$.file conf$$ 2>/dev/null; then + # We could just check for DJGPP; but this test a) works b) is more generic + # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). + if test -f conf$$.exe; then + # Don't use ln at all; we don't have any links + as_ln_s='cp -p' + else + as_ln_s='ln -s' + fi +elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.file + +if mkdir -p . 2>/dev/null; then + as_mkdir_p=: +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +as_executable_p="test -f" + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + +# IFS +# We need space, tab and new line, in precisely that order. +as_nl=' +' +IFS=" $as_nl" + +# CDPATH. +$as_unset CDPATH + + +# Name of the host. +# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, +# so uname gets run too. +ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` + +exec 6>&1 + +# +# Initializations. +# +ac_default_prefix=/usr/local +ac_config_libobj_dir=. +cross_compiling=no +subdirs= +MFLAGS= +MAKEFLAGS= +SHELL=${CONFIG_SHELL-/bin/sh} + +# Maximum number of lines to put in a shell here document. +# This variable seems obsolete. It should probably be removed, and +# only ac_max_sed_lines should be used. +: ${ac_max_here_lines=38} + +# Identity of this package. +PACKAGE_NAME='netsukuku' +PACKAGE_TARNAME='netsukuku' +PACKAGE_VERSION='0.0.9b' +PACKAGE_STRING='netsukuku 0.0.9b' +PACKAGE_BUGREPORT='' + +# 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 mkdir_p AWK SET_MAKE am__leading_dot build build_cpu build_vendor build_os host host_cpu host_vendor host_os 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 CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE gmp EGREP RT_METHOD KERNEL_METHOD OTHER_METHOD IF_METHOD debug_flags CONF_DIR DATA_DIR PID_DIR 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 + +# +# 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 netsukuku 0.0.9b 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 netsukuku 0.0.9b:";; + esac + cat <<\_ACEOF + +Optional Features: + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --disable-dependency-tracking speeds up one-time build + --enable-dependency-tracking do not reject slow dependency extractors + --enable-debug Enable Netsukuku debug + +Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --with-gmp-include gmp include dir + --with-pid-dir=ARG Specify location of ntkd.pid file (default /var/run) + +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 + +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 +netsukuku configure 0.0.9b +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 netsukuku $as_me 0.0.9b, which was +generated by GNU Autoconf 2.59. Invocation command line was + + $ $0 $@ + +_ACEOF +{ +cat <<_ASUNAME +## --------- ## +## Platform. ## +## --------- ## + +hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` + +/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` +hostinfo = `(hostinfo) 2>/dev/null || echo unknown` +/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` +/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` + +_ASUNAME + +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + echo "PATH: $as_dir" +done + +} >&5 + +cat >&5 <<_ACEOF + + +## ----------- ## +## Core tests. ## +## ----------- ## + +_ACEOF + + +# Keep a trace of the command line. +# Strip out --no-create and --no-recursion so they do not pile up. +# Strip out --silent because we don't want to record it for future runs. +# Also quote any args containing shell meta-characters. +# Make two passes to allow for proper duplicate-argument suppression. +ac_configure_args= +ac_configure_args0= +ac_configure_args1= +ac_sep= +ac_must_keep_next=false +for ac_pass in 1 2 +do + for ac_arg + do + case $ac_arg in + -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + continue ;; + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) + ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + case $ac_pass in + 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; + 2) + ac_configure_args1="$ac_configure_args1 '$ac_arg'" + if test $ac_must_keep_next = true; then + ac_must_keep_next=false # Got value, back to normal. + else + case $ac_arg in + *=* | --config-cache | -C | -disable-* | --disable-* \ + | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ + | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ + | -with-* | --with-* | -without-* | --without-* | --x) + case "$ac_configure_args0 " in + "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; + esac + ;; + -* ) ac_must_keep_next=true ;; + esac + fi + ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" + # Get rid of the leading space. + ac_sep=" " + ;; + esac + done +done +$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } +$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } + +# When interrupted or exit'd, cleanup temporary files, and complete +# config.log. We remove comments because anyway the quotes in there +# would cause problems or look ugly. +# WARNING: Be sure not to use single quotes in there, as some shells, +# such as our DU 5.0 friend, will then `close' the trap. +trap 'exit_status=$? + # Save into config.log some information that might help in debugging. + { + echo + + cat <<\_ASBOX +## ---------------- ## +## Cache variables. ## +## ---------------- ## +_ASBOX + echo + # The following way of writing the cache mishandles newlines in values, +{ + (set) 2>&1 | + case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in + *ac_space=\ *) + sed -n \ + "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" + ;; + *) + sed -n \ + "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" + ;; + esac; +} + echo + + cat <<\_ASBOX +## ----------------- ## +## Output variables. ## +## ----------------- ## +_ASBOX + echo + for ac_var in $ac_subst_vars + do + eval ac_val=$`echo $ac_var` + echo "$ac_var='"'"'$ac_val'"'"'" + done | sort + echo + + if test -n "$ac_subst_files"; then + cat <<\_ASBOX +## ------------- ## +## Output files. ## +## ------------- ## +_ASBOX + echo + for ac_var in $ac_subst_files + do + eval ac_val=$`echo $ac_var` + echo "$ac_var='"'"'$ac_val'"'"'" + done | sort + echo + fi + + if test -s confdefs.h; then + cat <<\_ASBOX +## ----------- ## +## confdefs.h. ## +## ----------- ## +_ASBOX + echo + sed "/^$/d" confdefs.h | sort + echo + fi + test "$ac_signal" != 0 && + echo "$as_me: caught signal $ac_signal" + echo "$as_me: exit $exit_status" + } >&5 + rm -f core *.core && + rm -rf conftest* confdefs* conf$$* $ac_clean_files && + exit $exit_status + ' 0 +for ac_signal in 1 2 13 15; do + trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal +done +ac_signal=0 + +# confdefs.h avoids OS command line length limits that DEFS can exceed. +rm -rf conftest* confdefs.h +# AIX cpp loses on an empty file, so make sure it contains at least a newline. +echo >confdefs.h + +# Predefined preprocessor variables. + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_NAME "$PACKAGE_NAME" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_TARNAME "$PACKAGE_TARNAME" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_VERSION "$PACKAGE_VERSION" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_STRING "$PACKAGE_STRING" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" +_ACEOF + + +# Let the site file select an alternate cache file if it wants to. +# Prefer explicitly selected file to automatically selected ones. +if test -z "$CONFIG_SITE"; then + if test "x$prefix" != xNONE; then + CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" + else + CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" + fi +fi +for ac_site_file in $CONFIG_SITE; do + if test -r "$ac_site_file"; then + { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 +echo "$as_me: loading site script $ac_site_file" >&6;} + sed 's/^/| /' "$ac_site_file" >&5 + . "$ac_site_file" + fi +done + +if test -r "$cache_file"; then + # Some versions of bash will fail to source /dev/null (special + # files actually), so we avoid doing that. + if test -f "$cache_file"; then + { echo "$as_me:$LINENO: loading cache $cache_file" >&5 +echo "$as_me: loading cache $cache_file" >&6;} + case $cache_file in + [\\/]* | ?:[\\/]* ) . $cache_file;; + *) . ./$cache_file;; + esac + fi +else + { echo "$as_me:$LINENO: creating cache $cache_file" >&5 +echo "$as_me: creating cache $cache_file" >&6;} + >$cache_file +fi + +# Check that the precious variables saved in the cache have kept the same +# value. +ac_cache_corrupted=false +for ac_var in `(set) 2>&1 | + sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do + eval ac_old_set=\$ac_cv_env_${ac_var}_set + eval ac_new_set=\$ac_env_${ac_var}_set + eval ac_old_val="\$ac_cv_env_${ac_var}_value" + eval ac_new_val="\$ac_env_${ac_var}_value" + case $ac_old_set,$ac_new_set in + set,) + { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,set) + { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 +echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,);; + *) + if test "x$ac_old_val" != "x$ac_new_val"; then + { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 +echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 +echo "$as_me: former value: $ac_old_val" >&2;} + { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 +echo "$as_me: current value: $ac_new_val" >&2;} + ac_cache_corrupted=: + fi;; + esac + # Pass precious variables to config.status. + if test "$ac_new_set" = set; then + case $ac_new_val in + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) + ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *) ac_arg=$ac_var=$ac_new_val ;; + esac + case " $ac_configure_args " in + *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. + *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; + esac + fi +done +if $ac_cache_corrupted; then + { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 +echo "$as_me: error: changes in the environment can compromise the build" >&2;} + { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 +echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} + { (exit 1); exit 1; }; } +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + + + + + + + + + + + + + + + + + + + + + + + + + +am__api_version="1.8" +ac_aux_dir= +for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do + if test -f $ac_dir/install-sh; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f $ac_dir/install.sh; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + elif test -f $ac_dir/shtool; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break + fi +done +if test -z "$ac_aux_dir"; then + { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5 +echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;} + { (exit 1); exit 1; }; } +fi +ac_config_guess="$SHELL $ac_aux_dir/config.guess" +ac_config_sub="$SHELL $ac_aux_dir/config.sub" +ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. + +# Find a good install program. We prefer a C program (faster), +# so one script is as good as another. But avoid the broken or +# incompatible versions: +# SysV /etc/install, /usr/sbin/install +# SunOS /usr/etc/install +# IRIX /sbin/install +# AIX /bin/install +# AmigaOS /C/install, which installs bootblocks on floppy discs +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag +# AFS /usr/afsws/bin/install, which mishandles nonexistent args +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" +# OS/2's system install, which has a completely different semantic +# ./install, which can be erroneously created by make from ./install.sh. +echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 +echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6 +if test -z "$INSTALL"; then +if test "${ac_cv_path_install+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + # Account for people who put trailing slashes in PATH elements. +case $as_dir/ in + ./ | .// | /cC/* | \ + /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ + ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ + /usr/ucb/* ) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then + if test $ac_prog = install && + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + : + elif test $ac_prog = install && + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : + else + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi + fi + done + done + ;; +esac +done + + +fi + if test "${ac_cv_path_install+set}" = set; then + INSTALL=$ac_cv_path_install + else + # As a last resort, use the slow shell script. We don't cache a + # path for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the path is relative. + INSTALL=$ac_install_sh + fi +fi +echo "$as_me:$LINENO: result: $INSTALL" >&5 +echo "${ECHO_T}$INSTALL" >&6 + +# Use test -z because SunOS4 sh mishandles braces in ${var-val}. +# It thinks the first close brace ends the variable substitution. +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' + +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' + +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + +echo "$as_me:$LINENO: checking whether build environment is sane" >&5 +echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6 +# Just in case +sleep 1 +echo timestamp > conftest.file +# Do `set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` + if test "$*" = "X"; then + # -L didn't work. + set X `ls -t $srcdir/configure conftest.file` + fi + rm -f conftest.file + if test "$*" != "X $srcdir/configure conftest.file" \ + && test "$*" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken +alias in your environment" >&5 +echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken +alias in your environment" >&2;} + { (exit 1); exit 1; }; } + fi + + test "$2" = conftest.file + ) +then + # Ok. + : +else + { { echo "$as_me:$LINENO: error: newly created file is older than distributed files! +Check your system clock" >&5 +echo "$as_me: error: newly created file is older than distributed files! +Check your system clock" >&2;} + { (exit 1); exit 1; }; } +fi +echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 +test "$program_prefix" != NONE && + program_transform_name="s,^,$program_prefix,;$program_transform_name" +# Use a double $ so make ignores it. +test "$program_suffix" != NONE && + program_transform_name="s,\$,$program_suffix,;$program_transform_name" +# Double any \ or $. echo might interpret backslashes. +# By default was `s,x,x', remove it if useless. +cat <<\_ACEOF >conftest.sed +s/[\\$]/&&/g;s/;s,x,x,$// +_ACEOF +program_transform_name=`echo $program_transform_name | sed -f conftest.sed` +rm conftest.sed + +# expand $ac_aux_dir to an absolute path +am_aux_dir=`cd $ac_aux_dir && pwd` + +test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" +# Use eval to expand $SHELL +if eval "$MISSING --run true"; then + am_missing_run="$MISSING --run " +else + am_missing_run= + { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 +echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} +fi + +if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then + # Keeping the `.' argument allows $(mkdir_p) to be used without + # argument. Indeed, we sometimes output rules like + # $(mkdir_p) $(somedir) + # where $(somedir) is conditionally defined. + # (`test -n '$(somedir)' && $(mkdir_p) $(somedir)' is a more + # expensive solution, as it forces Make to start a sub-shell.) + mkdir_p='mkdir -p -- .' +else + # On NextStep and OpenStep, the `mkdir' command does not + # recognize any option. It will interpret all options as + # directories to create, and then abort because `.' already + # exists. + for d in ./-p ./--version; + do + test -d $d && rmdir $d + done + # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. + if test -f "$ac_aux_dir/mkinstalldirs"; then + mkdir_p='$(mkinstalldirs)' + else + mkdir_p='$(install_sh) -d' + fi +fi + +for ac_prog in gawk mawk nawk awk +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_AWK+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$AWK"; then + ac_cv_prog_AWK="$AWK" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_AWK="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +AWK=$ac_cv_prog_AWK +if test -n "$AWK"; then + echo "$as_me:$LINENO: result: $AWK" >&5 +echo "${ECHO_T}$AWK" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$AWK" && break +done + +echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6 +set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'` +if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.make <<\_ACEOF +all: + @echo 'ac_maketemp="$(MAKE)"' +_ACEOF +# GNU make sometimes prints "make[1]: Entering...", which would confuse us. +eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=` +if test -n "$ac_maketemp"; then + eval ac_cv_prog_make_${ac_make}_set=yes +else + eval ac_cv_prog_make_${ac_make}_set=no +fi +rm -f conftest.make +fi +if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + SET_MAKE= +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + SET_MAKE="MAKE=${MAKE-make}" +fi + +rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null + +# test to see if srcdir already configured +if test "`cd $srcdir && pwd`" != "`pwd`" && + test -f $srcdir/config.status; then + { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 +echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} + { (exit 1); exit 1; }; } +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi + + +# Define the identity of the package. + PACKAGE=netsukuku + VERSION=0.0.9b + + +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. + + + +cat >>confdefs.h <<\_ACEOF +#define VERSION 0.0.9b +_ACEOF + + ac_config_headers="$ac_config_headers src/config.h" + + +# 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/'` + + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. +set dummy ${ac_tool_prefix}gcc; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}gcc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="gcc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + CC=$ac_ct_CC +else + CC="$ac_cv_prog_CC" +fi + +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. +set dummy ${ac_tool_prefix}cc; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + CC=$ac_ct_CC +else + CC="$ac_cv_prog_CC" +fi + +fi +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + ac_prog_rejected=no +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $# != 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" + fi +fi +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + for ac_prog in cl + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="$ac_tool_prefix$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$CC" && break + done +fi +if test -z "$CC"; then + ac_ct_CC=$CC + for ac_prog in cl +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$ac_ct_CC" && break +done + + CC=$ac_ct_CC +fi + +fi + + +test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&5 +echo "$as_me: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } + +# Provide some information about the compiler. +echo "$as_me:$LINENO:" \ + "checking for C compiler version" >&5 +ac_compiler=`set X $ac_compile; echo $2` +{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 + (eval $ac_compiler --version &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 + (eval $ac_compiler -v &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 + (eval $ac_compiler -V &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files a.out a.exe b.out" +# Try to create an executable without -o first, disregard a.out. +# It will help us diagnose broken compilers, and finding out an intuition +# of exeext. +echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 +echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6 +ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` +if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 + (eval $ac_link_default) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # Find the output, starting from the most likely. This scheme is +# not robust to junk in `.', hence go to wildcards (a.*) only as a last +# resort. + +# Be careful to initialize this variable, since it used to be cached. +# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. +ac_cv_exeext= +# b.out is created by i960 compilers. +for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out +do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) + ;; + conftest.$ac_ext ) + # This is the source file. + ;; + [ab].out ) + # We found the default executable, but exeext='' is most + # certainly right. + break;; + *.* ) + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + # FIXME: I believe we export ac_cv_exeext for Libtool, + # but it would be cool to find out if it's true. Does anybody + # maintain Libtool? --akim. + export ac_cv_exeext + break;; + * ) + break;; + esac +done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { echo "$as_me:$LINENO: error: C compiler cannot create executables +See \`config.log' for more details." >&5 +echo "$as_me: error: C compiler cannot create executables +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; } +fi + +ac_exeext=$ac_cv_exeext +echo "$as_me:$LINENO: result: $ac_file" >&5 +echo "${ECHO_T}$ac_file" >&6 + +# Check the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +echo "$as_me:$LINENO: checking whether the C compiler works" >&5 +echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 +# FIXME: These cross compiler hacks should be removed for Autoconf 3.0 +# If not cross compiling, check that we can run a simple program. +if test "$cross_compiling" != yes; then + if { ac_try='./$ac_file' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + cross_compiling=no + else + if test "$cross_compiling" = maybe; then + cross_compiling=yes + else + { { echo "$as_me:$LINENO: error: cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } + fi + fi +fi +echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +rm -f a.out a.exe conftest$ac_cv_exeext b.out +ac_clean_files=$ac_clean_files_save +# Check the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 +echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 +echo "$as_me:$LINENO: result: $cross_compiling" >&5 +echo "${ECHO_T}$cross_compiling" >&6 + +echo "$as_me:$LINENO: checking for suffix of executables" >&5 +echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # If both `conftest.exe' and `conftest' are `present' (well, observable) +# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will +# work properly (i.e., refer to `conftest.exe'), while it won't with +# `rm'. +for ac_file in conftest.exe conftest conftest.*; do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; + *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + export ac_cv_exeext + break;; + * ) break;; + esac +done +else + { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi + +rm -f conftest$ac_cv_exeext +echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 +echo "${ECHO_T}$ac_cv_exeext" >&6 + +rm -f conftest.$ac_ext +EXEEXT=$ac_cv_exeext +ac_exeext=$EXEEXT +echo "$as_me:$LINENO: checking for suffix of object files" >&5 +echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 +if test "${ac_cv_objext+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.o conftest.obj +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; + *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` + break;; + esac +done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute suffix of object files: cannot compile +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi + +rm -f conftest.$ac_cv_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 +echo "${ECHO_T}$ac_cv_objext" >&6 +OBJEXT=$ac_cv_objext +ac_objext=$OBJEXT +echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 +if test "${ac_cv_c_compiler_gnu+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_compiler_gnu=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_compiler_gnu=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_c_compiler_gnu=$ac_compiler_gnu + +fi +echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 +GCC=`test $ac_compiler_gnu = yes && echo yes` +ac_test_CFLAGS=${CFLAGS+set} +ac_save_CFLAGS=$CFLAGS +CFLAGS="-g" +echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 +if test "${ac_cv_prog_cc_g+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_prog_cc_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_prog_cc_g=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 +if test "$ac_test_CFLAGS" = set; then + CFLAGS=$ac_save_CFLAGS +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi +echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 +echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 +if test "${ac_cv_prog_cc_stdc+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_prog_cc_stdc=no +ac_save_CC=$CC +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#include +#include +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} + +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not '\xHH' hex character constants. + These don't provoke an error unfortunately, instead are silently treated + as 'x'. The following induces an error, until -std1 is added to get + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an + array size at least. It's necessary to write '\x00'==0 to get something + that's true only with -std1. */ +int osf4_cc_array ['\x00' == 0 ? 1 : -1]; + +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} +_ACEOF +# Don't try gcc -ansi; that turns off useful extensions and +# breaks some systems' header files. +# AIX -qlanglvl=ansi +# Ultrix and OSF/1 -std1 +# HP-UX 10.20 and later -Ae +# HP-UX older versions -Aa -D_HPUX_SOURCE +# SVR4 -Xc -D__EXTENSIONS__ +for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" + rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_prog_cc_stdc=$ac_arg +break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext +done +rm -f conftest.$ac_ext conftest.$ac_objext +CC=$ac_save_CC + +fi + +case "x$ac_cv_prog_cc_stdc" in + x|xno) + echo "$as_me:$LINENO: result: none needed" >&5 +echo "${ECHO_T}none needed" >&6 ;; + *) + echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 + CC="$CC $ac_cv_prog_cc_stdc" ;; +esac + +# Some people use a C++ compiler to compile C. Since we use `exit', +# in C++ we need to declare it. In case someone uses the same compiler +# for both compiling C and C++ we need to have the C++ compiler decide +# the declaration of exit, since it's the most demanding environment. +cat >conftest.$ac_ext <<_ACEOF +#ifndef __cplusplus + choke me +#endif +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + for ac_declaration in \ + '' \ + 'extern "C" void std::exit (int) throw (); using std::exit;' \ + 'extern "C" void std::exit (int); using std::exit;' \ + 'extern "C" void exit (int) throw ();' \ + 'extern "C" void exit (int);' \ + 'void exit (int);' +do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_declaration +#include +int +main () +{ +exit (42); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +continue +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_declaration +int +main () +{ +exit (42); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +done +rm -f conftest* +if test -n "$ac_declaration"; then + echo '#ifdef __cplusplus' >>confdefs.h + echo $ac_declaration >>confdefs.h + echo '#endif' >>confdefs.h +fi + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +DEPDIR="${am__leading_dot}deps" + + ac_config_commands="$ac_config_commands depfiles" + + +am_make=${MAKE-make} +cat > confinc << 'END' +am__doit: + @echo done +.PHONY: am__doit +END +# If we don't find an include directive, just comment out the code. +echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 +echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6 +am__include="#" +am__quote= +_am_result=none +# First try GNU make style include. +echo "include confinc" > confmf +# We grep out `Entering directory' and `Leaving directory' +# messages which can occur if `w' ends up in MAKEFLAGS. +# In particular we don't look at `^make:' because GNU make might +# be invoked under some other name (usually "gmake"), in which +# case it prints its new name instead of `make'. +if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then + am__include=include + am__quote= + _am_result=GNU +fi +# Now try BSD make style include. +if test "$am__include" = "#"; then + echo '.include "confinc"' > confmf + if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then + am__include=.include + am__quote="\"" + _am_result=BSD + fi +fi + + +echo "$as_me:$LINENO: result: $_am_result" >&5 +echo "${ECHO_T}$_am_result" >&6 +rm -f confinc confmf + +# Check whether --enable-dependency-tracking or --disable-dependency-tracking was given. +if test "${enable_dependency_tracking+set}" = set; then + enableval="$enable_dependency_tracking" + +fi; +if test "x$enable_dependency_tracking" != xno; then + am_depcomp="$ac_aux_dir/depcomp" + AMDEPBACKSLASH='\' +fi + + +if test "x$enable_dependency_tracking" != xno; then + AMDEP_TRUE= + AMDEP_FALSE='#' +else + AMDEP_TRUE='#' + AMDEP_FALSE= +fi + + + + +depcc="$CC" am_compiler_list= + +echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 +echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6 +if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CC_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + case $depmode in + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + none) break ;; + esac + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. + if depmode=$depmode \ + source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CC_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CC_dependencies_compiler_type=none +fi + +fi +echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 +echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6 +CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type + + + +if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then + am__fastdepCC_TRUE= + am__fastdepCC_FALSE='#' +else + am__fastdepCC_TRUE='#' + am__fastdepCC_FALSE= +fi + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 +echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then + if test "${ac_cv_prog_CPP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" + do + ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether non-existent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + break +fi + + done + ac_cv_prog_CPP=$CPP + +fi + CPP=$ac_cv_prog_CPP +else + ac_cv_prog_CPP=$CPP +fi +echo "$as_me:$LINENO: result: $CPP" >&5 +echo "${ECHO_T}$CPP" >&6 +ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether non-existent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + : +else + { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." >&5 +echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +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=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +depcc="$CXX" am_compiler_list= + +echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 +echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6 +if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CXX_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + case $depmode in + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + none) break ;; + esac + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. + if depmode=$depmode \ + source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CXX_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CXX_dependencies_compiler_type=none +fi + +fi +echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5 +echo "${ECHO_T}$am_cv_CXX_dependencies_compiler_type" >&6 +CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type + + + +if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then + am__fastdepCXX_TRUE= + am__fastdepCXX_FALSE='#' +else + am__fastdepCXX_TRUE='#' + am__fastdepCXX_FALSE= +fi + + + +prefix=/usr +datadir=/usr/share/netsukuku +sysconfdir=/etc/netsukuku +piddir=/var/run + + +# Check whether --with-gmp-include or --without-gmp-include was given. +if test "${with_gmp_include+set}" = set; then + withval="$with_gmp_include" + gmp="$withval" +fi; + + + + + +echo "$as_me:$LINENO: checking for egrep" >&5 +echo $ECHO_N "checking for egrep... $ECHO_C" >&6 +if test "${ac_cv_prog_egrep+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if echo a | (grep -E '(a|b)') >/dev/null 2>&1 + then ac_cv_prog_egrep='grep -E' + else ac_cv_prog_egrep='egrep' + fi +fi +echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 +echo "${ECHO_T}$ac_cv_prog_egrep" >&6 + EGREP=$ac_cv_prog_egrep + + +echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 +if test "${ac_cv_header_stdc+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#include +#include + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_header_stdc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_header_stdc=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then + : +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then + : +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then + : +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif + +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int +main () +{ + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + exit(2); + exit (0); +} +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +ac_cv_header_stdc=no +fi +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +fi +fi +echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +echo "${ECHO_T}$ac_cv_header_stdc" >&6 +if test $ac_cv_header_stdc = yes; then + +cat >>confdefs.h <<\_ACEOF +#define STDC_HEADERS 1 +_ACEOF + +fi + +# On IRIX 5.3, sys/types and inttypes.h are conflicting. + + + + + + + + + +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_Header=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +eval "$as_ac_Header=no" +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + +for ac_header in unistd.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_header_compiler=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------ ## +## Report this to the netsukuku lists. ## +## ------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + +for ac_header in pthread.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 netsukuku lists. ## +## ------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +else + \ + echo "============================ Unable to find pthread.h"; \ + echo "Do you have the libpthread library installed?" +fi + +done + + +for ac_header in zlib.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 netsukuku lists. ## +## ------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +else + \ + echo "============================ Unable to find zlib.h"; \ + echo "Do you have the zlib library installed?" +fi + +done + + +for ac_header in openssl/crypto.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 netsukuku lists. ## +## ------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +else + \ + echo "============================ Unable to find openssl/crypto.h";\ + echo "Read README first!!!!!"; \ + echo "Install the openssl library" +fi + +done + + +for ac_header in gmp.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 netsukuku lists. ## +## ------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +else + \ + echo "============================ Unable to find gmp.h"; \ + echo "Read README first!!!!!"; \ + echo "You need to install the libgmp library."; \ + echo "In the debian the package is libgmp3-dev" +fi + +done + + +echo "$as_me:$LINENO: checking OS" >&5 +echo $ECHO_N "checking OS... $ECHO_C" >&6 +case "$host" in + *-sunos5.6* | *-solaris2.6*) + opsys=sol2-6 + +cat >>confdefs.h <<\_ACEOF +#define SUNOS +_ACEOF + + +echo "$as_me:$LINENO: checking for main in -lxnet" >&5 +echo $ECHO_N "checking for main in -lxnet... $ECHO_C" >&6 +if test "${ac_cv_lib_xnet_main+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lxnet $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + +int +main () +{ +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 + ac_cv_lib_xnet_main=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_xnet_main=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_xnet_main" >&5 +echo "${ECHO_T}$ac_cv_lib_xnet_main" >&6 +if test $ac_cv_lib_xnet_main = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBXNET 1 +_ACEOF + + LIBS="-lxnet $LIBS" + +fi + + echo "$as_me:$LINENO: result: solaris" >&5 +echo "${ECHO_T}solaris" >&6 + ;; + *-sunos5* | *-solaris2*) + +cat >>confdefs.h <<\_ACEOF +#define SUNOS +_ACEOF + + +echo "$as_me:$LINENO: checking for main in -lsocket" >&5 +echo $ECHO_N "checking for main in -lsocket... $ECHO_C" >&6 +if test "${ac_cv_lib_socket_main+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lsocket $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + +int +main () +{ +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 + ac_cv_lib_socket_main=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_socket_main=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_socket_main" >&5 +echo "${ECHO_T}$ac_cv_lib_socket_main" >&6 +if test $ac_cv_lib_socket_main = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBSOCKET 1 +_ACEOF + + LIBS="-lsocket $LIBS" + +fi + + +echo "$as_me:$LINENO: checking for main in -lnsl" >&5 +echo $ECHO_N "checking for main in -lnsl... $ECHO_C" >&6 +if test "${ac_cv_lib_nsl_main+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lnsl $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + +int +main () +{ +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 + ac_cv_lib_nsl_main=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_nsl_main=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_main" >&5 +echo "${ECHO_T}$ac_cv_lib_nsl_main" >&6 +if test $ac_cv_lib_nsl_main = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBNSL 1 +_ACEOF + + LIBS="-lnsl $LIBS" + +fi + + echo "$as_me:$LINENO: result: solaris" >&5 +echo "${ECHO_T}solaris" >&6 + ;; + *-linux-*) + opsys=gnu-linux + +cat >>confdefs.h <<\_ACEOF +#define GNU_LINUX +_ACEOF + + echo "$as_me:$LINENO: result: linux" >&5 +echo "${ECHO_T}linux" >&6 + ;; + *-nec-sysv4*) + +echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5 +echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6 +if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lnsl $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char gethostbyname (); +int +main () +{ +gethostbyname (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_nsl_gethostbyname=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_nsl_gethostbyname=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5 +echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6 +if test $ac_cv_lib_nsl_gethostbyname = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBNSL 1 +_ACEOF + + LIBS="-lnsl $LIBS" + +fi + + +echo "$as_me:$LINENO: checking for socket in -lsocket" >&5 +echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6 +if test "${ac_cv_lib_socket_socket+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lsocket $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char socket (); +int +main () +{ +socket (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_socket_socket=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_socket_socket=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5 +echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6 +if test $ac_cv_lib_socket_socket = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBSOCKET 1 +_ACEOF + + LIBS="-lsocket $LIBS" + +fi + + echo "$as_me:$LINENO: result: net-sysv4" >&5 +echo "${ECHO_T}net-sysv4" >&6 + ;; + *-freebsd*) + +cat >>confdefs.h <<\_ACEOF +#define FREEBSD +_ACEOF + + echo "$as_me:$LINENO: result: freebsd" >&5 +echo "${ECHO_T}freebsd" >&6 + ;; + *-openbsd*) + opsys=openbsd + +cat >>confdefs.h <<\_ACEOF +#define OPEN_BSD +_ACEOF + + echo "$as_me:$LINENO: result: openbsd" >&5 +echo "${ECHO_T}openbsd" >&6 + ;; + *-bsdi*) + opsys=bsdi + OTHER_METHOD="mtu_kvm.o" + +echo "$as_me:$LINENO: checking for main in -lkvm" >&5 +echo $ECHO_N "checking for main in -lkvm... $ECHO_C" >&6 +if test "${ac_cv_lib_kvm_main+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lkvm $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + +int +main () +{ +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 + ac_cv_lib_kvm_main=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_kvm_main=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_kvm_main" >&5 +echo "${ECHO_T}$ac_cv_lib_kvm_main" >&6 +if test $ac_cv_lib_kvm_main = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBKVM 1 +_ACEOF + + LIBS="-lkvm $LIBS" + +fi + + echo "$as_me:$LINENO: result: bsdi" >&5 +echo "${ECHO_T}bsdi" >&6 + ;; + *-irix6.5) + opsys=irix + +cat >>confdefs.h <<\_ACEOF +#define IRIX +_ACEOF + + echo "$as_me:$LINENO: result: irix" >&5 +echo "${ECHO_T}irix" >&6 + ;; +esac + +echo "$as_me:$LINENO: checking Netsukuku kernel interface method" >&5 +echo $ECHO_N "checking Netsukuku kernel interface method... $ECHO_C" >&6 +if test x"$opsys" = x"gnu-linux"; then + echo "$as_me:$LINENO: result: netlink" >&5 +echo "${ECHO_T}netlink" >&6 + RT_METHOD=rt_netlink.o + +cat >>confdefs.h <<\_ACEOF +#define HAVE_NETLINK +_ACEOF + + netlink=yes +else + if test "$opsys" = "sol2-6";then + echo "$as_me:$LINENO: result: solaris" >&5 +echo "${ECHO_T}solaris" >&6 + KERNEL_METHOD="kernel_socket.o" + RT_METHOD="rt_socket.o" + elif test "$opsys" = "irix" ; then + echo "$as_me:$LINENO: result: irix" >&5 +echo "${ECHO_T}irix" >&6 + KERNEL_METHOD="kernel_socket.o" + RT_METHOD="rt_socket.o" + else + if test "$cross_compiling" = yes; then + KERNEL_METHOD=kernel_socket.o + RT_METHOD=rt_socket.o + echo "$as_me:$LINENO: result: socket" >&5 +echo "${ECHO_T}socket" >&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 + +main () +{ + int ac_sock; + + ac_sock = socket (AF_ROUTE, SOCK_RAW, 0); + if (ac_sock < 0 && errno == EINVAL) + exit (1); + exit (0); +} +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + KERNEL_METHOD=kernel_socket.o + RT_METHOD=rt_socket.o + echo "$as_me:$LINENO: result: socket" >&5 +echo "${ECHO_T}socket" >&6 +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 ) +RT_METHOD=rt_ioctl.o + echo "$as_me:$LINENO: result: ioctl" >&5 +echo "${ECHO_T}ioctl" >&6 +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: checking interface looking up method" >&5 +echo $ECHO_N "checking interface looking up method... $ECHO_C" >&6 +if test "$netlink" = yes; then + echo "$as_me:$LINENO: result: netlink" >&5 +echo "${ECHO_T}netlink" >&6 + IF_METHOD=if_netlink.o +else + if test "$opsys" = "sol2-6";then + echo "$as_me:$LINENO: result: solaris" >&5 +echo "${ECHO_T}solaris" >&6 + IF_METHOD=if_ioctl.o + elif test "$opsys" = "irix" ; then + echo "$as_me:$LINENO: result: irix" >&5 +echo "${ECHO_T}irix" >&6 + IF_METHOD=if_ioctl.o + elif test "$opsys" = "openbsd";then + echo "$as_me:$LINENO: result: openbsd" >&5 +echo "${ECHO_T}openbsd" >&6 + IF_METHOD=if_ioctl.o + elif grep NET_RT_IFLIST /usr/include/sys/socket.h >/dev/null 2>&1; then + echo "$as_me:$LINENO: result: sysctl" >&5 +echo "${ECHO_T}sysctl" >&6 + IF_METHOD=if_sysctl.o + +cat >>confdefs.h <<\_ACEOF +#define HAVE_NET_RT_IFLIST +_ACEOF + + else + echo "$as_me:$LINENO: result: ioctl" >&5 +echo "${ECHO_T}ioctl" >&6 + IF_METHOD=if_ioctl.o + fi +fi + + + + +# Check whether --enable-debug or --disable-debug was given. +if test "${enable_debug+set}" = set; then + enableval="$enable_debug" + \ +debug_flags="-Wall -DDEBUG" +else + debug_flags="" +fi; + + + +cat >>confdefs.h <<_ACEOF +#define DATA_DIR "$datadir" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define CONF_DIR "$sysconfdir" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PID_DIR "$piddir" +_ACEOF + + +# Check whether --with-pid_dir or --without-pid_dir was given. +if test "${with_pid_dir+set}" = set; then + withval="$with_pid_dir" + \ + +cat >>confdefs.h <<_ACEOF +#define PID_DIR "$withval" +_ACEOF + +fi; + + + + + ac_config_files="$ac_config_files Makefile src/Makefile src/man/Makefile src/scripts/Makefile src/conf/Makefile src/conf/netsukuku.conf" + +cat >confcache <<\_ACEOF +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs, see configure's option --config-cache. +# It is not useful on other systems. If it contains results you don't +# want to keep, you may remove or edit it. +# +# config.status only pays attention to the cache file if you give it +# the --recheck option to rerun configure. +# +# `ac_cv_env_foo' variables (set or unset) will be overridden when +# loading this file, other *unset* `ac_cv_foo' will be assigned the +# following values. + +_ACEOF + +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, don't put newlines in cache variables' values. +# Ultrix sh set writes to stderr and can't be redirected directly, +# and sets the high bit in the cache file unless we assign to the vars. +{ + (set) 2>&1 | + case `(ac_space=' '; set | grep ac_space) 2>&1` in + *ac_space=\ *) + # `set' does not quote correctly, so add quotes (double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \). + sed -n \ + "s/'/'\\\\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" + ;; + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n \ + "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" + ;; + esac; +} | + sed ' + t clear + : clear + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + t end + /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + : end' >>confcache +if diff $cache_file confcache >/dev/null 2>&1; then :; else + if test -w $cache_file; then + test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" + cat confcache >$cache_file + else + echo "not updating unwritable cache $cache_file" + fi +fi +rm -f confcache + +test "x$prefix" = xNONE && prefix=$ac_default_prefix +# Let make expand exec_prefix. +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + +# VPATH may cause trouble with some makes, so we remove $(srcdir), +# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=/{ +s/:*\$(srcdir):*/:/; +s/:*\${srcdir}:*/:/; +s/:*@srcdir@:*/:/; +s/^\([^=]*=[ ]*\):*/\1/; +s/:*$//; +s/^[^=]*=[ ]*$//; +}' +fi + +DEFS=-DHAVE_CONFIG_H + +ac_libobjs= +ac_ltlibobjs= +for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue + # 1. Remove the extension, and $U if already installed. + ac_i=`echo "$ac_i" | + sed 's/\$U\././;s/\.o$//;s/\.obj$//'` + # 2. Add them. + ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" + ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' +done +LIBOBJS=$ac_libobjs + +LTLIBOBJS=$ac_ltlibobjs + + +if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"AMDEP\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +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 netsukuku $as_me 0.0.9b, 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="\\ +netsukuku config.status 0.0.9b +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" ;; + "src/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; + "src/man/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/man/Makefile" ;; + "src/scripts/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/scripts/Makefile" ;; + "src/conf/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/conf/Makefile" ;; + "src/conf/netsukuku.conf" ) CONFIG_FILES="$CONFIG_FILES src/conf/netsukuku.conf" ;; + "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; + "src/config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS src/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,@mkdir_p@,$mkdir_p,;t t +s,@AWK@,$AWK,;t t +s,@SET_MAKE@,$SET_MAKE,;t t +s,@am__leading_dot@,$am__leading_dot,;t t +s,@build@,$build,;t t +s,@build_cpu@,$build_cpu,;t t +s,@build_vendor@,$build_vendor,;t t +s,@build_os@,$build_os,;t t +s,@host@,$host,;t t +s,@host_cpu@,$host_cpu,;t t +s,@host_vendor@,$host_vendor,;t t +s,@host_os@,$host_os,;t t +s,@CC@,$CC,;t t +s,@CFLAGS@,$CFLAGS,;t t +s,@LDFLAGS@,$LDFLAGS,;t t +s,@CPPFLAGS@,$CPPFLAGS,;t t +s,@ac_ct_CC@,$ac_ct_CC,;t t +s,@EXEEXT@,$EXEEXT,;t t +s,@OBJEXT@,$OBJEXT,;t t +s,@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,@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,@gmp@,$gmp,;t t +s,@EGREP@,$EGREP,;t t +s,@RT_METHOD@,$RT_METHOD,;t t +s,@KERNEL_METHOD@,$KERNEL_METHOD,;t t +s,@OTHER_METHOD@,$OTHER_METHOD,;t t +s,@IF_METHOD@,$IF_METHOD,;t t +s,@debug_flags@,$debug_flags,;t t +s,@CONF_DIR@,$CONF_DIR,;t t +s,@DATA_DIR@,$DATA_DIR,;t t +s,@PID_DIR@,$PID_DIR,;t t +s,@LIBOBJS@,$LIBOBJS,;t t +s,@LTLIBOBJS@,$LTLIBOBJS,;t t +CEOF + +_ACEOF + + cat >>$CONFIG_STATUS <<\_ACEOF + # Split the substitutions into bite-sized pieces for seds with + # small command number limits, like on Digital OSF/1 and HP-UX. + ac_max_sed_lines=48 + ac_sed_frag=1 # Number of current file. + ac_beg=1 # First line for current file. + ac_end=$ac_max_sed_lines # Line after last line for current file. + ac_more_lines=: + ac_sed_cmds= + while $ac_more_lines; do + if test $ac_beg -gt 1; then + sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag + else + sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag + fi + if test ! -s $tmp/subs.frag; then + ac_more_lines=false + else + # The purpose of the label and of the branching condition is to + # speed up the sed processing (if there are no `@' at all, there + # is no need to browse any of the substitutions). + # These are the two extra sed commands mentioned above. + (echo ':t + /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed + if test -z "$ac_sed_cmds"; then + ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" + else + ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" + fi + ac_sed_frag=`expr $ac_sed_frag + 1` + ac_beg=$ac_end + ac_end=`expr $ac_end + $ac_max_sed_lines` + fi + done + if test -z "$ac_sed_cmds"; then + ac_sed_cmds=cat + fi +fi # test -n "$CONFIG_FILES" + +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF +for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue + # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". + case $ac_file in + - | *:- | *:-:* ) # input from stdin + cat >$tmp/stdin + ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + * ) ac_file_in=$ac_file.in ;; + esac + + # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. + ac_dir=`(dirname "$ac_file") 2>/dev/null || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + { if $as_mkdir_p; then + mkdir -p "$ac_dir" + else + as_dir="$ac_dir" + as_dirs= + while test ! -d "$as_dir"; do + as_dirs="$as_dir $as_dirs" + as_dir=`(dirname "$as_dir") 2>/dev/null || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + done + test ! -n "$as_dirs" || mkdir $as_dirs + fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 +echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} + { (exit 1); exit 1; }; }; } + + ac_builddir=. + +if test "$ac_dir" != .; then + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A "../" for each directory in $ac_dir_suffix. + ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` +else + ac_dir_suffix= ac_top_builddir= +fi + +case $srcdir in + .) # No --srcdir option. We are building in place. + ac_srcdir=. + if test -z "$ac_top_builddir"; then + ac_top_srcdir=. + else + ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` + fi ;; + [\\/]* | ?:[\\/]* ) # Absolute path. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir ;; + *) # Relative path. + ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_builddir$srcdir ;; +esac + +# Do not use `cd foo && pwd` to compute absolute paths, because +# the directories may not exist. +case `pwd` in +.) ac_abs_builddir="$ac_dir";; +*) + case "$ac_dir" in + .) ac_abs_builddir=`pwd`;; + [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; + *) ac_abs_builddir=`pwd`/"$ac_dir";; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_builddir=${ac_top_builddir}.;; +*) + case ${ac_top_builddir}. in + .) ac_abs_top_builddir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; + *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_srcdir=$ac_srcdir;; +*) + case $ac_srcdir in + .) ac_abs_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; + *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_srcdir=$ac_top_srcdir;; +*) + case $ac_top_srcdir in + .) ac_abs_top_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; + *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; + esac;; +esac + + + case $INSTALL in + [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; + *) ac_INSTALL=$ac_top_builddir$INSTALL ;; + esac + + if test x"$ac_file" != x-; then + { echo "$as_me:$LINENO: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} + rm -f "$ac_file" + fi + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + if test x"$ac_file" = x-; then + configure_input= + else + configure_input="$ac_file. " + fi + configure_input=$configure_input"Generated from `echo $ac_file_in | + sed 's,.*/,,'` by configure." + + # First look for the input files in the build tree, otherwise in the + # src tree. + ac_file_inputs=`IFS=: + for f in $ac_file_in; do + case $f in + -) echo $tmp/stdin ;; + [\\/$]*) + # Absolute (can't be DOS-style, as IFS=:) + test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + echo "$f";; + *) # Relative + if test -f "$f"; then + # Build tree + echo "$f" + elif test -f "$srcdir/$f"; then + # Source tree + echo "$srcdir/$f" + else + # /dev/null tree + { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + fi;; + esac + done` || { (exit 1); exit 1; } +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF + sed "$ac_vpsub +$extrasub +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF +:t +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +s,@configure_input@,$configure_input,;t t +s,@srcdir@,$ac_srcdir,;t t +s,@abs_srcdir@,$ac_abs_srcdir,;t t +s,@top_srcdir@,$ac_top_srcdir,;t t +s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t +s,@builddir@,$ac_builddir,;t t +s,@abs_builddir@,$ac_abs_builddir,;t t +s,@top_builddir@,$ac_top_builddir,;t t +s,@abs_top_builddir@,$ac_abs_top_builddir,;t t +s,@INSTALL@,$ac_INSTALL,;t t +" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out + rm -f $tmp/stdin + if test x"$ac_file" != x-; then + mv $tmp/out $ac_file + else + cat $tmp/out + rm -f $tmp/out + fi + +done +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF + +# +# CONFIG_HEADER section. +# + +# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where +# NAME is the cpp macro being defined and VALUE is the value it is being given. +# +# ac_d sets the value in "#define NAME VALUE" lines. +ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)' +ac_dB='[ ].*$,\1#\2' +ac_dC=' ' +ac_dD=',;t' +# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE". +ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' +ac_uB='$,\1#\2define\3' +ac_uC=' ' +ac_uD=',;t' + +for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue + # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". + case $ac_file in + - | *:- | *:-:* ) # input from stdin + cat >$tmp/stdin + ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + * ) ac_file_in=$ac_file.in ;; + esac + + test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} + + # First look for the input files in the build tree, otherwise in the + # src tree. + ac_file_inputs=`IFS=: + for f in $ac_file_in; do + case $f in + -) echo $tmp/stdin ;; + [\\/$]*) + # Absolute (can't be DOS-style, as IFS=:) + test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + # Do quote $f, to prevent DOS paths from being IFS'd. + echo "$f";; + *) # Relative + if test -f "$f"; then + # Build tree + echo "$f" + elif test -f "$srcdir/$f"; then + # Source tree + echo "$srcdir/$f" + else + # /dev/null tree + { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + fi;; + esac + done` || { (exit 1); exit 1; } + # Remove the trailing spaces. + sed 's/[ ]*$//' $ac_file_inputs >$tmp/in + +_ACEOF + +# Transform confdefs.h into two sed scripts, `conftest.defines' and +# `conftest.undefs', that substitutes the proper values into +# config.h.in to produce config.h. The first handles `#define' +# templates, and the second `#undef' templates. +# And first: Protect against being on the right side of a sed subst in +# config.status. Protect against being in an unquoted here document +# in config.status. +rm -f conftest.defines conftest.undefs +# Using a here document instead of a string reduces the quoting nightmare. +# Putting comments in sed scripts is not portable. +# +# `end' is used to avoid that the second main sed command (meant for +# 0-ary CPP macros) applies to n-ary macro definitions. +# See the Autoconf documentation for `clear'. +cat >confdef2sed.sed <<\_ACEOF +s/[\\&,]/\\&/g +s,[\\$`],\\&,g +t clear +: clear +s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp +t end +s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp +: end +_ACEOF +# If some macros were called several times there might be several times +# the same #defines, which is useless. Nevertheless, we may not want to +# sort them, since we want the *last* AC-DEFINE to be honored. +uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines +sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs +rm -f confdef2sed.sed + +# This sed command replaces #undef with comments. This is necessary, for +# example, in the case of _POSIX_SOURCE, which is predefined and required +# on some systems where configure will not decide to define it. +cat >>conftest.undefs <<\_ACEOF +s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, +_ACEOF + +# Break up conftest.defines because some shells have a limit on the size +# of here documents, and old seds have small limits too (100 cmds). +echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS +echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS +echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS +echo ' :' >>$CONFIG_STATUS +rm -f conftest.tail +while grep . conftest.defines >/dev/null +do + # Write a limited-size here document to $tmp/defines.sed. + echo ' cat >$tmp/defines.sed <>$CONFIG_STATUS + # Speed up: don't consider the non `#define' lines. + echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS + # Work around the forget-to-reset-the-flag bug. + echo 't clr' >>$CONFIG_STATUS + echo ': clr' >>$CONFIG_STATUS + sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS + echo 'CEOF + sed -f $tmp/defines.sed $tmp/in >$tmp/out + rm -f $tmp/in + mv $tmp/out $tmp/in +' >>$CONFIG_STATUS + sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail + rm -f conftest.defines + mv conftest.tail conftest.defines +done +rm -f conftest.defines +echo ' fi # grep' >>$CONFIG_STATUS +echo >>$CONFIG_STATUS + +# Break up conftest.undefs because some shells have a limit on the size +# of here documents, and old seds have small limits too (100 cmds). +echo ' # Handle all the #undef templates' >>$CONFIG_STATUS +rm -f conftest.tail +while grep . conftest.undefs >/dev/null +do + # Write a limited-size here document to $tmp/undefs.sed. + echo ' cat >$tmp/undefs.sed <>$CONFIG_STATUS + # Speed up: don't consider the non `#undef' + echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS + # Work around the forget-to-reset-the-flag bug. + echo 't clr' >>$CONFIG_STATUS + echo ': clr' >>$CONFIG_STATUS + sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS + echo 'CEOF + sed -f $tmp/undefs.sed $tmp/in >$tmp/out + rm -f $tmp/in + mv $tmp/out $tmp/in +' >>$CONFIG_STATUS + sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail + rm -f conftest.undefs + mv conftest.tail conftest.undefs +done +rm -f conftest.undefs + +cat >>$CONFIG_STATUS <<\_ACEOF + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + if test x"$ac_file" = x-; then + echo "/* Generated by configure. */" >$tmp/config.h + else + echo "/* $ac_file. Generated by configure. */" >$tmp/config.h + fi + cat $tmp/in >>$tmp/config.h + rm -f $tmp/in + if test x"$ac_file" != x-; then + if diff $ac_file $tmp/config.h >/dev/null 2>&1; then + { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 +echo "$as_me: $ac_file is unchanged" >&6;} + else + ac_dir=`(dirname "$ac_file") 2>/dev/null || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + { if $as_mkdir_p; then + mkdir -p "$ac_dir" + else + as_dir="$ac_dir" + as_dirs= + while test ! -d "$as_dir"; do + as_dirs="$as_dir $as_dirs" + as_dir=`(dirname "$as_dir") 2>/dev/null || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + done + test ! -n "$as_dirs" || mkdir $as_dirs + fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 +echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} + { (exit 1); exit 1; }; }; } + + rm -f $ac_file + mv $tmp/config.h $ac_file + fi + else + cat $tmp/config.h + rm -f $tmp/config.h + fi +# Compute $ac_file's index in $config_headers. +_am_stamp_count=1 +for _am_header in $config_headers :; do + case $_am_header in + $ac_file | $ac_file:* ) + break ;; + * ) + _am_stamp_count=`expr $_am_stamp_count + 1` ;; + esac +done +echo "timestamp for $ac_file" >`(dirname $ac_file) 2>/dev/null || +$as_expr X$ac_file : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X$ac_file : 'X\(//\)[^/]' \| \ + X$ac_file : 'X\(//\)$' \| \ + X$ac_file : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X$ac_file | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'`/stamp-h$_am_stamp_count +done +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF + +# +# CONFIG_COMMANDS section. +# +for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue + ac_dest=`echo "$ac_file" | sed 's,:.*,,'` + ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_dir=`(dirname "$ac_dest") 2>/dev/null || +$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_dest" : 'X\(//\)[^/]' \| \ + X"$ac_dest" : 'X\(//\)$' \| \ + X"$ac_dest" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$ac_dest" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + { if $as_mkdir_p; then + mkdir -p "$ac_dir" + else + as_dir="$ac_dir" + as_dirs= + while test ! -d "$as_dir"; do + as_dirs="$as_dir $as_dirs" + as_dir=`(dirname "$as_dir") 2>/dev/null || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + done + test ! -n "$as_dirs" || mkdir $as_dirs + fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 +echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} + { (exit 1); exit 1; }; }; } + + ac_builddir=. + +if test "$ac_dir" != .; then + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A "../" for each directory in $ac_dir_suffix. + ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` +else + ac_dir_suffix= ac_top_builddir= +fi + +case $srcdir in + .) # No --srcdir option. We are building in place. + ac_srcdir=. + if test -z "$ac_top_builddir"; then + ac_top_srcdir=. + else + ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` + fi ;; + [\\/]* | ?:[\\/]* ) # Absolute path. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir ;; + *) # Relative path. + ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_builddir$srcdir ;; +esac + +# Do not use `cd foo && pwd` to compute absolute paths, because +# the directories may not exist. +case `pwd` in +.) ac_abs_builddir="$ac_dir";; +*) + case "$ac_dir" in + .) ac_abs_builddir=`pwd`;; + [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; + *) ac_abs_builddir=`pwd`/"$ac_dir";; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_builddir=${ac_top_builddir}.;; +*) + case ${ac_top_builddir}. in + .) ac_abs_top_builddir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; + *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_srcdir=$ac_srcdir;; +*) + case $ac_srcdir in + .) ac_abs_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; + *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_srcdir=$ac_top_srcdir;; +*) + case $ac_top_srcdir in + .) ac_abs_top_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; + *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; + esac;; +esac + + + { echo "$as_me:$LINENO: executing $ac_dest commands" >&5 +echo "$as_me: executing $ac_dest commands" >&6;} + case $ac_dest in + depfiles ) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named `Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # So let's grep whole file. + if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then + dirpart=`(dirname "$mf") 2>/dev/null || +$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$mf" : 'X\(//\)[^/]' \| \ + X"$mf" : 'X\(//\)$' \| \ + X"$mf" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$mf" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + else + continue + fi + grep '^DEP_FILES *= *[^ #]' < "$mf" > /dev/null || continue + # Extract the definition of DEP_FILES from the Makefile without + # running `make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue + # When using ansi2knr, U may be empty or an underscore; expand it + U=`sed -n 's/^U = //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 ' + /^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 + diff --git a/configure.ac b/configure.ac new file mode 100644 index 0000000..110ae1f --- /dev/null +++ b/configure.ac @@ -0,0 +1,184 @@ +AC_PREREQ(2.59) +AC_INIT(netsukuku, 0.0.9b) +AM_INIT_AUTOMAKE(netsukuku, 0.0.9b) +AC_DEFINE(VERSION, 0.0.9b) +AM_CONFIG_HEADER(src/config.h) + +dnl ----------------------------------- +dnl Get hostname and other information. +dnl ----------------------------------- +AC_CANONICAL_HOST + +AC_PROG_CC +AC_PROG_CPP +AC_PROG_CXX + +prefix=/usr +datadir=/usr/share/netsukuku +sysconfdir=/etc/netsukuku +piddir=/var/run + +AC_ARG_WITH(gmp-include, AS_HELP_STRING([--with-gmp-include], \ +[gmp include dir]), [gmp="$withval"]) +AC_SUBST(gmp) + + +AC_HEADER_STDC +AC_CHECK_HEADERS([unistd.h]) + +AC_CHECK_HEADERS([pthread.h], ,\ + [echo "============================ Unable to find pthread.h"; \ + echo "Do you have the libpthread library installed?" ]) +AC_CHECK_HEADERS([zlib.h], ,\ + [echo "============================ Unable to find zlib.h"; \ + echo "Do you have the zlib library installed?" ]) +AC_CHECK_HEADERS([openssl/crypto.h], ,\ + [echo "============================ Unable to find openssl/crypto.h";\ + echo "Read README first!!!!!"; \ + echo "Install the openssl library"]) +AC_CHECK_HEADERS([gmp.h], ,\ + [echo "============================ Unable to find gmp.h"; \ + echo "Read README first!!!!!"; \ + echo "You need to install the libgmp library."; \ + echo "In the debian the package is libgmp3-dev"]) + +AC_MSG_CHECKING(OS) +case "$host" in + *-sunos5.6* | *-solaris2.6*) + opsys=sol2-6 + AC_DEFINE(SUNOS,,SunOS 5) + AC_CHECK_LIB(xnet, main) + AC_MSG_RESULT(solaris) + ;; + *-sunos5* | *-solaris2*) + AC_DEFINE(SUNOS,,SunOS 5) + AC_CHECK_LIB(socket, main) + AC_CHECK_LIB(nsl, main) + AC_MSG_RESULT(solaris) + ;; + *-linux-*) + opsys=gnu-linux + AC_DEFINE(GNU_LINUX,,GNU Linux) + AC_MSG_RESULT(linux) + ;; + *-nec-sysv4*) + AC_CHECK_LIB(nsl, gethostbyname) + AC_CHECK_LIB(socket, socket) + AC_MSG_RESULT(net-sysv4) + ;; + *-freebsd*) + AC_DEFINE(FREEBSD,,FreeBSD) + AC_MSG_RESULT(freebsd) + ;; + *-openbsd*) + opsys=openbsd + AC_DEFINE(OPEN_BSD,,OpenBSD) + AC_MSG_RESULT(openbsd) + ;; + *-bsdi*) + opsys=bsdi + OTHER_METHOD="mtu_kvm.o" + AC_CHECK_LIB(kvm, main) + AC_MSG_RESULT(bsdi) + ;; + *-irix6.5) + opsys=irix + AC_DEFINE(IRIX,,IRIX 6.5) + AC_MSG_RESULT(irix) + ;; +esac + +dnl ------------------------------------ +dnl Determine routing get and set method +dnl ------------------------------------ +AC_MSG_CHECKING(Netsukuku kernel interface method) +if test x"$opsys" = x"gnu-linux"; then + AC_MSG_RESULT(netlink) + RT_METHOD=rt_netlink.o + AC_DEFINE(HAVE_NETLINK,,netlink) + netlink=yes +else + if test "$opsys" = "sol2-6";then + AC_MSG_RESULT(solaris) + KERNEL_METHOD="kernel_socket.o" + RT_METHOD="rt_socket.o" + elif test "$opsys" = "irix" ; then + AC_MSG_RESULT(irix) + KERNEL_METHOD="kernel_socket.o" + RT_METHOD="rt_socket.o" + else + AC_TRY_RUN([#include +#include +#include + +main () +{ + int ac_sock; + + ac_sock = socket (AF_ROUTE, SOCK_RAW, 0); + if (ac_sock < 0 && errno == EINVAL) + exit (1); + exit (0); +}], + [KERNEL_METHOD=kernel_socket.o + RT_METHOD=rt_socket.o + AC_MSG_RESULT(socket)], + [RT_METHOD=rt_ioctl.o + AC_MSG_RESULT(ioctl)], + [KERNEL_METHOD=kernel_socket.o + RT_METHOD=rt_socket.o + AC_MSG_RESULT(socket)]) + fi +fi +AC_SUBST(RT_METHOD) +AC_SUBST(KERNEL_METHOD) +AC_SUBST(OTHER_METHOD) + + +dnl ----------------------------- +dnl check interface lookup method +dnl ----------------------------- +AC_MSG_CHECKING(interface looking up method) +if test "$netlink" = yes; then + AC_MSG_RESULT(netlink) + IF_METHOD=if_netlink.o +else + if test "$opsys" = "sol2-6";then + AC_MSG_RESULT(solaris) + IF_METHOD=if_ioctl.o + elif test "$opsys" = "irix" ; then + AC_MSG_RESULT(irix) + IF_METHOD=if_ioctl.o + elif test "$opsys" = "openbsd";then + AC_MSG_RESULT(openbsd) + IF_METHOD=if_ioctl.o + elif grep NET_RT_IFLIST /usr/include/sys/socket.h >/dev/null 2>&1; then + AC_MSG_RESULT(sysctl) + IF_METHOD=if_sysctl.o + AC_DEFINE(HAVE_NET_RT_IFLIST,,NET_RT_IFLIST) + else + AC_MSG_RESULT(ioctl) + IF_METHOD=if_ioctl.o + fi +fi +AC_SUBST(IF_METHOD) + + + +AC_ARG_ENABLE(debug, AS_HELP_STRING([--enable-debug], [Enable Netsukuku debug]),\ +[debug_flags="-Wall -DDEBUG"], [debug_flags=""]) +AC_SUBST(debug_flags) + +AC_DEFINE_UNQUOTED(DATA_DIR, "$datadir", "Where the Netsukuku data is saved") +AC_DEFINE_UNQUOTED(CONF_DIR, "$sysconfdir", "Location of configuration files") +AC_DEFINE_UNQUOTED(PID_DIR, "$piddir", "Location of ntkd.pid file") +AC_ARG_WITH(pid_dir, + [ --with-pid-dir=ARG Specify location of ntkd.pid file (default /var/run)],\ + [AC_DEFINE_UNQUOTED(PID_DIR, "$withval", ntkd.pid file location)]) +AC_SUBST(CONF_DIR) +AC_SUBST(DATA_DIR) +AC_SUBST(PID_DIR) + +AC_CONFIG_FILES([Makefile src/Makefile src/man/Makefile src/scripts/Makefile\ + src/conf/Makefile src/conf/netsukuku.conf]) +AC_OUTPUT diff --git a/depcomp b/depcomp new file mode 100755 index 0000000..04701da --- /dev/null +++ b/depcomp @@ -0,0 +1,530 @@ +#! /bin/sh +# depcomp - compile a program generating dependencies as side-effects + +scriptversion=2005-07-09.11 + +# Copyright (C) 1999, 2000, 2003, 2004, 2005 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., 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. + +# Originally written by Alexandre Oliva . + +case $1 in + '') + echo "$0: No command. Try \`$0 --help' for more information." 1>&2 + exit 1; + ;; + -h | --h*) + cat <<\EOF +Usage: depcomp [--help] [--version] PROGRAM [ARGS] + +Run PROGRAMS ARGS to compile a file, generating dependencies +as side-effects. + +Environment variables: + depmode Dependency tracking mode. + source Source file read by `PROGRAMS ARGS'. + object Object file output by `PROGRAMS ARGS'. + DEPDIR directory where to store dependencies. + depfile Dependency file to output. + tmpdepfile Temporary file to use when outputing dependencies. + libtool Whether libtool is used (yes/no). + +Report bugs to . +EOF + exit $? + ;; + -v | --v*) + echo "depcomp $scriptversion" + exit $? + ;; +esac + +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 + +# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. +depfile=${depfile-`echo "$object" | + sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} +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 + # With Tru64 cc, shared objects can also be used to make a + # static library. This mecanism is used in libtool 1.4 series to + # handle both shared and static libraries in a single compilation. + # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. + # + # With libtool 1.5 this exception was removed, and libtool now + # generates 2 separate objects for the 2 libraries. These two + # compilations output dependencies in in $dir.libs/$base.o.d and + # in $dir$base.o.d. We have to check for both files, because + # one of the two compilations can be disabled. We should prefer + # $dir$base.o.d over $dir.libs/$base.o.d because the latter is + # automatically cleaned when .libs/ is deleted, while ignoring + # the former would cause a distcleancheck panic. + tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 + tmpdepfile2=$dir$base.o.d # libtool 1.5 + tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 + tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 + "$@" -Wc,-MD + else + tmpdepfile1=$dir$base.o.d + tmpdepfile2=$dir$base.d + tmpdepfile3=$dir$base.d + tmpdepfile4=$dir$base.d + "$@" -MD + fi + + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" + exit $stat + fi + + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" + do + test -f "$tmpdepfile" && break + done + 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 -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ + -e '/^#line [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 + +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-end: "$" +# End: diff --git a/doc/README b/doc/README new file mode 100644 index 0000000..5586171 --- /dev/null +++ b/doc/README @@ -0,0 +1,14 @@ +What you can find in these sub-directories: + + +main_doc/ Essential documentation + +articles/ Articles about various interesting topics + +faq/ Frequently Asked Questions + +howto/ Excuse me sir, how to do that? + +manuals/ Online manual pages + +misc/ Miscellanea documents diff --git a/doc/articles/Ntk_Developing_World b/doc/articles/Ntk_Developing_World new file mode 100644 index 0000000..9de5584 --- /dev/null +++ b/doc/articles/Ntk_Developing_World @@ -0,0 +1,51 @@ +== Netsukuku and ICT infrastructure in the Developing World == + +{{{ + +Netsukuku network: enabled self-made and self-sustained ICT infrastructure +for developing countries. + +The end-users, in order to connect their PC to the rest of the World +through the Internet, have to make a subscription with an Internet Operator. +The Domain Names, as well, are the unique way by which a network attached +device (which could consist of a computer, a file server, a network storage +device, a fax machine, a cable modem, etc.) is known on the Internet, +and are literally sold through the centralised system of the Domain +Name System (DNS). Netsukuku, an Open Source software, downloadable +from http://netsukuku.freaknet.org makes possible the creation of a +new distributed global Net, expandable to an unlimited number of users, +alternative, independent and totally apart from the Internet. +The Netsukuku particular routing system, created by some members of the +"Freaknet" group of Catania (Italy), allows the Net to be self-sustained, +thanks to all the Net users, that share a small part of their own PC +resources. Anybody has the chance to join the Net and, at the same time, to +let other users do the same. +In those countries and areas of the globe where Internet facilities are still +not available, a public Net can be created and developed in a very simple way +(i.e. through a wi-fi coverage), without depending on any Internet Operators. +In the same way, all the contents holder will be able to share any documents +simply from their PC, since a maximum of 256 hostnames can be recorded and +automatically supported by each PC (i.e. node of the Net). +Last but not least, inside Netsukuku Net all the users will have the chance to +get through the Internet: in fact any user can get the connectivity to +Internet from other users that share and devolve into the net the bandwidth +they don't use at the moment. +Netsukuku routing system differs from all the other protocols and algorithms: +the existing dynamic schemes are solely utilised to create small and medium +nets. +The routers of Internet are also managed by different protocols as the OSPF, +the RIP or the BGP, all based on different classical algorithms. +These algorithms are able to find out the best path to reach a node in the +net, but require a very high waste of CPU and memory. That's why inside +Internet, all the routers are powerful computers specifically dedicated to +this purpose. On the contrary, when a node hooks to Netsukuku, the net +automatically rewrites itself, while all the other nodes, using a very small +part of the CPU and of the memory resource (a few kb), recognised which are +the fastest and more efficient routes to communicate with the new arrived. +The nodes don't have privileges or limitations: when compared to other nodes, +they are part of the net and give their contribution to its expansion and +efficiency. The more they increase in number the more the net grows and +becomes stable. In Netsukuku there is no any difference between private and +public nets and talking about LAN become meaningless. + +-CLazop diff --git a/doc/articles/Ntk_New_Global_Net b/doc/articles/Ntk_New_Global_Net new file mode 100644 index 0000000..3ebb0f3 --- /dev/null +++ b/doc/articles/Ntk_New_Global_Net @@ -0,0 +1,29 @@ +== Netsukuku can create a global Net indipendent from the Internet == + +{{{ +The Open Source enables you to migrate towards free software, but there is +no chance to join your PC to the rest of the world in a free way. +Imagine to be titular of full membership into a global Network, without signing +contracts with any Internet Operators. Imagine to surf in a Net where there is +no central regulating Authority which assigns IP, conditions, names and +suffixes... +Netsukuku, an Open Source software, which can be downloaded from +http://netsukuku.freaknet.org, makes possible the creation of a new distributed +global Net, expandable to an unlimited number of users, independent and +totally apart from the Internet. Due to the Netsukuku particular routing +system, created by the "Freaknet" group of Catania (Italy), the Net is self +sustained, thanks to all the Net users, which share a small part of their +own PC resources. Anybody has the chance to join the Net and, at the same +time, to let other users do the same. +In this way, the countries and areas of the globe where Internet +facilities are still not available, simply through a wi-fi +coverage, can create and develop a Net without submitting themselves +to any Internet Operators or to any regulating central Authorities. + +"I hope someday you'll join us +And the world will be as one...." +J.Lennon + + +-CLazop +}}} diff --git a/doc/articles/Ntk_New_Global_Net.fr b/doc/articles/Ntk_New_Global_Net.fr new file mode 100644 index 0000000..cca247b --- /dev/null +++ b/doc/articles/Ntk_New_Global_Net.fr @@ -0,0 +1,28 @@ +{{{ +L'Open Source vous permet de migrer vers une informatique libre, mais il +n'y a aucune possibilité de connecter votre ordinateur au reste du monde +en modalité libre. +Imaginez un Réseau global ou tout le monde peut entrer sans s'obliger avec des +fournisseurs d'accés a Internet. +Imaginez de naviguer dans un Net sans devoir vous soumettre à aucune Autorité +régulatrice centrale qui puisse contrôler les serveurs, établir les +conditions. + +NETSUKUKU, un logiciel Open source, qui peut être téléchargé de +http://netsukuku.freaknet.org, rend possible la création d'un nouveau +réseau global distribué, extensible à un nombre illimité d'utilisateurs, +indépendant et totalement détaché de l'Internet. Grâce au système +particulier de cheminement de Netsukuku, créé par le groupe de "Freaknet" +de Catane (Italie), les utilisateurs de ce réseau en sont, aussi, les +membres actifs à travers le partage d'une petite partie des ressources de +leurs ordinateur. Quiconque a la possibilité de s'unir au Réseau et, en +même temps, de le faire grandir, l'objectif étant de créer et développer +un réseau libre, communautaire, citoyen, accessible à tous et permettant, +dans le respect des réglementations, la libre circulation des données. +Les pays et les régions du globe où Internet n'est encore pas disponible, +de cette façon, et simplement par l'utilisation d'une couverture wi-fi, +peuvent créer et développer un Réseau sans se soumettre aux Opérateurs +d'Internet ou à ses Autorités régulatrices centrales... + +"And the world will be as one...." +J.Lennon diff --git a/doc/articles/Ntk_New_Global_Net.ita b/doc/articles/Ntk_New_Global_Net.ita new file mode 100644 index 0000000..e5e4f03 --- /dev/null +++ b/doc/articles/Ntk_New_Global_Net.ita @@ -0,0 +1,19 @@ +{{{ +L'Open source da' la facolta' di migrare verso il software libero, ma non c'e' +alcuna possibilita' di collegare il proprio PC al resto del mondo senza +sottoscrivere abbonamenti con gli Operatori Internet o di navigare in una rete +libera da vincoli e condizionamenti. +Un software Open source, scaricabile all'indirizzo +http://netsukuku.freaknet.org, consente la creazione di una nuova rete globale +distribuita, espandibile ad un numero illimitato di utenti, indipendente e del +tutto staccata da Internet. +Grazie al particolare sistema di routing "Netsukuku" messo a punto dal gruppo +"Freaknet" di Catania, la Rete e' autogestita dagli stessi utenti, che mettono +in condivisione una piccolissima parte delle risorse del proprio PC. Chiunque +ha, cosi', la possibilita' di accedere alla Rete e sostenere, allo stesso +tempo, la sua espansione. +I paesi e nelle aree del globo attualmente escluse da Internet, tramite +Netsukuku e la semplice copertura wi-fi del territorio, possono, cosi', creare +ed implementare una Rete globale, senza ricorrere ne' al supporto degli +Operatori Internet ne' alle sue Autorita' regolatrici centrali. +}}} diff --git a/doc/articles/Ntk_civic_net b/doc/articles/Ntk_civic_net new file mode 100644 index 0000000..007b887 --- /dev/null +++ b/doc/articles/Ntk_civic_net @@ -0,0 +1,66 @@ +== Netsukuku and the civic networks == + +{{{ +Cities and Institutions are showing a growing interest in e-government +projects finilised in providing on line services to the citizens through +Internet. +For example are disposable: + + - school related activities (enrolments, cultural and educational + programs), + - news, local radio and televisions + - guides for expositions and events, cultural and tourist information + - discussion forums, social and cultural activities + +However, the diffusion and access to the Net isn't still disposable for +everyone: DSL facilities aren't available in many cities and the ISPs impose +expensive rates/costs to grant connectivity. +The creation of civic nets, in which the users can have free access to web +sites and to the on line e-services, surfing freely and without any cost web +sites dedicated to institutional, educational, tourist, commercial and social +activities, which need a constant and direct dialogue with the people, is +today made possible by NETSUKUKU Open Source software. +His first aim is the implementation of a global mesh network, completely +independent from Internet, in which the single PCs, communicating each other +through radio frequencies, become automatically the nodes/access points of the +net and in such way give their contribution to make it alive and, at the same +time, to expand it, exactly as in a fractal scheme. + +The NETSUKUKU routing system allows: + +- every user to go not only through the Net of their city but also through + those located in all the other cities which, once they are inter-connected, + create a kind of global Network, parallel to Internet, which can + indefinitely expand, completely without the support of ISPs; + +- till a maximum of 256 hostnames to be recorded and supported by each PC + (i.e. node of the Net). + +On the Netsukuku Net everybody wishing to offer digital contents/information, +will be able to share them simply from his or her PC. The more of actors +represented in the system is high in number, the more will be granted +dialogue, circulation of different ideas, democratic process and the full +right of citizenship inside the society of information. + +Last but not least, inside Netsukuku Net users will have the chance to get +through the Internet free of cost: in fact any node can share with the +Netsukuku Net his connectivity to Internet and get from other users the +bandwidth they didn't use in any the moment. + +=== How to realize a wireless Netsukuku Net === + +Netsukuku is an architecture of flexible net and will create autonomously an +efficient wireless mesh network among PCs equipped with radio connection +devices. The simplest way to create/join the Netsukuku Net is to install a +common wi-fi card inside your own PC and launch the Netsukuku program, freely +downloadable from Internet. The flux of data will reach the wished +destination, going through the same nodes (PCs or Access Points in which +Netsukuku as been installed inside), interconnected among them. Obviously a +larger diffusion of the Netsukuku dedicated network can be achieved by the +wi-fi coverage of wide urban and rural areas: in the market there are many and +different solutions of wireless devices, all valid and cheap (routers, access +points, omni directional antennas). + +For more information or any request of assistance Netsukuku community is +available on the net at the following site: +http://netsukuku.freaknet.org diff --git a/doc/articles/Ntk_civic_net.fr b/doc/articles/Ntk_civic_net.fr new file mode 100644 index 0000000..bff4a4e --- /dev/null +++ b/doc/articles/Ntk_civic_net.fr @@ -0,0 +1,68 @@ +==== Netsukuku et les Réseaux citoyens ==== + +{{{ + +Les Institutions montrent un intérêt croissant pour des projets visant a' +fournir des services en ligne aux citoyens par l'Internet. + +Par exemple les services suivants sont disponibles: + + - services pour l'école (inscriptions, projets culturel et + éducatif), + - information, live web cam, radio locaux + - guides pour expositions et événements culturelle et touristiques + - forum de discussion, sociales et culturelles + +Cependant, les citoyens n'ont pas libre accès aux services en ligne des +institutions, bien que les activités éducatives, administratives, commerciales +et sociales aient besoin d'une constante dialogue avec le public. +En fait, la diffusion et l'accès à l'Internet n'est pas encore a' la porté de +tous: l'ADSL n'est pas disponible dans beaucoup de région et les fournisseurs +d'accès imposent des prix trop hauts pour accorder la connectivité. +Le logiciel Open Source NETSUKUKU permet aux Institutions d'ériger un réseau +dans lequel les gens peuvent surfer sans besoin de supporter aucun coût ni de +s'abonner aux fournisseur d'accès. +Son but est la réalisation d'un réseau global, complètement indépendant de +l'Internet, dans lequel les ordinateurs, communiquant entre eux (par les +fréquences radio), deviennent automatiquement les noeuds du Réseau, donnent +leur contribution pour le maintenir et, en même temps, pour en permettre +l'expansion, exactement comme dans un schème à fractal. +Avec le système de cheminement NETSUKUKU, chaque utilisateur: + +- navigue dans le réseau de sa ville, et également dans ceux situés dans + toutes les autres villes qui, une fois reliées, créent un réseau global, + parallèles à l'Internet, qui peut indéfiniment augmenter, complètement sans + l'appui de fournisseur; +- peut enregistrer jusqu'à un maximum de 256 hostnames, qu'il contient dans + son ordinateu. + +Sur le réseau Netsukuku tout ceux qui souhaitent offrir contenus/informations +numériques, pourront les partager simplement avec leurs ordinateurs. Plus +d'acteurs seront représentés dans le système est plus large seront le +dialogue, la circulation des différentes idées, la participation au processus +démocratique et le droit de citoyenneté à l'intérieur de la société +d'information. + +Enfin, les utilisateurs du réseau Netsukuku auront la chance d'accèder à +Internet exempt de coût: en fait n'importe tous les noeuds peuvent partager +avec le réseau Netsukuku leur connectivité à Internet et obtenir des autres +utilisateurs la largeur de bande qu'ils n'utilisent pas pour le moment. + +=== Comment réaliser un réseau sans fil Netsukuku === + +Netsukuku est une architecture de réseau flexible et qui crée de façon +autonome un réseau wireless, efficace entre les ordinateur équipés de +dispositifs radio de raccordement. +La manière la plus simple de créer ou de s'unir à un réseau Netsukuku est +d'installer une commune carte wi-fi dans votre ordinateur et de lancer le +programme de Netsukuku, librement téléchargeable de l'Internet. +Le flux des données atteindra la destination souhaitée, passant par les noeuds +(les ordinateurs ou les points d'accès dans lesquels Netsukuku est installé à +l'intérieur), reliés ensemble entre eux. +Évidemment une plus grande diffusion du réseau consacré à Netsukuku peut être +réalisée par la couverture wi-fi de secteurs urbains et ruraux: sur le marché +il y a de nombreux et différents dispositifs sans fil, tous valides et à bon +marché ( access point, antennes omnidirectionnelles). +Pour plus d'information ou n'importe quelle demande d'aide, la communauté de +Netsukuku est disponible sur Internet a' l'adresse suivante: +http://netsukuku.freaknet.org diff --git a/doc/articles/Ntk_civic_net.ita b/doc/articles/Ntk_civic_net.ita new file mode 100644 index 0000000..0758b9b --- /dev/null +++ b/doc/articles/Ntk_civic_net.ita @@ -0,0 +1,91 @@ +== Netsukuku e le reti civiche == + +{{{ +Netsukuku e le reti civiche + +Comuni, Enti ed Istituzioni stanno dimostrando un crescente interesse verso +progetti di e-government finalizzati a fornire servizi on line ai cittadini +attraverso Internet, chioschi informatici, call center, come +ad esempio: + + - servizi amministrativi comunali (anagrafe, tributi locali, avvio e + monitoraggio di procedimenti amministrativi, ecc.) + - attivita' scolastiche (iscrizioni, iniziative culturali,progetti + educativi) + - portali territoriali, news, radio e live webcam locali + - guide per eventi e fiere, informazioni di interesse turistico e + culturale + - forum di discussione, sondaggi, iniziative socio-culturali. + +Tuttavia, la diffusione e l'accesso alle reti civiche sono, oggi, limitati +dalla indisponibilita' della banda larga in molti Comuni e dai costi imposti +dagli Internet sevice provider (ISP) per fornire la connettivita'. + +La realizzazione di reti telematiche cittadine, nelle quali gli utenti +possano accedere gratuitamente ai siti web ed ai servizi informatici di Enti +ed Istituzioni e' resa, oggi, possibile dal protocollo Netsukuku, che e' stato +ideato per permettere l'implementazione di una mesh network su scala globale, +indipendente da Internet, nella quale i singoli PC, collegandosi in frequenza +radio fra loro, diventano i nodi (router) della rete, e contribuiscono a +mantenerla e ad allargarla, secondo uno schema a frattale, recursivo ed a +crescita esponenziale. + +Il protocollo Netsukuku abilita: + +- gli utenti ad accedere non solo alla rete civica della propria citta' ma + anche a quelle allocate in tutte le citta' che, una volta interconesse, + formano una vera e propria ragnatela globale, parallela ad Internet, che + puo' espandersi indefinitamente, facendo sempre a meno di qualisiasi + operatore di telefonia o Internet (ISP); + +- ciascun PC (ovvero nodo della rete) a supportare liberamente fino ad un + massimo di 256 hostnames. + +Per collegarsi alla rete Netsukuku, gli utenti devono semplicemnte dotare +il proprio PC di una comune scheda wi-fi ed avviare il programma Netsukuku +scaricabile da Internet. E' evidente che una copertura del territorio +wi-fi a banda larga dedicata alla rete Netsukuku, ne puo' assicurare una +piu' rapida espansione. Il mercato del wireless mette ormai a disposizione +svariate soluzioni, tutte valide ed economiche (ripetitori, access point, +antenne ecc.)e Comuni, Istituzioni, Associazioni non-profit, Imprenditori +potranno cogliere l'opportunita' di sostenere questa rete come nuovo canale di +comunicazione efficace, affidabile, simile ma indipendente da Internet, ideale +per offrire a tutti la possibilita' di navigare liberamente e gratuitamente +in siti web dedicati ad attivita' istituzionali, educative, commerciali, +turistiche, promozionali e sociali, che richiedono un dialogo costante e +diretto col pubblico. + +Sulla rete Netsukuku chiunque voglia, potra', semplicemente dal proprio +PC, offrire in rete contenuti digitali, informazioni e servizi informatici: +maggiore sara' il numero degli attori rappresentati nel sistema, piu' saranno +garantiti la patertecipazione, il dialogo, la circolazione delle idee, +il processo democratico ed il pieno esercizio del diritto di cittadinanza +nella nuova societa' dell'informazione. + +La rete Netsukuku, infine, potra' essere utilizzata per connettersi +gratuitamente ad Internet: +infatti, qualsiasi nodo puo' condividere con la rete Netsukuku la +connettivita' ad Internet, a favore di chi non ha un account attivo con un ISP +o perche' ne e' provvisto o perche' si trova fuori sede. + +Come realizzare facilmente una rete wireless Netsukuku: +La wireless mesh network di Netsukuku e' una architettura di rete flessibile +che fa muovere dati in maniera efficiente tra PC forniti di connessione radio, +in modo tale che il flusso di dati raggiunga la destinazione voluta, passando +attraverso gli stessi nodi (PC ovvero Access Point con Netsukuku installato) +interconnessi tra loro, e seguendo la rotta migliore. +Gli utenti potranno essere interconnessi tra loro, all'interno del raggio +d'azione delle proprie schede wi-fi o dei loro Access Point, sfruttando, ad +esempio, i supporti delle antenne televisive del loro palazzo, ove potranno +essere attaccate antenne wi-fi centralizzate (access point) o singole (schede +wi-fi). +Per favorire una piu' rapida e generale espansione della wireless mesh network +basata sul protocollo Netsukuku, bastera', poi, assicurare sul territorio la +presenza di semplici ripetitori wi-fi dotati di antenne omnidirezionali. + +La comunita' di Netsukuku e' disponibile in rete, per qualsiasi ulteriore +informazione o richiesta di assistenza, sul sito: +http://netsukuku.freaknet.org + +-CLazop +}}} diff --git a/doc/faq/FAQ b/doc/faq/FAQ new file mode 100644 index 0000000..ee6cc0e --- /dev/null +++ b/doc/faq/FAQ @@ -0,0 +1,223 @@ + + 0. General + Q: What is Netsukuku? + Q: What are its features? + Q: Why did you choose that name? + Q: What does it mean "it uses chaos and fractals"? + Q: Why another p2p network? + Q: Ehi! You're crazy. This shit will not work! + Q: Where are current Netsukuku networks that I can connect to? + Q: What can I do to help the development of Netsukuku? How can I + contribute to its growth? + + 1. Technical + Q: Does it scale in a network with A LOT of nodes? + Q: What do you intend to do to solve the IP unicity problem? + Q: Does it really works? + Q: Netsukuku is separated from Internet. How? + Q: How can I join in Netsukuku? + Q: And how does a new node begin to locate any of the other nodes in + the network? + Q: Will you provide "Internet to Netsukuku" tunnels? + Q: Aside from what I hack myself I was wondering what can be done on + the Netsukuku network? + Q: Will we be able to host websites anytime soon? + Q: Will glibc be able to resolve names for the ANDNA system? + Q: What sort of performance does Netsukuku have? Is it any good for + voice chat, video chat, games? + + 2. Software + Q: On what OS does it run? + Q: Will Netsukuku be ported to Windows? + Q: Will Netsukuku be ported to PSP / Nintendo DS / wifi phones / PDAs? + Q: How does it join the network? + Q: For using a wifi link do I need of an access point? What to do? + Q: Why the code is not written in java? + +-- + + +/ \ + 0. General +\ / + +Q: What is Netsukuku? +A: Netsukuku is a mesh network or a p2p net system that generates and sustains + itself autonomously. It is designed to handle an unlimited number of nodes + with minimal CPU and memory resources. Thanks to this feature it can be + easily used to build a worldwide distributed, anonymous and anarchical + network, separated from the Internet, without the support of any servers, + ISPs or authority controls. + This net is composed by computers linked physically each other, therefore it + isn't build upon any existing network. Netsukuku builds only the routes which + connects all the computers of the net. + In other words, Netsukuku replaces the level 3 of the model iso/osi with + another routing protocol. + The Domain Name System is also replaced by a decentralised and distributed + system: the Abnormal Netsukuku Domain Name Anarchy. + + For more information read the section "2.3 So, WTF is it?" of the + document ( http://netsukuku.freaknet.org/doc/netsukuku ) + +Q: What are its features? +A: The complete list of features is here: + http://netsukuku.freaknet.org/files/doc/misc/Ntk_features_list + +Q: Why did you choose that name? +A: Networked Electronic Technician Skilled in Ultimate Killing, Utility and + Kamikaze Uplinking. + But there is also another story: we were learning Japanese katakana with + `slimeforest', a nice game for GNU/Linux. + Unfortunately when we encountered the "Network" word, written in Japanese, + we didn't know all the relative symbols, so the only katakana we were able + to read were few and mixed with others the name was: Ne tsu ku ku. + By the way, you can always think of any other deceitful and hidden + meanings. + +Q: What does it mean "it uses chaos and fractals"? +A: The Netsukuku protocol (Npv7) structures the entire net as a fractal and, + in order to calculate all the needed routes which are necessary to connect a + node to all the other nodes, it makes use of a particular algorithm called + Quantum Shortest Path Netsukuku (QSPN). + Here a fractal is meant as a highly clusterized graph of nodes. + (For the in depth description of the map system in Netsukuku read the + "5.3 The truly Gnode^n for n<=INFINITE" section in the document.) + + On the other hand, the QSPN is a meta-algorithm in the sense that it + has to run on a real (or simulated) network. The nodes have to send the + QSPN pkt in order to "execute" it. For this reason it is not always true + that a determinate pkt will be sent before another one. + This system allows to get the best routes without any heavy computation. + (read the "5.1 QSPN: Quantum Shortest Path Netsukuku" section in the + document). + +Q: Why another p2p network? +A: Netsukuku is not a p2p net built upon the Internet. It is a physical + network and it is a dynamic routing system designed to handle 2^128 nodes + without any servers or central systems, in this way, it is possible to + build a physical network separated from the Internet. Btw, read "What is + Netsukuku". + +Q: Ehi! You're crazy. It won't work! +A: Ehi pal, this doesn't pretend to be _now_ the final solution to the meaning + of life, the universe and everything. Why don't you contribute and give us + useful hints from your great knowledge? If you want to help in the + development, read the code and contact us ;) + +Q: Where are current Netsukuku networks that I can connect to? +A: Simply we don't know and we can't, but the website team si developing a + community portal which will ease the difficulty of coordination. (Think of + Google maps). + +Q: What can I do to help the development of Netsukuku? How can I contribute to + its growth? +A: http://lab.dyne.org/Ntk_Grow_Netsukuku + + +/ \ + 1. Technical +\ / + +Q: Does it scale in a network with A LOT of nodes? +A: Simple and not accurate reasons for the scalability of Netsukuku (until there + is the technical documentation with math background that is being written): + 1) the size of the maps is fixed: about 4Kb for the int_map and 16Kb for + the ext_map. + 2) Not all the nodes sends a broadcast discovery. + 3) There are few floods for each discovery. + 4) When a node receives a flood it already has the routes without + calculating anything. + 5) A flood is synchronized: the same flood starts at the same time for all + the nodes. + + A first draft of the explanation of the Netsukuku scalability is available + here: http://lab.dyne.org/Netsukuku_scalability + +Q: What do you intend to do to solve the IP unicity problem? +A: It is already solved: http://lab.dyne.org/Ntk_gnodes_contiguity + +Q: Does it really works? +A: ^_^ + +Q: Netsukuku is separated from Internet. How? + Someone is building all new infrastructure? Who's paying for that? +A: Not at all, there is no need to pay. The best way to physical link two + nodes is using the wifi. Nowadays, there are a lot of cool wifi + technologies, which allows to link two nodes distant kilometres each other. + In the city there would be no problems, it suffices only a node for + each neighbourhood and the city will be completely covered. + +Q: How can I join in Netsukuku? +A: Take out your wifi antenna, and start the Netsukuku daemon on the relative + network interface, then wait and tell to do the same thing to all your + friends ^_- + +Q: And how does a new node begin to locate any of the other nodes in the + network? +A: The Netsukuku radar sends echo packets about every 10 seconds, if someone + replies it communicates with it. + +Q: Will you provide "Internet to Netsukuku" tunnels? +A: Yes, they will be used to link close cities. Please read this for more + information: + http://lab.dyne.org/Ntk_Internet_tunnels + +Q: Aside from what I hack myself I was wondering what can be done on the + Netsukuku network? +A: Whatever you already do in the actual Internet. What the Netsukuku daemon + does is to only set the routes in the kernel routing table. + +Q: Will we be able to host websites anytime soon? +A: You can do it by now! + +Q: Will glibc be able to resolve names for the ANDNA system? +A: ANDNA comes with a DNS wrapper so it is trasparent to all the programs + which uses the glibc. Read "man andna": + http://netsukuku.freaknet.org/doc/manuals/html/andna.html + +Q: What sort of performance does Netsukuku have? Is it any good for voice chat + video chat? +A: What do you mean by `performance'? + + Network performance: it is dependent on the links quality. If the nodes are + linked by 100Mbps cable you will feel like in a large LAN. + The distance from yourself and the destination node is also relevant. + Remember that the Netsukuku daemon chooses only the best way to reach + the other nodes, but cannot improve the roads themself. + + Software performance: you really shouldn't worry about this: + PID USER PRI NI SIZE RSS SHARE %CPU %MEM TIME CPU COMMAND + 18521 root 15 0 17708 1552 1164 0.0 0.3 0:00 0 ntkd + + +/ \ + 2. Software +\ / + +Q: On what OS does it run? +A: For now it runs only on GNU/Linux, but it is easy to port it on other OS. + If you want to join in the development let us now ;) + +Q: Will Netsukuku be ported to Windows? +A: Short answer: if you code the port, yes. + Answer: We need coders for that. There are a lot of things to be done and + the Windows port is what we care less. + +Q: Will Netsukuku be ported to PSP / Nintendo DS / wifi phones / linux PDAs + etc... +A: We are currently working on flashing Netsukuku on Access Points (like + Linksys). See http://netsukuku.freaknet.org/openwrt/ + +Q: For using a wifi link do I need of an access point? What to do? +A: You just need a wifi network card. Put it in ad-hoc mode using "netsukuku" + as essid. ( man netsukuku_wifi: + http://netsukuku.freaknet.org/doc/manuals/html/netsukuku_wifi.html ) + +Q: Why the code is not written in java? +A: Are you kidding? + + +-- + +Q: My question is not answered here! +A: Contact us: http://netsukuku.freaknet.org diff --git a/doc/faq/FAQ.fr b/doc/faq/FAQ.fr new file mode 100644 index 0000000..dbf98fc --- /dev/null +++ b/doc/faq/FAQ.fr @@ -0,0 +1,27 @@ += Questions fréquentes sur Netsukuku (fr) = + +== 0. Généralités == + +=== 0.1. Qu'est-ce que Netsukuku ? === + +Netsukuku est un réseau maillé ou un système P2P qui se génère et entretient son fonctionnement de façon autonome. Il est conçu pour gérer un nombre illimité de n?uds avec des ressources en puissance de calcul et en mémoire minimales. Il peut ainsi être facilement utilisé pour bâtir un réseau mondial distribué, anonyme et anarchique, distinct d'Internet, sans recourir à aucun serveur, fournisseur d'accès ou autorité de contrôle. + +Gardez à l'esprit qu'il s'agit d'un réseau ''physique'' : il ne se fonde sur aucun autre réseau existant. Il doit par conséquent y avoir des ordinateurs reliés ''physiquement'', Netsukuku créant ensuite les routes. + +En d'autres termes, Netsukuku remplace le niveau 3 du modèle ISO/OSI par un autre protocole de routage. + +Pour plus d'informations, lisez la section 2.4, ''Mais qu'est-ce que c'est, à la fin ?'' de la documentation. + +=== 0.2. Quelles sont ses fonctionnalités ? === + +La liste complète des fonctionnalités se trouve ici : [http://netsukuku.freaknet.org/files/doc/misc/Ntk_features_list]. + +=== 0.3. Pourquoi avoir choisi ce nom ? === + +Nouveaux Électriciens Trappistes Sans Kimono Unissant Karma et Urbanité. + +Mais il y a une autre histoire, aussi. Nous apprenions les katakanas japonais avec slimeforest, un chouette jeu pour GNU/Linux. + +Malheureusement, quand nous sommes tombés sur le mot ''réseau'' écrit en japonais, nous ne connaissions pas tous les symboles employés ; nous ne pouvions donc lire que quelques katakanas et, mélangés avec d'autres, ça donnait le nom Ne-tsu-ku-ku. + +Bon, mais vous pouvez toujours imaginer d'autres significations exotiques... diff --git a/doc/faq/FAQ.ru b/doc/faq/FAQ.ru new file mode 100644 index 0000000..f2fd299 --- /dev/null +++ b/doc/faq/FAQ.ru @@ -0,0 +1,65 @@ += ???????? = + + ??? ????? Netsukuku:: Netsukuku - ??? P2P ???? ? ???????? ?????????? ??????? ????????? ? ?????????????? ??????????????. ??? ???????? ???????????? ?????????????? ?????????? ????? ? ???????????? ????????? ???????? ?????????? ? ??????. ????????? ????? ??? ????? ???? ??????? ??? ???????? ?????????? ??????????????, ????????? ? ???????????? ????, ?? ????????? ? ??????????, ??? ????????, ??????????? ??? ???????? ???????. ???? ????????? ??? Netsukuku ? ??? ?????????? ????, ?? ?????????? ??? ?????-???? ???????????? ?????, ???? ? ??? ?????? ???? ????????? ??????? ????? ????? ????? Netsukuku ????????? ??????? ?????????????. ??????? ??????? Netsukuku ???????? 3-? ??????? ??????? ?????? ISO/OSI (??????? ???????) ????? ?????????? ?????????????.[[BR]](??????: "2.4 So, WTF is it?" http://netsukuku.freaknet.org/?p=Documentation) + + ?????? ??????? ??? Netsukuku?:: Networked Electronic Technician Skilled in Ultimate Killing, Utility and Kamikaze Uplinking ? ??????? ??????????? ?????????? ???????????? ? ?????????? ???????????, ???????????? ? ??????????? ????? ?????????. [[BR]] ???? ??? ?? ?????? ??????. ?? ??????? ???????? ????? ? «slimeforest» ???? ??? GNU/Linux. ? ????????? ????? ?? ??????????? ?? ?????? «Network» ?????????? ?? ??????? ?? ?? ????? ?????????? ????????, ??? ??? ???????????? ????? ???????? ??????? ??? ??????? ????????? ? ??? ????: Ne tsu ku ku. ?????? ?? ?????? ?????? ????????? ???? ?????????? ????? ? ??????? ? ??? ?????? ?????. + + ??? ?????? «?????????? ??????????? ? ????????»?:: ???????? Netsukuku (Npv7) ????????????? ??? ???? ??? ??????? ? ??? ?????????? ????????? ??????????? ???? ??? ?????????????? ? ????? ?????????? ???????? ?????????? ??????????? ???? Netsukuku (QSPN). ????? ??? ????????? ?????????? ???? ? ??????? ???????? ????????????? ?????????. [[BR]] (??????: 5.3 The truly Gnode^n for n<=INFINITE" http://netsukuku.freaknet.org/?p=Documentation) [[BR]] ? ?????? ??????? QPSN ? ????-???????? ????? ?? ??????????? ? ???????? ???????? ???? (??? ?????????). ??? ??? «??????????» ???? ?????? ??????? QPSN pkt(?????). ??????? ?? ?????? ????? ??? ???????????? ????? ????? ?????? ????? ????? ??????. ??? ????????? ????????? ?????? ???? ??? ??????? ??????????. [[BR]] (??????: "5.1 QSPN: Quantum Shortest Path Netsukuku" http://netsukuku.freaknet.org/?p=Documentation) + + ??? ???? ??? ???? p2p ?????:: Netsukuku ?? p2p ??????????? ?????? ?????????. ??? ?????????? ???? ? ?? ????? ???????????? ????????????? ?????????????? ??? ???? ? 2^128 ????? ??? ???????? ??? ???????????????? ???????, ????? ??????? ???????? ????????? ??????????? ?? ????????? ????. ??????, ?????????? «??? ????? Netsukuku» + + ??! ?? ?? ???????. ??? ????? ?? ????? ????????!:: ??, ?????? ??? ?? ???????? ???? ????????????? ???????? ????????? ??????? ?????, ????????? ? ????? ??????????. ?????? ?? ?? ????????? ????-?????? ? ?????? ? ?? ?????????? ?????? ?????????? ???????????? ??????????? ???? ?????? ?????? ? ?????????? ????? ??? ? ??????? ? ???? ;) + + ??? ???? ???? Netsukuku ? ??? ? ??? ???????????????:: ?? ?? ?????? ?????, ?? ? ?? ????? ?????, ?? ?? ?????? ????? ??????? ????????? ??????, ??????? ???????? ???????????. + + ??? ? ???? ?????? ???????? Netsukuku? ??? ? ?????? ????? ? ?? ?????:: ??????? ????: http://lab.dyne.org/Ntk_Grow_Netsukuku + += ??????????? ????? = + + ??? Netsukuku ?????????????? ? ???? ? ??????? ??????????? ??????:: ??????? ? ?? ?????? ?????? ??????? ???????????????? Netsukuku (?? ??? ??? ???? ?? ????? ???????? ???. ???????????? ? ?????????????? ????????????): + 1. ?????? ????? ??????????, ????? 4?? ??? int_map ? 16?? ??? ext_map. + 1. ?? ??? ???? ???????? ????????????????? ?????? ??? ??????????? ???????? ????? (broadcast discovery) + 1. ????????????????? ?????? ?????????????? ????????????. + 1. ? ?????? ????????? ?????????????????? ?????? ???? ???????? ??????????? ???? ??? ?????-???? ?????????? + 1. ??????? ????????????????, ??? ???? ???????? ????????????? ????????????. + ???????? ?????????? ???????????? ???????????????? Netsukuku ???????? ?? ??????: http://lab.dyne.org/Netsukuku_scalability + + ??? ?????????????? ?????? ???????? ?????????? IP ??? ????????? ??????:: ???????? ??? ??????: http://lab.dyne.org/Ntk_gnodes_contiguity + + ??? ??? ????????????? ?????????:: :) + + Netsukuku ?????????? ?? ?????????. ???? ???-?? ?????? ?????????? ????? ??????????????? ??? ?? ??? ??? ???????:: ????? ???, ??????? ?? ????. ?????? ?????? ????????? ??????? ??? ???? ? ???????????? ?????????? (Wi-Fi). ?????? ?????????? ????????? ???????????? ?????????? ??????????? ???????? ????? ????? ???? ?? ?????????? ? ?????????. ? ??????? ?? ?????? ???? ?????-???? ???????, ?????????? Wi-Fi ???? ?? ?????/??????? ??? ??????? ????????. + + ??? ?????????????? ? Netsukuku?:: ?????????? Wi-Fi ???????, ????? ????????? Netsukuku ????? ?? ??????????????? ??????? ??????????. ?????, ? ?? ???????? ??????? ??????? ??????? ???? ????? ^_- + + ??? ????? ???? ???????????? ?????? ? ?????:: «?????» Netsukuku ???????? ??? ?????? ?????? 10 ??????, ???? ???-?????? ????????, ????????????? ?????. + + ?????-?? ????????????? «Netsukuku ? ????????» ????????:: ??, ??? ?????????? ????? ????????. ????? ???????? ???: http://lab.dyne.org/Ntk_Internet_tunnels + + ????? ??????????? ??? ? ???? ?????? ? ???? Netsukuku?:: ???? ????? ??? ????? ?????? ? ?????????. ????? Netsukuku ?????-???? ??????????? ???????? ? ??????? ????????????? ????. + + ?????-?? ????? ??????????? ??????:: ????? ??? ??????. + + ??????-?? glibc ??????????????? ????? ?? ANDNAv?:: ? ANDNA ???? ??????? DNS ??? ??? ??? ????????? ??? ???? ???????? ???????????? glibc. [[BR]] (?????? "man andna": http://netsukuku.freaknet.org/doc/manuals/html/andna.html ) + + ?????? ?????????????????? Netsukuku? ???? ?? ???????????? ??? ?????- ??? ??????????:: ??? ??????????????? ??? «???????????????????»? [[BR]] ??????? ??????????????????: ??????? ?? ?? ???????? ?????. ???? ???? ??????? 100??/? ??????? ?? ????? ???????? ??????? ?? ??????? LAN. ?????????? ????? ?????? ????? ????? ????????. ???????? ??? ????? Netsukuku ???????? ????????? ??????? ?? ?????? ?????, ?? ?? ????? ???????? ??. [[BR]] ??????????? ??????????????????: ?? ???? ?? ????? ?????? ????????????: +{{{ PID USER PRI NI SIZE RSS SHARE %CPU %MEM TIME CPU COMMAND +18521 root 15 0 17708 1552 1164 0.0 0.3 0:00 0 netsukuku_d }}} + += ??????????? ????? = + + ?? ????? ???????????? ??????? ??????????? Netsukuku?:: ???? ?????? GNU/Linux, ???????? ??????????? ?? ????? ??. ???? ???? ??????? ???? ???????? ????? ??? ????? ;) + + ?????-?? Netsukuku ??? Windows?:: ???????? ?????: ???? ?? ????????, ?? ??. [[BR]] ?????: ??? ????? ??? ?????????? ??????, ???? ??????? ?????? ???? ??? ?????????? ??? ??????? ? ???? ?? Windows ?? ????????? ?????. + + ?????-?? Netsukuku ?????????? ?? PSP / Nintendo DS / Wi-Fi ?????????? / Linux + ??? ? ??? ??????:: ?????? ?? ???????? ??? Netsukuku ??? ???????????? ????? + ??????? (???????? Linksys). (http://netsukuku.freaknet.org/openwrt/) + + ??? ??????????? Wi-Fi ??? ????? ????? ????????:: ?????????? Wi-Fi ??????? + ?????. ?????????? ?? ? ????????? ?????????? (ad-hoc) ????????? «netsukuku» + ??? essid [[BR]] (man netsukuku_wifi: http://netsukuku.freaknet.org/doc/manuals/html/netsukuku_wifi.html ) + + ?????? ?? ?? ?????? ?? Java?:: ??? ????? ?????? + + ????? ??????? ??? ???!:: ??? ????: http://netsukuku.freaknet.org/ diff --git a/doc/howto/igs_howto b/doc/howto/igs_howto new file mode 100644 index 0000000..b544009 --- /dev/null +++ b/doc/howto/igs_howto @@ -0,0 +1,147 @@ +Internet connection sharing in Netsukuku HOWTO + +This document describes how to configure a Netsukuku node to share its +Internet connection and how to configure another node that will use the shared +connection. + +-- + + * Internet Gateway Search + + * Prerequisites + + * How to share your Internet connection + + * How to connect to the Internet using a shared connection + + * Some nice feature you want to know + +-- + +** +*** Internet Gateway Search +** + +If the nodes are in restricted mode (compatibility with the Internet), they +can share their Internet connection. This can be easily done, in fact, if a +node X, connected to the Internet, activates the masquerading, it is possible +for the other nodes to connect by setting as the default gateway their rnode +which lead to the node X. + +This can be automated by Netsukuku itself. +The node which is sharing its connection will tell to the Netsukuku daemon to +masquerade its connection and to set a specific flag in the QSPN packets. +The other nodes in restricted mode will automatically know their nearest +Netsukuku Internet gateway and set it in their default route. + +For more information read http://lab.dyne.org/Ntk_IGS . + + +** +*** Prerequisites +** + +The IGS code of Netsukuku depends on the IPIP tunnel code of the kernel, so if +you are using Linux be sure to have the `CONFIG_NET_IPIP' option set as a +module or built-in. + + +** +*** How to share your Internet connection +** + +First of all modify the /etc/netsukuku/netsukuku.conf file. + +Set `internet_connection' to 1. + +Set the `internet_gateway' option to the IP of the gateway you use to reach +the Internet and specify the network interface too, for example: +"internet_gateway = 192.168.1.1:eth0". This option is necessary only if you +don't have the default route set when you run NetsukukuD (i.e. you haven't +connected yet), otherwise, leave it commented. + +You have also to set your upload and download bandwidth in +`internet_upload_rate' and `internet_download_rate'. It is expressed in Kb/s, +so if you have a line which maximum can do: 640 Kb/s in dwload and 30 Kb/s in +upload, set them to 640 and 30. + +`internet_ping_hosts' is a list of Internet hosts which will be pinged to +verify if the connection is alive, you can use the default hosts. + +Finally, If you want to share your Internet connection among other Netsukuku +nodes, set `share_internet' to 1. + +Ah, and you can set `shape_internet' to 1 if you want to shape your outgoing +Internet traffic. + +---- netsukuku.conf snip ---- +internet_connection = 1 +internet_gateway = 192.168.1.1:eth0 +internet_download_rate = 640 +internet_upload_rate = 30 +internet_ping_hosts = google.com:cisco.com:sourceforge.net:dyne.org +share_internet = 1 +shape_internet = 1 +---- snip end ---- + +Now you are ready to launch the Netsukuku daemon. You have just to append the -I +option in the command line. For example: + +# ntkd -i wlan0 -r -I + + +** +*** How to connect to the Internet using a shared connection +** + +Just start the daemon in restricted mode, f.e: + +# ntkd -i wlan0 -r + +If you have an Internet connection and you don't want to share it, you have to +set the correct options in netsukuku.conf: + +---- netsukuku.conf snip ---- +internet_connection = 1 +internet_gateway = 192.168.1.1:eth0 +internet_download_rate = 640 +internet_upload_rate = 30 +internet_ping_hosts = google.com:cisco.com:sourceforge.net:dyne.org +share_internet = 0 +---- snip end ---- + +If you don't, your Internet connection default route will be overwritten with +that of another node. + + +** +*** Some nice feature you want to know +** + +NetsukukuD supports a routing method called "multi inet gateway", this means +that your node can connect to the Internet using, at the same time, multiple +node which share their connection. +If there are 5 nodes which share their 640Kb/s connections, you can have 5 +parallel downloads at 640Kb/s. Isn't it juicy? +There's more: if you decide to share your Internet connection, you will always +use the Internet connections shared by the other nodes, in this way you donate +your bandwidth but, at the same time, you receive donations from other users. + +The other nice feature is the traffic shaping of your Internet connection (it +doesn't matter if you're sharing it or not). +If you decide to enable the relative option (shape_internet=1), NetsukukuD +will execute the /etc/netsukuku/tc_shaper.sh script. +This script shapes your Internet connection, this means that the traffic +generated from your private LAN (192.168.x.x) and the low delay traffic (i.e. +DNS, ssh...) are prioritised. +The benefits are: +* Even if you share your Internet connection to other Netsukuku nodes, your + traffic will have the maximum priority, therefore you won't notices any + slowdown +* Even if you are downloading a big file, your lowdelay traffic will have the + priority, therefor your ssh connections won't slow a bit + +PS: for more information read: http://lab.dyne.org/Ntk_IGS + +That's all, +enjoy ^_^ diff --git a/doc/main_doc/netsukuku b/doc/main_doc/netsukuku new file mode 100644 index 0000000..d03a9e6 --- /dev/null +++ b/doc/main_doc/netsukuku @@ -0,0 +1,1616 @@ + + + Netsukuku + + - Close the world, txEn eht nepO - + + + +-- + + 0. Preface + + 1. The old wired + + 2. The Netsukuku wired + + 2.1 Gandhi + 2.2 No name, no identity + 2.3 So, WTF is it? + 2.4 Other implementations + 2.5 The born + + 3. Netukuku Protocol v7: the seventh son of Ipv7 + + 3.1 #define Npv7 + + 4. Npv7_II: Laser Broadcast + + 5. Npv7 Hybrid Theory: the final way + + 5.1 QSPN: Quantum Shortest Path Netsukuku + 5.1.1 QSPN screenshot + 5.1.2 Continual qspn starters + 5.1.3 The Qspn sickness: RequestForRoute + 5.1.4 Qspn round + + 5.2 Npv7_HT Hook & Unhook + 5.2.1 Qspn Hook & Unhook + + 5.3 The truly Gnode^n for n<=INFINITE + 5.3.1 Groupnode: one entity + 5.3.2 Gnode fusion + + 6. Broadcast: There can be only one! + + 6.1 Tracer pkt: one flood, one route + + 7. ANDNA: Abnormal Netsukuku Domain Name Anarchy + + 7.1 ANDNA Metalloid elements: registration recipe + 7.1.1 ANDNA hook + 7.1.2 Don't rob my hostname! + 7.1.3 Count again + 7.1.4 Registration step by step + 7.1.5 Endless rest and rebirth + 7.1.6 Hash_gnodes mutation + 7.1.7 Yaq: Yet another queue + + 7.8 Hostname resolution + 7.8.1 Distributed cache for hostname resolution + 7.8.2 noituloser emantsoh esreveR + + 7.9 dns wrapper + + 7.10 Scattered Name Service Disgregation + 7.10.1 Service, priority and weight number + 7.10.1.1 Service number + 7.10.1.2 Priority + 7.10.1.3 Weight + + 7.10.2 SNSD Registration + 7.10.2.1 Zero SNSD IP + 7.10.2.2 SNSD chain + + 8. Heavy Load: flood your ass! + + 9. Spoof the Wired: happy kiddies + + 10. /dev/Accessibility + + 11. Internet compatibility + + 11.1 Private IP classes in restricted mode + 11.1.1 Netsukuku private classes + 11.1.2 Notes on the restricted mode + + 11.2 Internet Gateway Search + 11.2.1 Multi-gateways + 11.2.1.1 Anti loop multi-inet_gw shield + 11.2.2 Load sharing + 11.2.3 The bad + 11.2.4 MASQUERADING + 11.2.5 Traffic shaping + 11.2.6 Sharing willingness + 11.2.7 See also + + 12. Implementation: let's code + + 13. What to do + + 14. The smoked ones who made Netsukuku + +-- + + 0. Preface + + This document and the relative source code are available on: + http://netsukuku.freaknet.org + + Future extensions to this document can be found and added here: + http://lab.dyne.org/Netsukuku + + + 1. The old wired + + The Internet is a hierarchic network managed by multinational companies and + organizations supported by governments. Each bit of Internet traffic passes + through proprietary backbones and routers. + The Internet Service Providers give the connectivity to all the users, who + are in the lowest rank of this hierarchic pyramid. There is no way to share + the ownership of Internet and people can join the Net only in accordance + with conditions and terms imposed by the Majors. + The Internet represents, today, the means to access information, knowledge + and communication. About 1 billion of people can connect to this great + proprietary network, but the remaining 5 billion of people, which don't have + enough economic resource, are still waiting the multinationals to supply a + service with in their reach. + + The Internet was born with the intent of warranting a secure and + unattackable communication between the various nodes of the network, but + now, paradoxally, when an ISP decide to stop to provide its service, entire + nations are immediately cut out of the Internet. + + Beside that, Internet is not anonymous: the ISP and the multinationals can + trace back and analyse the traffic of data going through their servers, + without any limits. + + The centralised and hierarchical structure of Internet creates, as a + consequence, other identical systems, based on it, i.e. the DNS. + The servers of the Domain Name System are managed by different ISPs, as well + and the domains are literally sold through a similar centralised system. + This kind of structures allows, in a very simple and efficient way, to + physically localise any computers, which are connected to the Internet, in a + very short time and without any particular efforts. + + In China, the whole net is constantly watched by several computers filtering + the Internet traffic: a Chinese will never be able to see or came to know + about a site containing some keywords, such as "democracy", censored by + the government. Beside that, he'll never be able to express his own ideas on + the net, e.g. about his government's policy, without risking till the death + penalty. + + Internet was born to satisfy the military needs of security for the + administration of the American defence, not to ensure freedom of + communication and information: in order to communicate each other the + Internet users are obliged to submit themselves to the control and to the + support of big multinationals, whose only aim is to expand their own + hegemony. + As long as all the efforts to bring more freedom, privacy and accessibility + in the Internet face aversions, fears, contrary interests of governments and + private companies, the very alternative solution to this problem is to let + the users migrate toward a distributed, decentralised and fully efficient + net, in which all the users interact at the same level, with no privilege + and no conditioning means, as authentic citizens of a free world wide + community. + + 2. The Netsukuku wired + + Netsukuku is a mesh network or a p2p net system that generates and sustains + itself autonomously. It is designed to handle an unlimited number of nodes + with minimal CPU and memory resources. Thanks to this feature it can be + easily used to build a worldwide distributed, anonymous and not controlled + network, separated from the Internet, without the support of any servers, + ISPs or authority controls. + This net is composed by computers linked physically each other, therefore + it isn't build upon any existing network. Netsukuku builds only the routes + which connects all the computers of the net. + In other words, Netsukuku replaces the level 3 of the model iso/osi with + another routing protocol. + + Being Netsukuku a distributed and decentralised net, it is possible to + implement real distributed systems on it, e.g. the Abnormal Netsukuku Domain + Name Anarchy (ANDNA) which will replace the actual hierarchic and + centralized system of DNS. + + 2.1 Gandhi + + Netsukuku is self-managed. It generates itself and can stand alone. + A node hooks to Netsukuku, the net automatically rewrites itself and all the + other nodes known which are the fastest and more efficient routes to + communicate with the new arrived. + The nodes don't have privileges or limitation, when compared with other + nodes, they are part of the net and give their contribution to its expansion + and efficiency. + The more they increase in number the more the net grows and becomes + efficient. + In Netsukuku there is no any differences among private and public nets and + talking about LAN became meaningless. + + It can be neither controlled nor destroyed because it is totally + decentralised and distributed. + The only way to control or demolish Netsukuku is knocking physically down + each single node which is part of it. + + 2.2 No name, no identity + + Inside Netsukuku everyone, in any place, at any moment, can hook immediately + to the net without coming trough any bureaucratic or legal compliance. + Moreover, every elements of the net is extremely dynamic and it's never the + same. The ip address which identify a computer is chosen randomly, + therefore it's impossible to associate it to a particular physical place, + and the routes themselves, been composed by a huge number of node, show the + tendence to have such a high complexity and density to make the trace of a + node a titanic task. + Since there isn't any contract with any organisations, the speed of the data + transfer is uniquely limited by the actual tecnology of the network cards. + + 2.3 So, WTF is it? + + Netsukuku is a mesh network or a p2p net composed by a net protocol for + dynamic routing called Npv7_HT. + Currently there is wide number of protocols and algorithms for the dynamic + routing, but they differ from the Npv7_HT, 'cause they are solely utilized + to create small and medium nets. The routers of Internet are also managed + by different protocols as the OSPF, the RIP, or the BGP, based on different + classical algorithms, able to find out the best path to reach a node in the + net. + These protocols require a very high waste of cpu and memory, this is the + reason why the Internet routers are computers specifically dedicated to + this purpose. It would be impossible to implement one these protocols in + order to create and maintain such a net as Netsukuku is, where every each + node is a router by itself, because the map of all the routes would require + a space, on each pc connected to the net, of about ten Gb. + + The Npv7 structures the entire net as a fractal and, in order to calculate + all the needed routes which are necessary to connect a node to all the other + nodes, it makes use of a particular algorithm called + Quantum Shortest Path Netsukuku (QSPN). + A fractal is a mathematical structure which can be compressed up to the + infinite, because inside it, every part itself is composed by the same + fractal. Thus there is a high compression of a structure which can be + infinitely expanded. This means that we need just a few Kb to keep the whole + Netsukuku map. + The map structure of Netsukuku can be also defined more precisely by + calling it a highly clusterised graph of nodes. + + On the other hand, the QSPN is a meta-algorithm in the sense that it + doesn't follow any predefined mathematical instructions but exploits the + chance and the chaos, which both don't need any heavy computation. + The QSPN has to be executed on a real (or simulated) network. The nodes have + to send the QSPN packets in order to "execute" it. + For this reason it is not always true that a determinated pkt will be sent + before another one. + + 2.4 Other implementations + + Netsukuku is not restricted solely to the creation of a net of computers, it + is a protocol which implements a mesh net, and alike every net protocol can + be used in all the situations in which it's necessary to connect different + nodes to each other. + + Let's take in exam the case of mobile phones. Also the mobile phone net is a + hierarchic and centralised net. Thousands of nodes hook to a same cell, + which will sort the traffic to the other cells and these, finally, will send + the data to the destination-nodes. Well, Netsukuku can be used also by + mobile phones, making pointless the existence of all the mobile + telecommunication companies. + + This can be applied to all the systems of communication which are used + nowadays. + + 2.5 The born + + The story of how the idea of Netsukuku was born is quite a long and + complicated story. + During a historical transmission of radio Cybernet at the Hackmeeting 2000, + the idea of Ipv7, nocoder, nocrypt came to life. They were absurd theoric + jokes about a IP protocols, intelligent compiler and crypto programs. + In the far 2003, a crew of crazy freaks continued to expand the concepts of + the Ipv7: a net in which all the packets were sent in broadcasted, compressed + with the zlib7, an algorithm which could compress all the existent Internet + into just 32 byte ( See http://idiki.dyne.org/wiki/Zlib7 ). + In Ipv7 the nodes were devoid of an ip address, it was an extremely + decentralised and totally free net. Those people were really happy after the + first draft of the RFC. + One year later, the project was lost in the infinite forks of time, but after + some time, the dust was shaked off the great Ipv7 book. + We started to delineate the idea of the implementation of a pure net. Month + by month the net became more and more refined, and the project became + something concrete. + <>. + <>. + <>. + Other three months passed by and after many mystical meditations, the + theoretical kernel was ready. The algorithms were defined. + We started to code. The curse of the protocols coders of Pharaon + Mortedelprimogenito invaded the Netsukuku code. The delirium is the right + reward to all those who dare to create protocols of pure nets. + In spite of all, exactly after one year and after fourteen thousand lines of + code, Netsukuku Beta version was ready and immediately presented at the + National Hackmeeting 2005 in Naples. The ANDNA was completed and + documented. + In October, the first public version of Netsukuku was released. + By now, in May 2006, the protocol has been greatly improved, and feature + after feature the daemon has reached forty thousand lines of code. + What's left sleeps in our minds and still have to become. + + +-- -- + + + The Netsukuku Protocol + Npv7 + + + + 3. Netsukukuku protocol v7 + + Netsukuku uses its own protocol, the Npv7 (Netsukuku protocol version 7), + which derives from three different previous versions. + The first one was quite similar to the current dynamic routing protocols: + the network was in fact divided into several groups of nodes, and every + single node had a distinct map of the entire network. + This system, absolutely not optimal, cannot be employed by Netsukuku 'cause + it needs continuous and subsequent updates of the early map, and each update + will bring an overload in the net. + Moreover, each time the map changes, it's necessary to recalculate all the + routes. + + Future extensions to the Npv7 can be found and added here: + http://lab.dyne.org/Netsukuku_RFC + + + 3.1 #define Npv7 + + The basic definitions used in Netsukuku are: + + src_node: Source node. It is the node who send a packet to the dst_node. + dst_node: Destination node. It is the node which receives the packet from + the src_node. + + r_node: Remote node, given a node X, it is any other node directly linked to + X. + g_node: Group node, a group of nodes, or a group of a group of nodes, and so + on. + b_node: Border node, a node connected to rnodes of different gnode. + h_node: Hooking node, a node hooking to Netsukuku. + + int_map: Internal map. The internal map of the node X contains the + informations about the gnode, which the node X belongs to. + ext_map: External map. The external map contains the informations about the + gnodes. + bmap / bnode_map: Border node map. It's the map which keeps the list of + border_nodes. + + quadro_group: A node or a groupnode located at any level, disassembled in + its essential parts. + + + 4. Npv7_II: Laser Broadcast + + Npv7_II is the second version of the Npv7. + Netsukuku is divided into many smaller groupnodes, which contains up to six + hundred nodes each and every node will solely have an external map. + All the groupnodes are grouped into multi-groupnodes, calle quadro + groupnodes. + In order to create a new route and connect to a given dst_node, the + src_node, using the external map, firstly tries to find out the best path to + reach the destination gnode, which the dst_node belongs to. + In this way the founded route is stored in the pkt broadcasted inside the + gnode, which the src_node belongs to. + The border_nodes of the gnode of the src_node receive the pkt and check if + the next gnode, to which the pkt has to be broadcasted, is the proper + neighbor gnode. If the condition is true, the border_nodes broadcast the pkt + to that same neighbor gnode. Otherwise the pkt is dropped. + And so on... + In this way the packet will reach the destination gnode. + When the dst_node receives the pkt it has just to set an inverse route, using + the route already stored in the pkt. + The Npv7_II and its previous version are not utilised, but they are just the + theoretical base of the Npv7_HT, the present version of the Netsukuku + protocol. + + 5. Npv7 Hybrid Theory: the final way + + From the union of the Npv7 and Npv7_II + Npv7 Hybrid Theory was born from the union of the Npv7 and Npv7_II. + This new version, exploits the advantages of both the internal map and the + laser broadcast and in this way it can overpass their limits. + In Npv7_HT the maximum number of nodes, present in a group node + (MAXGROUPNODE) is equal to 2^8, thus the groupnodes are relatively small. + The main change in Npv7_HT is about its own essence, in fact, it's based on a + algorithm appositely created for Netsukuku, which is called + Quantum Shortest Path Netsukuku, which allows to obtain at once all the + informations related to the complete situation of the gnode, all the best + routes, the reduction of the load of the gnode, an efficient + management of high dynamic gnodes and moreover it's not even necessary to + authenticate each node. + + 5.1 QSPN: Quantum Shortest Path Netsukuku + + + In Netsukuku, as well as in Nature, there is no any need of using + mathematical schemes. Does a stream calculate the best route to reach the + sea when it is still at the top of the mountain? + The stream simply flows and its flux will always find its ideal route. + + Netsukuku exploits the same chaotic principle. The result of its net + discovery algorithm can be different each time, even if the net hasn't + changed at all. This is because the discovery algorithm is "executed" by the + net itself. + + The use of a map, for a protocol of dynamic nets, creates a lot of + troubles, since it has to be continuously updated. The solution is simple: to + avoid totally the use of maps and make every broadcasted request a + tracer_pkt (See 6.1 Tracer pkt). + In this way every node, which will receive the pkt, will known the best + route to reach the src_node and all the nodes which are at the middle of the + route itself, it will record these informations inside its internal map, it + will add its own entry inside the tracer_pkt and will continue to broadcast + the pkt. + The left problem is: in order to obtain all the routes for all the nodes + it's necessary that all the nodes broadcast a tracer_pkt. Currently this + problem doesn't exist at all. In fact, with the tracer_pkt we can obtain + also the routes for the middle-nodes: that means we need a smaller number + of n packets, where n is the number of nodes. + + If every time a node receives a tracer_pkt, it sends it back to the + src_node, in this way we are sure that all the nodes can receive all the + possible routes. By using this system we obtain the same result achieved by + making every node send a tracer_pkt. + + Those who already know the physic of waves, can easily understand how the + qspn works. If we throw a pebble at a mirror of water, contained in a + basin, circular waves begin to propagate themself from the point of impact. + Each wave generates a child wave that continues to spread and to generate + child waves, as well, which generate children, and so on... + When a wave hits the borders of the basin, it is reflected and goes back to + the start point. The same happens if the wave meets an obstacle. + The qspn_starter is the pebble thrown inside the groupnode and each wave is a + tracer_pkt. Each child wave carries with itself the information of the + parent wave. When the wave arrives at an extreme_node (an obstacle or a dead + road), the qspn_open (the reflected wave) starts. + + The QSPN is based on this principle. To begin the tracing of the gnode, any + node sends a qspn_pkt called qspn_close and then this node becomes a + qspn_starter. + A qspn_pkt is a normal tracer_pkt, but its broadcasting method is lightly + different from the normal one. + Each node, which receives a qspn_close "closes" the link the pkt was + received and sends the pkt to all its other links. All the following + qspn_close pkts, which will arrive to the node, will be sent to all the + links, which have not been already closed. + When the qspn_close is totally diffused, some nodes will have all their + links closed. These nodes will be the extreme_nodes, which will send another + qspn_pkt (called qspn_open) in order to reply. The qspn_open contains all + the information already stored in the last qspn_close receveid. The + extreme_nodes will send the qspn_open to all their links, except the one + from which they have received the last qspn_close and to which they'll send + an empty qspn_open. + The qspn_open is a normal qspn_pkt, so it "opens" all the links in the same + way of the qpsn_close. The nodes, which will have all their links opened + will do absolutely nothing, in this way the end of the qspn_close is + warranted. + A qspn_open pkt has also a sub_id, a number that identifies, in the internal + map, the extreme node, which has generated the qspn_open pkt itself. The + sub_id, which remains unmodified in all the child qspn_open pkts, generated + from the first packet, is used to manage simultaneusly more qspn_pkts, since + each extreme_node generates one qspn_open and each of them has to be + independent from the others. + Indeed all the nodes, which have only one link, are surely e_nodes (extreme + nodes), in fact, when they receive a qspn_close they are already closed. + + A node, after sending a qspn_open, cannot reply anymore to any qspn_pkts that + it is going to receive and so it will send no more qspn_pkts. + The qspn_starter, the node which has triggered the qspn, acts as a normal + node but will not send qspn_opens, since it already sent the very first + qspn_close. Moreover, in order to update its own map, it will use all the + qspn_closes which are going to be received, excepting those which have been + already sent by the qspn_starter and those which already crossed more than + one hop. In this way, even if there is more than one qspn_starter, the + stability is maintained. + The in-depth description of the qspn_starter is in the following paragraph + 5.1.1. + + At the end, the total number of packets, which are sent in broadcast are equal + to the number of e_nodes, exactly 2 per cyclic net segment and 1 per single + non-cyclic segment. + + Every time a tracer_pkt goes trough the net, the information about the + crossed routes, which it carries, are stored by all the nodes which receive + the tracer_pkt. + A node will probably receive different routes to reach the same node, but it + will memorize only the best MAXROUTES (10) routes. + + The qspn_pkt id, which is stored in the pkt itself, is at the beginning set + as 1 and is incremented by 1 every time a new qspn_pkt is sent by any nodes. + Because of that, all the nodes know the current qspn_pkt id. Each time a + node desires to globally update the internal or external map, it sends a + qspn_close, but only if it hasn't received, in the previous QSPN_WAIT + seconds, another qspn_close yet. + If two nodes send, at the same time, a qspn_close, they will use the same + pkt id 'cause they don't know that another qspn_close, with the same id, was + already sent; in this case the way of working of the qspn doesn't change, in + fact, if the two qspn_pkt were sent from very distant places, the qspn_pkt + will spread more rapidly. + + When a node downloads the internal map from another node, it has to restore + the map before making use of it. To do that the node has to just to insert the + r_node, from which it has downloaded the map, to the beginning of all the + routes. If the node downloads the map from more than one rnode, it will have + to compare all the routes and choose the best one. The resulting map will + have all the best routes. + + The routes of the internal and external maps will be always copied in the + kernel routing table. In this way, it will not be necessary to create every + time different routes to reach different destination nodes. + + 5.1.1 QSPN screenshot + + (A)-----(B) + / | \ | \ + (E) | \ | (F) + \ | \ | / + (C)-----(D) + + Let's recap, then! All the extreme nodes shall send a tracer_pkt, but we + cannot know which are they. In the above picture it's easy to point them + out, because, indeed, they are drawn in a map, but in reality (inside the + Netsukuku code) a topologic map doesn't exist at all, so we cannot know + where a group of nodes begins and where it ends. + + This is what will happen, in a theoretical simulation, if the node E sends a + qspn_close: + E has sent the first qspn_close of a new qspn_round, so it is now a + qspn_starter. + Let's consider the case when the node A receives before C the qspn_close. + A closes the link E and sends the pkt to B, C and D. + C receives the pkt, closes the link E and sends it to A and D. + C receives the pkt from A and closes the link. + + B e D have received the pkt and close the respective links. + Let's consider the case when B sends the pkt before F. + D, immediately, sends it to F, but at the same time F sends it to D. + D receives the pkt from B, too. + D and F have all the links closed. + They send a qspn_open. + The qspn_open propagates itself in the opposite sense. + The qspn_open ends. + Each node has the routes to reach all the other nodes. + + In general, the basic topology of a map for the qspn is a rhomb with the + nodes at the vertexes, then, to have a more complex topology it's possible + to add other rhombs united each other from the vertexes. + + 5.1.2 Continual qspn starters + + If more qspn_starters, which launch a qspn, are contiguous among them, so + the way of working of the qspn is slightly different. + A group of qspn_starter nodes is contiguous when all its nodes are linked to + other nodes, which are qspn_starters, as well. In this scenary the + qspn_starters continue to mutually forward solely the qspn_closes sent by + the qspn_starters; in fact, they acts as normal nodes, but whenever they + receive pkts coming from outside of the contiguous group of qspn_starters, + they follow again their basic instructions. So, if A sends a qspn_close and + B has already sent a qspn_close, as well, when B receives the qspn_close of + A, B forwards it as a normal tracer_pkt with the BCAST_TRACER_STARTERS flag, + which will spread only among the other starters. + The reason why all this happens is that in the contiguous group of nodes, + every single node send a tracer_pkt, therefore, the qspn_pkts are + declassified as normal tracer_pkts. + + 5.1.3 The Qspn sickness: RequestForRoute + + /* To code, and maybe not really necessary */ + The only big hole in the qspn is the impossibility of having a vast number + of routes in order to reach the same node. With the qspn we are sure to + obtain just the best routes, but currently qspn can also generate uncountable + routes, all what we need is to let the broadcast working forever, without + interruption. Surely, it's unthinkable to wait for the eternity, that's why + we use the RequestForRoute! The RFR will be used all the time a node gets + connected to another node. + This is what happens: + the node sends to all its rnodes a RFR request for a specific route. This + request contains also the number of sub-requests (total_routes), which the + rnodes have to send to their rnodes. Practically, the node decides how many + routes wants to receive and calculates the number of sub-requests, which its + rnode will send: subrfr=(total_routes-r_node.links)/r_node.links. + After that it sends the rfr request. After having sent the route, used to + reach the dst_node specified inside the rfr_pkt, its rnodes sends, in the + same way, an rfr with the number of total_routes equal to the number of + subrfr. The rnodes of the rnodes will execute the same procedure and will + directly answer to the requester node. + + 5.1.4 Qspn round + + If a node finds a change around itself, e.g. one of its rnodes is dead, or + the rtt, between it and its rnode, has considerably changed, then it will + send a qspn. In order to avoid to continuously generate qspns the node must + firstly verify that QSPN_WAIT_ROUND (60 seconds) has expired. The + QSPN_WAIT_ROUND expires at the same moment for all the nodes belonging to + the same gnode. In order to make the nodes which hook to the gnode + synchronised to the nodes of the gnode itself, the rnodes give to the + hooking nodes the number of seconds passed since the previous qspn, in this + way all the nodes will know when the next deadline will be, i.e. it will be + after (current_time-prev_qspn_round)+QSPN_WAIT_ROUND seconds. + When a qspn_starter sends a new qspn_pkt, it increases by 1 the id of the + qspn_round. + If a node receiving a qspn_pkt notices that its id is greater than the + previous already recorded qspn_round id, it means that it has received a new + qspn_round. In this case it will update its local id and its qspn_time (the + variable, which indicates when the last qspn has been received or sent). + For updating the qspn_tim, it has to set it on + current_time - sum_of_the_rtt_contained_in_the_tracer_pkt. + + 5.2 Npv7_HT Hook & Unhook + + In order to make a node join Netsukuku, it has to be hooked to its rnodes. + Hook in Netsukuku doesn't refer to a physical hooking to the net, 'cause we + assume that a node has been already physically linked to other (r)_nodes. + The hooking of a node is the way the node communicate to its nearest rnodes, + if it doesn't receive any answer it will choose another rnode. Practically + during the hooking, the node gains the internal map, the external one, the + border node map and chooses a free ip. Now it is officially a member of the + net, therefore it sends a normal tracer_pkt and its rnodes will send, later, + a qspn. + + This is in details what really happens: + The node chooses an ip included in 10.0.0.1 <= x <= 10.0.0.1+256, + removes the loopback nets from the routing table and sets as default gateway + the choosen ip. + The step number one is to launch the first radar to see what its rnodes are. + If there are no rnodes, it creates a new gnode and the hooking ends here. + Then it asks to nearest rnode the list of all the available free nodes + (free_nodes) presents inside the gnode of the rnode. If the rnode rejects + the request (the gnode might be full), the node asks for the list of another + rnode. + It chooses an ip from all the received free_nodes and sets it on the network + interface, modifying the default gw. + The step number two is to ask the external map to the same rnode from which + it obtained the list of free nodes. Using this list it checks if it has to + create a new gnode. If it found it unnecessary it downloads the int_map from + every rnode. + Then, it joins all the received int_map into a unique map, in this way it + knows all the routes. At the end, it gets the bnode_map. + If everything has worked properly, it re-launch a second radar, sends a + simple tracer_pkt and updates its routing table. Fin. + + 5.2.1 Qspn Hook & Unhook + + After having been hooked to a gnode, what the node has to do is to send a + tracer_pkt. In this way all the nodes will already have an exact route to + reach it, so they will update some routes and they will be happy. Then for + what the secondary routes may concern the match will be played at the next + qspn round. + When a node dies or un-hooks itself from Netsukuku, doesn't warn anyone. + When its rnodes notice its death, they will send a new qspn round. + + 5.3 The truly Gnode^n for n<=INFINITE + + In the world there are 6*10^9 people and if we colonize other planets they + will increase to about (6*10^9)^n, where n is a random number > 0. + It is also true that they will extinguish themself with one of the usual + stupid war. Practically, Netsukuku has to manage a HUGE number of nodes and + for this reason, as you already are aware, the gnodes are used. + But they are not enough, 'cause, even using them, it would be still + necessary to have an external and internal map of 300Mb. How can the problem + be solved then? + The gnodes are divided in further groups, which doesn't contain normal nodes + but, on the contrary, whole gnodes. The contained gnodes are considered as + single nodes... Continuing recursively with groups of groups, Netsukuku can + contain about an infinite number of nodes with a small effort. + The way of working of all the Netsukuku system remains unchanged. + In order to implement the fractal gnodes we use more than one extern map, + which will contain information about these groups of groups. A "group of + group" is still called "groupnode". + Every map of groupnodes belong to a specific level, thus the basic + groupnode, which includes the single nodes, is in level 0. The map of + the first groupnodes of groupnodes of nodes is located in level 1 and the map + of the groupnodes of groupnodes of groupnoes is in the second level, and so + on. + + A node, in order to reach any other node it must only have its internal map, + which is the map of level 0 and all the maps of all the upper levels where + it belongs to. + With simple calculations, it's easy to know that to use all the IPs of the + ipv4, the total number of levels is 3 (considering a group composed by + MAXGROUPNODE of members). In the ipv6, instead, there are a huge number of + IPs, therefore the number of levels if 16. A simple estimation tells us + that, in the ipv4, all the maps needs 144K of memory, while in the ipv6 + 1996K are required. + + As usual, the QSPN is utilised to find all the routes, which connects the + groupnodes. The QSPN will be restricted and started in each level, in this + way, for example, it will find all the routes which links the gnodes + belonging to the second level. + The use of the levels isn't so complicated, just think about the way of + working of the internal map, then apply it recursively to the external maps. + Just consider every groupnode a single node. + In order to use a route to reach a gnode, we store in the routing table + range of ips (i.e. from ip x to ip y), instead of a single ip. In this way, + the total number of routes necessary to reach all the nodes of Netsukuku is + about is about MAXGROUPNODE*(levels+1). Let's take in exam the case of the + ipv4 which has 3 levels. First of all, a node must have all the routes to + reach every node of its groupnode at level 0, thus we have MAXGROUPNODE + routes, then we have to add all the routes to reach the groupnodes of its + upper level, so we add other MAXGROUPNODE routes. Continuing we arrive at + the last level and we finally have MAXGROUPNODE*(3+1) routes. In the end we + have 1024 routes for the ipv4 and 4352 for the ipv6. All of them are kept in + the routing table of the kernel. + + 5.3.1 Groupnode: one entity + + The real QSPN of groupnodes changes a bit. + The difference between a groupnode and a single node is subtle: the node is + a single entity, which maintains its links directly by itself, the + groupnode, instead, is a node composed by more nodes and its links are + managed by other nodes, which are the border nodes. + In order to transform the gnode in a single entity the bnodes of the + gnode have to communicate each other. When a bnode receives a qspn_close + from another gnode, it closes its links, then it will communicate to the + other bnode of the same gnode when all its links to the external gnodes are + closed. The other bnodes, of that gnode, will do the same. In this way, the + qspn_open will be sent only when _all_ the bnodes have all their external + links closed. + The situation changes again when we consider gnode of high level, because + the bnode aren't anymore a single node but a complete gnode. The procedure + remains the same: the bnode-gnode is formed by all its internal bnodes. + How is possible for the bnode to communicate each other? + Obviously they talk passively: when a bnode closes all its external links, + having received a qspn_close, it sets in the tracer_pkt, which is going to be + forwarded, the BNODE_CLOSED flag, in this way all the other bnodes, noticing + that flag, will increment their counter of closed bnodes. When the number of + closed bnodes is equal to the that of the total bnodes, which are in the same + gnode, then the bnodes will send the qspn_open. + One last trick: when a bnode receives a qspn_close sent from a bnode of its + same gnode, then, it considers itself a QSPN_STARTER and forwards the + tracer_pkt without adding its entry, that's because the gnode has to appear + as a single node. Moreover, the bnodes close and open only the external + links, which connect them to the bnodes of the bording gnodes. + All this strategy is also valid for the qspn_open. + + 5.3.2 Gnode fusion + + When a node creates a new group_node, it will chose it completely randomly, + using a random ip. If two gnode, originally isolated, unfortunately have the + same groupnode id, (and also the same range of IPs), one of them must + change, that means to change the IPs of all the nodes of the gnode. + + The solution is described in the NTK_RFC 0001: + http://lab.dyne.org/Ntk_gnodes_contiguity + + 6. Broadcast: There can be only one! + + The broadcasted packet, generally, are not sent to being forwarded forever + in Netsukuku ;). Each node keeps a cache with MAXGROUPNODE members, which is + stored in the internal map. Each member is associated to a node of the + gnode and it contains the pkt_id of the last pkt broadcasted from that node + itself. + When a broadcast pkt is received by a node, first of all, it is analysed: + if the pkt_id is less or equal to that memorised in the cache, it will be + dropped, because it is surely an old pkt. + It's useless to say that the pkt_id of the broadcast pkt being sent are + incremented by one each time. If the pkt passes the test, the node executes + the action requested by it and forwards it to all its rnode, excluding the + one from which it has received the pkt. + The number of hops the broadcast pkt has to cross can also be choosen with + the ttl (time to live) of the pkt. + + 6.1 Tracer pkt: one flood, one route + + The tracer_pkt is just the way to find the best route using the broadcast. + If the broadcasted pkt uses the "tracer_pkt" flag, then each crossed node + will append in the pkt its ip. In this way the entire route crossed by the + pkt is memorised in the pkt itself. The first pkt, which will arrive at + destination, will be surely the pkt which has passed through the best route, + therefore the dst_node will set the memorised route and it connects to the + src_node. + The first tracer_pkt has also another subtle benefit, in fact, the + tracer_pkt carries the route to reach all the nodes which are part of the + memorised route. That is because, if the pkt has really gone through the + best route it has also crossed _all_ the best routes for the middle hops. + The conclusion is that a tracer_pkt can memorise the best route to reach the + src_node, and thus all the routes to reach all the middle nodes, which have + been crossed. + The border_node, in order to append their ip in a tracer_pkt, set the + "b_node" flag and adds the id of the bording gnode, but only if that gnode + belongs to a level higher than the one where the tracer_pkt is spreading. + + In order to optimise the utilised space in a tracer_pkt, the IPs of the + nodes are stored in the IP2MAP format, which is equivalent to the IDs of the + nodes in the gnode of level 0. With this format only a u_char (one byte) is + required, instead of 20. + + + 7. ANDNA: Abnormal Netsukuku Domain Name Anarchy + + ANDNA is the distributed, non hierarchical and decentralised system of + hostname management in Netsukuku. It substitutes the DNS. + The ANDNA database is scattered inside all the Netsukuku and the worst of + cases every node will have to use about 355 Kb of memory. + + ANDNA works basically in the following way: + in order to resolve a hostname we just have to calculate its hash. + The hash is nothing more than a number and we consider this number as an ip + and the node related to that ip is called andna_hash_node. + Practically the hash_node will keep a small database, which associates all + the hostnames related to it with the ip of the node, which has registered + the same hostnames. + + + Node X + ip: 123.123.123.123 + hash( hostname: "andna.acus" ) == 11.22.33.44 + || + || + Node Y + ip: 11.22.33.44 + { [ Andna database of the node Y ] } + {hash_11.22.33.44 ---> 123.123.123.123} + + + The revocation requests don't exist, the hostname is automagically deleted + when it isn't updated. + + 7.1 ANDNA Metalloid elements: registration recipe + + It is very probable that the hash_node doesn't exist at all in the net, + 'cause it can be one ip among the available 2^32 ips, and even if it is up, + it can also die soon and exist from the net. The adopted solution to this + ugly problem is to let the hostnames be kept by whole gnodes, in this way + the working of the ANDNA and a minum of hostnames backup is warranted. + The gnodes related to the hash of the hostname is the hash_gnode. Inside the + hash_gnode there is the hash_node too. + + Since even the hash_gnodes cannot exist, a approximation strategy is + utilised: the nearest gnode to the hash_gnode is the rounded_hash_gnode and + it is consider as a normal hash_gnode. For example, if the hash_gnode is the + 210, the nearest gnode to it will be the 211 or the 209. Generally, when we + are referring to the gnode, which has accepted a registration, there is no + difference between the two kind of gnodes, they are always called + hash_gnode. + + There are also gnodes, which backup the hash_gnode when it dies. A + backup_gnode is always a rounded_gnode, but the number of its nodes, which + backup the data is proportional to the total number of its nodes (seeds): + if(seeds > 8) { backup_nodes = (seeds * 32) / MAXGROUPNODE ); } + else { backup_nodes = seeds; } + The maximum number of backup_gnodes per hostname is about + MAX_ANDNA_BACKUP_GNODES (2). + + 7.1.1 ANDNA hook + + When a node hooks to Netsukuku becoming automatically part of a ash_gnode, + it will also wonder about hooking to ANDNA through the andna_hook. + With the andna_hook it will get from its rnodes all the caches and + databases, which are already inside the nodes of that gnode. + Obviously it is first necesarry the hooking of the node to Netsukuku. + + 7.1.2 Don't rob my hostname! + + Before making a request to ANDNA, a node generates a couple of RSA keys, + i.e. a public one (pub_key) and a private (priv_key). The size of the + pub_key will be limitated due to reasons of space. + The request of a ostname made to ANDNA will be signed with the private key + and in the same request the public key will be attached. + In this way, the node will be able to certify the true identity of its + future requests. + + 7.1.3 Count again + + The maximum number of hostnames, which can be registered is 256, in order to + prevent the massive registration of hostnames, formed by common keyword, by + spammers. + The problem in ANDNA is to count. The system is completely distributed, + therefore is cannot know how many hostnames a node has registered. However a + there is a solution: a new element will be added, the andna_counter_node. + A counter_node is a node with an ip equal to the hash of the public key of + the node, which registers its hostnames, in this way there is always a + counter_node for each register_node. + The counter_node keeps the number of hostnames registered by the + register_node related to it. + When a hash_gnode receives a registration request, it contacts the relative + counter_node, which reply by telling how many hostnames have been registered + by the register_node. If the register_node has not exceeded its limit, the + counter_node will increments its counter and the hash_gnode finally register + the hostname. + A counter_node is activated by the check request the hash_gnode sends. The + register_node has to keep the counter_node active following the same rules + of the hibernation (see the chapter below). Practically, if the counter_node + receives no more chech requests, it will deactivate itself, and all the + registered hostnames become invalid and cannot be updated anymore. + The same hack of the hash_gnode is used for the counter_node: there will be + a whole gnode of counter_nodes, which is called, indeed, counter_gnode. + + + 7.1.4 Registration step by step + + Let's see the hostname registration step by step: + The node x, which wants to register its hostname, finds the nearest gnode to + the hash_gnode, contacts a random node belonging to that gnode (say the node + y) and sends it the request. + The request includes a public key of its key pair. which is valid for all + the future requests. The pkt is also signed with its private key. + The node y verifies to be effectively the nearest gnode to the hash_gnode, + on the contrary it rejects the request. The signature validity is also + checked. The node y contacts the counter_gnode and sends to it the ip, the + hostname to be registered and a copy of the registration request itself. + The counter_gnode checks the data and gives its ok. + The node y, after the affermative reply, accepts the registration request + and adds the entry in its database, storing the date of registration. + Finally it forwards in broadcast, inside the its gnode, the request. + The other nodes of the hash_gnode, which receive the forwarded request, will + check its validity and store the entry in their db. + At this point the node x sends the request to the backup_gnodes with the + same procedure. + + 7.1.5 Endless rest and rebirth + + The hash_gnode keeps the hostname in an hibernated state for about 3 days + since the moment of their registration or update. + The expiration time is very long to stabilise the domains. In this way, even + if someone attacks a node to steal its domain, it will have to wait 3 days + to fully have it. + When the expiration time runs out, all the expired hostnames are deleted and + substituted with the other in queue. + A node has to send an update request for each of its hostnames, each time it + changes ip and before the hibernation time expires, in this way it's + hostname won't be deleted. + The packet of the update request has an id, which is equal to the number of + updates already sent. The pkt is also signed with the private key of the + node to warrant the true identity of the request. + The pkt is sent to any node of the hash_gnode, which will send a copy of the + request to the counter_gnode, in order to verify if it is still active and + that the entry related to the hostname being updated exists. On the + contrary, the update request is rejected. + If all it's ok, the node of the hash_gnode broadcasts the update request + inside its gnode. + The register_node has to send the update request to the backup_gnodes too. + If the update request is sent too early it will be considered invalid and + will be ignored. + + 7.1.6 Hash_gnodes mutation + + If a generical rounded_gnode is overpassed by a new gnode, which is nearer + to the hash_gnode, it will exchange its rule with that of the second one, + and so the old rounded_gnode is transformed into the new one. + This transition takes place passively: when the register_node will update + its hostname, will directly contact the new rounded_gnode and since the + hostname stored inside the old rounded_gnode is not up to date, they'll be + dropped. + In the while, when the hostname has not been updated, all the nodes trying + to resolve it, will find the new rounded_gnode as the gnode nearest to the + hash_gnode and so they'll send the requests to the new gnode. + Since the new rounded_gnode doesn't have the database yet, it will ask to + the old hash_gnode to let it get its andna_cache related to the hostname to + resolve. Once it receives the cache, it will answer the node and in the + while it will broadcast, inside its gnode, the just obtained andna_cache. + In this way, the registration of that hostname is automatically transfered + into the new gnode. + In order to avoid a node to take the hostname away from the legitimate owner + before the starting of the transfer, all the nodes of the new hash_gnode, + will double check a registration request. In this way, they will come to + know if that hostname already exists. In case of positive response, they + will start the transfer of the andna_cache and they'll add the node asking + for the hname registration in queue. + + + 7.1.7 Yaq: Yet another queue + + Every node is free to choose any hostname, even if the hostname has been + already chosen by another node. + The node sends a request to the gnode which will keep the hostname, the + request is accepted and it is added in the queue, which can have a maximum + of MAX_ANDNA_QUEUE (5) elements. + The node is associated to the registered hostname and the date of the request + is memorized by the hash_node. + When the hostname on top of the queue expires, it will be automatically + substituted by the second hostname, and so on. + + A node which wants to resolve the hostname can also request the list of the + nodes stored in the andna_queue. In this way, if the first node is + unreacheble, it will try to contact the other ones. + + 7.8 Hostname resolution + + In order to resolve a hostname the X node has to simply find the hash_gnode + related to the hostname itself and randomly send to any node of that gnode + the resolution request. + + 7.8.1 Distributed cache for hostname resolution + + In order to optimise the resolution of a hostname, a simple strategy is + used: a node, each time it resolves a hostname, stores the result in a + cache. For each next resolution of the same hostname, the node has already + the result in its cache. Since in the resolution packet is written the last + time when the hostname has been registered or updated, an entry in the cache + expires exactly when that hostname is not valid anymore in ANDNA and has to + be updated. + The resolved_hnames cache is readable by any node. + A node X, exploiting this feature, can ask to any bnode Y randomly choosen + insied its same gnode to resolve for itself the given hostname. + The bnode Y, will search in its resoved cache the hostname and on negative + result the bnode will resolve it in the standard way, sending the result to + the node X. + These tricks avoid the overload of the hash_gnodes, which keep very famous + hostnames. + + 7.8.2 noituloser emantsoh esreveR + + If a node wants to know all the related hostnames associated to an ip, it + will directly contact the node which possides that ip. + + 7.9 dns wrapper + + The work of a DNS requests wrapper will be to send to the ANDNA daemon the + hostnames to resolve and to return the IPs associated to them. + Thanks to the wrapper it will be possible to use the ANDNA without modifying + any preexistent programs: it will be enough to use its own computer as a dns + server. + + See the ANDNS RFC: http://lab.dyne.org/Ntk_andna_and_dns + the andna manual: http://netsukuku.freaknet.org/doc/manuals/html/andna.html + + 7.10 Scattered Name Service Disgregation + + -- + The updated "SNSD" can be found here: + http://lab.dyne.org/Ntk_SNSD + -- + + The Scattered Name Service Disgregation is the ANDNA equivalent of the + SRV Record of the Internet Domain Name System, which is defined here: + http://www.ietf.org/rfc/rfc2782.txt + For a brief explanation you can read: + http://en.wikipedia.org/wiki/SRV_record + + SNSD isn't the same of the "SRV Record", in fact, it has its own unique + features. + + With the SNSD it is possible to associate IPs and hostnames to another + hostname. + Each assigned record has a service number, in this way the IPs and hostnames + which have the same service number are grouped in an array. + In the resolution request the client will specify the service number too, + therefore it will get the record of the specified service number which is + associated to the hostname. Example: + + The node X has registered the hostname "angelica". + The default IP of "angelica" is 1.2.3.4. + X associates the "depausceve" hostname to the `http' service number (80) of + "angelica". + X associates the "11.22.33.44" IP to the `ftp' service number (21) of + "angelica". + + When the node Y resolves normally "angelica", it gets 1.2.3.4, but when + its web browser tries to resolve it, it asks for the record associated to + the `http' service, therefore the resolution will return "depausceve". + The browser will resolve "depausceve" and will finally contact the server. + When the ftp client of Y will try to resolve "angelica", it will get the + "11.22.33.44" IP. + + The node associated to a SNSD record is called "SNSD node". In this example + "depausceve" and 11.22.33.44 are SNSD nodes. + + The node which registers the records and keeps the registration of the main + hostname is always called "register node", but it can also be named "Zero SNSD + node", in fact, it corresponds to the most general SNSD record: the service + number 0. + + Note that with the SNSD, the NTK_RFC 0004 will be completely deprecated. + + 7.10.1 Service, priority and weight number + + 7.10.1.1 Service number + + The service number specifies the scope of a SNSD record. The IP associated to + the service number `x' will be returned only to a resolution request which has + the same service number. + + A service number is the port number of a specific service. The port of the + service can be retrieved from /etc/services. + + The service number 0 corresponds to a normal ANDNA record. The relative IP + will be returned to a general resolution request. + + 7.10.1.2 Priority + + The SNSD record has also a priority number. This number specifies the priority + of the record inside its service array. + The client will contact first the SNSD nodes which have the higher priority, + and only if they are unreachable, it will try to contact the other nodes + which have a lower priority. + + 7.10.1.3 Weight + + The weight number, associated to each SNSD record, is used when there are + more than one records which have the same priority number. + In this case, this is how the client chooses which record using to contact + the servers: + + The client asks ANDNA the resolution request and it gets, for example, 8 + different records. + The first record which will be used by the client is chosen in a pseudo-random + manner: each record has a probability to be picked, which is proportional to its + weight number, therefore the records with the heavier weight are more likely to + be picked. + Note that if the records have the same priority, then the choice is completely + random. + + It is also possible to use a weight equal to zero to disable a record. + + The weight number has to be less than 128. + + 7.10.2 SNSD Registration + + The registration method of a SNSD record is similar to that described in the + NTK_RFC 0004. + + It is possible to associate up to 16 records to a single hostname. + The maximum number of total records which can be registered is 256. + + The registration of the SNSD records is performed by the same register_node. + The hash_node which receives the registration won't contact the counter_node, + because the hostname is already registered and it doesn't need to verify + anything about it. It has only to check the validity of the signature. + + The register node can also choose to use an optional SNSD feature to be sure + that a SNSD hostname is always associated to its trusted machine. In this + case, the register_node needs the ANDNA pubkey of the SNSD node to send a + periodical challenge to the node. + If the node fails to reply, the register_node will send to ANDNA a delete + request for the relative SNSD record. + + The registration of SNSD records of hostnames which are only queued in the + andna_queue is discarded. + + Practically, the steps necessary to register a SNSD record are: + * Modify the /etc/netsukuku/snsd_nodes file. + {{{ + register_node# cd /etc/netsukuku/ + register_node# cat snsd_nodes + # + # SNSD nodes file + # + # The format is: + # hostname:snsd_hostname:service:priority:weight[:pub_key_file] + # or + # hostname:snsd_ip:service:priority:weight[:pub_key_file] + # + # The `pub_key_file' parameter is optional. If you specify it, NetsukukuD will + # check periodically `snsd_hostname' and it will verify if it is always the + # same machine. If it isn't, the relative snsd will be deleted. + # + + depausceve:pippo:http:1 + depausceve:1.2.3.4:21:0 + + angelica:frenzu:ssh:1:/etc/netsukuku/snsd/frenzu.pubk + + register_node# + register_node# scp frenzu:/usr/share/andna_lcl_keyring snsd/frenzu.pubk + }}} + * Send a SIGHUP to the NetsukukuD of the register node: + {{{ + register_node# killall -HUP ntkd + # or, alternatively + register_node# rc.ntk reload + }}} + + 7.10.2.1 Zero SNSD IP + + The main IP associated to a normal hostname has these default values: + {{{ + IP = register_node IP # This value can't be changed + service = 0 + priority = 16 + weight = 1 + }}} + + It is possible to associate other SNSD records in the service 0, but it isn't + allowed to change the main IP. The main IP can only be the IP of the + register_node. + Although it isn't possible to set a different association for the main IP, it + can be disabled by setting its weight number to 0. + + The string used to change the priority and weight value of the main IP is: + {{{ + hostname:hostname:0:priority:weight + + # For example: + register_node# echo depausceve:depausceve:0:23:12 >> /etc/netsukuku/snsd_nodes + }}} + + + 7.10.2.2 SNSD chain + + Since it is possible to assign different aliases and backup IPs to the zero + record, there is the possibility to create a SNSD chain. + For example: + + {{{ + depausceve registers: depausceve:80 --> pippo + pippo registers: pippo:0 --> frenzu + frenzu registers: frenzu:0 --> angelica + }}} + + However the SNSD chains are ignored, only the first resolution is considered + valid. Since in the zero service there's always the main IP, the resolution is + always performed. + In this case ("depausceve:80 --> pippo:0") the resolution will return the main + IP of "pippo:0". + + The reply to a resolution request of service zero, returns always IPs and not + hostnames. + + 8. Heavy Load: flood your ass! + + The routes set by Netsukuku are created with the nexthop support, which + allows a node to reach another node using more than one route simultaneusly + (multipath), warranting a balanced sorting of the pkts traffic. + The anti-flood shield is a consequence of this multipath routes system, in + fact, also when a node is bombed by a continuous and consistent flux of + data, it receives that flux subdivided into different routes and links, + therefore it is always be able to communicate with other nodes. + + 9. Spoof the Wired: happy kiddies + + If a node hooks Netsukuku spoofing an ip, it will obtain nothing simply + because no nodes will know how to reach it, as the exact route to reach the + true node is already known. + Moreover, the rnodes will not allow a hooking an ip which was already + present inside the maps. + + 10. /dev/accessibility + + The best medium to make the nodes linked each other is, obviously, the wifi, + but any kind of links, which connects two nodes can be used for the same + purpose. + The mobile phones are a great device, where Netsukuku can run. + Some of the newest models use Linux as kernel. + + 11. Internet compatibility + + Netsukuku cannot instantaneusly spread and it's impossibile to imagine to + move from the Internet to Netsukuku immediately. + Currently, during its early phase of diffusion, we need to make it compatible + with the old Internet and the only way is to temporarily limitate the + growing of Netsukuku. + + A node which uses Netsukuku cannot enter inside the Internet because when + ntkd is launched, it can take any random ip and there's an high probability + of a collision with an IP address of the Internet. For example it can take + the IP 195.169.149.142, but that, in the Internet, is the IP of + 195.169.149.142. + + In order to keep the compatibility with the Internet, Netsukuku has to be + restricted to a subclass of ip, so that it doesn't interfere with the + normal default classes of the Internet. + We use the private A class of ip for the ipv4 and the Site-Local class for + the ipv6. + + The passage from the restricted Netsukuku to the complete one is easy: + at the same moment the user decides to abandon the Internet, he will + restart NetsukukuD without any options of restriction. + + Obviously all the other private classes are not influenced, to let the user + create a LAN with just one gw/node Netsukuku. + + 11.1 Private IP classes in restricted mode + + -- + The updated "Restricted IP classes" can be found here: + http://lab.dyne.org/Ntk_restricted_ip_classes + -- + + The user can decide to use, in restricted mode, a different private IP + class from the default one ( 10.x.x.x ). This is useful if the 10.x.x.x class + cannot be used, for example in Russia, it is very popular to provide Internet + access through big LANs which use the 10.x.x.x class. + + The other available classes are: + + 172.16.0.0 - 172.31.255.255 = 16*2^16 = 1048576 IPs + 192.168.0.0 - 192.168.255.255 = 2^16 = 65536 IPs + + The 192.168.x.x class cannot be used as an alternate restricted mode IP class + because it is the default Netsukuku private class, thus the only alternative + to 10.x.x.x is the "172.16.0.0 - 172.31.255.255" IP class. + However it is adviced to always use the default class. + + 11.1.1 Netsukuku private classes + + It necessary to provide at least one private IP class inside Netsukuku to + allow the creation of private LANs which are connected to Netsukuku with just + one node. + + The default Netsukuku private class is 192.168.x.x. + The random IPs choosen by the nodes will be never one of that class. + The default private class is valid both in normal and restricted mode. + + Only in normal mode the "172.16.0.0 - 172.31.255.255" class becomes private. + This class is assigned to very large private networks. + + The 10.x.x.x class IS NOT private since it is too big and it would be just a + waste of IP addresses to use it as a private class. + Note also that for each Netsukuku node you can have a private network, + therefore with just 16 Netsukuku nodes you can form a private network of + 16777216 nodes, which is equivalent to a 10.x.x.x class. + + 11.1.2 Notes on the restricted mode + + A node which runs in restricted mode cannot be compatible with normal mode + nodes, for this reason a restricted node will drop any packets coming from a + normal node. + + While in restricted mode the "172.16.0.0 - 172.31.255.255" class IS NOT + private. + + In restricted mode, when two different networks which use different + private classes (say 10.x.x.x and 192.168.x.x) are linked, nothing happens + and they will not rehook, this is necessary because it's assumed that the + specified private class is the only choice the user can utilize. + This leds to some problems, consider this scenario: + + 10.0.0.0 <-> 172.16.0.0 + + In this case the rehook isn't launched, so it is possible that there will be + a lot of collision. + + + 11.2 Internet Gateway Search + + -- + The updated "Internet Gateway Search" can be found here: + http://lab.dyne.org/Ntk_IGS + -- + + If the nodes are in restricted mode (compatibility with the Internet), they + should share their Internet connection. This can be easily done, in fact, if + a node X, connected to the Internet, activates the masquerading, it is + possible for the other nodes to connect by setting as the default gateway + their rnode which lead to the node X. + + This can be automated by Netsukuku itself and it requires small changes in the + code: it is just necessary that the nodes connected to the Internet set a flag + in the qspn_pkt, in this way the other nodes will know the routes to reach the + Internet. + + 11.2.1 Multi-gateways + + The situation becomes a little complex when there is more than one node which + shares its internet connection. Let's consider this scenario: + + A(gw) B(gw) + \ / + \___ ___/ + \/ + Ntk nodes (10.x.x.x) + + A and B are nodes which shares their internet connection, we call them + gateways. Let's call X the node which wants to connect to an Internet host. + In this case, the nodes near A, might find useful to use A itself to + reach the Internet, the same happens for the nodes near B. + Instead, the nodes in the middle don't know what is the best choice and they + might continuosly change their gw. This means that a tcp connection + (to an inet host), which was established trough A, when is then routed trough + B dies because A and B have different public IPs on the Internet. + + The node X has to create an IPIP tunnel to the gateway it wants to use, and + set as default gw the tunnel. In this way, the node X is sure to always use + the same gateway while the routing of the packets between it and the gw is + made transparently by the other Netsukuku nodes. + + 11.2.1.1 Anti loop multi-inet_gw shield + + An inet-gw is a normal node like all the other, therefore it can use the + Internet connections of the other inet-gws in conjunction with its own one. + + Consider the previous scenario, A and B are two inet-gw. + A sets in his internet default route the adsl modem and B. + B does the same, but sets A as the second default route. + + What would happen if the default route, written in the routing cache of A, is + B and, at the same time, the default route set in the routing cache of B is A? + The packets would jump endlessy in a infinite loop loosing themself forever. + + That's why we need the "anti loop multi-inet_gw shield". + It's working way is simple: each inet-gw has a netfilter rule which marks + all the packets coming from the outside and directed to the Internet. These + packets are then routed directly to the Internet without being sent, again, to + an inet-gw. In the example: + A wants to send a packet to the Internet and its looks in its routing cache. + It decide to forward the packet to B. B receives the packet, recognizes it is + an extern packet directed to the Internet and shoots it on its modem. + + 11.2.2 Load sharing + + Let's consider the previous scenario. + + The node X can also decide to use both A and B to reach the Internet, using + at the same time their connections! Even the gw A can use at the same time + its own line and the connection of the gw B. + + The procedure to implement this is what follows: + + * X creates a tunnel to A and another one to B + + * X adds in the routing table the default route using A and B as multipath + gateways. The gateway for the connections is chosen randomly. + + * X adds a rule in the routing table to route all the packets of established + connections trough the same gateway used to create the same connection. + The rule is linked to some netfilter rules which track and mark each + connection. The method is described in details here: + https://lists.netfilter.org/pipermail/netfilter/2006-March/065005.html + + 11.2.3 The bad + + The implementation of the Load sharing is very Linux specific, so it will be + very difficult to port it to other kernels, therefore this feature will be + available only to nodes which run Linux (ehi, one more reason to use Linux ;). + + 11.2.4 MASQUERADING + + Each node sharing the Internet connection (inet-gw) has to masquerade its + interfaces, so iptables must be used. + In order to keep the daemon portable, NetsukukuD will launch the script found + at /etc/netsukuku/masquerade.sh, which in Linux will be a simple script that + executes "iptables -A POSTROUTING -t nat -j MASQUERADE". + When NetsukukuD is closed the added firewall rules are flushed with + "/etc/netsukuku/masquerade.sh close" + + 11.2.5 Traffic shaping + + The inet-gw can also shape its internet connection in order to prioritize its + local outgoing traffic (the traffic coming from its 192.168.x.x LAN). + In this way, even if it shares its Internet connection, it won't notice any + difference 'cause it will have the first priority. Moreover with the traffic + shaper, the inet-gw can also prioritize some protocol, i.e. SSH. + + The traffic shaper will activated at the start of NetsukukuD. The daemon will + run the /etc/netsukuku/tc_shaper.sh script, which in Linux utilizes the + iproute2 userspace utility. + When the daemon is closed the traffic shaping will be disabled with + "/etc/netsukuku/tc_shaper.sh close". + + 11.2.6 Sharing willingness + + If your ISP isn't very kind, it might decide to ban you because your sharing + your Internet connection. + It's a pity, but it is for your ISP, not for you, that's because probably + someone is also sharing its Inet connection and you can use it too. + + What if you want to be completely sure that you'll have a backup connection? + An idea would be to share your Inet connection only when you're sure that you + can reach someone which is doing the same. In this way you won't share it + when you are still alone in your area and you can't contact other Netsukuku + nodes. This is a good compromise: until another node doesn't guarantees you a + backup connection, you won't share your. + + This can be done automatically by activating the `share_on_backup' option in + netsukuku.conf. NetsukukuD will start to share your Internet connection _only_ + when it will be in contact with another node which is sharing, or it is willingly + to share, its own connection. + + 11.2.7 See also + + For more information on the necessity of using ipip tunnels in an adhoc + network used to share internet connections, you can read this paper: + http://www.olsr.org/docs/XA-OLSR-paper-for-ICC04.pdf + + 12. Implementation: let's code + + The Netsukuku protocol isn't low-level, 'cause all it has to do is to set + the routes in the routing table of the kernel, therefore the daemon + NetsukukuD runs in userspace. + All the system is, in fact, maintained by the daemon, which runs on every + node. NetsukukuD communicates with the other nodes using the tcp and the udp + ad sets the routes in the kernel table. + + All the code is written in C and is well commented, thus it should be easy + to follow the flux of the program, but, before reading a .c is adviced to + peep the relative .h. + + The code in netsukuku.c launches the main threads. + Every port listened by NetsukukuD is owned by a daemon, which runs as a + single thread. The used ports are the 269-udp , 269-tcp, 271-udp, 277-udp, + 277-tcp. + All the packets received by the daemons are filtered by accept.c and + request.c, which avoid flood attacks using a small table. (accept.c is the + same code used to patch the user-level-denial-of-service OpenSSH + vulnerability). Secondly, the packets are given to pkts.c/pkt_exec(). + When all the daemons are up and running, hook.c/netsukuku_hook(), which is + the code used to hook at Netsukuku, is called. + + Hook.c will launch the first radar scan calling radar.c/radar_scan(). + The radar_scan thread will then launch a radar scan every MAX_RADAR_WAIT + seconds. When radar_update_map() notices a change in its rnodes, it sends a + new qspn_close with qspn.c/qspn_send(). + All the code relative to the qspn and the tracer_pkts is in qspn.c and + tracer.c + + The ANDNA code was subdivided in andna_cache.c. which contains all the + functions used to manage the caches and in andna.c, where the code for the + ANDNA packets is written. + + The sockets, sockaddr, connect, recv(), send, etc... are all in inet.c and + are mainly utilsed by pkts.c. + Pkts.c is the code which receives the requests with pkt_exec() and sends + them with send_rq(), a front end used to packet and send the majority of + requests. + Ipv6-gmp.c makes use of GMP (GNU multiple precision arithmetic library) in + order to manipulate the 16 bytes of the ipv6, considering them as a unique + big number. That is essential for some formulas, which modify directly the + ip to know many information, in fact, in Netsukuku, an ip is truly a number. + + The code for the kernel interface, used to set the routes in the routing + table and to configure a network interface is in: + krnl_route.c, if.c, ll_map.c, krnl_rule.c, libnetlink.c. + Route.c is the middleman between the code of the Netsukuku protocol and the + functions which communicates with the kernel. + + The cares of the internal map are up to map.c. All the other maps are based + on it and they are: + bmap.c for the border node map. gmap.c for the external maps. + + In order to compile the Netsukuku code, it isn't necessary to use autoconf, + automake and the others, but it's just needed the handy scons + (http://www.scons.org). + + The latest version of the code is always available on the hinezumilabs cvs: + + cvs -d :pserver:anoncvs@hinezumilabs.org:/home/cvsroot login + + or give a look on the online web cvs: + + http://cvs.netsukuku.org/ + + + 13. What to do + + - Testing on large Netsukuku and ANDNA. + - Complete what is in src/TODO. + - Code, code and code. + - Something else is always necessary. + + If you wants to get on board, just blow a whistle. + + + 14. The smoked ones who made Netsukuku + + Main theory and documentation: + + Andrea Lo Pumo aka AlpT + + + The NTK_RFC 0006 "Andna and dns": + + Federico Tomassini aka Efphe + + + The NTK_RFC 0001 "Gnode contiguity": + + Andrea Lo Pumo aka AlpT + Enzo Nicosia aka Katolaz + Andrea Milazzo aka Mancausoft + Emanuele Cammarata aka U scinziatu + + + Special thanks to: + + Valvoline the non-existent entity for the implementation advices, + Newmark, the hibernated guy who helped in some ANDNA problems, + Crash aka "il nipponico bionico" who takes BSD, breathes the 2.4Ghz and + worship the great Disagio, + Tomak aka "il magnanimo" who watches everything with his crypto eyes and + talks in the unrandomish slang, + Asbesto aka "l'iniziatore" who lives to destroy the old to build the new, + Nirvana who exists everywhere to bring peace in your data, + Ram aka "il maledetto poeta" who builds streams of null filled with the + infinite, + Quest who taught me to look in the Code, + Martin, the immortal coder and our beloved father, + Elibus, the eternal packet present in your lines, + Pallotron, the biatomic super AI used to build stream of consciousness, + Entropika, the Great Mother of Enea, + Uscinziatu, the attentive, + Shezzan, the holy bard of the two worlds, + Katolaz, + Gamel, + ... + the list goes on... + V C G R A N Q E M P N E T S U K + + and finally thanks to all the + + Freaknet Medialab + + whose we are all part, and the poetry + + Poetry Hacklab + + + About the translator of this document, you have to thank this great guy: + + Salahuddin, the hurd-nipponese old british one, which is always joyful. + +-- +This file is part of Netsukuku. +This text is free documentation; 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. For more information read the COPYING file. diff --git a/doc/main_doc/netsukuku.ita b/doc/main_doc/netsukuku.ita new file mode 100644 index 0000000..8e8b6f1 --- /dev/null +++ b/doc/main_doc/netsukuku.ita @@ -0,0 +1,1208 @@ + + + Netsukuku + + - Close the world, txEn eht nepO - + + + +-- + +0. Preface + + 1. The old wired + + 2. The Netsukuku wired + + 2.1 Gandhi + 2.2 No name, no identity + 2.3 So, WTF is it? + 2.4 Other implementations + 2.5 The born + +-- + + 3. Netukuku Protocol v7: the seventh son of Ipv7 + + 3.1 #define Npv7 + + 4. Npv7_II: Laser Broadcast + + 5. Npv7 Hybrid Theory: the final way + + 5.1 QSPN: Quantum Shortest Path Netsukuku + 5.1.1 QSPN screenshot + 5.1.2 Continual qspn starters + 5.1.3 The Qspn sickness: RequestForRoute + 5.1.4 Qspn round + + 5.2 Npv7_HT Hook & Unhook + 5.2.1 Qspn Hook & Unhook + + 5.3 The truly Gnode^n for n<=INFINITE + 5.3.1 Groupnode: one entity + 5.3.2 Gnode fusion + + 6. Broadcast: There can be only one! + + 6.1 Tracer pkt: one flood, one route + + 7. ANDNA: Abnormal Netsukuku Domain Name Anarchy + + 7.1 ANDNA Metalloid elements: registration recipe + 7.1.1 ANDNA hook + 7.1.2 Don't rob my hostname! + 7.1.3 Count again + 7.1.4 Registration step by step + 7.1.5 Endless rest and rebirth + 7.1.6 Hash_gnodes mutation + 7.1.7 Yaq: Yet another queue + + 7.8 Hostname resolution + 7.8.1 Distributed cache for hostname resolution + 7.8.2 noituloser emantsoh esreveR + + 7.9 dns wrapper + + 8. Heavy Load: flood your ass! + + 9. Spoof the Wired: happy kiddies + + 10. /dev/Accessibility + + 11. Internet compatibility + + 12. Implementation: let's code + + 13. What to do + + 14. The smoked ones who made Netsukuku + +-- + + 0. Preface + + Questo documento ed il codice sorgente relativo sono disponibili su: + http://netsukuku.freaknet.org + + Le future modifiche e aggiunte a questo documento possono essere trovate + e proposte qui: http://lab.dyne.org/Netsukuku + + Nota: questa NON e' l'ultima versione del documento. + L'ultima versione e' quella inglese: + http://netsukuku.freaknet.org/doc/netsukuku + Se vuoi tradurre le parti mancanti, non fare complimenti ;) + + + 1. The old wired + + Internet e' una rete gerarchica gestita da multinazionali ed enti che vengono + supportati dai governi. Ogni bit di traffico dati passa attraverso le loro + backbone e i loro router. + Gli Internet Service Provider offrono la connettivita' a tutti gli utenti, + che si trovano nelle parti piu' basse di questa scala gerarchica. + Non esiste alcun modo per condividere la proprieta' di Internet e quindi, + gli utenti, per connettersi alla grande Rete, sono costretti a sottostare + alle pesanti condizioni imposte dalle mega-corporation. + Internet e' oggi il mezzo di comunicazione per eccellenza che permette la + diffusione e la condivisione globale del sapere e dell'informazione. + Circa 1 miliardo di persone possono connettersi a questa grande rete + proprietaria, ma le restanti 5 miliardi, che non hanno sufficienti + risorse economiche, aspettano tutt'ora che le multinazionali offrano loro + un servizio realmente accessibile. + + Internet e' nato per garantire una comunicazione sicura e inattaccabile tra + i vari nodi della rete, ma adesso, paradossalmente, quando un ISP decide di + non fornire piu' il suo servizio intere sono immediatamente tagliate fuori + da Internet. + + Inoltre, Internet non e' una rete anonima: gli ISP e le multinazionali + possono intercettare e analizzare il traffico che passa dai loro server + senza alcun vincolo. + + La struttura gerarchica e centralizzata di Internet crea, di conseguenza, + altri sistemi identici che poggiano su di essa, come ad esempio il DNS. + I server del Domain Name System vengono anch'essi gestiti dai vari ISP, i + domini vengono letteralmente venduti e le maglie di un sistema centralizzato + rimangono immutate. + Questo tipo di struttura permette, in modo semplice ed efficace, di + localizzare fisicamente qualsiasi computer connesso ad Internet in + pochissimo tempo e senza alcuno sforzo. + + In Cina, l'intera rete e' sorvegliata continuamente da numerosi computer che + filtrano il traffico Internet: un cinese non potra' mai vedere e in ogni + caso venire a conoscenza di un sito che contiene delle parole chiavi + censurate dallo Stato. Se, poi, egli osasse esprimere sulla rete un pensiero + contrario alla dottrina politica del governo, rischierebbe perfino la pena + di morte. + + Internet e' nato per soddisfare le esigenze di sicurezza militare + dell'amministrazione della difesa degli USA, e nel corso del tempo, la + sua struttura originaria non e' cambiata, ne' mai potra' mutare. + La liberta' di comunicazione e d'informazione su Internet saranno sempre + negate: per comunicare saremo sempre costretti a chiedere il preventivo + beneplacito di autorita' statali e mendicare il supporto di gigantesche + multinazionali che, in tal modo, continueranno ad espandere il proprio + dominio. + Se, di fatto, i tentativi di rendere Internet il mezzo di comunicazione + libero per eccellenza, sono destinati a fallire, allora non ci resta altro + da fare che sostituirlo. + Come? + Con una rete distribuita, decentralizzata e pienamente efficiente, una rete + che non possa essere sottoposta a nessun tipo di governo. + + 2. The Netsukuku wired + + Netsukuku e' una mesh network o un sistema p2p che si crea e si mantiene + autonomamente. + Netsukuku e' stato progettato per gestire un numero illimitato di nodi con + un minimo uso di CPU e memoria. Questa sua caratteristica puo' essere + sfruttata per costruire, senza il supporto di alcun server o ISP, una rete + globale distribuita, anonima e non controllata, separata da Internet. + Questa rete e' formata da computer collegati fisicamente tra loro, quindi + non e' costruita su alcuna altra rete. Netsukuku si occupa solamente di + costruire le rotte che collegano tutti i computer della rete. + In altre parole, Netsukuku sostituisce il livello 3 del modello iso/osi con + un altro protocollo di routing. + + Poiche' Netsukuku, e' una rete distribuita, e non centralizzata, e' + possibile implementare su di essa effettivi sistemi distribuiti, come ad + esempio l'Abnormal Netsukuku Domain Name Anarchy (ANDNA), che sostituira' + l'attuale sistema gerarchico e centralizzato dei DNS. + + 2.1 Gandhi + + Netsukuku si crea e si gestisce da se'. + Un nodo si aggancia a Netsukuku, la rete si auto-riscrive e tutti gli altri + nodi conoscono quali sono le strade piu' veloci ed efficienti per comunicare + con il nuovo arrivato. + I nodi non hanno privilegi o limitazioni rispetto ad altri nodi, fanno parte + della rete e contribuiscono alla sua espansione ed efficienza. + Con l'aumentare del loro numero, la rete cresce e si perfeziona. + In Netsukuku non vi e' alcuna differenza tra reti private e pubbliche e non + ha piu' alcun significato parlare di LAN. + + Netsukuku non puo' essere controllato ne' distrutto poiche' e' totalmente + decentralizzato e distribuito. L'unico modo per sorvegliare o smantellare + Netsukuku e' abbattere fisicamente ogni singolo nodo che lo compone. + + 2.2 No name, no identity + + In Netsukuku chiunque, in qualunque luogo e in qualsiasi momento puo' + agganciarsi immediatamente alla rete senza dover passare attraverso + adempimenti burocratici o contrattuali. + Inoltre, ogni elemento della rete e' estremamente dinamico e non rimane mai + uguale a se' stesso. L'indirizzo IP che identifica un computer e' scelto + casualmente, quindi e' impossibile associarlo ad una localita' fisica + precisa, e le stesse rotte, essendo formate da un numero innumerevole di + nodi, tendono ad avere una complessita' e densita' talmente elevata da + rendere il tracciamento di un nodo un'impresa epica. + Poiche' non esiste alcun contratto con alcuna societa', la velocita' del + trasferimento dei dati e' limitata unicamente dalla tecnologia attuale delle + schede di rete. + + 2.3 So, WTF is it? + + Netsukuku e' una mesh network o rete p2p composta da un protocollo di rete + per il routing dinamico, chiamato Npv7_HT. + Attualmente esistono molti protocolli ed algoritmi per il routing dinamico, + ma a differenza dell'Npv7_HT, vengono utilizzati solo per creare piccole e + medie reti. Anche i router di Internet sono gestisti da vari protocoli come + l'OSPF, il RIP o il BGP, che usano diversi algoritmi classici per trovare + il percorso migliore per raggiungere un nodo in una rete. + Questi protocolli richiedono un consumo di cpu e memoria elevatissimo, ed e' + per questo motivo che i router di Internet sono dei computer appositamente + dedicati. Sarebbe impossibile adottare uno di questi protocolli per creare + e mantenere una rete come Netsukuku, dove ogni nodo e' a sua volta un + router, perche' la mappa di tutte le rotte richiederebbe uno spazio, su + ciascun pc connesso alla rete, di circa dieci Gb. + + L'Npv7 struttura l'intera rete come un frattale, ed usa un particolare + algoritmo chiamato Quantum Shortest Path Netsukuku (QSPN) per calcolare + tutte le rotte necessarie a collegare un nodo ad ogni altro nodo. + Un frattale e' una struttura matematica che si puo' comprimere all'infinito, + proprio perche', al suo interno, ogni sua parte e' formata dal frattale + stesso. Si ha quindi una compressione elevata di una struttura che + puo' espandersi infinitamente. Questo significa che bastano pochi Kb per + mantenere l'intera mappa di Netsukuku. + La struttura della mappa puo' anche essere definita in modo piu' preciso + come un grafo altamente clusterizzato. + + Il QSPN, invece, e' un meta-algoritmo perche' non esegue una sequenza di + istruzioni matematiche definite ma sfrutta il caso e il caos, che non + richiedono nessun calcolo pesante. + Il QSPN deve essere eseguito su una rete reale (o simulata). I nodi devono + mandare i pacchetti QSPN per "eseguire" l'algoritmo, e per questo motivo + non e' sempre vero che un determinato pacchetto sara' mandato prima di un + altro. + + 2.4 Other implementations + + Netsukuku non e' limitato alla creazione di una rete di soli computer, e' un + protocollo che implementa una rete pura, e cosi' come ogni protocollo di rete + puo' essere usato in tutte le situazioni in cui si ha bisogno di collegare + piu' nodi fra loro. + Prendiamo in esame il caso dei cellulari. Anche la rete dei cellulari e' una + rete gerarchica e centralizzata. Migliaia di nodi si appoggiano ad una + stessa cella, che poi smistera' il traffico alle altre celle, che, infine, + consegneranno i dati ai nodi destinatari. Bene, Netsukuku puo' essere + adottato anche dai cellulari, rendendo superflua l'esistenza degli attuali + gestori di telefonia mobile. + Questo ragionamento puo' essere applicato a tutti i sistemi di comunicazione + che esistono attualmente. + + 2.5 The born + + La storia di come si sia arrivati a Netsukuku e' lunga e travagliata. + Durante un storica trasmissione di radio Cybernet, all'Hackmeeting del + 2000, nasce l'idea dell'Ipv7, di nocoder e nocrypt: sono assurdi scherzi + teorici che trattano protocolli di rete, compilatori intelligenti e + programmi cryptografici. + Nel lontano 2003, un gruppo di pazzi deliranti continua a espandere i + concetti dell'Ipv7: una rete in cui tutti i pacchetti vengono mandati in + broadcast, compressi con le zlib7, un algoritmo che comprime l'attuale + Internet in 32 byte ( Vedi http://idiki.dyne.org/wiki/Zlib7 ). + In Ipv7 nessun nodo possiede un indirizzo IP e la rete e' estremamente + decentralizzata e libera. Quelle persone erano felici, e dopo la stesura del + primo RFC, un sorriso sereno e una luce angelica avvolgeva le loro figure. + + Un anno trascorre, il progetto si perde tra le infinite diramazioni del + tempo, ma dopo non molto la polvere viene scrollata dal grande libro + dell'Ipv7. Si comincia a delirare sull'implementazione di una rete pura. + I mesi passano. La rete viene definita sempre di piu', diventa quasi + tangibile... + <>. + <>. + <>. + Tre mesi dopo, a seguito di numerosissime peregrinazioni mistiche, il cuore + teorico e' pronto. Gli algoritmi sono definiti. + Si comincia a codare. La maledizione dei coder di protocolli di rete del + sacro faraone Mortedelprimogenito si riversa sul codice di Netsukuku. La + pazzia e il delirio sono la giusta ricompensa a tutti coloro i quali + osano addentrarsi nella creazione di protocolli di reti pure. + + Nonostante tutto, esattamente dopo un anno e 14 mila righe di codice, + Netsukuku e' pronto e diventa Beta. + Due mesi dopo la presentazione di Netsukuku all'Hackmeeting 2005, il + protocollo di ANDNA, cosi' come il suo codice, e' completamente + definito e documentato. + In Ottobre, viene stata rilasciata la prima versione publica di Netsukuku. + + Nel corso dei mesi il protocollo e il demone sono stati profondamente + migliorati e adesso, a Maggio del 2006, il codice ha raggiunto quaranta mila + righe. + + Il resto giace in potenza e deve ancora divenire. + + +-- + + The Netsukuku Protocol + Npv7 + + + + 3. Netsukukuku protocol v7 + + Netsukuku, usa l'Npv7 (Netsukuku protocol version 7), il suo protocollo, che + deriva da tre precedenti versioni. + La prima era strutturata in maniera simile agli attuali protocolli di rete + utilizzati per il routing dinamico: la rete era divisa in gruppi di nodi, + ogni nodo possedeva la mappa dell'intera rete. + Questo sistema, non ottimale, non e' adottato da Netsukuku poiche' prevede + l'aggiornamento continuo della mappa, ed ogni aggiornamento crea un overload + nella rete. Inoltre, ogni volta che la mappa cambia bisogna ricalcolarsi tutte + le rotte. + + 3.1 #define Npv7 + + Le definizioni basilari utilizzate per Netsukuku sono state e, tuttora sono: + + src_node: Il Source node e' il nodo che manda un pacchetto al dst_node. + dst_node: Destination node, il node the riceve il pacchetto mandato dal + src_node. + + r_node: Considerando un nodo X, un remote node (r_node) e' un qualsiasi + nodo direttamente collegato ad X. + g_node: Group node, un gruppo di nodi, o un gruppo di gruppi di nodi, e + cosi' via. + b_node: Border node, un nodo che ha rnodes di diversi gnode. + h_node: Hooking node, un nodo che si sta agganciando a netsukuku. + + int_map: Internal map, mappa interna. La mappa interna del nodo X e' la mappa + che contiene le informazioni sui nodi che appartengono al gnode a cui + appartiene X. + ext_map: External map, mappa esterna. La mappa che contiene le informzioni sui + gnode. + bmap / bnode_map: Border node map. E' la mappa che tiene la lista dei + border node. + + quadro_group: Un nodo, o un groupnode di qualsiasi livello, scomposto nelle + sue parti essenziali. + + + 4. Npv7_II: Laser Broadcast + + Npv7_II e' la seconda versione dell'Npv7. + Netsukuku viene suddiviso in tanti piccoli groupnode che contengono al + massimo 600 nodi. Ogni nodo di Netsukuku possiedera' solamente la mappa + esterna, quella dei groupnode. + Gli stessi groupnode vengono raggruppati in multi-groupnode, chiamati quadro + groupnode. + Per creare una rotta e raggiungere un determinato dst_node, il src_node, + usando la mappa esterna, calcola il percorso migliore per raggiungere il + gnode di destinazione a cui appartiene il dst_node. + La rotta cosi' trovata viene memorizzata nel pacchetto che viene spedito in + broadcast all'interno del gnode a cui appartiene l'src_node. + I border_node del gnode del src_node ricevono il pkt e controllano se il + prossimo gnode a cui deve essere mandato in broadcast il pkt e' proprio un + gnode con cui confinano. Se la condizione viene rispettata, i border_node + mandano in broadcast il pkt in quel gnode. In caso contrario il pkt viene + ignorato. + E cosi' via... + In questo modo il pacchetto arrivera' al gnode di destinazione. + Quando il dst_node riceve il pkt non deve far altro che settare una + rotta inversa usando la rotta memorizzata nel pkt. + L'Npv7_II e la sua versione precedente non vengono usate, ma sono alla base + dell'Npv7_HT, l'attuale versione del protocollo Netsukuku. + + 5. Npv7 Hybrid Theory: the final way + + Dall'unione di Npv7 e Npv7_II e' derivato Npv7 Hybrid Theory. + Questa nuova versione, sfrutta i vantaggi della mappa interna e del laser + broadcast e cosi' facendo supera le loro imperfezioni. + In Npv7_HT il numero massimo di nodi presenti in un group node (MAXGROUPNODE) + e' pari a 2^8, i groupnode sono quindi relativamente piccoli. + In Npv7_HT il cambiamento principale riguarda la sua stessa essenza, infatti, + si basa su un algoritmo creato appositamente per Netsukuku, chiamato + Quantum Shortest Path Netsukuku, che permette di ottenere in un solo colpo la + situazione completa del g_node, tutte le rotte migliori, la riduzione del + carico del g_node, un'efficace gestione dei gnode molto dinamici, + l'abolizione del bisogno di autenticazione tra i nodi. + + 5.1 QSPN: Quantum Shortest Path Netsukuku + + In Netsukuku, come in natura, non vi e' alcun bisogno di usare schemi + matematici. Un ruscello, per raggiungere il mare, calcolera' mai la strada + che dovra' percorrere quando ancora si trova in cima alla montagna? Il + ruscello scorrera' semplicemente, trasportato dal suo stesso flusso, + trovando cosi', prima o poi, la sua rotta ideale. + + Netsukuku sfrutta lo stesso principio caotico. Il risultato finale + restituito dall'algoritmo che esplora la rete puo' essere constituito da + risultati intermedi ogni volta differenti, poiche' quest'algoritmo viene + "eseguito" dalla rete stessa. + + L'uso di una mappa, in un protocollo di reti dinamiche, crea troppi + problemi, dovendo tenerla sempre aggiornata. La soluzione e' semplice: non + usare affatto una mappa e far diventare ogni richiesta mandata in broadcast + un tracer_pkt (Vedi 6.1 Tracer pkt). + In questo modo ogni nodo che ricevera' il pkt sapra' qual e' la rotta + migliore per raggiungere il src_node e tutti i nodi che stanno + in mezzo alla rotta, si memorizzera' queste info nella sua mappa interna, + aggiungera' la sua entry nel tracer_pkt e fara' continuare il broadcast del + pkt. + Rimane un grosso problema: per avere tutte le rotte per tutti i nodi + bisogna che tutti i nodi mandino in broadcast un tracer_pkt. In realta' questo + problema e' del tutto inconsistente. Infatti, con il tracer_pkt possiamo + ricavare anche le rotte per i nodi intermedi; questo vuol dire che abbiamo + bisogno di un numero < di n pacchetti, dove n e' il numero dei nodi. + Se ogni nodo rimanda indietro un tracer_pkt ogni volta che ne riceve uno, + siamo sicuri che tutti i nodi ricevono tutte le rotte possibili, cosi' + facendo ricaviamo lo stesso risultato raggiunto dal far mandare un + tracer_pkt da tutti i nodi. + + Per chi ha presente la fisica delle onde, il funzionamento del qspn puo' + essere facilmente compreso. Se lanciamo un sassolino in uno specchio d'acqua, + contenuto in una bacinella, dal punto di impatto incominciano a propagarsi + delle onde circolari. Ogni onda genera un'onda figlia che continua ad + espandersi ed a generare figli che generano figli e cosi' via... + Quando un'onda colpisce i bordi della bacinella, viene riflessa e ritorna + verso il punto d'origine; lo stesso avviene se l'onda incontra un ostacolo. + Il qspn_starter e' il sassolino gettato nel groupnode ed ogni onda e' un + tracerpkt. Ogni onda figlia porta con se' l'informazione dell'onda padre. + Quando l'onda arriva in un extreme_node (un ostacolo, un vicolo cieco) parte + il qspn_open (l'onda riflessa). + + Il QSPN si basa su questo principio. Per iniziare il tracciamento del g_node, + un qualsiasi nodo manda un qspn_pkt (chiamato qspn_close), questo nodo diventa + quindi un qspn_starter. + Un qspn_pkt e' un normale tracer_pkt, ma il modo in cui si diffonde in + broadcast e' leggermente diverso dal normale. + Ogni nodo che riceve il qspn_pkt "chiude" il link da cui ha ricevuto il pkt, + e spedisce il pkt a tutti gli altri link. Tutti i successivi pacchetti + qspn_close che arriveranno al nodo saranno mandati a tutti i link ancora non + chiusi. + Una volta che il qspn_close e' diffuso, alcuni nodi si troveranno con tutti i + link chiusi. Questi nodi saranno gli extreme_node che invieranno un altro + qspn_pkt di risposta (chiamato qspn_open), che contiene l'informazione gia' + accumulata, a tutti i link, tranne a quello da cui hanno ricevuto l'ultimo + qspn_close che li ha completamente chiusi a cui invieranno un qspn_open + vuoto. + Il qspn_open e' un normale qspn_pkt, quindi "apre" tutti i link alla stessa + maniera del qspn_close. I nodi che si troveranno con tutti i link aperti non + faranno assolutamente nulla, questo garantisce la fine del qspn_open. + Un qspn_open possiede anche un sub_id, un numero che indentifica nella mappa + interna l'extreme_node che l'ha creato. Il sub_id, che rimane inalterato per + tutti i pacchetti qspn_open figli generati dal primo pacchetto, viene usato + per gestire piu' qspn_pkt simultaneamente, poiche' ogni extreme_node genera + un qspn_open ed ognuno dovra' essere indipendente dall'altro. + Tutti i nodi con un solo link sono gli e_node per eccellenza, infatti non + appena ricevono un qspn_close sono gia' chiusi. + + Una volta che un nodo ha mandato un qspn_open non rispondera' piu' a + qualsiasi qspn_pkt che gli arrivera' (sempre relativamente alla sessione + corrente), quindi non mandera' piu' qspn_close ne' qspn_open. + Il qspn_starter, il nodo che ha innescato il qspn, si comporta come un + normale nodo pero' non puo' mandare qspn_open perche' ha gia' mandato il + primo qspn_close in assoluto, inoltre tutti i qspn_close che riceve li usa + per aggiornare la sua mappa, ma se hanno gia' percorso piu' hop o se sono + stati spediti da lui stesso, vengono ignorati; questo accorgimento garantisce + la stabilita' nel caso ci siano piu' qspn_starter simultanei. La descrizione + approfondita del qspn_starter e' nella sezione successiva 5.1.1. + + Alla fine i pacchetti di broadcast che vengono generati con qspn sono pari al + numero degli e_node, ovvero 2 per ogni segmento di rete ciclico e 1 per un + segmento singolo non ciclico. + + L'informazione per le rotte viene in ogni caso accumulata ogni volta che + qualche tracer_pkt gira per la rete. Un nodo ricevera' molto probabilmente + diverse rotte per raggiungere uno stesso nodo, ma memorizzera' solamente le + prime MAXROUTES (10) rotte migliori. + + Il pkt_id dei qspn_pkt inizia da 1 e viene incrementato di 1 ogni volta che + un nodo ne spedisce uno nuovo. + Quindi, tutti i nodi conoscono il pkt_id corrente. Ogni qualvolta un nodo + deve far aggiornare la mappa interna o esterna manda un qspn_close, solamente + se non ha ricevuto entro i precedenti QSPN_WAIT secondi un altro qspn_close. + Se due nodi mandano nello stesso momento un qspn_close, useranno lo stesso + pkt_id, perche' nessuno dei due sa che ne e' stato gia' spedito un altro; in + questo caso il funzionamento del qspn non cambia, anzi se i due qspn_pkt + sono partiti da due luogi molto distanti allora il qspn_pkt si diffondera' + molto rapidamente. + + Quando un nodo prende la mappa interna da un altro nodo, non deve + far altro che aggiungere l'r_node, da cui ha preso la mappa, all'inizio + di tutte le rotte. Se scarica la mappa da piu' r_node, dovra' confrontare + tutte le rotte e scegliere la piu' breve. La mappa risultante avra' tutte + le rotte migliori. + + Le rotte della mappa interna ed esterna verranno sempre ricopiate nella + tabella di routing del kernel. In questo modo non ci sara' alcun bisogno di + creare ogni volta la rotta necessaria per raggiungere il nodo di + destinazione. + + 5.1.1 QSPN screenshot + + (A)-----(B) + / | \ | \ + (E) | \ | (F) + \ | \ | / + (C)-----(D) + + Ricapitolando, tutti i nodi estremi dovrebbero inviare un tracer_pkt, ma non + si puo' sapere quali essi siano. In questo disegnino e' facile individuarli, + perche', appunto, la mappa e' disegnata, me nella realta' (nel codice di + Netsukuku) non esiste una mappa topologica, quindi non si puo' sapere dove + inizia un gruppo di nodi e dove finisce. + + Ecco cosa succede, in uno scenario immaginario, se il nodo E manda un + qspn_close: + E ha mandato il primo qspn_close del nuovo qspn_round, quindi e' diventato + un qspn_starter. + Consideriamo il caso in cui il nodo A riceve prima di C il qspn_close. + A chiude il link E, manda il pkt a B, C, e D. + C riceve il pkt, chiude il link E, lo manda ad A ed a D. + C riceve da A, chiude il link. + + B e D hanno ricevuto, e chiudono i rispettivi link. + Consideriamo il caso in cui il nodo B manda per primo il pkt ad F. + D lo manda ad F subito dopo, ma nello stesso momento F lo manda a D. + D ha ricevuto il pkt anche da B. + D ed F hanno tutti i link chiusi. + Mandano un qspn_open. + Tutto avviene nel senso opposto. + Finisce il qspn_open. + Tutti hanno le rotte per raggiungere tutti. + + In genere, la topologia base a cui si riconduce il qspn e' un rombo con i + nodi ai vertici, per renderla piu' complessa e' possibile aggiungere altri + rombi uniti tra di loro con i vertici. + Tutte le altre situazioni derivano piu' o meno da questa. + + 5.1.2 Continual qspn starters + + Se piu' qspn_starter che lanciano un qspn sono contigui fra loro allora + il funzionamento del qspn varia leggermente. Un gruppo di nodi qspn_starter + e' contiguo quando tutti i suoi nodi sono collegati a nodi che sono a + loro volta dei qspn_starter. In questo scenario i qspn_starter continuano a + inoltrare tra di loro solo i qspn_close mandati dai qspn_starter; si + comportano quindi come dei normali nodi, infatti non appena ricevono dei + pacchetti provenienti dall'esterno del gruppo contiguo di qspn_starters + ritornano a seguire le loro istruzioni originarie. Quindi se A manda un + qspn_close e B ha mandato pure un qspn_close, quando B riceve il qspn_close + di A lo inoltra come un normale tracer_pkt con la flag BCAST_TRACER_STARTERS + che si diffonde solo tra gli altri starter. + Il motivo di tutto questo deriva dal fatto che in quel gruppo contiguo di + nodi, ogni singolo nodi manda un tracer_pkt, quindi, i qspn_pkt vengono + declassati a normali tracer_pkt. + + 5.1.3 The Qspn sickness: RequestForRoute + + /* Da codare, e non realmente necessario */ + L'unico grande difetto di qspn e' l'impossibilita' di avere molte piu' rotte + per raggiungere uno stesso nodo. Con il qspn si e' sicuri di avere solamente + le rotte migliori, e basta. In realta' il qspn puo' anche generare infinite + rotte, basta che si lasci circolare il broadcast all'infinito (^_-). + Ovviamente e' impensabile aspettare un'intera eternita' o due, quindi si usa + il RequestForRoute! Il RFR verra' usato ogni volta che un nodo si connette + ad un altro. + Ecco cosa succede: + il nodo manda a tutti i suoi rnode una richiesta RFR per una determinata + rotta, questa richiesta contiene anche il numero di sub richieste + (total_routes) che gli rnode devono mandare ai loro rnode. In pratica il + nodo decide quante rotte ricevere e si calcola il numero di sub richieste + che dovranno mandare i suoi rnode: + subrfr = (total_routes - r_node.links) / r_node.links + Dopo invia il RFR. + I suoi rnode, dopo avergli mandato la rotta che loro usano per raggiungere il + dst_node specificato nel rfr_pkt, mandano allo stesso modo un RFR che pero' + ha total_routes pari a subrfr. Gli rnode degli rnode eseguiranno la stessa + procedura e risponderanno direttamente al nodo interessato. + + 5.1.4 Qspn round + + Se un nodo riscontra un cambiamento attorno a se', ad esempio un suo + rnode e' morto oppure l'rtt che lo distanzia dal suo rnode e' cambiato + considerevolmente, allora mandera' un QSPN. Per evitare che vengano creati + dei QSPN continuamente, il nodo deve prima verificare che il QSPN_WAIT_ROUND + (60 secondi) sia scaduto. Il QSPN_WAIT_ROUND scade nello stesso momento per + tutti i nodi appartenenti allo stesso gnode. Per far si' che i nodi che si + agganciano al gnode siano sincronizzati ai nodi del gnode stesso, gli viene + dato il numero di secondi che sono passati dal precedente QSPN, in questo + modo tutti i nodi sapranno quando si verifichera' la prossima scadenza, + ovvero avverra' dopo (current_time - prev_qspn_round) + QSPN_WAIT_ROUND + secondi. + Quando un qspn_starter manda un nuovo qspn_pkt, incrementa l'id del + qspn_round di 1. + Se il nodo che riceve un qspn_pkt, vede che il suo id e' maggiore del + qspn_round id precedente che ha memorizzato, allora vuol dire che ha ricevuto + un nuovo qspn_round; in questo caso aggiornera' il suo id locale e il suo + qspn_time (la variabile che indica quando e' stato ricevuto/mandato l'ultimo + qspn). + Per aggiornare il qspn_time, dovra' settarlo a + current_time - somma_degli_rtt_contenuti_nel_tracer_pkt. + + 5.2 Npv7_HT Hook & Unhook + + Un nodo, per entrare a far parte di Netsukuku, deve agganciarsi ai suoi + rnode. + L'hook in Netsukuku non si riferisce ad un aggancio alla rete "fisico", + poiche' si presuppone gia' che un nodo sia linkato ad altri (r)_node. + Quando un nodo si aggancia significa che comunica con un il suo rnode piu' + vicino, se non gli risponde ne sceglie un altro. In pratica durante l'hook, + il nodo si prende la mappa interna, quella esterna, la mappa dei border + node, e si sceglie un IP libero. A questo punto fa ufficialmente parte della + rete, quindi manda un normale tracer_pkt. I suoi rnode manderanno in seguito, + un qspn. + + Ecco cosa avviene piu' in dettaglio: + Il nodo si prende un IP compreso tra 10.0.0.1 <= x <= 10.0.0.1+256, + rimuove le reti di loopback dalla tabella locale di routing e setta come + default gateway l'IP scelto. + Il primo passo e' quello di lanciare il primo radar per vedere quali sono i + suoi r_nodes. Se non ci sono rnodes, crea un nuovo gnode e l'hook termina qui. + Poi chiede all'rnode piu' vicino la lista di nodi liberi (free_nodes) + presenti nel gnode dell'rnode. Se l'rnode non accetta la richiesta (il gnode + potrebbe essere pieno), il nodo chiede la lista ad un altro rnode. + Dai free_nodes ricevuti sceglie un IP e lo setta all'interfaccia di rete, + modificando il default gw. + A questo punto richiede la mappa esterna allo stesso rnode da cui ha preso la + list di nodi liberi. Usando la lista di free_nodes vede se deve creare un + nuovo gnode. Se non deve, prende l'int_map da ogni r_node. + Unisce tutte le int_map ricevute in un unica mappa, in questo modo ha gia' + tutte le rotte. Infine, si prende la bnode_map. + Se tutto e' andato a buon fine, rilancia un secondo radar, manda un semplice + tracer_pkt e aggiorna la sua tabella di routing. Fin. + + 5.2.1 Qspn Hook & Unhook + + Un nodo, dopo essersi agganciato al gnode, non deve far altro che mandare + un tracer_pkt. In questo modo tutti i nodi avranno gia' la rotta esatta + per raggiungerlo, aggiorneranno qualche rotta e saranno felici. Poi per + quanto riguarda le rotte secondarie ci pensera' il round successivo di QSPN. + Quando un nodo muore o si sgancia, non dice nulla a nessuno. I suoi rnode si + accorgeranno della sua morte e manderanno un nuovo qspn_round. + + 5.3 The truly Gnode^n for n<=INFINITE + + Nel mondo ci sono 6*10^9 di persone, se andremo a colonizzare + altri pianeti arriveremo a circa (6*10^9)^n, dove n e' un numero random > 0. + E' anche vero che ci estingueremo molto prima in una delle solite stupide + guerre. In sostanza netsukuku deve provvedere a un numero ENORME di nodi, + per questo, come gia' sai, si usano i gnode. + Ma questo non basta, perche' anche cosi' ci vorrebbero 300Mb circa per + tenere l'intera extern map! Come si fa quindi? + Si dividono i gnode in ulteriori gruppi, stavolta pero' questi gruppi non + contengono nodi normali ma degli interi gnode, che vengono considerati dei + nodi a tutti gli effetti... Procedendo recursivamente netsukuku puo' + contenere all'incirca INFINITI nodi. + Tutto rimane invariato. + Per implementare questi gnode frattali e' necessario usare piu' di una mappa + esterna che conterranno l'informazione su questi gruppi di gruppi. Questi + "gruppi di gruppi" li continuiamo a chiamare groupnode. + Ogni mappa di groupnode appartiene ad un determinato livello. Quindi il + groupnode normale, che racchiude singoli nodi si trova a livello 0, la mappa + del primo groupnode di gruppi di nodi si trova al primo livello, e la mappa + di groupnode di groupnode di groupnode e' al secondo, e cosi' via. + Un nodo per poter contattare qualsiasi altro nodo in qualsiasi parte del + globo deve avere solamente la sua mappa interna, che non e' nient'altro + che la mappa a livello 0 e poi le mappe di tutti i livelli superiori in + cui lui e' presente. Facendo qualche calcolo con l'ipv4, per usare tutti + gli IP, si devono usare solamente 3 livelli di mappe. Il che significa che + prima c'e' il normale groupnode, poi ci sono MAXGROUPNODE di groupnode, + e infine ci sono MAXGROUPNODE di questi ultimi. Nell'IPv6 invece, abbiamo + una quantita' abnorme di IP, percio' i livelli ammontano a 16. Facendo una + stima approssimativa, tutte le mappe esterne dei groups nell'IPv4 occupano + 144K di memoria e nell'IPv6 1996K. Questo significa che nessuno si deve + preoccupare di usare lo swap! + + Per trovare le rotte che connettono i vari gruppi verra' usato il QSPN, + avevi dubbi -_^ ? Il qspn verra' ristretto e lanciato per ogni livello, in + questo modo, ad esempio, trovera' tutte le rotte che legano i nodi + appartenenti al secondo livello... + Questo sistema dei livelli in relta' non e' complesso, basta tenere + presente il funzionamento della mappa interna in unione a quello della + mappa esterna ed applicare recursivamente ad ogni grouppo lo stesso concetto. + Basta considerare ogni grouppo un singolo nodo. + La rotta usata per raggiungere un groupnode, nella routing table, e' formata + da range di IP (da IP x ad IP y) invece di un singolo IP. + In questo modo, per poter raggiungere tutti i nodi presenti in netsukuku + bisogna tenere nella routing table MAXGROUPNODE*(levels+1) rotte. + Consideriamo il caso dell'IPv4 che ha 3 livelli. + Intanto un nodo deve avere tutte le rotte per raggiungere tutti + i nodi all'interno del suo groupnode, percio' gia' abbiamo MAXGROUPNODE + di rotte, poi dobbiamo aggiungere tutte le rotte per raggiungere gli + altri groupnode del suo livello superiore, percio' aggiungiamo altri + MAXGROUPNODE di rotte. Proseguendo arriviamo all'ultimo livello ed abbiamo + MAXGROUPNODE*(3+1). Con l'IPv4 abbiamo 1024 rotte, con l'IPv6 4352. + Tutte queste rotte risiederanno direttamente nel kernel. + + 5.3.1 Groupnode: one entity + + Per avere il qspn effettivo dei groupnode la storia cambia un po'. + La differenza tra un groupnode ed un nodo singolo risiede nel fatto che il + nodo e' un'unica entita' che gestisce i suoi link direttamente da se', il + groupnode, invece, e' un nodo composto da piu' nodi e i suoi link sono + gestisti da altri nodi che sono i border node. Per rendere il groupnode + un'unica entita' che si comporti esattamente come un nodo singolo basta che + tutti i bnode del groupnode comunichino tra loro. Quindi, quando un bnode + riceve un qspn_close da un altro groupnode, chiudera' il suo link e quando + avra' tutti i suoi link con gli altri gnode chiusi, lo comunichera' agli + altri bnode del suo groupnode. Lo stesso faranno gli altri. In questo modo + il qspn_open sara' mandato solamente quando tutti i bnode avranno tutti i + loro link esterni chiusi. + Quando parliamo di groupnode di alti livelli allora un bnode non e' piu' un + singolo nodo, ma e' a sua volta un gnode. Il procedimento resta invariato: + questo bnode-gnode e' rappresentato da tutti i suoi bnodes interni. + Ma come fanno i bnode a comunicare fra loro? + Ovviamente in modo passivo: quando un bnode chiude tutti i suoi link esterni + dopo aver ricevuto un qspn_close, setta nel tracer_pkt che sta per + forwardare la flag BNODE_CLOSED, in questo modo gli altri bnode, vedendo + questa flag, incrementeranno il loro contatore di bnodes chiusi. Quando i + numero di bnode chiusi e' pari a quello dei bnode presenti nel gnode, allora + verra' mandato il qspn_open. + Un ultimo accorgimento: quando un bnode riceve un qspn_close mandato da un + bnode del suo stesso gnode, allora, anche lui si considerera' un + QSPN_STARTER e forwardera' il pkt senza aggiungere la sua entry, questo + perche' il gnode deve essere come un unico nodo; inoltre, i bnode chiudono + ed aprono solo i link esterni, cioe' quelli che li collegano ai bnode dei + gnode confinanti. + Tutto questo discorso vale anche per il qspn_open. + + 5.3.2 Gnode fusion + + Quando un nodo crea un nuovo group_node, ne sceglie uno completamente random, + usando quindi un IP random. Se due gnode, dapprima isolati, per disgrazia + hanno lo stesso groupnode id (e quindi lo stesso intervallo di IP), uno + di loro due deve cambiare; questo significa cambiare l'IP di tutti i nodi + del gnode. + + La soluzione e' descritta nell'NTK_RFC 0001: + http://lab.dyne.org/Ntk_gnodes_contiguity + + 6. Broadcast: There can be only one! + + Quando vengono mandati dei pkt in broadcast si deve fare in modo che non + vaghino in eterno in Netsukuku. Ogni nodo mantiene una cache composta + da un numero di slot pari a MAXGROUPNODE. (La cache e' all'interno della + mappa interna). Ogni slot corrisponde ad un nodo del g_node. Questo slot + contiene il pkt_id dell'ultimo pkt broadcast mandato da quel nodo. + Quindi: + u_int brdcast; /*Pkt_id of the last brdcast_pkt sent by this node*/ + + Un nodo quando riceve un pkt broadcast lo analizza: + se vede che il pkt_id e' <= a quello memorizzato nella cache lo rigetta, + perche' e' sicuramente un pkt vecchio che non deve piu' diffondersi. + Ovviamente i pkt_id vengono incrementati ogni volta dal src_node. + Se il pkt supera questo check allora il nodo esegue l'azione che il pkt + richiede e forwarda il pkt a tutti i suoi r_node, escludendo quelli che gli + hanno spedito il pkt. Se si vuole che il broadcast sia delimitato entro + un'area di raggio prefissato, basta settare il ttl al numero di hop di questo + raggio. + + 6.1 Tracer pkt: one flood, one route + + Il tracer pkt non e' altro che il modo per trovare la rotta migliore + con il broadcast. Se il pkt che viene mandato in broadcast avra' la flag + "tracer_pkt" settata allora ogni nodo che attraversera', aggiungera' in coda + al pkt il suo IP. Quindi l'intera rotta che il pkt compie viene memorizzata + nel pacchetto stesso. Il primo pacchetto che arrivera' a destinazione sara' + sicuramente quello che avra' percorso la rotta migliore, percio' il dst_node + non fara' altro che settare la rotta memorizzata nel pacchetto ed avviare + la connessione. Il tracer_pkt introduce anche un altro subdolo vantaggio, + infatti, il tracer_pkt non solo trasporta la rotta migliore per il src_node, + ma anche quella per i nodi che fanno parte della rotta perche' se questo pkt + ha davvero percorso la rotta migliore significa che ha anche percorso _TUTTE_ + le rotte migliori per gli hop intermediari. + Concludendo, con un tracer pkt possiamo conoscere la rotta migliore per + raggiungere il src_node (il nodo che ha spedito il pkt), e conseguentemente + le rotte per raggiungere tutti i nodi intermediari. + I border_node quando aggiungono la loro entry in un tracer_pkt settano la + flag b_node ed aggiungono in coda l'id del gnode con cui confinano, ma + solamente se quel gnode appartiene al livello superiore a quello in cui il + tracer_pkt si sta propagando. + Con questo sistema tutti riceveranno tutte le rotte migliori per raggiungere + tutti i nodi del g_node e tutti i g_node confinanti. + + Per ottimizzare al massimo lo spazio utilizzato in un tracer_pkt, + gli IP vengono scritti nel formato IP2MAP, che corrisponde all'id dei nodi + nel gnode di livello zero. Con questo formato e' richiesto solamente un + u_char (1 byte invece di 20). + + 7. ANDNA: Abnormal Netsukuku Domain Name Anarchy + + ANDNA e' il sistema distribuito, non gerarchico e decentralizzato, di + gestione di hostname in Netsukuku. Sostituisce il DNS. + Il database dell'ANDNA e' sparso in tutto Netsukuku e nel peggiore dei casi + ogni nodo dovra' usare circa 355Kb di memoria. + + Il funzionamento base di ANDNA si articola nel seguente modo: + per risolvere un hostname basta calcolarsi il suo hash. + L'hash non e' nient'altro che un numero e questo numero noi lo consideriamo + come un IP. Il nodo che corrisponde a questo IP lo chiamiamo + andna_hash_node. In pratica l'hash_node manterra' un piccolo database che + associa gli hostname, che corrispondono a lui, con l'IP del nodo che ha + registrato quello stesso hostname. + + + Nodo X + IP: 123.123.123.123 + hash( hostname: "andna.acus" ) == 11.22.33.44 + || + || + Nodo Y + IP: 11.22.33.44 + { [ Database andna del nodo Y ] } + {hash_11.22.33.44 ---> 123.123.123.123} + + + Le richieste di revoca non esistono, l'hostname viene cancellato + automaticamente se non viene aggiornato. + + 7.1 ANDNA Metalloid elements: registration recipe + + In realta', non e' detto che l'hash_node esista nella rete, perche' puo' + essere un IP a caso tra i 2^32 IP disponibili, ed ammesso che esista puo' + sempre morire e uscire dalla rete. Quindi, per garantire la funzionalita' + effettiva di ANDNA, ed anche un minimo di backup, gli hostname non vengono + gestiti da singoli nodi, ma da interi gnode. Il gnode che corrisponde + all'hash e' l'hash_gnode, all'interno ci sara' anche l'hash_node. + + Poiche' gli hash_gnode possono anche non esistere al momento, viene adottata + una strategia di approsimazione: viene usato il gnode che piu' si avvicina + all'hash_gnode, che viene chiamato, rounded_hash_gnode, o in forma breve + rounded_gnode. Ad esempio, se l'hash gnode e' il 210, il piu' vicino a lui + sara' il 211 e il 209. + In generale, quando si considera solamente il gnode che ha accettato una + registrazione, non si fa differenza tra i due tipi e il gnode si chiama + sempre hash_gnode. + + Per consentire un pronto recupero degli hostname quando un intero hash_gnode + viene tagliato fuori da Netsukuku perdendo tutti i suoi link, o quando tutti + i nodi che lo compongono muoiono, si usano dei rounded_gnode di backup. + Un backup_gnode e' sempre un gnode rounded_gnode, ma mette a disposizione + solo alcuni dei suoi nodi per mantenere l'informazione dell'hostname + registrato. + Il numero dei nodi che fanno da backup in un backup_gnode e' proporzionale + al suo numero totale di nodi (seeds): + if(seeds > 8) { backup_nodes = (seeds * 32) / MAXGROUPNODE ); } + else { backup_nodes = seeds; } + Il numero di backup_gnodes utilizzati per ogni hash_gnode e' pari a + MAX_ANDNA_BACKUP_GNODES (2). + + 7.1.1 ANDNA hook + + Quando un nodo si aggancia a Netsukuku diventando parte di un hash_gnode, + dovra' anche preoccuparsi di agganciarsi ad ANDNA con l'andna_hook. + Con l'andna_hook si prendera' dai suoi rnode tutte le cache ed i database + che i nodi di quel gnode posseggono. Ovviamente e' prima necessario che il + nodo si agganci a Netsukuku. + + 7.1.2 Don't rob my hostname! + + Un nodo, prima di fare una richiesta ad ANDNA, genera una coppia di chiavi + RSA, una pubblica (pub_key) ed una privata (priv_key). La dimensione della + pub_key sara' limitata, per questioni di spazio. + La richiesta di un hostname fatta ad ANDNA verra' firmata con la chiave + privata e nella richiesta stessa sara' allegata la chiave pubblica. + In questo modo il nodo potra' far certificare l'originalita' delle sue future + richieste. + + 7.1.3 Count again + + Il numero massimo di hostnames che un nodo puo' registrare e' pari a 256, + per prevenire la registrazione massiccia di hostnames formati da parole + comuni da parte di spammer. + L'unico problema in andna sarebbe quello di contare. Il sistema e' + totalmente distribuito e, quindi, non si puo' tenere il conto di quanti + hostname ha registrato un nodo. Esiste pero' una soluzione: introdurre un + nuovo elemento, gli andna_counter_nodes. + Un counter_node e' un nodo che ha un IP uguale all'hash della public key + del nodo che registra gli hostname. Quindi esiste un counter_node per ogni + register_node. Il counter_node si occupa di memorizzare il numero di + hostname che ha registrato il register_node che gli corrisponde. Quindi, + quando un hash_gnode riceve una richiesta di registrazione, prima di tutto + contatta il relativo counter_node, che gli comunica quanti hostname sono + gia' stati registrati dal register_node: se il nodo non ha sforato il + proprio limite, allora il counter node incrementa il contatore e + l'hash_gnode registra effettivamente l'hostname. + L'attivazione di un counter_node avviene con la richiesta di controllo da + parte dell'hash_gnode e viene mantenuta dalle successive richieste. + Il meccanismo e' identico a quello dell'andna, e pertanto il register_node si + deve anche preoccupare di mantenere il suo counter_node attivo seguendo le + stesse regole dell'ibernazione (vedi sotto). + In pratica, se il counter_node non riceve piu' richieste di controllo da + parte degli hash_gnode, si disattiva, e tutti gli hostname registrati non + sono piu' validi (non si possono piu' aggiornare). + La stessa regola degli hash_gnode viene applicata anche al counter_node: non + esistera' piu' un singolo counter_node, ma un intero gnode di counter_node, + chiamato appunto counter_gnode. + + 7.1.4 Registration step by step + + Il nodo x, che vuole registrare il suo hostname, trova il gnode piu' vicino + all'hash_gnode (o l'hash_gnode stesso), contatta un nodo a caso (il nodo y) + di quel gnode e gli manda la richiesta. + La richiesta include una public key della sua coppia di chiavi RSA che + rimane valida per tutte le future richieste. Il pkt viene anche firmato con + la priv_key. + Il nodo y controlla di essere effettivamente nel gnode piu' vicino + all'hash_node, in caso contrario rigetta la richiesta. Viene controllata + anche la validita' della firma apposta nella richiesta. + Il nodo y contatta il counter_gnode e gli manda l'IP, l'hostname del + register_node e la copia della richiesta. + Il counter verifica i dati e controlla che la firma apposta sulla richiesta + sia valida, e da' l'ok. + Il nodo y, dopo l'ok, accetta la richiesta, crea l'entry nel suo db + annotando la data di registrazione, e manda in broadcast, all'interno del + gnode, la richiesta. + Gli altri nodi dell'hash_gnode che ricevono la richiesta controllano la sua + validita' e la memorizzano in un'entry del loro db. + A questo punto il nodo x deve solo preoccuparsi di mandare la richiesta ai + backup_gnode. Quando i nodi dei backup_gnode ricevono la richiesta, + controllano di essere nel range dei gnode piu' vicini, e riapplicano la + stessa procedura. + + 7.1.5 Endless rest and rebirth + + Gli hash_gnode mantengono gli hostname in uno stato di ibernazione per circa + 3 giorni dal momento della loro registrazione od aggiornamento. + Il tempo di decadimento e' volutamente molto alto per mantenere i domini + stabili. In questo modo, anche se qualcuno attacca un nodo per appropriarsi + del suo dominio, dovra' aspettare 3 giorni. + Quando il tempo di ibernazione si e' esaurito allora tutti gli hostname + scaduti vengono cancellati e vengono sostituiti dagli altri hostname in + coda. + Un nodo deve mandare una richiesta di aggiornamento dei suoi hostname ogni + qualvolta il suo IP cambia e in ogni caso prima dello scadere del tempo di + ibernazione, in questo modo il suo hostname non sara' cancellato. + Il pacchetto della richiesta di aggiornamento ha un id che indica il numero + di aggiornamenti gia' mandati. Il pacchetto viene anche firmato con la + chiave privata del nodo, per garantire l'autenticita' della richiesta. + Il pkt viene mandato ad un nodo qualsiasi dell'hash_gnode. Quest'ultimo nodo + contattera' il counter_node, mandando anche una copia della richiesta, per + aggiornare le sue entry e per verificare che sia ancora attivo e che l'entry + relativa all'hostname da aggiornare sia presente. In caso contrario, la + richiesta di aggiornamento viene rigettata. + Se tutto va bene, il nodo dell'hash_gnode manda in broadcast la richiesta + di aggiornamento all'interno del suo gnode. + Il register_node deve poi mandare la richiesta di aggiornamento anche ai + backup_gnode. + Se la richiesta di aggiornamento viene mandata troppo presto (nel primo + giorno) verra' considerata invalida e sara' ignorata. + + 7.1.6 Hash_gnodes mutation + + Se un generico rounded_gnode viene scavalcato da un nuovo gnode che e' piu' + vicino all'hash_gnode deve lasciargli il posto, quindi avviene un + trasferimento dal vecchio rounded_gnode al nuovo. + La transizione, pero', avviene in maniera semi-passiva: quando il + register_node fara' l'aggiornamento dell'hostname, si rivolgera' + direttamente al nuovo rounded_gnode. L'hostname presente nel vecchio + rounded_gnode, non essendo piu' aggiornato, decadera'. + Nel frattempo, quando ancora l'hostname non e' stato aggiornato, tutti i + nodi che vogliono risolverlo troveranno il nuovo rounded_gnode come gnode + piu' vicino all'hash_gnode, quindi manderanno le richieste al nuovo gnode. + Il nuovo rounded_gnode, non avendo ancora il db, chiedera' al vecchio + hash_gnode di dargli la sua andna_cache relativa all'hostname da risolvere. + Una volta ricevuta, rispondera' al nodo che ha chiesto la risoluzione + dell'hname e nel frattempo mandera' in broadcast, all'intero del suo gnode, + l'andna_cache appena ottenuta. In questo modo la registrazione di + quell'hostname viene automaticamente trasferita nel nuovo gnode. + Per evitare che un nodo sottragga l'hostname al leggittimo proprietario + prima che il trasferimento dell'andna_cache avvenga, tutti i nodi del nuovo + hash_gnode, per accettare una richiesta di registrazione, controllano se + quell'hostname esiste gia' in un hash_gnode vecchio: se questa condizione + e' verificata avvieranno il trasferimento dell'andna_cache ed aggiungeranno + il nodo che vuole registrare l'hostname nella coda. + + 7.1.7 Yaq: Yet another queue + + Ogni nodo ha la liberta' di scegliersi un qualsiasi nome host, ed anche se + l'hostname e' gia' stato preso da un altro nodo, puo' sempre decidere di + proseguire nella registrazione. Proseguendo, il nodo manda una richiesta al + gnode che conservera' l'hostname, la richiesta viene accettata, e + viene aggiunta in coda, dove massimo possono esserci MAX_ANDNA_QUEUE (5) + hostname. Nell'hash_gnode il nodo viene associato al nome host che ha + richiesto e viene memorizzata anche la data di richiesta. + Quando l'hostname, che sta' in cima alla coda, scade, verra' sostituito + automaticamente dal secondo, e cosi' via. + + Un nodo che vuole risolvere l'hostame, puo' anche richiedere la lista dei + nodi presenti nella andna_queue. In questo modo se il primo nodo non e' + raggiungibile, potra' provare a contattare gli altri. + + 7.8 Hostname resolution + + Per risolvere un hostname il nodo X deve semplicemente trovare l'hash_gnode + relativo all'hostname e mandare ad un nodo a caso di quel gnode la richiesta + di risoluzione. + + 7.8.1 Distributed cache for hostname resolution + + Per incrementare l'efficienza di risoluzione di hostname, si adotta una + piccola strategia: un nodo, ogni volta che risolve un hostname, memorizza + il risultato in una cache. Per ogni risoluzione successiva dello stesso + hostname, il nodo avra' gia' il risultato nella sua cache. + Poiche' nei pacchetti di risoluzione degli hostname e' indicato il tempo + dell'ultima volta in cui sono stati registrati o aggiornati, un'entry nella + cache scade esattamente quando l'hostname non e' piu' valido in ANDNA e deve + essere aggiornato. + La resolved_hnames cache e' accessibile a qualunque nodo. + Un nodo X, sfruttando questa proprieta', se non ha l'hostname da risolvere + nella sua cache, puo' decidere di chiedere ad un qualsiasi bnode Y scelto a + caso del suo stesso gnode di risolvere per lui l'hostname desiderato. + Il bnode Y, cerchera' nella sua resolved cache l'hostname e in caso di esito + negativo, risolvera' l'hostname in modo standard facendo mandare la risposta + al nodo X. + Questo sistema previene l'overload degli hash_gnode che mantengono hostname + molto famosi. + + 7.8.2 noituloser emantsoh esreveR + + Se un nodo vuole conoscere gli hostname associati a un IP, contatta + direttamente il nodo che ha quell'IP. + + 7.9 dns wrapper + + Un wrapper di richieste DNS si occupera' di mandare al demone di ANDNA gli + hostname da risolvere e di restituire gli IP associati ad essi. + Grazie al wrapper sara' possibile usare ANDNA senza modificare alcun + programma esistente: bastera' usare come server DNS il proprio computer. + + 8. Heavy Load: flood your ass! + + Le rotte settate da Netsukuku sono create col supporto nexthop, che permette + ad un nodo di raggiungere un altro nodo usando piu' rotte simultaneamente + (multipath), garantendo uno smistamento equo del traffico dei pkts. + Lo scudo anti-flood e' una conseguenza dell'avere delle rotte + multipath, ed essere collegati a piu' rnodes. Infatti, anche quando un + nodo e' bombardato da un flusso di dati continuo e sostenuto, riceve + quel flusso diviso in differenti rotte e differenti link, e quindi puo' + sempre comunicare con altri nodi. + + 9. Spoof the Wired: happy kiddies + + Se un nodo si aggancia a Netsukuku falsificando un IP, non concludera' nulla + semplicemente perche' nessun nodo sapra' come raggiungerlo, avendo gia' la + rotta esatta per raggiungere il nodo originale. + In secondo luogo, gli rnode non permettono un aggancio di un IP che e' gia' + presente nelle mappe. + + 10. /dev/accessibility + + Il mezzo ideale per connettere i nodi tra loro e', ovviamente, il wifi, ma + qualunque tipo di link che connette due nodi serve allo scopo. + I cellulari sono un ottimo dispositivo, su cui far girare Netsukuku. + Alcuni dei nuovi modelli usano Linux come kernel. + + 11. Internet compatibility + + Netsukuku non puo' diffondersi instantaneamente, ed e' impossibile pensare + di poter migrare da Internet a Netsukuku immediatamente. + Bisogna, quindi, che durante la sua iniziale diffusione, rimanga compatibile + con il vecchio Internet e l'unico modo e' quello di limitare temporaneamente + l'espandibilita' di Netsukuku. + + Un nodo che usa Netsukuku non puo' uscire su Internet perche', quando + ntkd viene avviato, come default gw viene settato lo stesso indirizzo + IP assegnato all'interfaccia di rete, in questo modo le classi di IP non + esistono piu', e qualsiasi nodo puo' prendersi qualsiasi IP random; inoltre, + dato che gli IP vengono scelti in maniera random, possono accadere molte + collisioni con gli attuali IP di Internet. + + Per mantenere la compabilita' con Internet, Netsukuku deve essere ristretto + ad una sotto classe di IP, in modo da non interferire con il default gw che + esce su Internet. Allora, per non interferire in nessun modo con Internet, + usiamo la classe A degli indirizzi privati per l'IPv4, e la classe + Site-Local per l'IPv6. + + Il passaggio dal Netsukuku ristretto al Netsukuku completo e' semplice: + nel momento stesso in cui un utente decide di abbandonare Internet, riavvia + NetsukukuD senza l'opzione di restrizione. + + Ovviamente le altre classi private di IP non vengono toccate, per lasciare la + possibilita' di creare una LAN con un solo gw/nodo netsukuku. + + 12. Implementation: let's code + + Il protocollo di Netsukuku non e' low-level, perche' tutto quello che deve + fare e' settare le rotte nella tabella di routing del kernel, percio' il + demone NetsukukuD gira in userspace. + Tutto il sistema viene quindi gestito dal demone che gira su ogni nodo. + NetsukukuD comunica con gli altri nodi attraverso l'udp e il tcp e setta le + rotte nella tabella del kernel. + + Tutto il codice e' scritto in C ed e' commentato, quindi non dovrebbe essere + difficile seguire il flusso del programma, in ogni caso, prima di leggere un + .c e' consigliato sbirciare il relativo .h . + + Netsukuku.c si occupa di lanciare i thread principali. + Ogni porta su cui ascolta NetsukukuD e' gestita da un demone che viene + lanciato come un singolo thread. Le porte usate sono le 269-udp, 269-tcp, + 271-udp, 277-udp e 277-tcp. + Tutti i pacchetti ricevuti dai demoni vengono filtrati da accept.c e da + request.c che grazie ad una piccola tabella prevengono eventuali attacchi + di flood (accept.c e' lo stesso codice usato per patchare la vulnerabita' + user-level-denial-of-service di OpenSSH). In secondo luogo vengono passati + a pkts.c/pkt_exec(). + Quando tutti i demoni sono attivi, viene lanciato hook.c/netsukuku_hook(), + il codice che gestisce l'hook alla rete. + + Hook.c avviera' per la prima volta il primo radar scan con + radar.c/radar_scan(). Tutti i pacchetti ricevuti relativi al radar sono + gestiti da radar.c/radard() e da radar.c/radar_recv_reply(). + Dopo l'aggancio alla rete, verra' avviato il radar_scan thread che non fara' + altro che eseguire in eterno la funzione radar.c/radar_daemon(), la quale + lancia un radar_scan() ogni MAX_RADAR_WAIT secondi. Quando il + radar_update_map() si accorge di un cambiamento nei suoi rnode spedisce un + nuovo qspn_close con qspn.c/qspn_send(). + Tutto il codice relativo al qspn e ai tracer_pkt si trova in qspn.c e in + tracer.c. + + Il codice di ANDNA e' diviso in andna_cache.c, che contiene tutte le + funzioni usate per gestire le relative cache e in andna.c dove risiede il + codice che si occupa dei pkt del protocollo ANDNA. + + I socket, sockaddr, le connect, i recv(), i send, etc... sono tutte in + inet.c, e vengono utilizzate da pkts.c. + pkts.c si occupa di ricevere le richieste con pkt_exec() e mandarne con + send_rq(), un front-end utilizzato per impacchettare e spedire la grande + maggioranza delle richieste. + ipv6-gmp.c usa la libreria GMP (GNU multiple precision arithmetic library) + per poter manipolare i 16 byte di un IPv6 come se fossero un unico grande + numero, questo e' essenziale per alcune formule che agiscono direttamente + sull'IP per poter ricavare molte informazioni, infatti, in Netsukuku un IP + e' un numero a tutti gli effetti. + + Il codice che si interfaccia al kernel per settare le rotte nella route + table e per configurare un'interfaccia di rete si trova in: + krnl_route.c, if.c, ll_map.c, krnl_rule.c, libnetlink.c. + Route.c fa da intermediario tra il codice che gestisce il protocollo di + netsukuku e tra le funzioni che comunicano con il kernel. + + Per quanto riguarda le mappe tutto si basa su map.c, il sorgente che + si occupa di prendersi cura della mappa interna. Tutte le altre mappe si + appogiano su map.c, e sono: + bmap.c per la border node map, gmap.c per le mappe esterne. + + Per compilare il codice di Netsukuku non e' necessario usare autoconf, + automake e famiglia, ma basta usare il comodo scons (http://www.scons.org). + + L'ultima versione del codice e' sempre disponibile sul cvs degli + hinezumilabs: + + cvs -d :pserver:anoncvs@hinezumilabs.org:/home/cvsroot login + + oppure date un'occhiata da qui: + + http://hinezumilabs.org/cgi-bin/viewcvs.cgi/netsukuku/ + + + 13. What to do + + - Testare su larga scala Netsukuku ed ANDNA. + - Completare i src/TODO. + - Codare, codare, codare. + - Varie ed eventuali. + + Chi vuole imbarcarsi faccia un fischio. + + + 14. The smoked ones who made Netsukuku + + Andrea Lo Pumo aka AlpT + + + Special thanks to: + + Valvoline the non-existent entity for the implementation advices, + Newmark, the hibernated guy who helped in some ANDNA problems, + Crash aka "il nipponico bionico" who takes BSD, breathes the 2.4Ghz and + worship the great Disagio, + Tomak aka "il magnanimo" who watches everything with his crypto eyes and + talks in the unrandomish slang, + Asbesto aka "l'iniziatore" who lives to destroy the old to build the new, + Nirvana who exists everywhere to bring peace in your data, + Ram aka "il maledetto poeta" who builds streams of null filled with the + infinite, + Quest who taught me to look in the Code, + Martin, the immortal coder and our beloved father, + Elibus, the eternal packet present in your lines, + Pallotron, the biatomic super AI used to build stream of consciousness, + Entropika, the Great Mother of Enea, + Uscinziatu, the attentive, + Shezzan, the holy bard of the two worlds, + Katolaz, + Gamel, + ... + the list goes on... + V C G R A N Q E M P N E T S U K + + and finally thanks to all the + + Freaknet Medialab + + whose we are all part, and the poetry + + Poetry Hacklab + + +-- +This file is part of Netsukuku. +This text is free documentation; 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. For more information read the COPYING file. diff --git a/doc/main_doc/ntk_rfc/Ntk_IGS b/doc/main_doc/ntk_rfc/Ntk_IGS new file mode 100644 index 0000000..adcb047 --- /dev/null +++ b/doc/main_doc/ntk_rfc/Ntk_IGS @@ -0,0 +1,130 @@ +== NTK_RFC 0003 == + +Subject: Internet Gateway Search + +---- +This text describes a change to the Npv7. +It will be included in the final documentation, so feel free to correct it. +But if you want to change the system here described, please contact us first. +---- + +If the nodes are in restricted mode (compatibility with the Internet), they +should share their Internet connection. This can be easily done, in fact, if +a node X, connected to the Internet, activates the masquerading, it is +possible for the other nodes to connect by setting as the default gateway +their rnode which lead to the node X. + +This can be automated by Netsukuku itself and it requires small changes in the +code: it is just necessary that the nodes connected to the Internet set a flag +in the qspn_pkt, in this way the other nodes will know the routes to reach the +Internet. + +=== Multi-gateways === + +The situation becomes a little complex when there is more than one node which +shares its internet connection. Let's consider this scenario: + +{{{ + A(gw) B(gw) + \ / + \___ ___/ + \/ + Ntk nodes (10.x.x.x) +}}} + +A and B are nodes which shares their internet connection, we call them +gateways. Let's call X the node which wants to connect to an Internet host. +In this case, the nodes near A, might find useful to use A itself to +reach the Internet, the same happens for the nodes near B. +Instead, the nodes in the middle don't know what is the best choice and they +might continuosly change their gw. This means that a tcp connection +(to an inet host), which was established trough A, when is then routed trough +B dies because A and B have different public IPs on the Internet. + +The node X has to create an IPIP tunnel to the gateway it wants to use, and +set as default gw the tunnel. In this way, the node X is sure to always use +the same gateway while the routing of the packets between it and the gw is +made transparently by the other Netsukuku nodes. + +==== Anti loop multi-inet_gw shield ==== + +An inet-gw is a normal node like all the other, therefore it can use the +Internet connections of the other inet-gws in conjunction with its own one. + +Consider the previous scenario, A and B are two inet-gw. +A sets in his internet default route the adsl modem and B. +B does the same, but sets A as the second default route. + +What would happen if the default route, written in the routing cache of A, is +B and, at the same time, the default route set in the routing cache of B is A? +The packets would jump endlessy in a infinite loop loosing themself forever. + +That's why we need the "anti loop multi-inet_gw shield". +It's working way is simple: each inet-gw has a netfilter rule which marks +all the packets coming from the outside and directed to the Internet. These +packets are then routed directly to the Internet without being sent, again, to +an inet-gw. In the example: +A wants to send a packet to the Internet and its looks in its routing cache. +It decide to forward the packet to B. B receives the packet, recognizes it is +an extern packet directed to the Internet and shoots it on its modem. + +=== Load sharing === + +Let's consider the previous scenario. + +The node X can also decide to use both A and B to reach the Internet, using +at the same time their connections! Even the gw A can use at the same time +its own line and the connection of the gw B. + +The procedure to implement this is what follows: + + * X creates a tunnel to A and another one to B + + * X adds in the routing table the default route using A and B as multipath +gateways. The gateway for the connections is chosen randomly. + + * X adds a rule in the routing table to route all the packets of established +connections trough the same gateway used to create the same connection. +The rule is linked to some netfilter rules which track and mark each +connection. The method is described in details here: +https://lists.netfilter.org/pipermail/netfilter/2006-March/065005.html + +=== The bad === + +The implementation of the Load sharing is very Linux specific, so it will be +very difficult to port it to other kernels, therefore this feature will be +available only to nodes which run Linux (ehi, one more reason to use Linux ;). + +=== MASQUERADING === + +Each node sharing the Internet connection (inet-gw) has to masquerade its +interfaces, so iptables must be used. +In order to keep the daemon portable, NetsukukuD will launch the script found +at /etc/netsukuku/masquerade.sh, which in Linux will be a simple script that +executes "iptables -A POSTROUTING -t nat -j MASQUERADE". +When NetsukukuD is closed the added firewall rules are flushed with +"/etc/netsukuku/masquerade.sh close" + + +=== Traffic shaping === + +The inet-gw can also shape its internet connection in order to prioritize its +local outgoing traffic (the traffic coming from its 192.168.x.x LAN). +In this way, even if it shares its Internet connection, it won't notice any +difference 'cause it will have the first priority. Moreover with the traffic +shaper, the inet-gw can also prioritize some protocol, i.e. SSH. + +The traffic shaper will activated at the start of NetsukukuD. The daemon will +run the /etc/netsukuku/tc_shaper.sh script, which in Linux utilizes the +iproute2 userspace utility. +When the daemon is closed the traffic shaping will be disabled with +"/etc/netsukuku/tc_shaper.sh close". + +=== See also === + +For more information on the necessity of using ipip tunnels in an adhoc +network used to share internet connections, you can read this paper: +http://www.olsr.org/docs/XA-OLSR-paper-for-ICC04.pdf + +---- +related: ["Netsukuku RFC"] diff --git a/doc/main_doc/ntk_rfc/Ntk_MX_request b/doc/main_doc/ntk_rfc/Ntk_MX_request new file mode 100644 index 0000000..5f78fce --- /dev/null +++ b/doc/main_doc/ntk_rfc/Ntk_MX_request @@ -0,0 +1,56 @@ +== NTK_RFC 0004 == + +Subject: Mail Exchange request + +---- +This text describes how the MX DNS query are resolved by ANDNA. + + * WARNING * +This RFC has been deprecated by the NTK_RFC 0009 + * WARNING * +---- + +In the DNS the resolution of the MX field is handled directly by the DNS +servers, in ANDNA, instead, the resolution of an MX hostname is a redirect +request. In short it means that the request, instead of being sent to a +hash_node, is sent to the register_node itself, + +== hname MX resolution == + +The resolution of a MX hostnames in ANDNA works in this way: + * We are trying to resolve the MX of the "pippo" hname. + * "pippo" is resolved normally and the IP of the register_node is gained. + * We ask to the register_node the IP of its MX. + +== hname MX registration == + +Since the IP of the MX node can change during the time, the register_node must +be aware of its current IP. +It is the MX node itself that tells the register_node its current IP each time +it changes. The MX node to contact the register_node has to simply resolve its +hname. +The register_node has to verify the authenticity of the IP update request, +therefore the MX node will sign the request with the private key of the +register_node. + +This system is necessary because the MX node and the register node have to be +synced. In this way when the register_node dies or can't be reached anymore, +the MX node can't be contacted too. +Moreover this system prevents the spoofing of the MX node. + +The steps necessary to register a hname MX are: + * Copy the ANDNA private key of the register node, which is saved in its lcl_cache, to the MX node: +{{{ +register_node# scp /usr/share/netsukuku/andna_lcl_keyring mx_node:/etc/netsukuku/mx/ +# is the hname relative to the MX node +}}} + * Send a SIGHUP to the MX NetsukukuD: +{{{ +register_node# ssh mx_node "killall -HUP ntkd" +}}} + + +If no MX is associated to an hostname, the register_node will use its own IP +as the default MX IP. +---- +related: [Netsukuku_RFC] diff --git a/doc/main_doc/ntk_rfc/Ntk_SNSD b/doc/main_doc/ntk_rfc/Ntk_SNSD new file mode 100644 index 0000000..05edeb9 --- /dev/null +++ b/doc/main_doc/ntk_rfc/Ntk_SNSD @@ -0,0 +1,203 @@ +== NTK_RFC 0009 == + +Subject: Scattered Name Service Disgregation + +---- +This text describes the Scattered Name Service Disgregation, an extension of +the ANDNA protocol. +It will be included in the final documentation, so feel free to correct it. +But if you want to change the system here described, please contact us first. +---- + +== SNSD == + +The Scattered Name Service Disgregation is the ANDNA equivalent of the +SRV Record of the Internet Domain Name System, which is defined here: +http://www.ietf.org/rfc/rfc2782.txt +For a brief explanation you can read: +http://en.wikipedia.org/wiki/SRV_record + +SNSD isn't the same of the "SRV Record", in fact, it has its own unique +features. + +With the SNSD it is possible to associate IPs and hostnames to another +hostname. +Each assigned record has a service number, in this way the IPs and hostnames +which have the same service number are grouped in an array. +In the resolution request the client will specify the service number too, +therefore it will get the record of the specified service number which is +associated to the hostname. Example: + +The node X has registered the hostname "angelica". +The default IP of "angelica" is 1.2.3.4. +X associates the "depausceve" hostname to the `http' service number (80) of +"angelica". +X associates the "11.22.33.44" IP to the `ftp' service number (21) of +"angelica". + +When the node Y resolves normally "angelica", it gets 1.2.3.4, but when +its web browser tries to resolve it, it asks for the record associated to +the `http' service, therefore the resolution will return "depausceve". +The browser will resolve "depausceve" and will finally contact the server. +When the ftp client of Y will try to resolve "angelica", it will get the +"11.22.33.44" IP. +If Y tries to resolve a service which hasn't been associated to anything, it +will get the mainip 1.2.3.4. + +The node associated to a SNSD record is called "SNSD node". In this example +"depausceve" and 11.22.33.44 are SNSD nodes. + +The node which registers the records and keeps the registration of the main +hostname is always called "register node", but it can also be named "Zero SNSD +node", in fact, it corresponds to the most general SNSD record: the service +number 0. + +Note that with the SNSD, the NTK_RFC 0004 will be completely deprecated. + +== Service, priority and weight number == + +==== Service number ==== + +The service number specifies the scope of a SNSD record. The IP associated to +the service number `x' will be returned only to a resolution request which has +the same service number. + +A service number is the port number of a specific service. The port of the +service can be retrieved from /etc/services. + +The service number 0 corresponds to a normal ANDNA record. The relative IP +will be returned to a general resolution request. + +==== Priority ==== + +The SNSD record has also a priority number. This number specifies the priority +of the record inside its service array. +The client will contact first the SNSD nodes which have the higher priority, +and only if they are unreachable, it will try to contact the other nodes +which have a lower priority. + +==== Weight === + +The weight number, associated to each SNSD record, is used when there are +more than one records which have the same priority number. +In this case, this is how the client chooses which record using to contact +the servers: + +The client asks ANDNA the resolution request and it gets, for example, 8 +different records. +The first record which will be used by the client is chosen in a pseudo-random +manner: each record has a probability to be picked, which is proportional to its +weight number, therefore the records with the heavier weight are more likely to +be picked. +Note that if the records have the same priority, then the choice is completely +random. + +It is also possible to use a weight equal to zero to disable a record. + +The weight number has to be less than 128. + +== SNSD Registration == + +The registration method of a SNSD record is similar to that described in the +NTK_RFC 0004. + +It is possible to associate up to 16 records to a single service. +The maximum number of total records which can be registered is 256. + +The registration of the SNSD records is performed by the same register_node. +The hash_node which receives the registration won't contact the counter_node, +because the hostname is already registered and it doesn't need to verify +anything about it. It has only to check the validity of the signature. + +The register node can also choose to use an optional SNSD feature to be sure +that a SNSD hostname is always associated to its trusted machine. In this +case, the register_node needs the ANDNA pubkey of the SNSD node to send a +periodical challenge to the node. +If the node fails to reply, the register_node will send to ANDNA a delete +request for the relative SNSD record. + +The registration of SNSD records of hostnames which are only queued in the +andna_queue is discarded. + +Practically, the steps necessary to register a SNSD record are: + * Modify the /etc/netsukuku/snsd_nodes file. +{{{ +register_node# cd /etc/netsukuku/ +register_node# cat snsd_nodes +# +# SNSD nodes file +# +# The format is: +# hostname:snsd_hostname:service:priority:weight[:pub_key_file] +# or +# hostname:snsd_ip:service:priority:weight[:pub_key_file] +# +# The `pub_key_file' parameter is optional. If you specify it, NetsukukuD will +# check periodically `snsd_hostname' and it will verify if it is always the +# same machine. If it isn't, the relative snsd will be deleted. +# + +depausceve:pippo:http:1 +depausceve:1.2.3.4:21:0 + +angelica:frenzu:ssh:1:/etc/netsukuku/snsd/frenzu.pubk + +register_node# +register_node# scp frenzu:/usr/share/andna_lcl_keyring snsd/frenzu.pubk +}}} + * Send a SIGHUP to the NetsukukuD of the register node: +{{{ +register_node# killall -HUP ntkd +# or, alternatively +register_node# rc.ntk reload +}}} + +==== Zero SNSD IP ==== + +The main IP associated to a normal hostname has these default values: +{{{ +IP = register_node IP # This value can't be changed +service = 0 +priority = 16 +weight = 1 +}}} + +It is possible to associate other SNSD records in the service 0, but it isn't +allowed to change the main IP. The main IP can only be the IP of the +register_node. +Although it isn't possible to set a different association for the main IP, it +can be disabled by setting its weight number to 0. + +The string used to change the priority and weight value of the main IP is: +{{{ +hostname:hostname:0:priority:weight + +# For example: +register_node# echo depausceve:depausceve:0:23:12 >> /etc/netsukuku/snsd_nodes +}}} + + +==== SNSD chain ==== + +Since it is possible to assign different aliases and backup IPs to the zero +record, there is the possibility to create a SNSD chain. +For example: + +{{{ +depausceve registers: depausceve:80 --> pippo +pippo registers: pippo:0 --> frenzu +frenzu registers: frenzu:0 --> angelica +}}} + +However the SNSD chains are ignored, only the first resolution is considered +valid. Since in the zero service there's always the main IP, the resolution is +always performed. +In this case ("depausceve:80 --> pippo:0") the resolution will return the main +IP of "pippo:0". + +The reply to a resolution request of service zero, returns always IPs and not +hostnames. + +---- + +related: ["Netsukuku RFC"] diff --git a/doc/main_doc/ntk_rfc/Ntk_andna_and_dns b/doc/main_doc/ntk_rfc/Ntk_andna_and_dns new file mode 100644 index 0000000..ca8bbb6 --- /dev/null +++ b/doc/main_doc/ntk_rfc/Ntk_andna_and_dns @@ -0,0 +1,436 @@ +{{{ + + + + ANDNS PROTOCOL + +INDEX: + +0 - Introduction +1 - Notations +2 - Packet Headers +3 - Query Type +4 - Query Realm +5 - Rcode +6 - Questions +7 - Answers +8 - Compression + + +0. - INTRODUCTION - + + This document describes the protocol used to communicate with ANDNA. + This protocol is used also to make query in internet realm. + So, we can query for `google.it` in internet, or for `depausceve` + in the netsukuku net. + + In the case of internet queries, the dns_wrapper will contact the + dns-servers specified in /etc/resolv.conf when ntkd is loaded. + +1. - NOTATIONS - + + In the next section, we represent a byte with this graphic: + + 1 2 3 4 5 6 7 8 + +--+--+--+--+--+--+--+--+ + | | + +--+--+--+--+--+--+--+--+ + + The numbers represent the bits + Let's show two bytes: + + 1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8 + +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + | | | + +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + +2. - HEADERS - + + Headers are 4-byte long, and the format is: + + +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + | ID | R| + +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + |QR| P| Z| QT | ANCOUNT |I | NK| RCODE | + +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + + where: + + ID = It's a 2-byte value which identifies the query. + ID is choosed in a random way and the future + answers must have the same ID. + + R = Recursion bit. If set, SNSD queries that have + a hostname as resolution will be resolved (if + possible). + + QR = 0 implies that this packet contains a question + 1 if the packets contains answers + + P = If the query is h2ip and ntk-related, P specifies + the protocol service: + 0 for TCP + 1 for UDP + P has to be zero otherwise. + + Z = zlib compression. If z=1, the packet contents, + headers excluded, are zlib-compressed. See + Section 8. + + QT = Query Type. See below. + Note: answers must leave this field unchanged. + + ANCOUNT = Answer Count. This field is set only if QR=1, + ie if this packet contains answers. + ANCOUNT is the number of answers which belongs + to this packet. + + I = Ip-version bit. Specifies the ip version for the + packet contents. All addresses contained in the + packet are: + if I==0 IPv4 addresses (4-bytes) + if I==1 Ipv6 addresses (16-bytes) + This bit is useful only for questions. The server + will reply "NO SUCH DOMAIN" if his node is running + with a different ip-version. + Otherwise, only IPs of the same family will be + returned. + + NK = Netsukuku bit. With this field, you can specify + the query realm. + If NK=1, the realm is netsukuku. + If NK=2, the realm is internet. + If NK=0, the packet is not encoded with this + protocol, but with standard DNS protocol. + To specify realms with DNS protocol, see below. + Note: answers must leave this field unchanged. + + RCODE = This is the result of a query. + RCODE has to be 0 if this packet contains a + question. + In the case of errors, ANCOUNT has to be 0. + +3. - QUERY TYPE - + + There are different kind of questions: + + QTYPE = 0 + This is the classic resolution `hostname -> ip`. + A gethostbyname. + Note: this type of query is used also for SNSD + resolution (see `NTK_RFC 0009`). + You can specify a service. + So, the general way to represent this query is: + + hostname:service -> ip + + If you don't specify a service, the 0-service + will be used. + + Example: if you want to discover which address is + hosting the http service of hostname `depausceve`, + you have to formule this query: + + depausceve:80 + + See below how to formule queries. + + QTYPE = 1 + This is a reverse resolution: `ip -> host`. + + QTYPE =2 + This is a global query: all services for the + hostname will be answered. + The query realm has to be Ntk. + +4. - QUERY REALMS - + + A query can be formulated to find some object in the + netsukuku net or in internet. + Maybe you want to know the ip of `google.it`, but you + have to specify where: internet or netsukuku? + + If you use ANDNS protocol, you specify this with NK + bit (See the HEADERS SECTION). + + If you use DNS protocol, you have to formule the query + with some suffix: if you ask for `google.it.int` (or + google.it.INT), the question is made in internet. + If you ask for `google.it.ntk` (or `google.it.NTK) + the question is made in netsukuku. + If you don't specify any suffix, the default realm + is Netsukuku Realm + + The dns_wrapper first search for a suffix, understanding + the correct realm. + If the question does not have any suffix, the query + will be made in the default realm. + Otherwise, dns_wrapper removes this suffix and + resolves the query without it. + +5. - RCODE - + + This is the answer report. + It's always 0 if the packet carries a question. + Possible values, in the case of an answer, are: + + RCODE = 0 No Error. + This answer contains answers. + The number of ANSWERS is ANCOUNT (see + HEADERS SECTION). + + RCODE = 1 Interpretation Error. + The server did not understand your query. + In other words, your question is malformed. + + RCODE = 2 Server Fail. + The server did encounter some error processing + your question. Your question is good. + + RCODE = 3 No Such Domain + The object of your question does not exist. + + RCODE = 4 Not Implemented + This type of query is not implemented yet + in this server. + + RCODE = 5 Refused + The server refuse to talk with you. + + Note: this expression is always true: + + (RCODE XOR ANCOUNT) + + ie, if RCODE contains some error (RCODE!=0), there is + not answer in this packet. If RCODE is 0 (no error), + the packet contains some answer. + +6. - QUESTIONS - + + We have to switch the value QTYPE against realm. + + - Case QTYPE = 0 (h2ip) AND Realm=NTK + The format of the question is: + + +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + | SERVICE | + +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + | | + | | + | | + | HOSTNAME | + | HASH | + | (HH) | + | | + | | + +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + + where: + + SERVICE is a 2-byte field and represents the SNSD service + value (see `NTK_RFC 0009`). + + HH is the 16-bytes hostname hash. + + - Case QTYPE = 0 (h2ip) AND Realm=INET + The format of the question is: + + +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + | SERVICE | + +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + | RDLENGTH | + +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + | | + \ \ + \ RDATA \ + | | + +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + + where: + + SERVICE is a 2-byte field and represents the SNSD service + value (see `NTK_RFC 0009`). At this moment, for INET + resolutions, the service is limited to value 25 + - TCP is assumed - or 0. + + RDLENGTH is the RDATA len + + RDATA is a hostname string, such that: + strlen(RDATA)=RDLENGTH + + - Case QTYPE = 1 (ip2h). + The format of the question is: + + +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + | | + / RDATA / + / / + | | + +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + + where: + + RDATA is an IP in the binary format. + The length of the field - ie the family address (4 or 6) - + depends on the bit `I' in the headers section. + + - Case QTYPE = 2 (global query). + The format of the question is: + + +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + | | + | | + | | + | HOSTNAME | + | HASH | + | (HH) | + | | + | | + +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + + where: + + HH is the 16-bytes hostname hash. + +7. - ANSWERS - + + The format of answers is: + + CASE QTYPE=0 (h2ip) + + +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + | | T| WG | PRIO | + +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + | | + / RDATA / + / / + | | + +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + + where: + + T is set if this answer carries an IP. + T is 0 if the answer carries a hostname hash. + + WG is the weigth of an answer (see `NTK_RFC 0009`) + + PRIO the priority (see `NTK_RFC 0009`) + + RDATA is a binary ip address (His family (and his length) is specified + in the headers bit `I') or a hostname hash). + + CASE QTYPE=1 (ip2h) + + +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + | RDLENGTH | + +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + | | + / RDATA / + / / + | | + +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + + where: + + RDLENGTH is the strlen of RDATA (RDATA is a hostname). + + RDATA the hostname resolution. + + CASE QTYPE=2 (global query) + + If QTYPE=2, there is a extra header field before answers: + + +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + | ANCOUNT | + +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + + The two bytes are the number of answers that the query + produced. After the two bytes. + + Note: the ANCOUNT field on main headers has to be 1 if + RCODE=0, 0 otherwise. + The two extra bytes are the real number of answers in the + case of QTYPE=2. + + After the two bytes, this is the format for each answer: + + +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + | M| T| P| WG | PRIO | + +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + | SERVICE | + +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + | | + / DATA / + / / + | | + +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + + where T is the type of the DATA. + T is: + T = 0 Hostname + T = 1 Ip + + M is set if T is set, and specifies that this is the MAIN_IP + of the hostname. + + P is The protocol: Tcp if 0, UDP if 1. + + If T=1, the ip version is specified in main headers, in the + field I. + If T=0, the format of data is: + + +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + | | + | | + | | + | HOSTNAME | + | HASH | + | (HH) | + | | + | | + +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + + where HH is the 16 bytes hash of SNSD hostname. + + If T=1, the format of data is: + + +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + | | + / RDATA / + / / + | | + +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + + where RDATA is the binary IP and the length of his contents + depends on the field I of main headers (4 in IPv4, 16 in IPv6). + + +8. - COMPRESSION - + + The format of a compressed packet is: + + +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + | ID | R| + +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + |QR| P| Z| QT | ANCOUNT |I | NK| RCODE | + +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + | | + | USIZE | + | | + | | + +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + | | + / DATA / + / / + | | + +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + + Headers remain uncompressed. The packet contents, question and + answers, are compressed with zlib. The buffer obtained with the + compression is DATA. + USIZE is the original size of packet contents (question and + answers). + If a packet is compressed, then Z=1. + +}}} + diff --git a/doc/main_doc/ntk_rfc/Ntk_andna_counter_pubk b/doc/main_doc/ntk_rfc/Ntk_andna_counter_pubk new file mode 100644 index 0000000..caea720 --- /dev/null +++ b/doc/main_doc/ntk_rfc/Ntk_andna_counter_pubk @@ -0,0 +1,38 @@ +== NTK_RFC 0007 == + + +Subject: ANDNA counter system based on public key + +---- +This text describes a change to the counter_gnode system in ANDNA. +It will be included in the final documentation, so feel free to correct it. +But if you want to change the system here described, please contact us first. +---- + +{{{ +The counter_gnode is used to prevent massive registrations of hnames by a +single node, however there is a bug in the actual protocol. + +Currently the IP of the counter_gnode is the hash of the public key of the +register node. + +The public key is part of the key pair used by the register_node to register +and update its hnames, therefore there should be only one key pair for each +node. + +However, nothing prevents the register node to create multiple key pairs, +modify the ntkd code and use them at the same time. +With this technique, the register node can have a new counter_gnode for each +new generated key pair, avoiding in this way the registration limit. + +The solution is to calculate the IP of the counter_gnode using the hash of the +IP of the register_node. This method was previously proposed but it was +discarded because every time the register_node changes IP it will have a new +counter_gnode. The new counter_gnode cannot know how many hnames the +register_node registered before so it will accept all the new requests, but in +reality, this is not a problem, in fact, the new counter_gnode can accept only +256 hnames, thus the limit is maintained. +}}} + +---- +related: ["Netsukuku RFC"] diff --git a/doc/main_doc/ntk_rfc/Ntk_bandwidth_measurement b/doc/main_doc/ntk_rfc/Ntk_bandwidth_measurement new file mode 100644 index 0000000..aedd7c0 --- /dev/null +++ b/doc/main_doc/ntk_rfc/Ntk_bandwidth_measurement @@ -0,0 +1,121 @@ +== NTK_RFC 0002 == + +Subject: bandwidth measurement + +---- +This text describes a change to the Npv7. +It will be included in the final documentation, so feel free to correct it. +But if you want to change the system here described, please contact us first. +---- + +== Link measurement issues == + +In the current version of the Npv7 the link quality is measured only with the +rtt and packets loss, so only the lantecy is actually considered, this isn't +optimal since also a link with a bandwidth of 20000 bps can have a good +lantecy. +It isn't a critical problem since more than one route is used to reach a +single dst_node, so when a route is satured the kernel will use another one +looking in the nexthop table of that route. + +== Improvement == + +In order to improve the link measurement a node must include in the tracer +pkts the available bandwidth of its traversed link. +The link bandwidth, which will be used to modify the real rtt, in this way it +will be possible to have a traffic shaping based also on the real bandwidth of +the links. + +== Bandwidth measurement == + +There are two phases of measurement: in the first the total bandwidth of the +new links is measured by the hooking node and the destination nodes, in the +second the bandwidth of the links is constantly monitored. + +The utilised bandwidth will be monitored with iptables and the libiptc library. +See http://www.tldp.org/HOWTO/Querying-libiptc-HOWTO/bmeter.html . + +We also need to know the total bandwidth which can handle the network +interface. What is a good method to do this? + +=== Total available bandwidth === + +{{{ + A <-> B <-> C +}}} + +The node B is hooking to A and C. At the end of the hook, B measures the +total available bandwidth of the links B<->C and B<->A. +It sends an indefinite amount of random packets, for some seconds, to the +destination of the link. The link is monitored with libiptc and the maximum +rate of bytes per second is registered as the maximum available upload +bandwidth for that specific link. These steps are repeated for each rnode. +Since the link might be asymettric the measurement is also repeated by A and +C. In the end we have the measurement of: A->B, B->A, C->B, B->C. + +=== Realtime bandwidth monitoring === + +With the use of the libiptc library, B can monitor the bandwidth usage of its +links. + +{{{ +Max_link_bw = Total available bandwidth of the link +free_link_bw = available/not used bandwidth of the link +cur_used_link_bw= amount of bandwidth currently used + +Max_NIC_bw = maximum bandwidth of the network interface +cur_used_NIC_bw = amount of the total bandwidth currently used of the network + interface +}}} + +To calculate the `free_link_bw': +{{{ +free_link_bw = Max_link_bw - cur_used_link_bw +if(free_link_bw > Max_NIC_bw - cur_used_NIC_bw) + free_link_bw = (Max_NIC_bw - cur_used_NIC_bw); +}}} +The `free_link_bw' value will be used to modify the `rtt' used to sort the +routes in the routing table. +{{{ +modified_rtt(free_link_bw, real_rtt) = 27<<27 + real_rtt - bandwidth_in_8bit(free_link_bw) + +real_rtt must be <= 2^32-27<<27-1 (about 8 days) + +You can find the definition of bandwidth_in_8bit() here: +http://hinezumilabs.org/cgi-bin/viewcvs.cgi/netsukuku/src/igs.c?rev=HEAD&content-type=text/vnd.viewcvs-markup +}}} + +== Latency VS bandwidth == + +It may also happens that a link has a good bandwidth but a high latency. +A low latency is needed by semi-realtime applications: for a ssh connection +we don't care to have a 100Mbs connection but we want to use the shell in +realtime, so when we type a command we get a fast response. + +The Netsukuku should create three different routing tables: + * the first shall include the routes formed by the links with the best bandwidth value. + * the second shall include the "best latency" routes + * the routes in the third table shall be an average of the first and the second tables + +If the protocol of the application uses the "tos" value in its IP packets, it +is possible to add a routing rule and choose the right table for that +protocol: the ssh protocol will be routed by the second table. + +== Caveats == + +If the libiptc are used, it will be more difficult to port the daemon for +other kernels than Linux. Libpcap is a good alternative. +It is possible to capture the packets for some seconds using libpcap, count +them and find how much bandwidth is used. + +== IGS == + +The inet-gw which share their internet connection measure also the utilzed +bandwidth of the Internet connection. +The maximum download and upload bandwidth is known since it must be specified +by the user in the netsukuku.conf config file. In this way, monitoring the +device used by the Internet default route, it's trivial to known the +available bandwidth. + +---- +related: [Netsukuku_RFC] diff --git a/doc/main_doc/ntk_rfc/Ntk_gnodes_contiguity b/doc/main_doc/ntk_rfc/Ntk_gnodes_contiguity new file mode 100644 index 0000000..6c79225 --- /dev/null +++ b/doc/main_doc/ntk_rfc/Ntk_gnodes_contiguity @@ -0,0 +1,198 @@ += NTK_RFC 0001 = + +Subject: Gnode contiguity + +---- +This text describes a change to the Npv7 about the collision of IPs. +It will be included in the final documentation, so feel free to correct it. +But if you want to change the system here described, please contact us first. +---- + += The real problems = + +A collision of IPs happens when two gnodes with the same ID are born separately, +so when they meet each trough a direct link or trough other nodes many +problems arise since there are some ambiguities: + + * In the first case there can be nodes which have the same IP. + + * In the second: + A <-> B <-> D <-> A + After a qspn_round the node B will have two routes to reach the gnode A. But in this case the gnode A isn't a contiguous gnode, so when B wants to reach a node which belongs to A, it will send the packet using only one route which may lead to the A gnode which hasn't the wanted node. + +So these are the real problems. +In order to solve them it is necessary that every time two gnodes meets each +other for the first time, one of them will redo the hook, in fact, this was +the cause of all. +When a gnode meets for the first time another gnode is like when a new node joins +the network: it hooks with the other nodes. The same must be done for the +gnode. + += Hook of gnodes = + +The hook of two gnodes works in this way: only the gnode which has less +nodes than the other will change (let's call the first gnode X and the second +Y). If X and Y have the same number of nodes, the gnode which has the smaller +gnode_id will change. +The bnodes of X will start to re-hook, the other nodes will re-hook when +they notice that a new rnode which belongs to Y comes up. +Summing up: the bnodes re-hook first, then their rnodes, then the rnodes of +the rnodes of the bnodes... and so on, all the nodes of the gnode have +re-hooked. + +It doesn't matter that a gnode composed by 2^24 nodes changes all its IPs, +since it will happen only very few times, i.e. when the gnode of the Europe +meets that of the America. + +== Gnode count == + +This method requires that the number of nodes present in a gnode has to be +known, therefore the qspn_pkt which traverse gnodes stores also the number +of nodes of each traversed gnode. + +== No first tracer_pkt == + +While re-hooking, the first tracer_pkt won't be sent like in the normal hook +'cause if all the nodes of the gnode which is re-hooking send it, there +would be a broadcast pkt for each node. The next qspn_round will let +the other know the routes to reach them. + +== Re-hook of two equal, not contiguous gnodes == + +When there are two nodes with the same ip, or gnodes with the +same gid, one of them will re-hook, following the same rules we've described, +but all the packets that the two (g)nodes will send each other will be routed +by the daemons. For example if A wants to send a packet to A' it stores in the +pkt the route it received with the last qspn_pkt, the other nodes will forward +the packet to A' using that route, this is to avoid the problem described +above. + +== Re-hook details == + +The gnode X is re-hooking at the gnode Y. + +If the gnode Y hasn't enough free nodes for all the nodes of the +gnode X then the situation evolves in this way: + maxYnodes = maxmimum number of nodes in Y; + curYnodes = current number of nodes in Y (gnode count of Y). + + diff = maxYnodes - curYnodes; + +`diff' is the number of new nodes which the gnode Y can accept inside. +The bnodes of X will say to `diff'# nodes in X to re-hook in the gnode Y, all +the other non-informed nodes will create a new gnode. + +Let's analyse the two cases. + +=== informed nodes === + +Remembering how the nodes re-hook (first the bnode, then its rnodes, then the +rnodes of its rnodes, etc..) we adopt this strategy: + + join_rate=diff/number_of_X_bnodes - 1; + +Each bnode of X knows it can inform `join_rate'# nodes, so when its +rnodes try to re-hook at it, they'll know that: + + * they will become part of the gnode Y + * they can inform other `(join_rate-1)/(number_of_links-1)'# nodes + +The same procedure holds for recursively the rnodes of the rnodes of the +bnode. + +When `join_rate' becomes zero the node becomes non-informed. + +=== non-informed nodes === + +The gid of the new gnode they create is based on the hash of their previous +gid. In this way all the non-informed nodes will be in the same new gnode, +cause they all generates the same hash. If the new gid is already taken in the +map they'll increment it by one until they choose a non-taken gnode. + +== Counting the nodes == + +At this point all seems to be solved, but it is not. +Anyone can modify the qspn, so for example the X which has less nodes than Y +can fake the number, and Y will be forced to re-hook. +It this happens anyone can easily force a gnode of 2^24 nodes to change its +IPs! +Therefore the problem to be solved now is: how can the gnode Y verify that the +gnode X has really more nodes? + +What is the main property of a network which has more nodes than another? +The computability power! + +We assume that the average computability power for a gnode of the second level +or greater is constant. (a gnode of the second level can have 2^16 nodes, in the +third level 2^24). Therefore the gnode of level 1 won't be checked. + +Each node of the gnode which has to re-hook (in this case the gnode Y, +since the gnode X is faking the qspn_pkt) will send a problem to solve to the +other gnode and it wait for a very small time the reply with the solution in +it. If the solution is right the node receiving it will re-hook, otherwise +the gnode X will be banned and excluded from all the qspn floods. +Only one challenge each T time can occur, where T is proportional to the size +of the Y gnode. So say that Y has 16milions IPs, if it has already sent a +challenge it will send another after 10 minutes. + +== Computability power == + +But this system leaves opened another kind of attack: the gnode X can target a single +node in Y, replying only to its reply and making it re-hook. In order to +prevent this the nodes act in this way: + + * When a node hooks it creates a RSA key pair, then its rnodes get its public key. + + * When a node receives a reply to the problem, it broadcasts the reply inside its gnode, +signing it with its public key. When its rnodes receive the pkt, check the signature. +If it is valid they update the counter of received replies for the problems sent, then +they substitute the signature with their own. The packet will propagate +until it reaches all the nodes of the gnode. + + * The nodes will start to rehook only when all the replies will be +received (during the wait time). Since it is not possible that all the reply are +received it is allowed that 10% of replies are lost. + +The problem to solve sent by the nodes is: + f(x) mod k +where k is a random number between 2^16 and 2^32. + +f(x) is a function which is not easily computable with mod k. +When x gets bigger the computation time increases. +We are still deciding on what f() function using. + +=== Dumb machines === + +Generating the problem doesn't require a high computability power, in +fact, the daemon will keep 8 or 16 problems cached, generated while the cpu +isn't used. + +The machines which have a very low computability power won't reply and even +try to solve the problems they receive (but only if they can't take the +computability of the problem). + += ANDNA changes = + +If a same hostname is registered in two separeted gnodes what happens when they meet? +Which node will mantain the hostname? + +The node which is in the greater gnode wins: the hash_nodes of the smaller +gnode, which re-hooks, will reset their uptime counter, in this way when they +receive the update request from the node (which has changed its IP and must +update its hname), they ask to the other gnode for the old andna_caches. + +Moreover the ANDNA_MIN_UPDATE_TIME (the minum amount of time to be waited +before sending an update os the hname) has to be reduced to +NEW_HOOK_WAIT_TIME, which is the minimum amount of time to be waited before +re-hooking. This is necessary, because all the hname updates sent +before ANDNA_MIN_UPDATE_TIME seconds have elapsed since the last update +rejected. If a gnode re-hooked, the hostname of its nodes has to be +updated, therefore the update request must be accepted. + += And that's all = + +That's all folks. + +Alpt, Katolaz, Mancausoft, Uscinziatu +---- +related: [Netsukuku_RFC] diff --git a/doc/main_doc/ntk_rfc/Ntk_life_probability b/doc/main_doc/ntk_rfc/Ntk_life_probability new file mode 100644 index 0000000..4579d12 --- /dev/null +++ b/doc/main_doc/ntk_rfc/Ntk_life_probability @@ -0,0 +1,46 @@ +== NTK_RFC 0005 == + +Subject: Life probability + +---- +This text describes a change to the Npv7. +It will be included in the final documentation, so feel free to correct it. +But if you want to change the system here described, please contact us first. +---- + +Statistically the probability of a node to continue to stay up is related to +its uptime, for example if the node X has an uptime of 30 seconds and the node Y of +1200 seconds, then it is more probable that the node Y will continue to stay +up. + +For this reason we give higher credits to older nodes/gnodes, this means that +in a multipath route we prefer to don't use very young nodes as main gateways. + +{{{ + A + / \ + L K + \ / + N +}}} + +Let's say K has an uptime of 600 seconds and L of 200. +The node N, to reach A, will prefer the node K. + +=== Implementation === + +In order to implement this we penalize the new nodes/gnodes by increasing +their rtt, in this way they will be considered as slow links. + +We can do this only for new nodes/gnodes 'cause we cannot trust the uptime +value given by a node, but we can know for sure if that node is completely +new. + +When the next qspn_round updates the routes the penality is removed. + +Another system would be counting the number of qspn_rounds the nodes took part +in. +If it has only partecipated in < 3 rounds it is considered young. + +---- +related: [Netsukuku_RFC] diff --git a/doc/main_doc/ntk_rfc/Ntk_restricted_ip_classes b/doc/main_doc/ntk_rfc/Ntk_restricted_ip_classes new file mode 100644 index 0000000..ca85e5c --- /dev/null +++ b/doc/main_doc/ntk_rfc/Ntk_restricted_ip_classes @@ -0,0 +1,64 @@ +== NTK_RFC 0008 == + +Subject: Private IP classes in restricted mode + +---- +This text describes a change to the Npv7. +It will be included in the final documentation, so feel free to correct it. +But if you want to change the system here described, please contact us first. +---- + +The user can decide to use, in restricted mode, a different private IP +class from the default one ( 10.x.x.x ). This is useful if the 10.x.x.x class +cannot be used, for example in Russia, it is very popular to provide Internet +access through big LANs which use the 10.x.x.x class. + +The other available classes are: +{{{ +172.16.0.0 - 172.31.255.255 = 16*2^16 = 1048576 IPs +192.168.0.0 - 192.168.255.255 = 2^16 = 65536 IPs +}}} + +The 192.168.x.x class cannot be used as an alternate restricted mode IP class +because it is the default Netsukuku private class, thus the only alternative +to 10.x.x.x is the "172.16.0.0 - 172.31.255.255" IP class. +However it is adviced to always use the default class. + +== Netsukuku private classes == + +It necessary to provide at least one private IP class inside Netsukuku to +allow the creation of private LANs which are connected to Netsukuku with just +one node. + +The default Netsukuku private class is 192.168.x.x. +The random IPs choosen by the nodes will be never one of that class. +The default private class is valid both in normal and restricted mode. + +Only in normal mode the "172.16.0.0 - 172.31.255.255" class becomes private. +This class is assigned to very large private networks. + +The 10.x.x.x class IS NOT private since it is too big and it would be just a +waste of IP addresses to use it as a private class. +Note also that for each Netsukuku node you can have a private network, +therefore with just 16 Netsukuku nodes you can form a private network of +16777216 nodes, which is equivalent to a 10.x.x.x class. + +== Notes on the restricted mode == + +A node which runs in restricted mode cannot be compatible with normal mode +nodes, for this reason a restricted node will drop any packets coming from a +normal node. + +While in restricted mode the "172.16.0.0 - 172.31.255.255" class IS NOT +private. + +In restricted mode, when two different networks which use different +private classes (say 10.x.x.x and 192.168.x.x) are linked, nothing happens and +they will not rehook, this is necessary because it's assumed that the specified +private class is the only choice the user can utilize. +This leds to some problems, consider this scenario: +{{{ + 10.0.0.0 <-> 172.16.0.0 +}}} +In this case the rehook isn't launched, so it is possible that there will be a +lot of collision. diff --git a/doc/main_doc/ntk_rfc/Ntk_viphilama b/doc/main_doc/ntk_rfc/Ntk_viphilama new file mode 100644 index 0000000..b00a160 --- /dev/null +++ b/doc/main_doc/ntk_rfc/Ntk_viphilama @@ -0,0 +1,193 @@ +== NTK_RFC 0010 == + +Subject: Viphilama - Virtual to Physical Layer Mapper + +---- +This text describes a change to the Npv7. +It will be included in the final documentation, so feel free to correct it. +But if you want to change the system here described, please contact us first. +---- + + +=== Viphilama === + +Viphilama will permit to Netsukuku to expand itself over the Internet and then +switching automatically to the physical layer without interfering with the +stability of the Net. +The theory of Viphilama isn't complete yet. This document, right now, is just +a description of what it would be. + +=== Layer === + +Netsukuku will be split in two layer: the virtual layer and the physical one. + +==== The physical layer ==== + +This is the original Netsukuku layer: every node is linked to other nodes by +physical links (wifi, cables, ...). +The physical layer is prioritised over the virtual one. + +==== The virtual layer ==== + +The virtual layer is built upon the Internet or any other existing network. +The Netsukuku nodes, in this layer, are linked each other by tunnels. + +A node, in order to join in the virtual layer, has to know its physical +coordinates. +The use of geographical coordinates is required for Viphilama, because it has +to map the virtual layer to the physical one and it needs a way to measure +the effective distance between two virtual nodes. + +The coordinates can be retrieved using an online map service like +http://maps.google.com or with a GPS. + +The coordinates are stored in the internal, external and bnode maps. +In the internal map there are the coordinates of each single node. +In the external maps, the coordinates which locate a gnode are set to its +barycenter: it is the average of the coordinates of all its internal nodes. + +==== Gate node ==== + +The two layers are joined by the gate nodes. They are nodes which belong to +both layers. +This means that the two layer form a unique network. + + +=== Virtual to Physical mapper === + +The mapper does a basic job: whenever it finds that a virtual link can be +replaced by a physical one, it removes the virtual link. + +Assume this scenario: + +{{{ + Tokyo Moscow Rome London + | | | | + | | | | + |__________|Internet tunnel|_________| +}}} + +Only one link exists, and it is a virtual one. +Only Tokyo and London are linked, all the other cities are alone. + +When Tokyo and Moscow will be linked by a series of physical nodes, the mapper +will change the net in this way: + +{{{ + Tokyo<--ntk nodes-->Moscow Rome London + | | | + |______ Internet tunnel ___| +}}} + + +When even Moscow and Rome will be linked by physical nodes: + +{{{ + Tokyo<--ntk nodes-->Moscow<--ntk nodes-->Rome London + | | + |__ Inet tunnel _| +}}} + +And so on. + +Basically when there are two nodes linked physically, one of them can cut +its virtual link which connects it to the virtual layer. + +Let's go into the details. + +==== Virtual hooking ==== + +A node, which hasn't any physical neighbours, resides in a black zone and, for +this reason, it can't hook to the physical layer. It will hook directly to +a vnode (virtual node), joining the virtual layer. +Let this hooking node be X. + +The first part of the Virtual Hooking is the creation of the virtual links +(ip tunnels). + +X chooses, at first, a random vnode which can be located anywhere in the +globe. If it is its first hook to the virtual layer, it will get the IP of +the vnode from a small public list available on the Internet, otherwise it +will consult its saved virtual maps. +Let the chosen vnode be Y. + +X sends to Y a packet containing its coordinates. This pkt will be forwarded +with a greedy technique: +Y looks up its maps and forwards the pkt to the vnode which is the nearest to X. +If this latter vnode knows another vnode which is nearer to X, it forwards +again the packet. Finally, the pkt will arrive to the node Z, which is a node +very near to X. + +Let d(A, B) be the physical distance between the node A and B. + +The node Z appends its Internet IP to the received packet and forwards it +again to a node T, so that d(X,T) ~= d(X,Z). +The node T will do the same (adds its IP and forwards the pkt). +When the packet will be forwarded for the 16th time or when it can't be +forwarded anymore, it is sent back to the node X. + +The node X collects this last packet and creates a virtual link (tunnel) to +each Internet IP which has been stored in the packet itself. +These linked nodes are the new rnodes of the node X. + + +At this point the node X will hook to each linked node. This procedure is +called v-linking: + +Let "L" be the generic linked node. + +X sends the I_AM_VHOOKING request to L. + +L analyses its virtual rnodes and compares d(L,vR) to d(X,vR), where vR is a +vrnode. If d(X,vR) < d(L,vR), L adds the Internet IP of the vR in the reply +packet. This means that if L finds out that X is nearer to one of its +vrnodes, it tells X to create a link to it and deletes its link to the vrnode. + +X receives the reply packet of L and tries to create a virtual link to each +vR listed in the same packet. +X writes the list of all the vR nodes which has been successfully linked to X +itself. This list is sent back to L. + +L reads this latter list and delete all its links to the vR nodes, which has +been successfully linked to X. + +X repeats this same hooking procedure for each L. + +In the end, X chooses one of its vrnodes and hooks with the classical method +to it. + +==== Gate hooking ==== + +A node can hook to the physical layer as a normal node or as gate node. + +A normal node is the old plain node of Netsukuku, it doesn't have to specify +its coordinates and doesn't need any other prerequisites. + +The gate-node has an Internet connection that it uses to connect to +the virtual layer, it is also connected to physical nodes. + +There are two cases: + + * When the node is from the start a gate node + * When it is first a vnode and then becomes a gate node + +In the first case it hooks directly to a physical node. If one of its rnodes +is a gate node too, it will start the v-linking procedure with it. +In this way, the new gate-node will be linked to its nearer vrnodes. +The old gate-node will delete all the links to the vrnodes which have been +linked by the new gate-node. + +In the second case, the node directly v-links to the new gate node which is +connected to. + +When a gate-node can reach one of it vrnodes using both a virtual and a +physical link, it will delete the virtual one. + +== TODO == + + * Is it possible to avoid using the coordinates? + * What does happen when a (v)node dies? + +---- + +Feel free to help the development of Viphilama. diff --git a/doc/manuals/andna b/doc/manuals/andna new file mode 100644 index 0000000..a462adc --- /dev/null +++ b/doc/manuals/andna @@ -0,0 +1,160 @@ +NAME + ANDNA - Abnormal Netsukuku Domain Name Anarchy + +DESCRIPTION + ANDNA is the distributed, non hierarchical and decentralised system of + hostname management in Netsukuku. It substitutes the DNS. The ANDNA + database is scattered inside all the Netsukuku net and in the worst case + every node will have to use about some hundreds Kb of memory. + + In order to join ANDNA it is necessary to be hooked at Netsukuku with + the ntkd(8) daemon. + + For more information about ANDNA visit: + +USAGE + First of all be sure to have the ntkd(8) daemon up and running. + + HOSTNAME REGISTRATION + You can register up to 256 hostnames. Each hostname can be a string of + maximum 512 bytes, which contains a newline (\n) only at its end. + + The hostnames to be registered must be listed, one per line, in the + andna_hostnames file, which is by default in + /etc/netsukuku/andna_hostnames. + + The ntkd(8) daemon reads it when it is started and when it receives the + SIGHUP signal. So if you've added a hostname while ntkd was running, + just do: + + killall -HUP ntkd + + All the hostnames, which are already registered by other nodes, are + added in the queue, in this way, when the other nodes won't update them, + your hostnames will automatically be the first in the queue. + + An hostname expires after 3 days, if it isn't updated. ntkd + automatically updates the registered hostnames, therefore your hostnames + will expire only if you aren't present in the Netsukuku for 3 entire + days. + + If you want to know the result of a registration read the ntkd logs. + + HOSTNAME RESOLUTION + The ntkd(8) daemon runs also a DNS wrapper which receives standard DNS + queries for hostnames resolution. The hostnames are resolved in ANDNA, + then the DNS wrapper will reply to the requester. + + When the ntkd(8) daemon is started it copies /etc/resolv.conf in + /etc/resolv.conf.bak and adds in the first line of /etc/resolv.conf the + "nameserver 127.0.0.1" string. When it is closed it moves back + /etc/resolv.conf.bak to /etc/resolv.conf. Use the -R option if you want + to disable this behaviour. + + All the resolved hostnames are kept, until their expiration date, in the + "resolved hostnames cache". The entire cache is flushed each time the + ntkd(8) daemon receives the SIGALRM signal. + + That's all. + + IP RESOLUTION + It is possible to know the list of hostnames registered by a node. You + have to simply reverse resolve its ip. For example: + + dig -x 127.0.0.2 + + This command shows your currently registered hostnames. You can use it + to know what hostnames have been already registered. Note the 127.0.0.2 + ip. If you use 127.0.0.1 you get only the local hostname written in + /etc/hosts. + + SCATTERED NAME SERVICE DISGREGATION + The Scattered Name Service Disgregation is the ANDNA equivalent of the + SRV Record of the Internet Domain Name System. For a complete + description of the SNSD read the NTK_RFC 0009: + + + SNSD NODE REGISTRATION + * Modify the /etc/netsukuku/snsd_nodes file. + * Copy the needed public keys + * Send a SIGHUP to the NetsukukuD of the register node: + + SNSD NODE DELETION + Not implemented + + SNSD HNAME RESOLUTION + The utility ntk-resolv(8) can be used to resolve SNSD hostnames. + Examples: + + ntk-resolv -s 53/udp host + ntk-resolv -s http host + +SIGNALS + When the SIGHUP signal is sent to ntkd(8), the andna_hostnames and + snsd_nodes files will be reloaded and it will try to register all the + new added hostnames and snsd records. + + When the SIGALRM signal is sent to ntkd(8), the resolved hostnames cache + will be flushed. + +FILES + /etc/netsukuku/andna_hostnames + It is the file where the hostnames to be registerd in ANDNA are kept + one per line. It's location can be changed by modifying its option + in the netsukuku.conf file. + + /etc/netsukuku/snsd_nodes + The snsd_nodes file keeps the list of the SNSD records which will be + register in ANDNA. + + /usr/share/netsukuku/andna_lcl_keyring + In this keyring your ANDNA public and secret keys are saved. Handle + this file with care: without it, you won't be able to update your + hostnames, thus you'll definitely lose them. + + /usr/share/netsukuku/andna_cache + /usr/share/netsukuku/andna_lcl_cache + /usr/share/netsukuku/andna_rh_cache + /usr/share/netsukuku/andna_counter_cache + They are the saved ANDNA caches. Their locations can be changed in + netsukuku.conf. + +BUGS + { Don't panic! } + + If you encounter any bug, please report it. Use the online bug track + system: + + or the mailing list: + + and explain what the problem is and if possible a way to reproduce it. + +CONTACTS + Subscribe to the netsukuku mailing to get help, be updated on the latest + news and discuss on its development. + + To subscribe to the list, send a message to: + netsukuku-subscribe@lists.dyne.org + + We live night and day in IRC, come to see us in: #netsukuku on the + FreeNode irc server (irc.freenode.org). + +AUTHORS + Main authors and maintainers: + + Andrea Lo Pumo aka AlpT + + Main contributors: + + Andrea Leofreddi , Katolaz + , Federico Tomassini + + For a complete list read the AUTHORS file or visit: + + +SEE ALSO + For more information about Netsukuku visit: + + + ntkd(8), ntk-wifi(8), iproute2(8), route(8) + diff --git a/doc/manuals/netsukuku.conf b/doc/manuals/netsukuku.conf new file mode 100644 index 0000000..3387f51 --- /dev/null +++ b/doc/manuals/netsukuku.conf @@ -0,0 +1,241 @@ +NAME + netsukuku.conf - Netsukuku daemon configuration file + +SYNOPSIS + /etc/netsukuku/netsukuku.conf + +DESCRIPTION + ntkd(8) loads its options from the command line and from netsukuku.conf. + The options that are changed infrequently resides in the configuration + file. The netsukuku.conf file is typically installed at + /etc/netsukuku/netsukuku.conf. + + The comments starts with a '#'. If an option is commented, ntkd will use + its default value. + + The character '=' is used to assign a value to an option. + + All the options will be overridden by their command line equivalent. + +OPTIONS + RESTRICTED MODE + ntk_restricted_mode = *bool* + When set to 1, ntkd will be started in restricted mode to be + compatible with Internet. In the restricted mode, only IPs of the + largest private subnet, i.e. 10.x.x.x are chosen. + + Default: *0* + + ntk_restricted_class = *bool* + When set to 1 the IPs will be chosen from the + 172.16.0.0-172.31.255.255 range (use this option only if you can't + use the 10.x.x.x class). + + Default: *0* + + INTERNET CONNECTION + All these Internet options requires ntk_restricted_mode set to 1. + + internet_connection = *bool* + When set to 1, it specifies that this computer has an active + Internet connection. Note that ntkd will overwrite any default route + if this option is set to 0 and the shared Internet connections of + other nodes are used. + + Default: *0* + + internet_gateway = *IP:interface* + It specifies the default gateway used by *localhost* to reach the + Internet. This option is necessary only if you don't have the + default route set when you run ntkd (i.e. you haven't connected + yet). If this option isn't specified, ntkd will automatically + retrieve the default Internet gateway from the routing table. + Example: internet_gateway = 192.168.1.1:eth0 + + Default: *(null)* + + internet_download_rate = *Kb* + This option is required if the internet_connection option has been + set to 1. It must be set to the download rate of the Internet + connection in KiloBytes. Example: + + internet_download_rate = 640 + + Default: *(null)* + + internet_upload_rate = *Kb* + This option is required if the internet_connection option has been + set to 1. It must be set to the upload rate of the Internet + connection in KiloBytes. Example: + + internet_upload_rate = 30 + + Default: *(null)* + + internet_ping_hosts = *host1:host2:host3:...* + Specifies a list of Internet hostnames which ntkd will ping + periodically to verify the status of the Internet connection. If all + the hosts specified aren't reachable, it will assume that the + Internet connection isn't available anymore. When one them becoms + pingable, ntkd will enable again the Internet Gateway Search. + Example: + + internet_ping_hosts = google.com:cisco.com:sourceforge.net:dyne.org + + This option hasn't a default value, it must be specified in the + netsukuku.conf file. + + share_internet = *bool* + When set to 1, ntkd shares the Internet connection among all the + other Netsukuku nodes. + + Default: *1* + + shape_internet = *bool* + Specifies if ntkd will execute the /etc/netsukuku/tc_shaper.sh + script to activate the traffic shaping of the Internet connection. + + Default: *0* + + use_shared_internet = *bool* + Specifies if ntkd will load balance the Internet traffic of this + host using the Inet connections shared by the Netsukuku nodes. When + set to 0, localhost (this machine) uses only its local Internet + connection (if any). + + Default: *1* + + ANDNA + disable_andna = *bool* + When set to 1, ntkd won't load the ANDNA(8) daemon. Note that when + the ANDNA daemon is disabled, the andna system will not work at all, + so it will be impossible to resolve, register or update hostnames. + + Default: *0* + + disable_resolvconf = *bool* + When ntkd starts it modifies /etc/resolv.conf writing in the first + line "nameserver 127.0.0.1". The old /etc/resolv.conf is copied in + /etc/resolv.conf.bak. When the daemon is closed /etc/resolv.conf is + restored. If you want to disable this set disable_resolvconf to 1. + If it is disabled you won't be able to resolve hostnames! + + Default: *0* + + LIMITS + Note: in the current ntkd version these limits aren't effective. + + ntk_max_connections = *number* + How many connection the netsukuku daemons can simultaneusly handle. + + Default: *512* + + ntk_max_accepts_per_host = *number* + How many simultaneusly connections to the daemons from a single host + are allowed. + + Default: *16* + + max_accepts_per_host_time = *seconds* + The wait time necessary for a host to reconnect to the daemons after + all the ntk_max_accepts_per_host were used. + + Default: *4* + + FILES + pid_file = *filename* + ntkd will save its process id in this file. It is used to check if + other instances of ntkd are already running. Only one instance is + allowed. + + Default: */var/run/ntkd.pid* + + ntk_ext_map_file = *filename* + ntk_int_map_file = *filename* + ntk_bnode_map_file = *filename* + Specify the paths of the maps saved by the daemon. + + Default: */usr/share/netsukuku/ext_map_file* + + Default: */usr/share/netsukuku/int_map_file* + + Default: */usr/share/netsukuku/bnode_map_file* + + andna_hnames_file = *filename* + Specify the path of the file which keeps the ANDNA hostnames of the + local host. These hostnames will be registerd in ANDNA. + + Default: */etc/netsukuku/andna_hostnames* + + snsd_nodes_file = *filename* + The snsd_nodes_file keeps the list of the SNSD records which will be + register in ANDNA. + + Default: */etc/netsukuku/snsd_nodes* + + andna_lclkey_file = *filename* + Specifies the location of the *local keyring* file. In this keyring + the ANDNA public and secret keys are saved. Handle this file with + care: without it, you won't be able to update your hostnames, thus + you'll definitely lose them. + + Default: */usr/share/netsukuku/andna_lcl_keyring* + + andna_cache_file = *filename* + andna_lcl_file = *filename* + andna_rhc_file = *filename* + andna_counter_c_file = *filename* + Specify the paths of the caches used by the ANDNA daemon. + + Default: */usr/share/netsukuku/andna_cache* + + Default: */usr/share/netsukuku/andna_lcl_cache* + + Default: */usr/share/netsukuku/andna_rh_cache* + + Default: */usr/share/netsukuku/andna_counter_cache* + + ip_masquerade_script = *filename* + Specifies the path of the IP masquerading script. This script is + launched by NetsukukuD, at its start, when it shares the Internet + connection. The script will activate the IP masquerading. The script + is also used to disable the IP masquerading when ntkd is closed. + + Default: */etc/netsukuku/ip_masquerade.sh* + + tc_shaper_script = *filename* + Specifies the path of the traffic shaping script. This script + manages the traffic shaping for the upload bandwidth. It is executed + by ntkd at its start if its relative option has been enabled. + + Default: */etc/netsukuku/tc_shaper.sh* + +CONTACTS + Subscribe to the netsukuku mailing to get help, be updated on the latest + news and discuss on its development. + + To subscribe to the list, send a message to: + netsukuku-subscribe@lists.dyne.org + + We live night and day in IRC, come to see us in: #netsukuku on the + FreeNode irc server (irc.freenode.org). + +AUTHORS + Main authors and maintainers: + + Andrea Lo Pumo aka AlpT + + Main contributors: + + Andrea Leofreddi , Katolaz + , Federico Tomassini + + For a complete list read the AUTHORS file or visit: + + +SEE ALSO + For more information about Netsukuku visit: + + + ntkd(8), ntk-wifi(8), andna(8), iproute2(8), route(8) + diff --git a/doc/manuals/ntk-resolv b/doc/manuals/ntk-resolv new file mode 100644 index 0000000..6e99d5a --- /dev/null +++ b/doc/manuals/ntk-resolv @@ -0,0 +1,208 @@ +NAME + ntk-resolv - Andns Lookup Resolver + +SYNOPSIS + ntk-resolv [-vnPtrspShbml] host ntk-resolv -H host + +DESCRIPTION + Ntk-resolv is an interface to ANDNA daemon: it performs andns queries + and displays the answers to stdout. It is able to formule questions for + objects in Internet and Netsukuku realms. It uses the 'andns protocol' + to encode his contents, as explained in Netsukuku RFC 006. + +USAGE + The simplest example is: + + ntk-resolv hname + + With this comand, it asks ANDNA which IP registered the hostname + 'hname'. The default behavior is to perform the query in the Netsukuku + realm. + +OPTIONS + -v --version + Print Version, then exit. + + -n --nameserver=host + Specify the nameserver to use. The default is localhost. + + -P --port=n + Uses the port of nameserver. Default is 53. + + -t --query-type=snsd --query-type=ptr --qury-type=global --query-type=mx + Specify the query type . Default is snsd. See the section QUERY + TYPE. + + -r --realm=inet --realm=ntk + Specify the realm of the query: Internet or Netsukuku. Default is + ntk. + + -s --service=n[/proto] + Specify the SNSD service and the relative protocol to search. See + services(5). The service can be specified in alfanumeric or numeric + format. The default service and protocol are 0 and tcp. Example: + + ntk-resolv -s domain/udp host + ntk-resolv -s 53/udp host + + See the section QUERY TYPE, SERVICES AND PROTOCOL for a better + explanation. + + -S --silent + With this option, ntk-resolv will be very discrete. + + -b --block-recursion + Set recursion OFF. If recursion is ON (default), when a SNSD service + is requested, and the service is specified with a hostname instead + of an IP, the IP of that hostname will be searched. In the case of a + success research, the answer will contain the IP of the hostname, + and NOT the hostname HASH. + + -m --md5-hash + If this option is set, the hostname specified is interpreted as a + MD5 hash. This is useful when you want to know a hostname IP, but + you know only the hash of his name. + + -H --compute-hash + Compute the hash of specified hostname and print it to stdout. + Example: + + ntk-resolv -H hname + + It will print the md5 hash of `hname'. This is useful to debug SNSD + configurations. In fact, if a query is not recursive, the results + are hash'ed hostnames: so, it's possible to verify if the ANDNA + cache is storing the correct hash-value for your SNSD hostnames. + + -l --parsable-output + Print answers in a synthetic way. The format of output is: + + ~ IP (SNSD s=0) + - hname (Inverse) + - hname prio weight (SNSD s!=0) + ~ ip prio weight (SNSD s!=0) + ~ ip service proto prio weight (Global) + - hname service proto prio weight (Global) + + Note that when an answer contains an IP, the first character is `~'; + if the answer contains a hostname (hash'ed or not) the line begins + with `-'. + + -h --help + Prints to stdout a short explanation of ntk-resolv. + + Final note: + All options that take string arguments could be expressed in a + shorter way, by specifing univoque abbreviation of argument. So, + there is the equivalence: + + ntk-resolv -r i = ntk-resolv -r inet + + with the exception of option -s, wich requires a valid service. + +QUERY TYPE + You can formule different kind of queries. + + With a `ptr' query, you specify an IP, and you will have, if exists, + the hostname that registered that IP. + + With a `snsd' query, you specify a hostname, a service and a + protocol. If service and protocol are not specified, they are set to + 0, and you will have the IP assigned to the hostname at this moment. + If you specify a service and a protocol, the answer will contain the + IP that gives the specified service/protocl for the hostname. See + the section SNSD, SERVICES AND PROTOCOL to understand better the + SNSD behavior. + + A global query will return the complete SNSD configuration for a + hostname. Ie, you will have an answer for each service that hostname + registered. + + The `mx' query is equivalent to a snsd query with service 25 and + proto TCP. + +SNSD, SERVICES AND PROTOCOL + SNSD Query Type gives a hostname resolution. With SNSD (Scattered + Name Service Disgregation) ANDNA lets the user to ask for a domain + and a service. If service is 0, the resolution will show which IP + registered the hostname. If service is non-0, the resolution will + show which IP gives specified service for the hostname (considering + the protocol too). See services(5). + + You can specify a service as expressed in /etc/services. It can be + expressed also in numeric form. It is also possible to specify the + protocol: + + "domain", "53", "53/udp", "domain/udp" + + are valid service/proto strings. + + For example, the next commands will retrieve the IP(s) that offers + web-pages for the hostname "host": + + ntk-resolv -s http/tcp host + ntk-resolv -s 80/tcp host + ntk-resolv -s 80 host + ntk-resolv -s http host + + To configure the SNSD delegations, see the SNSD HowTo. + + If the delegation for a service (say http) is not set, the IP + returned is the IP that registered the hostname. So, if you do not + want to set SNSD delegations for specific services, the main + hostname IP will be used and you don't need to do nothing. + + The hope is that every client will build different queries: browsers + will make queries with service=80 and proto=tcp, mail-clients will + build queries with service=25 and proto tcp and so on. + + The service is useless if the query realm is Internet. + + The default service is 0: ie, the query will return the IP that + registered the hostname. Default protocol is tcp. Protocol is + ignored when service requested is 0. + + Note: service and proto are also ignored when the query type is + `ip->host` (ptr query type). + +BUGS + { Don't panic! } + + If you encounter any bug, please report it. Use the online bug track + system: + + or the mailing list: + + and explain what the problem is and if possible a way to reproduce + it. + +CONTACTS + Subscribe to the netsukuku mailing to get help, be updated on the + latest news and discuss on its development. + + To subscribe to the list, send a message to: + netsukuku-subscribe@lists.dyne.org + + We live night and day in IRC, come to see us in: #netsukuku on the + FreeNode irc server (irc.freenode.org). + +AUTHORS + Main authors and maintainers: + + Federico Tomassini wrote ntk-resolv and network + libraries. + + Andrea Lo Pumo aka AlpT wrote ANDNA and + Netsukuku Core. + + Main contributors: + + Andrea Leofreddi , Katolaz + , + + For a complete list read the AUTHORS file or visit: + + +SEE ALSO + ntkd(8), andna(8), services(5) + diff --git a/doc/manuals/ntk-wifi b/doc/manuals/ntk-wifi new file mode 100644 index 0000000..9b7a46b --- /dev/null +++ b/doc/manuals/ntk-wifi @@ -0,0 +1,54 @@ +NAME + ntk-wifi - configures the specified wifi card to join Netsukuku + +SYNOPSIS + ntk-wifi *wifi_interface* + +DESCRIPTION + Netsukuku_wifi is a shell script, which takes as its first argument the + name of the wifi network interface to be used in order to join in + Netsukuku. Then it sets the wifi interface in Ad-Hoc mode and its essid + to "netsukuku". At this point the ntkd daemon is ready to be launched, + +EXAMPLES + ntk-wifi wlan0 + +BUGS + { Don't panic! } + + If you encounter any bug, please report it. Use the online bug track + system: + + or the mailing list: + + and explain what the problem is and if possible a way to reproduce it. + +CONTACTS + Subscribe to the netsukuku mailing to get help, be updated on the latest + news and discuss on its development. + + To subscribe to the list, send a message to: + netsukuku-subscribe@lists.dyne.org + + We live night and day in IRC, come to see us in: #netsukuku on the + FreeNode irc server (irc.freenode.org). + +AUTHORS + Main authors and maintainers: + + Andrea Lo Pumo aka AlpT + + Main contributors: + + Andrea Leofreddi , Katolaz + , Federico Tomassini + + For a complete list read the AUTHORS file or visit: + + +SEE ALSO + For more information about Netsukuku visit: + + + ntkd(8), andna(8), iproute2(8), route(8) + diff --git a/doc/manuals/ntkd b/doc/manuals/ntkd new file mode 100644 index 0000000..0cca3fb --- /dev/null +++ b/doc/manuals/ntkd @@ -0,0 +1,243 @@ +NAME + ntkd - Netsukuku protocol daemon + +SYNOPSIS + ntkd [-hvaldrD46] [-i net_interface] [-c conf_file] [-l logfile] + +DESCRIPTION + Netsukuku is a mesh network or a P2P net system that generates and + sustains itself autonomously. It is designed to handle an unlimited + number of nodes with minimal CPU and memory resources. Thanks to this + feature it can be easily used to build a worldwide distributed, + anonymous and anarchical network, separated from the Internet, without + the support of any servers, ISPs or authority controls. + + The complete features list of Netsukuku is here: + + + In order to join to Netsukuku you have to use ntkd, which is the daemon + implementing the Npv7 protocol. The daemon at startup takes the list of + all the network interfaces which are currently UP and it uses all of + them to send and receive packets. If you want to force the daemon to use + specific interfaces you should use the -i option. The ports it listens + to are: 269-udp, 269-tcp, 277-udp, 277-tcp. So be sure to open them in + the firewall. + + For more information about Netsukuku visit: + + +OPTIONS + -4, --ipv4 + Forces the daemon to use ipv4 addresses only + + -6, --ipv6 + Forces the daemon to use ipv6 addresses only. Warning, this is still + experimental. + + -i *interface*, --iface *interface* + Specifies the network interface the daemon will use to join + Netsukuku, i.e. wlan0. You can use more than one interface by + specifying multiple times the -i option. For example: + + ntkd -i wlan0 -i eth0 -i wifi1 -i eth1 + + -a, --no_andna + Forces ntkd to don't run the ANDNA daemon when started. + + -R, --no_resolv + When NetsukukuD starts it modifies /etc/resolv.conf writing in the + first line the string "nameserver 127.0.0.1". The old + /etc/resolv.conf is copied in /etc/resolv.conf.bak. When the daemon + is closed /etc/resolv.conf is restored. If you want to disable this + set use the -R option. + + -r*[bool]*, --restricted=*[bool]* + With this option the daemon will run in restricted mode as specified + in the Npv7, only IPs of a private class will be chosen. It is used + for Internet compatibility. If no argument is given to the option, + the default restricted private class 10.0.0.0 is used, otherwise if + *bool* is not zero, the restricted class will be + 172.16.0.0-172.31.255.255. + + -I, --share-inet + Tells NetsukukuD to run in restricted mode (see -r) and to share + your Internet connection. Please check the relative options in + /etc/netsukuku/netsukuku.conf + + -D, --no_daemon + This option tells ntkd to don't detach to background and daemonizing + itself. The daemon will run on foreground instead. + + -c *configuration_file*, --conf *configuration_file* + Specifies the name of the configuration file. The default is + /etc/netsukuku/netsukuku.conf. ntkd will not start without a + configuration file. + + -l *logfile*, --logfile *logfile* + Specifies that ntkd should send all of its messages to the specified + file. The *logfile* will be overwritten. + + -d, --debug + With this option the daemon will run with displaying its debug + messages. The more -d you specify the more debug messages you'll + get. Sometimes it's cool to use it, but be careful and don't go + insane ;) + + -h, --help + Display a the list of available options and their brief description. + + -v, --version + Displays the version of the ntkd daemon. + +EXAMPLES + Usually you'll just want to use ntkd with a wifi device: + + ntk-wifi wlan0 + ntkd -i wlan0 + + If you one to use more than one network interface: + + ntkd -i eth0 -i wlan0 -i wifi1 -i eth2 + +SIGNALS + When the SIGHUP signal is sent to ntkd(8), the andna_hostnames and + snsd_nodes files will be reloaded and it will try to register all the + new added hostnames and snsd records. + + When the SIGALRM signal is sent to ntkd, the resolved hostnames cache is + flushed. + +LOGS + If ntkd is started as a daemon (without the -D option), all the logs are + sent to syslog under the LOG_DAEMON category. + + If the no-daemon option (-D) is used, all the logs are printed to + stderr. + +FILES + /etc/netsukuku/netsukuku.conf + It is the default path for the ntkd configuration file. It's + possible to choose another file using the -c option. + + /etc/netsukuku/andna_hostnames + It is the file where the hostnames to be registerd in ANDNA are kept + one per line. It's location can be changed by modifying the relative + option in the netsukuku.conf file. + + /etc/netsukuku/snsd_nodes + The snsd_nodes_file keeps the list of the SNSD records which will be + register in ANDNA. + + /usr/share/netsukuku/ext_map_file + /usr/share/netsukuku/int_map_file + /usr/share/netsukuku/bnode_map_file + They are the Netsukuku maps saved by the daemon. Their locations can + be changed in netsukuku.conf. + + /usr/share/netsukuku/andna_lcl_keyring + In this keyring your ANDNA public and secret keys are saved. Handle + this file with care: without it, you won't be able to update your + hostnames, thus you'll definitely lose them. + + /usr/share/netsukuku/andna_cache + /usr/share/netsukuku/andna_lcl_cache + /usr/share/netsukuku/andna_rh_cache + /usr/share/netsukuku/andna_counter_cache + They are the saved ANDNA caches. Their locations can be changed in + netsukuku.conf. + + /etc/netsukuku/ip_masquerade.sh + This script is launched by NetsukukuD, at its start, when it shares + the Internet connection. The script will activate the IP + masquerading. The script is also used to disable the IP masquerading + when ntkd is closed. + + /etc/netsukuku/tc_shaper.sh + This script manages the traffic shaping for the upload bandwidth. It + is executed by ntkd at its start if its relative option has been + enabled. + + /var/run/ntkd.pid + It is the lock file created by ntkd at its start, it is used to + check if other instances of ntkd are already running. Only one + instance is allowed. + +KERNEL DEPENDENCIES + On Linux be sure to have the following options set in your kernel + .config. These options are taken from linux-2.6.14. + + # + # Networking options + # + CONFIG_PACKET=y + CONFIG_UNIX=y + CONFIG_INET=y + CONFIG_IP_MULTICAST=y + CONFIG_IP_ADVANCED_ROUTER=y + CONFIG_IP_MULTIPLE_TABLES=y + CONFIG_IP_ROUTE_MULTIPATH=y + CONFIG_NET_IPIP=y + CONFIG_NETFILTER=y + + and these from linux-2.6.16.19. + + # + # Core Netfilter Configuration + # + + CONFIG_NETFILTER_XT_MATCH_CONNTRACK=y + NETFILTER_XT_TARGET_CONNMARK=y + + # + # IP: Netfilter Configuration + # + + CONFIG_IP_NF_IPTABLES=y + CONFIG_IP_NF_FILTER=y + CONFIG_IP_NF_TARGET_REJECT=y + CONFIG_IP_NF_NAT=y + CONFIG_IP_NF_NAT_NEEDED=y + CONFIG_IP_NF_TARGET_MASQUERADE=y + + If you are using modules you have to load them before launching the + daemon. + +BUGS + { Don't panic! } + + If you encounter any bug, please report it. Use the online bug track + system: + + or the mailing list: + + and explain what the problem is and if possible a way to reproduce it. + +CONTACTS + Subscrive to the netsukuku mailing to get help, be updated on the latest + news and discuss on its development. + + To subscribe to the list, send a message to: + netsukuku-subscribe@lists.dyne.org + + We live night and day in IRC, come to see us in: #netsukuku on the + FreeNode irc server (irc.freenode.org). + +AUTHORS + Main authors and maintainers: + + Andrea Lo Pumo aka AlpT + + Main contributors: + + Andrea Leofreddi , Katolaz + , Federico Tomassini + + For a complete list read the AUTHORS file or visit: + + +SEE ALSO + For more information about Netsukuku visit: + + + netsukuku.conf(5), ntk-wifi(8), andna(8), iproute2(8), route(8) + diff --git a/doc/misc/Ntk_Grow_Netsukuku b/doc/misc/Ntk_Grow_Netsukuku new file mode 100644 index 0000000..806576c --- /dev/null +++ b/doc/misc/Ntk_Grow_Netsukuku @@ -0,0 +1,95 @@ +== Grow Netsukuku == + +Netsukuku is a mesh network. +The mesh networks depend on the collaboration of each node, in fact, a +distributed network can grow only with the small contributions of each user. + +Don't expect that someone will set up the whole net for you, just +because Netsukuku is decentralised, anonymous, distributed and independent +and it will never be possible to anybody to control it. + +You have the possibility to be the citizen of a free world wide community, +where no one will ever be able to limit your digital rights with measures like +prosecution of file sharing, censorship, data retention, commercial +connectivity and so on. + +=== Joining Netsukuku === + +The first step is to turn your PC into a Netsukuku node: + * take a computer + * install any distro of GNU/Linux + * install Netsukuku + * buy a wifi (PCI) card + * buy/build an external antenna (with the longest range as possible) +or + * buy an Access Point compatible with the Netsukuku-AP firmware + * buy/build an external antenna (with the longest range as possible) + * connect the AP to your PC. In this case it doesn't matter anymore + what OS you've installed and even if your PC is turned off, the AP + will continue to be an active Netsukuku node.. + +It's highly probable you will be the first node in your neighborhood, +but this is normal: someone have to be the first. +As soon as another user will do the same thing you did, you will be +automatically connected to each other. +Waiting doesn't cost you nothing. + +In order to shorten your waiting you can help the growth of Netsukuku in your +neighborhood by following the advises written below. + +=== Internet sharing === + +If you have an Internet connection, share it with your neighbours. +In this way everybody will be able to have a free Internet connection without +worrying of his or her location. Moreover, when this habit will be common, you +won't worry too, anywhere and anytime. + +Don't worry too much about sharing your bandwidth. +These are some features of sharing the Internet connection with Netsukuku: + * You can connect to the Internet using, at the same time, multiple node + which share their connection. For example, if there are 5 nodes sharing + their 640Kb/s connections, you can have 5 parallel downloads at 640Kb/s. + * If you decide to share your Internet connection, you will always use the + Internet connections shared by the other nodes. In this way, you donate + your bandwidth, but, at the same time, receive donations from other users. + * Even if you share your Internet connection to other Netsukuku nodes, your + traffic will have the maximum priority, therefore you won't notice any + slowdown. + +=== Spread the word === + +It is very important to let your neighbours aware of being inside a +Netsukuku area. +You have just to mark in a visible way the area, for example using: + * stickers: /* TODO: image and phrase for the sticker URL */ + * papers: /* TODO: url of the sheet to print */ + * posters: /* TODO */ + +For more information on this topic go to: +http://lab.dyne.org/Ntk_spread_the_word /* TODO */ + +=== City-City link === + +In the same way two nodes close to each other are linked, it is possible to connect +two close cities by wireless links. +Otherwise, if it is impossible to link physically them (f.e. there is a desert +area between them), they can still be connected with the use of Internet tunnels. + +For more information on this topic go to: +http://lab.dyne.org/Ntk_Internet_tunnels + +=== Documentation === + +Another useful thing you can do is writing or translating documentation. +Use the wiki: http://lab.dyne.org/Netsukuku + +=== Code === + +There is a lot to code too! If you are a Kung Foo coder, get on board and +help the development writing some nice poems. For a start you can take a look +at the src/TODO file. + +=== Misc === + +Finally, every good work you can do is welcomed and it will surely be used, +for example if you like to draw upload your drawings. diff --git a/doc/misc/Ntk_Internet_tunnels b/doc/misc/Ntk_Internet_tunnels new file mode 100644 index 0000000..14c42b3 --- /dev/null +++ b/doc/misc/Ntk_Internet_tunnels @@ -0,0 +1,36 @@ +== Internet tunnels and Netsukuku == + +Internet tunnels can be used to link Netsukuku nodes. + +Generally, it isn't a good idea because Netsukuku is meant to be a +physical net, in fact, if the links are based on a lower network (the +Internet), Netsukuku becomes dependent on it. +If Netsukuku becomes dependent on another network, all the advantages of +having a parallel net to the Internet are lost. + +However the Internet tunnels can be useful. + +Consider this scenario: +there two large gnode in two near cities and it is difficult to link the +cities, f.e. using a wireless hook. +In this case they can be linked with the use of Internet tunnels. + +Some of nodes with the best Internet connection will be linked to the nodes of +the other city. In this way the links will be like real physical links, +because they'll have the same topological meaning, and the delay between the +two gnode won't be high (the cities are near). +Moreover the ISPs will be used to connect two large gnode, therefore the +Netsukuku net will be partially dependent on the Internet. +These tunnels have to be created manually. + +It is important to not create tunnels which undermine the topological meaning +of physical links, thus you must not create a tunnel between Tokyo and +Amsterdam. + +If there is the danger that the ISPs used to create the tunnels will try to +tap them, it is possible to create encrypted tunnels, or even better the +tunnel can be encrypted and routed through different routes using Tor. In the +latter case the link bandwidth will be heavily afflicted therefore this +countermeasure must be used with caution. + +For an example on how to link two nodes using a tunnel see ["Ntk_vpn_test"]. diff --git a/doc/misc/Ntk_features_list b/doc/misc/Ntk_features_list new file mode 100644 index 0000000..7a36ac0 --- /dev/null +++ b/doc/misc/Ntk_features_list @@ -0,0 +1,100 @@ + +== Netsukuku features list == + +{{{ + +- The Netsukuku mesh network is: distributed, not hierarchic, and higly + scalable. The design of Netsukuku prioritises the stability of net. + For this reason, it isn't specifically suitable for mobile nodes. + However if the mobile nodes are inside an area covered by static Netsukuku + nodes, there aren't any problems. It is also possible to use other mesh + network protocols designed for mobility in conjunction with Netsukuku (f.e. + see olsrd.org), in the same way they are used in conjunction with the + Internet. + +- Scalability: Netsukuku is specifically designed to handle an unlimited + number of nodes with minimal CPU and memory resources. + + - The net isn't overloaded with discoveries packet + + - The size of the maps is fixed: about 4Kb for the int_map and 16Kb + for the ext_map. + + - Not all the nodes sends a broadcast discovery. + + - There are few floods for each discovery. + + - When a node receives a flood it has already the routes that can be + used to reach all the nodes traversed by the flood. It doesn't need + to calculate anything about them. + + - A flood is synchronized: the same flood starts at the same time for + all the nodes. + + - http://lab.dyne.org/Netsukuku_scalability + +- zeroconf: the network builds itself, without need of human intervention + +- ANDNA: distributed and not hierarchic DNS + + - When the net becomes larger, ANDNA scales more because its DB will + be distributed among the nodes. + + - Any node can register up to 256 hostnames. + + - The registration is secure: it is based on asymmetric cryptography, + thus it is very difficult to take hostnames which has been already + registered by other nodes. + + - Each hostname can be a string of maximum 512 bytes. + + - DNS compatibility: all the network programs are already compatible + with ANDNA, because NetsukukuD comes with a DNS wrapper which + converts DNS queries to ANDNA requests. + + - All the resolved hostnames are kept, in the "resolved hostnames + cache" to speed up the resolution process. + The rhcache is synchronized with ANDNA, therefore its stored + entries will expire exactly when the registered hostnames expire + in ANDNA. + + - Scattered Name Service Disgregation + http://lab.dyne.org/Ntk_SNSD + The SNSD is the ANDNA equivalent of the SRV Record of the Internet + Domain Name System, which is defined here: + http://www.ietf.org/rfc/rfc2782.txt + SNSD isn't the same of the "SRV Record", in fact, it has its own + unique features. + +- Internet compatibility + - internet sharing + * Multi-inet-gateways. + The Netsukuku nodes will now automatically use multiple + inet-gateways to connect to the Internet, therefore their + Internet connection will be effectively load-balanced. + + * Anti-loop multi-igw shield. + The nodes which share their Internet connection will also + automatically use the shared connection of the other nodes. + Through a simple marking system, death loops are avoided. + + * Traffic shaping. + The nodes which share their Internet connection can now + shape it, in this way they'll prioritize their local + outgoingtraffic and the lowdelay one (f.e. SSH). + +- Routes based on bandwidth and latency + http://lab.dyne.org/Ntk_bandwidth_measurement + +- NetsukukuD: + - low memory and CPU usage + - it can run smoothly on a small Access Point + + - Support for multipath routes: to reach a destination node, the + packets will use, at the same time, more than one route. + + - support for multi network interfaces + + - Multi interfaces multipath: if the node can reach a rnode trough + multiple interfaces, it uses them all with a multipath route. +}}} diff --git a/doc/misc/Ntk_scalability b/doc/misc/Ntk_scalability new file mode 100644 index 0000000..759530f --- /dev/null +++ b/doc/misc/Ntk_scalability @@ -0,0 +1,157 @@ +- QSPN scalability + +The QSPN is an optimised way of "sending a tracer_pkt from each extreme node". +A tracer_pkt is just a flood, and the total number of floods is given by: + + total_floods = extreme_nodes + 1 + +where the extreme_nodes are: + + extreme_nodes = number_of_nodes_with_only_one_link + number_of_cycles*2 + +A cycle here is meant as a set of nodes, where each node is linked at least at +two other nodes of the set. + +The total different packets generated by a single flood is equal to: + + total_packets_per_flood = Sum( number_of_links_of_each_node - 1 ) + 1 + +Since the network is organized in gnodes, the total_floods for all the levels +will be the sum of the total_floods of each level. The same applies to the +total_packets_per_flood. + + +Now we'll consider various worst scenarios. + + +- First scenario + +The first worst case is a network where all the nodes are an extreme_node, i.e. +there's one node X and all the other are linked to it by just one link. + + O Y + \ / + \ / + N ---- X ----L + | + | + M (A graph describing the first worst + scenario) + +In this case all the nodes, including X, will send a tracer_pkt. +This means that if all the nodes in the level 0 are linked in that way, and all +the gnodes of the higher levels are also linked between them in the same way, +then the total floods, in all the levels, we'll be: + + total_floods = MAXGROUPNODE * levels + +Where MAXGROUPNODE is the number of (g)node present in a gnode. +By the way, this configuration has its advantages because there is only one +hop between each node, therefore each flood will end after one hop and the +total packets will be: + + total_packets = MAXGROUPNODE^2 * levels + +MAXGROUPNODE is equal to 256. +In the ipv4 we have 4 levels. +This means that in a network composed by 2^32 nodes, in the first worst +scenario to run the QSPN at all the levels will have: + + total_floods = 1024; total_packets = 262144; + +Note that "levels" is equal to log_2(N)/MAXGROUPNODE_BITS, where N is the +maximum number of nodes in the network and MAXGROUPNODE_BITS is equal to 8. +MAXGROUPNODE is also equal to 2^MAXGROUPNODE_BITS. +The final formulas that describes the growth of the number of floods and +packets are: + + total_floods = 2^5 * log_2(N) + + total_packets = 2^13 * log_2(N) + + +- Second scenario + +In this case we consider a network where each (g)node is linked to all the other +(g)nodes. + C + /|\ + / | \ + A-----D + \ | / + \|/ + E + +That means that we have 1 cycle and 0 nodes_with_only_one_link, so the +total_floods are: + + total_floods = 2 + +Since every (g)node is linked with every other (g)gnodes, the number of links +for each of them is MAXGROUPNODE and the number of total different packets +generated per flood is: + + total_packets = ( ( MAXGROUPNODE - 1 ) * MAXGROUPNODE + 1) + +Supposing that this configuration is the same for the upper levels too, we have: + + total_floods = 2 * levels + total_packets = total_floods * ( ( MAXGROUPNODE - 1 ) * MAXGROUPNODE + 1) + + N = total_number_of_nodes_in_the_network + levels = log_2(N)/MAXGROUPNODE_BITS + + total_packets = (log_2(N)/4) * ( ( MAXGROUPNODE - 1 ) * MAXGROUPNODE + 1) + +In ipv4, with 2^32 nodes: + + total_packets = 522248 + +- Third scenario + +All the (g)nodes are in just one line: to reach the end node B from the start +node A we have traverse N nodes, with N equal to the total number of nodes +minus 2. + +In this awful case a flood will have to traverse N hops, this means that if +the average rtt between two nodes is 70ms, then the flood, if started from an +extreme node will take about 9 years to reach the other end. + +- About the maximum size of a tracer_pkt + +Each time a tracer_pkt traverse a node it grows of one byte, since the +tracer_pkt is always restricted to a determinate level, which has maximum +MAXGROUPNODE nodes, the maximum size of a plain tracer_pkt is 256 Bytes (we +are not counting the headers, which are a constant size). + +The things change if the tracer_pkt traverses border nodes, in fact, +(7 + 10*L) bytes are added in the the tracer_pkt each time it passes trough a +bnode. L is the number of gnodes the border node is linked to. + +- About the maximum size of the maps + +The size of levels in the maps is fixed 'cause we already know the maximum number +of nodes in the network. We are also considering that we store only the 20 +best routes for each node. + +So the maximum size of the maps, when we have all the routes stored, and the +bnode with all their maximum links filled is: + + internal map | external map | border node map + +ipv4 44032 | 136704 | 3159552 + +ipv6 44032 | 683520 | 15797760 + +(in bytes). + +The bnode map is so large because we are considering the worst case in which +in each of our gnodes there are 256 bnodes each of them is linked to 512 +gnodes. + + +- About the overload created by multiple hooks of (g)nodes + +In order to prevent that a QSPN is sent every time a (g)node joins the network +the QSPN are all syncronised in each level, therefore the maps are updated at +each qspn_round. (Read the section "5.1.4 Qspn round"). diff --git a/doc/misc/mailinglist b/doc/misc/mailinglist new file mode 100644 index 0000000..b007619 --- /dev/null +++ b/doc/misc/mailinglist @@ -0,0 +1,12 @@ +Subscribe to the netsukuku mailing to get help, be updated on the latest news +and discuss on its development. + +To subscribe to the list, send a message to: + netsukuku-subscribe@lists.dyne.org + +or use the web interface: + http://lists.dyne.org/mailman/listinfo/netsukuku + +You can browse the archive here: + http://lists.dyne.org/netsukuku/ + http://dir.gmane.org/gmane.network.peer-to-peer.netsukuku diff --git a/doc/misc/rfc1035.txt b/doc/misc/rfc1035.txt new file mode 100644 index 0000000..b1a9bf5 --- /dev/null +++ b/doc/misc/rfc1035.txt @@ -0,0 +1,3077 @@ +Network Working Group P. Mockapetris +Request for Comments: 1035 ISI + November 1987 +Obsoletes: RFCs 882, 883, 973 + + DOMAIN NAMES - IMPLEMENTATION AND SPECIFICATION + + +1. STATUS OF THIS MEMO + +This RFC describes the details of the domain system and protocol, and +assumes that the reader is familiar with the concepts discussed in a +companion RFC, "Domain Names - Concepts and Facilities" [RFC-1034]. + +The domain system is a mixture of functions and data types which are an +official protocol and functions and data types which are still +experimental. Since the domain system is intentionally extensible, new +data types and experimental behavior should always be expected in parts +of the system beyond the official protocol. The official protocol parts +include standard queries, responses and the Internet class RR data +formats (e.g., host addresses). Since the previous RFC set, several +definitions have changed, so some previous definitions are obsolete. + +Experimental or obsolete features are clearly marked in these RFCs, and +such information should be used with caution. + +The reader is especially cautioned not to depend on the values which +appear in examples to be current or complete, since their purpose is +primarily pedagogical. Distribution of this memo is unlimited. + + Table of Contents + + 1. STATUS OF THIS MEMO 1 + 2. INTRODUCTION 3 + 2.1. Overview 3 + 2.2. Common configurations 4 + 2.3. Conventions 7 + 2.3.1. Preferred name syntax 7 + 2.3.2. Data Transmission Order 8 + 2.3.3. Character Case 9 + 2.3.4. Size limits 10 + 3. DOMAIN NAME SPACE AND RR DEFINITIONS 10 + 3.1. Name space definitions 10 + 3.2. RR definitions 11 + 3.2.1. Format 11 + 3.2.2. TYPE values 12 + 3.2.3. QTYPE values 12 + 3.2.4. CLASS values 13 + + + +Mockapetris [Page 1] + +RFC 1035 Domain Implementation and Specification November 1987 + + + 3.2.5. QCLASS values 13 + 3.3. Standard RRs 13 + 3.3.1. CNAME RDATA format 14 + 3.3.2. HINFO RDATA format 14 + 3.3.3. MB RDATA format (EXPERIMENTAL) 14 + 3.3.4. MD RDATA format (Obsolete) 15 + 3.3.5. MF RDATA format (Obsolete) 15 + 3.3.6. MG RDATA format (EXPERIMENTAL) 16 + 3.3.7. MINFO RDATA format (EXPERIMENTAL) 16 + 3.3.8. MR RDATA format (EXPERIMENTAL) 17 + 3.3.9. MX RDATA format 17 + 3.3.10. NULL RDATA format (EXPERIMENTAL) 17 + 3.3.11. NS RDATA format 18 + 3.3.12. PTR RDATA format 18 + 3.3.13. SOA RDATA format 19 + 3.3.14. TXT RDATA format 20 + 3.4. ARPA Internet specific RRs 20 + 3.4.1. A RDATA format 20 + 3.4.2. WKS RDATA format 21 + 3.5. IN-ADDR.ARPA domain 22 + 3.6. Defining new types, classes, and special namespaces 24 + 4. MESSAGES 25 + 4.1. Format 25 + 4.1.1. Header section format 26 + 4.1.2. Question section format 28 + 4.1.3. Resource record format 29 + 4.1.4. Message compression 30 + 4.2. Transport 32 + 4.2.1. UDP usage 32 + 4.2.2. TCP usage 32 + 5. MASTER FILES 33 + 5.1. Format 33 + 5.2. Use of master files to define zones 35 + 5.3. Master file example 36 + 6. NAME SERVER IMPLEMENTATION 37 + 6.1. Architecture 37 + 6.1.1. Control 37 + 6.1.2. Database 37 + 6.1.3. Time 39 + 6.2. Standard query processing 39 + 6.3. Zone refresh and reload processing 39 + 6.4. Inverse queries (Optional) 40 + 6.4.1. The contents of inverse queries and responses 40 + 6.4.2. Inverse query and response example 41 + 6.4.3. Inverse query processing 42 + + + + + + +Mockapetris [Page 2] + +RFC 1035 Domain Implementation and Specification November 1987 + + + 6.5. Completion queries and responses 42 + 7. RESOLVER IMPLEMENTATION 43 + 7.1. Transforming a user request into a query 43 + 7.2. Sending the queries 44 + 7.3. Processing responses 46 + 7.4. Using the cache 47 + 8. MAIL SUPPORT 47 + 8.1. Mail exchange binding 48 + 8.2. Mailbox binding (Experimental) 48 + 9. REFERENCES and BIBLIOGRAPHY 50 + Index 54 + +2. INTRODUCTION + +2.1. Overview + +The goal of domain names is to provide a mechanism for naming resources +in such a way that the names are usable in different hosts, networks, +protocol families, internets, and administrative organizations. + +From the user's point of view, domain names are useful as arguments to a +local agent, called a resolver, which retrieves information associated +with the domain name. Thus a user might ask for the host address or +mail information associated with a particular domain name. To enable +the user to request a particular type of information, an appropriate +query type is passed to the resolver with the domain name. To the user, +the domain tree is a single information space; the resolver is +responsible for hiding the distribution of data among name servers from +the user. + +From the resolver's point of view, the database that makes up the domain +space is distributed among various name servers. Different parts of the +domain space are stored in different name servers, although a particular +data item will be stored redundantly in two or more name servers. The +resolver starts with knowledge of at least one name server. When the +resolver processes a user query it asks a known name server for the +information; in return, the resolver either receives the desired +information or a referral to another name server. Using these +referrals, resolvers learn the identities and contents of other name +servers. Resolvers are responsible for dealing with the distribution of +the domain space and dealing with the effects of name server failure by +consulting redundant databases in other servers. + +Name servers manage two kinds of data. The first kind of data held in +sets called zones; each zone is the complete database for a particular +"pruned" subtree of the domain space. This data is called +authoritative. A name server periodically checks to make sure that its +zones are up to date, and if not, obtains a new copy of updated zones + + + +Mockapetris [Page 3] + +RFC 1035 Domain Implementation and Specification November 1987 + + +from master files stored locally or in another name server. The second +kind of data is cached data which was acquired by a local resolver. +This data may be incomplete, but improves the performance of the +retrieval process when non-local data is repeatedly accessed. Cached +data is eventually discarded by a timeout mechanism. + +This functional structure isolates the problems of user interface, +failure recovery, and distribution in the resolvers and isolates the +database update and refresh problems in the name servers. + +2.2. Common configurations + +A host can participate in the domain name system in a number of ways, +depending on whether the host runs programs that retrieve information +from the domain system, name servers that answer queries from other +hosts, or various combinations of both functions. The simplest, and +perhaps most typical, configuration is shown below: + + Local Host | Foreign + | + +---------+ +----------+ | +--------+ + | | user queries | |queries | | | + | User |-------------->| |---------|->|Foreign | + | Program | | Resolver | | | Name | + | |<--------------| |<--------|--| Server | + | | user responses| |responses| | | + +---------+ +----------+ | +--------+ + | A | + cache additions | | references | + V | | + +----------+ | + | cache | | + +----------+ | + +User programs interact with the domain name space through resolvers; the +format of user queries and user responses is specific to the host and +its operating system. User queries will typically be operating system +calls, and the resolver and its cache will be part of the host operating +system. Less capable hosts may choose to implement the resolver as a +subroutine to be linked in with every program that needs its services. +Resolvers answer user queries with information they acquire via queries +to foreign name servers and the local cache. + +Note that the resolver may have to make several queries to several +different foreign name servers to answer a particular user query, and +hence the resolution of a user query may involve several network +accesses and an arbitrary amount of time. The queries to foreign name +servers and the corresponding responses have a standard format described + + + +Mockapetris [Page 4] + +RFC 1035 Domain Implementation and Specification November 1987 + + +in this memo, and may be datagrams. + +Depending on its capabilities, a name server could be a stand alone +program on a dedicated machine or a process or processes on a large +timeshared host. A simple configuration might be: + + Local Host | Foreign + | + +---------+ | + / /| | + +---------+ | +----------+ | +--------+ + | | | | |responses| | | + | | | | Name |---------|->|Foreign | + | Master |-------------->| Server | | |Resolver| + | files | | | |<--------|--| | + | |/ | | queries | +--------+ + +---------+ +----------+ | + +Here a primary name server acquires information about one or more zones +by reading master files from its local file system, and answers queries +about those zones that arrive from foreign resolvers. + +The DNS requires that all zones be redundantly supported by more than +one name server. Designated secondary servers can acquire zones and +check for updates from the primary server using the zone transfer +protocol of the DNS. This configuration is shown below: + + Local Host | Foreign + | + +---------+ | + / /| | + +---------+ | +----------+ | +--------+ + | | | | |responses| | | + | | | | Name |---------|->|Foreign | + | Master |-------------->| Server | | |Resolver| + | files | | | |<--------|--| | + | |/ | | queries | +--------+ + +---------+ +----------+ | + A |maintenance | +--------+ + | +------------|->| | + | queries | |Foreign | + | | | Name | + +------------------|--| Server | + maintenance responses | +--------+ + +In this configuration, the name server periodically establishes a +virtual circuit to a foreign name server to acquire a copy of a zone or +to check that an existing copy has not changed. The messages sent for + + + +Mockapetris [Page 5] + +RFC 1035 Domain Implementation and Specification November 1987 + + +these maintenance activities follow the same form as queries and +responses, but the message sequences are somewhat different. + +The information flow in a host that supports all aspects of the domain +name system is shown below: + + Local Host | Foreign + | + +---------+ +----------+ | +--------+ + | | user queries | |queries | | | + | User |-------------->| |---------|->|Foreign | + | Program | | Resolver | | | Name | + | |<--------------| |<--------|--| Server | + | | user responses| |responses| | | + +---------+ +----------+ | +--------+ + | A | + cache additions | | references | + V | | + +----------+ | + | Shared | | + | database | | + +----------+ | + A | | + +---------+ refreshes | | references | + / /| | V | + +---------+ | +----------+ | +--------+ + | | | | |responses| | | + | | | | Name |---------|->|Foreign | + | Master |-------------->| Server | | |Resolver| + | files | | | |<--------|--| | + | |/ | | queries | +--------+ + +---------+ +----------+ | + A |maintenance | +--------+ + | +------------|->| | + | queries | |Foreign | + | | | Name | + +------------------|--| Server | + maintenance responses | +--------+ + +The shared database holds domain space data for the local name server +and resolver. The contents of the shared database will typically be a +mixture of authoritative data maintained by the periodic refresh +operations of the name server and cached data from previous resolver +requests. The structure of the domain data and the necessity for +synchronization between name servers and resolvers imply the general +characteristics of this database, but the actual format is up to the +local implementor. + + + + +Mockapetris [Page 6] + +RFC 1035 Domain Implementation and Specification November 1987 + + +Information flow can also be tailored so that a group of hosts act +together to optimize activities. Sometimes this is done to offload less +capable hosts so that they do not have to implement a full resolver. +This can be appropriate for PCs or hosts which want to minimize the +amount of new network code which is required. This scheme can also +allow a group of hosts can share a small number of caches rather than +maintaining a large number of separate caches, on the premise that the +centralized caches will have a higher hit ratio. In either case, +resolvers are replaced with stub resolvers which act as front ends to +resolvers located in a recursive server in one or more name servers +known to perform that service: + + Local Hosts | Foreign + | + +---------+ | + | | responses | + | Stub |<--------------------+ | + | Resolver| | | + | |----------------+ | | + +---------+ recursive | | | + queries | | | + V | | + +---------+ recursive +----------+ | +--------+ + | | queries | |queries | | | + | Stub |-------------->| Recursive|---------|->|Foreign | + | Resolver| | Server | | | Name | + | |<--------------| |<--------|--| Server | + +---------+ responses | |responses| | | + +----------+ | +--------+ + | Central | | + | cache | | + +----------+ | + +In any case, note that domain components are always replicated for +reliability whenever possible. + +2.3. Conventions + +The domain system has several conventions dealing with low-level, but +fundamental, issues. While the implementor is free to violate these +conventions WITHIN HIS OWN SYSTEM, he must observe these conventions in +ALL behavior observed from other hosts. + +2.3.1. Preferred name syntax + +The DNS specifications attempt to be as general as possible in the rules +for constructing domain names. The idea is that the name of any +existing object can be expressed as a domain name with minimal changes. + + + +Mockapetris [Page 7] + +RFC 1035 Domain Implementation and Specification November 1987 + + +However, when assigning a domain name for an object, the prudent user +will select a name which satisfies both the rules of the domain system +and any existing rules for the object, whether these rules are published +or implied by existing programs. + +For example, when naming a mail domain, the user should satisfy both the +rules of this memo and those in RFC-822. When creating a new host name, +the old rules for HOSTS.TXT should be followed. This avoids problems +when old software is converted to use domain names. + +The following syntax will result in fewer problems with many + +applications that use domain names (e.g., mail, TELNET). + + ::= | " " + + ::=