pax_global_header00006660000000000000000000000064117645305340014522gustar00rootroot0000000000000052 comment=60000cf287876a94319d091496f395cfc3514f60 linbox-1.3.2/000077500000000000000000000000001176453053400130205ustar00rootroot00000000000000linbox-1.3.2/AUTHORS000066400000000000000000000007511176453053400140730ustar00rootroot00000000000000The Linbox team: Jean-Guillaume Dumas Mark Giesbrecht Pascal Giorgi Bradford Hovinen Erich Kaltofen Clement Pernet Daniel Roche B. David Saunders Arne Storjohann William Turner Gilles Villard Zhendong Wan linbox-1.3.2/COPYING000066400000000000000000000432541176453053400140630ustar00rootroot00000000000000 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 Lesser 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 Lesser General Public License instead of this License. linbox-1.3.2/COPYING.LESSER000066400000000000000000000636421176453053400150620ustar00rootroot00000000000000 GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999 Copyright (C) 1991, 1999 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. [This is the first released version of the Lesser GPL. It also counts as the successor of the GNU Library Public License, version 2, hence the version number 2.1.] Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below. When we speak of free software, we are referring to freedom of use, 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 and use pieces of it in new free programs; and that you are informed that you can do these things. To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it. For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights. We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library. To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others. Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license. Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs. When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library. We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances. For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License. In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system. Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library. The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run. GNU LESSER GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you". A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) "Source code" for a work means the preferred form of the work for making modifications to it. For a library, 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 library. Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. 1. You may copy and distribute verbatim copies of the Library's complete 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 distribute a copy of this License along with the Library. 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 Library or any portion of it, thus forming a work based on the Library, 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) The modified work must itself be a software library. b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. (For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, 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 Library, 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 Library. In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. This option is useful when you wish to copy part of the code of the Library into a program that is not a library. 4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you 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. If distribution of 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 satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. 5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. 6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) b) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with. c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be 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. It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. 7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library 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. 9. 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 Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. 10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library 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 with this License. 11. 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 Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library 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 Library. 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. 12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library 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. 13. The Free Software Foundation may publish revised and/or new versions of the Lesser 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 Library 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 Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. 14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, 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 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "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 LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. 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 LIBRARY 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 LIBRARY (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 LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), 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 Libraries If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change. You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License). To apply these terms, attach the following notices to the library. 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 library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; 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. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the library, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the library `Frob' (a library for tweaking knobs) written by James Random Hacker. , 1 April 1990 Ty Coon, President of Vice That's all there is to it! linbox-1.3.2/ChangeLog000066400000000000000000006604771176453053400146160ustar00rootroot000000000000002011-03-10 bboyer * Implement DublinBox Mother model for dense matrices (BlasM* own, BlasS* share) * Change BlasSubmatrix private members (and add one to make Iterators faster) * Change <> includes to "" so I have no surprise when the compiler looks them in a non expected place * add a const in Field Categories for a weird bug... * RawIterators are renamed to Iterators (impossible to pronounce, easy to misspell) * add functions to blas-domain and blas-matrix 2011-24-09 bboyer * replace DenseMatrix(Base) by Blas(Matrix/Blackbox) * put these classes (and DenseSubmatrix) in a Protected namespace (users will be warned...) * update Blas(Mat/Bb) interface * clean DenseMatrix(Base) from LinBox * Delete BlasTag (use LinBoxTag class instead, avoids branching) * Update to Givaro gcd new clean intefarce * Update to one/zero in (some) Fflas-Ffpack fields * Rename Flaflas to more serious FFLAS-FFPACK * Minor updates in some classes. * martin albretch patch to update linbox-sage.h * M4RI checks * Ekopath (pathscale) checks 2011-05-11 bboyer linbox-1.2.0 released: * Many many bug fixes, many memleaks, much code beautify. * Licence/copyright added to (hopefully) every file. * Vi/emacs magic lines for auto-indentation. * Some documentation added + improved Doxygen framework (dev/user documentation, more *.doxy items, bug/todo list, bibliography list) * Upgrade to givaro 3.4.0 series ( new namespace, new API for integer operations, a few new functions (naturallog...) ) * Upgrade to fflas-ffpack 1.4.0 (new namespace, new includes) * Some initial work introduced here and there (matrix permutation representations, symbolic/numeric solver, sparse matrix representation...) * CRA algorithms reworked and tested, some added. * Timer moved to Givaro * Some debug/util moved to FflasFfpack * Better configure.ac/Makefiles (more options, icc/gcc customisation,...) * More m4 rules * Possibility to use IML functions as a shared library (and some examples given) * 'make fullcheck' checks all possible tests given and reports * Auto-installer from sources/svn with plenty of options * Some new field functions like characteristic() * Work on synchronising field member functions signatures for better compatibility between all fields (in progress) 2010-11-03 cpernet linbox-1.1.7 released: * bug fixes and minor enhancements * New interface to sage (supporting native floating point representation) * new rebind interface * incorporate the code for computations over the rationals (by A Ubranska), still waiting to be cleaned-up (it is not used yet by default) 2008-09-22 cpernet linbox-1.1.6 released: * compilation pb, and bug fixes, for cygwin support and debianization 2008-06-10 cpernet * Upgrade fflas-ffpack to v1.3.3 (safer and tighter bounds, bug fixes,...) * Design changes for balanced finite field implementations * Improve efficiency of Chinese Remainder Algorithm * Add new interface to Sage * bugs and documentation fixes * remove gmp++ from LinBox, and thus make Givaro a necessary package 2008_03-02 cpernet linbox-1.1.5 released: * drivers are back to the source code, * shared libraries are enabled by default. * new code in fflas-ffpack for rank profiles * new double-determinant algorithm * changed the rawIndexedIterator interface, fixing the broken previous one. * many minor fixes, mostly memleaks. 2007-10-27 cpernet linbox-1.1.4 has been released including the following most important changes: * lots of memory leaks fixed * better compliance with BLAS * increased system solver functionalities (rectangular, rank deficient matrices) * support for g++/gcc v4.2 2007-09-28 cpernet * Add support for more general dense system solving: The system can be rectangular (over/underdetermined), singular. 2007-09-07 bds * This changelog is being widely ignored. Today buildbot test is on. 2007-01-31 bds * This entry is just to record that version 1.1.0 has been released by Jean-Guillaume Dumas and the current svn version is just a couple of steps from the release version. 2006-08-08 bds * examples/det.C, solutions/det.h, methods.h modified in preparation for * mpi based paralle cra loop in algorithms/cra-domain.h (by Bryan Youse). * also a stub of util/mpicpp.h added (will become the mpi interface). 2006-07-27 Hui Wang and bds * Add blackbox/quad-matrix.h which defines the ZOQuad matrix, * which is a cache efficient {0,1}-matrix rep. * Add it's tests, modify also blackbox/zo.h, * and accumulate-special in field/modular.h to better support sums of field elements efficiently. 2006-06-01 bds * rank.h adjusted to work around faulty PIVOT_LINEAR code in sparse elim. * test-rank.C now tests blackbox, elimination, hybrid methods as well as... 2006-04-18 bds and Hui Wang * examples/smith.C minor changes * linbox/blackbox/apply.h - don't recall what we did to wreck this. * linbox/blackbox/archetype.h linbox/blackbox/scalar-matrix.h linbox/blackbox/zero-one.h linbox/randiter/modular.h linbox/vector/stream.h tests/Makefile.am tests/Matio.h - minor touches * cvs thinks we changed just about everything in tests, but diff shows no change. We're checking in anyway * Where are our added files blackbox/zo.h zo.inl quad-matrix.h ? - which are a new version of zero-one and a block decomposed sparse matrix, resp. 2006-01-20 bds and Hui Wang * linbox/algorithms/gauss.inl - we think we made it better but it still isn't working :-) 2005-12-13 Pascal Giorgi * linbox/algorithms/Makefile.am: add new files * linbox/algorithms/lifting-container.h: minor change * linbox/algorithms/matpoly-mult.h: adding FFT and Karatsuba based polynomial matrix multiplication and middle product * linbox/algorithms/rational-reconstruction.h: use macro to enable timing * linbox/algorithms/rational-solver.h: minor change * linbox/algorithms/rational-solver.inl: minor chane * linbox/algorithms/short-vector.h: work in progress for ternary lattice reduction * linbox/algorithms/sigma-basis.h: add muti sigma basis computation and special Pade solver. * linbox/blackbox/block-hankel-inverse.h: enable use of new special Pade solver * linbox/blackbox/block-hankel.h: use macro to enable timing * linbox/randiter/{Makefile.am,random-fftprime.h}: add fftprime generator 2005-12-8 bds * minor cleanups 2005-11-17 Pascal Giorgi: * macros/blas-check.m4: adding new support for blas libraries * macros/linbox-opt.m4: adding new support for blas libraries * macros/linbox-misc.m4: adding new support for blas libraries * linbox/config-blas.h: linbox headers for BLAS * linbox/Makefile.am: add new BLAS support * linbox/fflas/Makefile.am: remove dependencies to ATLAS * linbox/fflas/fflas.h: add new BLAS support * linbox/ffpack.Makefile.am: remove dependencies to ATLAS * configure.in: remove ATLAS checking and replace with BLAS checking * linbox-config.in: remove ATLAS libs and replace with BLAS libs * tests/Makefile.am: remove ATLAS dependencies 2005-10-26 Pascal Giorgi: * linbox/algorithms/Makefile.am: add sigma-basis.h file * linbox/algorithms/sigma-basis.h: make sigma basis algorithm available * linbox/algorithms/blackbox-block-container.h: add support for special structured block * linbox/algorithms/blas-domain.h: fix bug * linbox/algorithms/lifting-container.h: add support for sparse solver using a Block Hankel inverse * linbox/algorithms/rational-solver.h(.inl): add new algorithm for solving sparse system * linbox/blackbox/Makefile.am: add block-hankel.h. block-toeplitz.h and block-hankel-inverse.h * linbox/blackbox/apply.h: fix optimization compatibility * linbox/blackbox/block-hankel.h : add a blackbox for block Hankel matrices * linbox/blackbox/block-hankel-inverse.h: add blackbox to compute the inverse of a block Hankel blackbox * linbox/blackbox/block-toeplitz.h: add a blackbox for block Toeplitz matrices * linbox/element/gmp-rational.h: fix this stupid bug using signed long integer to convert rational !!! * linbox/field/hom.h: add support for PID_integer homomorphism * linbox/ring/givaro-polynomial.h: fix bug * linbox/solutions/det.h: add handler for rational domain * linbox/solutions/charpoly.h: add handler for rational domain * linbox/solutions/minpoly.h: add handler for rational domain and hybrid method for blas blackbox * linbox/solutions/rank.h: add handler for rational domain * linbox/solutions/solve.h: add handler for rational domain and fix indentation * linbox/solutions/methods.h: fix indentation and add block hankel method 2005-09-01 Dan Roche * linbox/algorithms/toeplitz-det.h: Forgot to add this before. 2005-08-31 Pascal Giorgi: * linbox/algorithms/blas-domain.inl: add inverse specialization for multimod double domain * linbox/algorithms/cia.h: call domain specialized minpoly instead of calling API and make code generic according to integer ring * linbox/algorithms/lifting-container.h: support for multimod double domain * linbox/algorithms/matrix-hom.h: support for multimod double domain * linbox/algorithms/matrix-inverse.h: support for multimod double domain * linbox/algorithms/rational-solver.inl: support for multimod double domain * linbox/blackbox/apply.h: support for multimod double domain and new optimization * linbox/blackbox/blas-blackbox.h: support for multimod double domain, add construction from MatrixReader and finalize apply function * linbox/blackbox/submatrix.h: fixed indent style problem * linbox/ffpack/ffpack.h: fix memory leak problem * linbox/field/modular-double.h: add support for multimod double domain * linbox/field/ntl-ZZ.h: fix indent style problem * linbox/field/ntl-ZZ_p.h: set FieldTraits categoryTag * linbox/matrix/blas-matrix.h: add constructor from MatrixStream * linbox/matrix/dense-submatrix.h: add constructor from non const MatrixDenseBase * linbox/matrix/dense-submatrix.inl: add constructor from non const MatrixDenseBase, fix bug in ConstRawIterator operator++(int) * linbox/matrix/transpose.h: make the reference to the matrix to be non const * linbox/ring/givaro-polynomial.h: add support for PID-integer and NTL-ZZ domain * linbox/solutions/charpoly.h: throw an exception if matrix are not square * linbox/solutions/det.h: fix indentation and throw an exception if matrix are not square * linbox/solutions/minpoly.h: fix indentation, throw an exception if matrix are not square and make minpoly over the integer generic * linbox/solutions/rank.h: fix indentation * linbox/solutions/smith-form.h" fix indentation * linbox/util/debug.h: allow the PreconditionFailed to be a real LinBox exception 2005-08-19 Z. Wan * linbox/element/gmp-rational.h Fixed the error which occurs duing conversion between gmp integer and gmp rational 2005-08-18 Dan Roche * Added functionality for computing the determinant of a toeplitz matrix * Added field/ntl-ZZ_pX.h and field/ntl-lzz_pX.h, rings over the respective NTL polynomial types * Added functions pow and powin to field/ntl-ZZ_p.h and field/ntl-lzz_p.h (could be added to all fields) * Added blackbox/toeplitz.h and blackbox/toeplitz.inl, very similar to the existing Toeplitz blackbox class, but generalized to use any polynomial ring. Didn't delete the old blackbox/ntl-toeplitz.h, inl so old code doesn't break * Added tests/test-toeplitz-det.C to test all this * Modified tests/test-ntl-toeplitz.C to use the new Toeplitz class 2005-08-1 bds * numerous doc tweaks 2005-07-15 bds and zw * Now modular-balance-int.h and modular-int32.h define different classes. * Modular-int had been replaced by modular-int32. * Modular-int is now deprecated. * Added randiter/modular-balance.h 2005-07-13 bds and zw * solutions/solve.h call block-lanczos in bbsolve when cardinality small * algorithms/bbsolve.h call mg-block-lanczos * algorithms/mg-block-lanczos commentating number of trials. 2005-07-13 Bradford Hovinen * linbox/solutions/solve.h: Cast A.coldim () to double before calling log (solve): Initialize status * linbox/algorithms/rational-solver.inl: Use std::max * linbox/blackbox/apply.h: Move #include ntl-ZZ.h into #ifdef __LINBOX_HAVE_NTL * examples/solve.C: Add using namespace std 2005-07-13 bds and zw * tests/Makefile.am move test-la-block-lanczos to failing tests list * test-la-block-lanczos use case n = 10 to show problem * test-mg-block-lanczos restore maxtries to default, comment out nullspace test which has memory probs. * test-solve change default blocking factor to 16 2005-07-13 Bradford Hovinen * tests/Makefile.am (NTL_TESTS): Moved test-rational-solver, test-rational-solver-adaptive, test-smith-form-binary, test-last-invariant-factor here because they depend on NTL (GIVARO_TESTS): Moved test-ffpack, test-blas-domain, test-givaro-zpz here because they depend on Givaro * tests/Makefile.am (NTL_TESTS): Fix definition so that automake does not complain 2005-07-13 Pascal Giorgi fix and remove NTL dependencies - remove NTL dependecies: use of PID_integer * tests/test-last-invariant-factor.C * tests/test-rational-solver.C * tests/test-rational-solver-adaptive.C * tests/test-smith-form-binary.C - fix NTL dependencies: by use of __LINBOX_HAVE_NTL preprocessing * tests/test-smith-form.C * tests/test-smith-form-iliopoulos.C * tests/test-smith-form-local.C * tests/test-smith-form-adaptive.C * linbox/field/hom.h: specialization for NTL * linbox/algorithms/smith-form-adaptative.h - linbox/ring/givaro-polynomial.h: to be done by Jean-Guillaume and Clement 2005-07-12 Pascal Giorgi * linbox/matrix/factorized.inl: add support for singular system solving (inconsistent system is defined by the zero solution) fix also bug in nonsingular solving 2005-07-11 Pascal Giorgi (authorized by dictator Dumas)) * linbox/solutions/solve.h: change the interface for integer systems Make the solver interface working with Wiedemann method, Lanczos method * linbox/algorithms/solve.h: add support for Lanczos method * linbox/algorithms/bbsolve.h: fix compilation error * linbox/algorithms/wiedemann.h: fix compilation error * linbox/algorithmd/wiedemann.inl: fix compilation error * linbox/algorithms/lanczos.h: fix compilation error * linbox/algorithmd/lanczos.inl: fix compilation error 2005-07-07 Dan Roche * linbox/blackbox/sparse.h * linbox/blackbox/dense.h * linbox/matrix/sparse.h: Changed the RawIndexedIterator code so that dereferencing returns a reference to the value (same as RawIterator) * linbox/blackbox/lambda-sparse.h * tests/test-matrix-stream.C * linbox/algorithms/matrix-hom.h: Updated the code here to reflect change above 2005-07-07 Dan Roche * linbox/matrix/sparse.h: Went through and fixed more iterator problems that could be causing segfaults. 2005-07-06 bds and zw * linbox/solutions/is-positive-definite.h, is-positive-semidefinite.h, added functions isPositiveDefinite and isPositiveSemiDefinite. * linbox/tests/test-isposdef.C, test-ispossemidef.C, Makefile.am, added tests for them. * linbox/field/hom.h, linbox/algorithms/signature.h, minor tweaks. * linbox/algorithms/algorithms.doxy, docs related 2005-07-06 Dan Roche * examples/rank.C * examples/det.C: Modified these to use MatrixStream and thereby support multiple file formats. * linbox/matrix/sparse.h * linbox/matrix/sparse.inl: Fixed some problems with the iterators: seg faults were caused by poor handling of empty rows. * linbox/util/matrix-stream.inl: minor clean-ups 2005-07-4 Pascal Giorgi * linbox/blackbox/Makefile.am: add polynomial.h * linbox/blackbox/apply.h: add optimization * linbox/blackbox/blas-blackbox.h: add the use of BLAS asap * linbox/solutions/methods.h: extend dixon method * linbox/solutions/solve.h: add rational-solver and diophantine-solver support for BlasElimination method (need to fix denominator output). also add support for BlasElimination over finite field (not fully implemented) * linbox/algorithms/rational-reconstruction.h: define early termination according to threshold (0 means no early termination, x > 0 means early termination with checking each x steps) 2005-07-01 Pascal Giorgi * configure.in: add linbox/util/formats/Makefile.am support * add linbox/util/formats/Makefile.am file * linbox/util/Makefile.am: fixe comment problem 2005-07-01 Dan Roche * linbox/blackbox/dense.h * linbox/matrix/dense.inl * linbox/matrix/dense.h: Added Constructors from a matrix-stream * linbox/blackbox/sparse.h * linbox/blackbox/sparse.inl * linbox/matrix/sparse.h: Added Constructors from a matrix-stream Changed to use size_t for indexing rather than ints: * linbox/util/matrix-stream.h * linbox/util/matrix-stream.inl * linbox/util/formats/generic-dense.h * linbox/util/formats/maple-dense1.h * linbox/util/formats/maple-sparse1.h * linbox/util/formats/matrix-market.h * linbox/util/formats/sms.h * linbox/util/formats/sparse-row.h * tests/test-matrix-stream.C: Included sparse and dense blackbox matrix constructors in testing * tests/data/sms.matrix: Fixed a formatting error 2005-07-01 W. J. Turner * linbox/until/commentator.C: removed using namespace std directive 2005-06-30 Pascal Giorgi resolve symbol error in libutil.a (commentator.o needed timer.o) * linbox/util/commetator.C: include timer.C * linbox/util/Makefile.am: remove timer.c from libutil.a source (included through commentator) 2005-06-29 W. J. Turner Removed using declarations within several classes and replaced with this->... to preserve backwards compatability and allow compilation with gcc 3.4 and newer: * linbox/algorithms/blackbox-block-container.h * linbox/algorithms/blackbox-container-symmetric.h * linbox/algorithms/blackbox-container-symmetrize.h * linbox/algorithms/blackbox-container.h * linbox/algorithms/lifting-container.h * linbox/blackbox/frobenius.h * linbox/blackbox/lambda-sparse.h * linbox/blackbox/ntl-hankel.{h,inl} * linbox/blackbox/submatrix.h * linbox/field/givaro-zpz.h * linbox/matrix/blas-matrix.h * linbox/util/formats/generic-dense.h * linbox/util/formats/maple-dense1.h * linbox/util/formats/maple-sparse1.h * linbox/util/formats/matrix-market.h * linbox/util/formats/sms.h * linbox/util/formats/sparse-row.h 2005-06-27 W. J. Turner * linbox/ffpack/ffpack_charpoly_kgfast.inl: removed using namespace std directive * linbox/*/lidia-gfq.h: removed using namespace LiDIA directives * linbox/vector/sparse.h: removed using namespace LinBox directive * linbox/util/formats/*.h: removed using declarations * linbox/util/*.h: removed using declarations * linbox/util/xml/*.h: removed using declarations 2005-06-25 Bradford Hovinen * tests/test-mg-block-lanczos.C (testRandomSolve, testSampleNullspace): Use preconditioner SYMMETRIZE (main): Use more sensible defaults * examples/dot-product.C (main): Declare v1 and v2 to be of length n (fixes segfault) 2005-06-24 W. J. Turner * linbox/blackbox/*: removed using declarations and directives * linbox/field/*.h: removed using declarations and directives * linbox/field/ntl-lzz_pE.h: added explicit call to namespace in NTL::BuildIrred_zz_pX * linbox/field/ntl-GF2E.h: added explicit call to namespace in NTL::BuildSparseIrred_GF2X * linbox/randiter/*.h: removed using declarations 2005-06-17 Pascal Giorgi * /linbox/field/PID-integer.h: add sqrt function and homomorphism support * /linbox/field/hom.h: identation fixed * /example/solver/t-rdisove.C: comment givaro.h to fix compilation errors 2005-06-16 Pascal Giorgi * /linbox/blackbox/apply.h: add blas-blackbox compatibility * /linbox/blackbox/blas-blackbox.h: modify constructor and add category support * /linbox/matrix/blas-matrix.h: new creator and add category support * /linbox/matrix/matrix-category.h: move MatrixCategory from blas-matrix.h * /linbox/algorithms/blas-domain.h: fancy indentation * /linbox/algorithms/blas-domain.inl: add support for BlasBlackbox * /linbox/algorithms/matrix-hom.h: add support for BlasBlackbox * /linbox/algorithms/rational-solver.inl: use of MatrixHom and BlasBlackbox instead of MatrixMod and BlasMatrix 2005-06-15 Pascal Giorgi * /linbox/blackbox/apply.h : compatiblity with 64bits architecture 2005-06-14 Pascal Giorgi * /doc directory: modification to documentation (linbox.html become central) * macros/linbox-doc.m4: new documentation checking (use of Doxygen) * configure.in: take into consideration new doc checking 2005-06-10 bds methods.h working for det.h in good form - other solutions may be broken: Can consider det.h a good model for solutions funs now. 2005-06-07 Z. Wan * linbox/blackbox/matrix-blackbox.h, linbox/matrix/dense.h, sparse.h, added reind to DenseMatrixBase and SparseMatrixBase. 2005-05-02 Pascal Giorgi * configure.in , macros/linbox-opt.m4 : add optimization process during linbox configuration * linbox/fflas/fflas.h : allow the use of optimized Winograd threshold 2005-04-26 -bds * Name changes *ntl-zz* --> *ntl-lzz* to avoid clashes with ZZ in case insensitive situations. * Also change test*.cpp to test*.C for consistency 2005-03-32 Pascal Giorgi * linbox/fflas/fflas_fgemm.inl: fix compilation error with WinoMain function call * linbox/algorithms/Makefile.am, rational-solver.h,.inl: set default prime size to 20 bits and make number of prime to try as a user parameter in function solve * tests/Makefile.am, test-rational-solver.C : retrieve rational solver test (make commentator progress worrking) 2005-03-30 bds * removed xml read/write code in numerous places * misc small stuff (I forgot what I may have changed, to tell the truth!) 2005-03-17 PG and ZW * linbox/algorithms/cra.h, cra-det-integer.h, minpoly-integer.h, Makefile.am, added functionalities for integer cases using modular arithmetic and CRA * linbox/solutions/det.h, minpoly.h, rank.h, unified the interface, added blas elimination for det and rank 2005-03-15 bds *tests/test-rank.C linbox/solutions/rank.h methods.h Introduce rank by blas-elimination, together with check for too small prime in wiedemann rank. 2005-02-17 Zhendong Wan (wan@cis.udel.edu) *linbox/algorithms/rational-reconstruction.h, implemented the fast early termination techniques, which was described in a preprint paper submitted to ISSAC'05. 2005-02-16 Zhendong Wan (wan@cis.udel.edu) *linbox/algorithms/rational-solver.h, rational-solver.inl, rational-solver-adaptive.h, Merged rational solver using numerical methods with others 2005-02-14 Clement Pernet (Clement.Pernet@imag.fr) * Improvements to FFLAS::fgemm routine: Winograd's fast matrix multiplication is now working for any operation of the type C<-alpha.A*B + beta.C * Dynamic pealing is now generic wrt the field * The recursive block algorithm is now working over the field if the BLAS condition is not met 2005-02-07 Clement Pernet (Clement.Pernet@imag.fr) * Change the name fflapack -> ffpack * bug fixes in blackbox-block-container.h * compilation failure of test-rational-solver due to "assert" in rational-solver.h should be fixed * compilation failuer in test-matrix-stream due to 888888888888888 being to big should be fixed 2005-02-04 Zhendong Wan (wan@cis.udel.edu) *Add linbox/solutions/cra.h, minpoly-integer.h, add codes to compute the minpoly of an integer matrix. *Modify linbox/test-minpoly.C, add test for minpoly of an integer matrix. *Modify linbox/solutions/minpoly.h, it can hanle integer case. ** linbox/solutions/cra.h and linbox/algorithms/cra.h should merge in future ** minpoly-integer.h and minpoly.h should merge, and support blas in future 2005-02-03 Zhendong Wan (wan@cis.udel.edu) *linbox/field/PID-double.h, PID-integer.h, PIR-modular-int.h, PIR-modular-int32.h, PIR-ntl-ZZ_p.h, double-fmod.h, field-traits.h gf2.h, givaro-gfq.h, givaro-montg.h, givaro-rational.h, givaro-zpz.h, gmp-integers.h, gmp-rational.h, lidia-gfq.h local2_32.h, modular-balance-int.h, modular-balance-int32.h, modular-byte.h, modular-double.h, modular-int.h, modular-int32.h, modular-short.h, modular.h, ntl-GF2E.h ntl-RR.h, ntl-ZZ.h, ntl-ZZ_p.h, ntl-ZZ_pE.h, ntl-pid-zz_p.h, ntl-zz_p.h, ntl-zz_pE.h, param-fuzzy.h, unparametric.h, added information in field traits in order to classify all rings. 2005-03 Zhendong Wan (wan@cis.udel.edu) *linbox/algorithms/matrix-mod.h, change class MatrixMod to namespace, so that some special mod functions can be addaed *linbox/algorithms/rational-reconstruction.h, rational-solver.inl, fixed compiling complaints 2005-01-28 Dan Roche * examples/linbox-program.C - various fixes * field/unparametric.h - was casting to long and then to integer - fixed * field/hom.h - added mapping from UnparametricField to Modular * util/matrix-stream.h Provides a new, generic way of reading matrices in multiple formats. * util/formats New directory for matrix-stream format specifications * util/formats/matrix-stream-readers.h Place to include all the different format specification files: * util/formats/generic-dense.h * util/formats/maple-dense1.h * util/formats/maple-sparse1.h * util/formats/matrix-market.h * util/formats/matrix-stream-readers.h * util/formats/sms.h * randiter/gmp-random-prime.h Generates random numbers up to a given size * tests/test-matrix-stream.C Tests to see if matrix-stream is working * Sample matrices used by test-matrix-stream: * tests/data/generic-dense.matrix * tests/data/maple-dense1.matrix * tests/data/maple-sparse1.matrix * tests/data/matrix-market-array.matrix * tests/data/matrix-market-coordinate.matrix * tests/data/sms.matrix * tests/data/sparse-row.matrix 2005-01-07 ZW * linbox/field/gmp-integers.h, fixed init * linbox/field/modular-double.h, implemented a fast init 2004-12-03 bds * matrix/sparse.h .inl - add reading of Magma Compact form * vector/vector-domain.h .inl - can't read into const vectors, so rm 'const 2004-10-08 bds * examples/blackbox/Makefile.am smith.C - minor * field/field-traits.h givaro-gfq.h ntl-GF2E.h - put in maxmodulus * doc/Doxyfile mainpage - minor doc changes 2004-09-30 Pascal Giorgi * linbox/algorithms/lifting-container.h: take modification of MatrixApplyDomain setup function * linbox/algorithms/rational-solver.inl: use of BlasMatrix instead of BlasBlackbox * linbox/algorithms/rational-reconstruction.h: add lifting commentator progress in getRational3 function * linbox/blackbox/apply.h: redefine MatrixApplyDomain s.t. specialization for dense storage is easier * linbox/matrix/dense.inl: make reading with sparse format work and fix bug in writing over domain with non positive cardinality 2004-09-21 Pascal Giorgi * linbox/algorithms/Makefile.am: Add headers for (rationnal-solver.inl, diophantine-solver.inl, vector-fraction.h) * linbox/algorithms/blackbox-block-container-base.h: Use BlasDomain and BlasMatrix * linbox/algorithms/blackbox-block-container.h: Make BlackboxBlockContainerRecord class (handling precomputed sequence and row-colum updating) * linbox/algorithms/block-massey-domain.h: Compute generating matrix polynomial using Sigma Basis through algorithm of GJV-ISSAC'03 * linbox/algorithms/block-wiedemann.h: Add block Wiedemann solver * linbox/algorithms/lifting-container.h: Add specialisation for Block Wiedemann method and clean optimizations * linbox/algorithms/rational-solver.h: Add specialisation for Block Wiedemann method * linbox/algorithms/rational-solver.inl: Add specialisation for Block Wiedemann method * linbox/blackbox/Makefile.am: Add headers for lambda-sparse.h and blas-blackbox.h * linbox/blackbox/apply.h: Put optimizations on matrix-vector product - moved from lifting-container * linbox/fflas/fflas_fgemm.inl: Fix bug on Winomain function * linbox/fflas/fflas_ftrsm.inl: Fix bug on normalisation before BLAS call * linbox/field/Makefile.am: Add ntl-GF2E.h header * linbox/field/ntl-GF2E.h: Add wrapper for GF(2^n) of NTL library * linbox/field/modular-double.h: Improve DotProductDomain specialization * linbox/field/ntl.h: Add ntl-GF2E.h header * linbox/matrix/blas-matrix.h: Take into account modifications of dense-submatrix * linbox/matrix/dense-submatrix.h: Use pointer instead of reference * linbox/matrix/dense-submatrix.inl: Use pointer instead of reference * linbox/matrix/factorized-matrix.inl: Fix the extractions of L, U and S * linbox/solutions/methods.h: Add BlockWiedemann method * linbox/util/gmp++/Makefile.am: Remove gmp++_int.c ( redudant for compilation) 2004-09-02 Bradford Hovinen * linbox/algorithms/la-block-lanczos.h (class LABlockLanczosSolver): Add _iter, _total_dim, _rank * linbox/algorithms/la-block-lanczos.inl (cleanup): Update _rank (rank): Implement * linbox/blackbox/diagonal.h (class Diagonal): Compilation fix * linbox/blackbox/dense.h (class DenseMatrix): Make _AT use DenseMatrix, not DenseMatrixBase * tests/test-la-block-lanczos.C (main): * tests/test-mg-block-lanczos.C (main): Use better defaults * linbox/algorithms/la-block-lanczos.inl (solve, sampleNullspace): Clear history when done * tests/Makefile.am (BASIC_TESTS): Add test-mg-block-lanczos * linbox/algorithms/la-block-lanczos.h (class LABlockLanczosSolver::InnerProductArray): Add reset * linbox/algorithms/la-block-lanczos.inl (iterate): Reset uAv * linbox/algorithms/Makefile.am (pkgincludesub_HEADERS): Add eliminator.{h|inl} * tests/Makefile.am (BASIC_TESTS): Add test-la-block-lanczos * linbox/algorithms/Makefile.am (pkgincludesub_HEADERS): Add la-block-lanczos.{h|inl}, mg-block-lanczos.{h|inl}; remove block-lanczos.{h|inl} 2004-09-01 bds * solutions/minpoly.h tests/test-minpoly.C: add minpolySymmetrize 2004-09-01 bds wan zw * linbox/algorithms/rational-solver-adaptive.h, adaptive solve 2004-08-30 bds and zw * linbox/algorithms/one-invariant-factor.h, smith-form-adaptive.inl, make bonus works 2004-08-30 bds and zw * linbox/algorithms/smith-form-adaptive.h, inl. Implementation of an adaptive algorithm for Smith form 2004-08-30 bds * linbox/randiter/mersenne-twister.h linbox/util/commentator.h linbox/util/gmp++/gmp++_int_misc.C tests/Makefile.am tests/test-common.C: LinBoxSrcOnly flag also used in tests/ now (to avoid incompatibility with use in examples/) 2004-08-30 bds * examples/ex-integers.C examples/Makefile.am linbox/util/gmp++/Makefile.am: Turn on LinBoxSrcOnly flag for examples compilations so that user does not confront load-library problems. * doc/Makefile.am examples/Matio.h linbox/integer.h linbox/blackbox/*.h etc.: switch documentation system to doxygen. (it still needs plenty of work) * add .doxy files (replacing .dxx files) to doc system * examples/blackbox/smith.C and smithbig.C: smith form examples. 2004-08-28 Pascal Giorgi * examples/solver/t-rdisolve.C: add sparse matrix format for file and make seed to work * linbox/algorithms/diophantine-solver{.h,.inl}: adding parameters information of solving * linbox/algorithms/rational-reconstruction.h: clear bugs in timings 2004-08-26 Z. Wan * linbox/algoriths/last-invariant-factor.h, implement the bonus idea \ref{....} 2004-08-26 Pascal Giorgi * examples/fields/ex-fields-archetype.C : put std namespace * examples/run/run.C : put std namespace * examples/solver/Makefile.am : change order of libs for compilation * examples/solver/t-rdisolve.C : change to use the new design of rational solver * gmp++/gmp++_int.h : Added new function to get the size of integer in base B and base 2 * gmp++/gmp++_int.inl : Added implementation of bitsize() and size_in_base( int base) functions * linbox/algorithms * diophantine-solver.h : use new design of rationnal solver * diophantine-solver.inl : use new design of rationnal solver ( disabling conversion for VectorFraction) * lifting-container.h : Added fast apply over ring when entries of the matrix are small enough ( say less than 2^16) * rational-reconstruction.h : Added direct method for reconstruction, added switch between early termination and direct method * rational-solver.inl : Added blas optimization for preconditionning matrices in random solution solver * linbox/fflapack/fflapack.h : Maked triangular inverse available * linbox/field/PID-double.h : Added abs and compare functions, + indentation * linbox/field/PID-integer.h : Added abs and compare functions, + indentation * linbox/matrix/dense.inl : problem with resizing in read function, leave code as it was but add the older version as comment 2004-08-24 Z. Wan (wan@cis.udel.edu) * change ith-invariant-factor.h to one-invariant-factor.h * Change the implementation of the alogrithm for oneinvariantfactor, use the enhanced algorithm in ISSSAC'04 papre by bds and ZW 2004-08-24 Z. Wan (wan@cis.udel.edu) *linbox/algorithms/rational-solver.h, inl, rational-reconstruction.h, linbox/tests/test-rational-solver.C, change the format of the rational solution a vector of rationals ====> (a vector of the numerator, the common denominator). 2004-08-19 Z. Wan (wan@cis.udel.edu) * linbox/algorithms/rational-reconstruction.h, implement the V. Pan's idea for final reconstruction step. * linbox/field/ntl-ZZ.h, add abs and compare member function. 2004-08-19 David Pritchard (dpritcha@ens-lyon.fr, daveagp@mit.edu) * gmp++/gmp++_int.inl - Added wrapper for mpz_import (convert word array to LinBox::Integer) * linbox/algorithms - Added timing to rational solving routines (#define RSTIMING in rational-solver.h) * diophantine-solver.h - made QSolver field into a reference type * diophantine-solver.inl - changed comments * lifting-container.inl - Added blas optimization for muliplication of large integer matrices in Dixon * rational-reconstruction.h - Changed getRational2 again so that early termination num/denbounds work * rational-solver.h - Added timing, reportTimes() * rational-solver.inl - Added timing * vector-fraction.h - Added comment, about how RandIter may have unrandom low-order bits * linbox/blackbox/apply.h - Removed bad overload of applyV * linbox/fflapack/fflapack.h - changed name of function to LQUPtoInverseOfFullRankMinor * linbox/field/modular-double.h - added constr. from long int, to avoid ambiguity warning when making t-rdisolve * linbox/matrix/dense.inl - attempted to fix problems with Const{Row/Col}Iterator operator++ (int) * linbox/matrix/factorized-matrix.h - added comment about how GetQ returns Qt * linbox/util/timer.C - added a count field to the timer (how many intervals does this timer measure) * linbox/util/timer.h - added a count, stopped small negative rounding errors from printing * gmp++/gmp++_int_cstor.C - added mpz_import function wrapper * tests/test-common.C - fixed reading of large integers * examples/solver/t-rdisolve.C - added flag to make some columns zero, made better random entries 2004-08-11 bds * examples/blackbox/smith.C illustrates iliopolous' and local methods * matrix/dense.inl read() now adjusts to new input size rather than complaining. Also read() accepts sparse file format. 2004-08-11 David Pritchard (dpritcha@ens-lyon.fr, daveagp@mit.edu) * gmp++/gmp++_int.inl - Added nth root function declaration * linbox/algorithms * diophantine-solver.inl - minor changes * lifting-container.h - fixed reconstruction lifting bound * rational-reconstruction.h - added getRational2; will eventually be las-vegas style reconstructor - changed early termination so that 2*numbound*denbound is always less than modulus * rational-solver.inl - more updates, fixes. now only one LQUP is used to check consistency - added optimization wherein LQUP is used to compute a modular inverse more quickly * linbox/fflapack/fflapack.h - added InverseFromLQUP function; fixed invL bug * linbox/matrix/blas-matrix.h - moved indexDomain here (allows application of BlasPermutation to indices, using BlasMatrixDomain) * linbox/matrix/dense-submatrix.inl - minor fix * linbox/util/gmp++/gmp++_int_misc.C - added nth root function 2004-08-09 Dan Roche * gmp++/gmp++_int.inl: Add arithmetic function support for long long and unsigned long long * linbox/blackbox/dense.h,inl: Add hadamardBound method to DenseMatrixFactory * linbox/blackbox/sparse.h: Make hadamardBound return a reference to res, and avoid overflow in computing hadamardBound * linbox/solutions/det.h: little fixes 2004-08-09 Pascal Giorgi * /linbox/blackbox/sparse.h : Fix bugs in SparseMatrixFactory. it compiles right now * /linbox/util/gmp++/gmp++_int_io.C : avoid memory leaks in Integer2string function * /linbox/field/ntl-zz_pE.h : adding new wrapper for NTL algebraic extension of single precision prime field * /linbox/field/ntl-ZZ_pE.h : write a class to handle parametric field * /linbox/field/ntl.h, Makefile.am : adding new field ntl-zz_pE.h 2004-08-08 Dan Roche (roche@cis.udel.edu) * examples/linbox-program.C - now works for determinant also - except that someone recently broke solutions/det.h and blackbox/sparse.h * gmp++/gmp++_int.h, linbox/util/gmp++/gmp++_int_misc.C - added prevprime so that prime-stream.h works * linbox/integer.h - added an abs function here so it works for all types from int8 up to integer. * linbox/algorithms/cra.h - changed invmod to inv so that this compiles * linbox/blackbox/dense.h,.inl - added DenseBlackboxFactory class so I can use det.h to find determinant of a dense matrix over the integers. * linbox/solutions/det.h - NUM_BITS is determined from FieldTraits (linbox/field/field-traits.h) 2004-08-06 David Pritchard (dpritcha@ens-lyon.fr, daveagp@mit.edu) * examples/solver/t-rdisolve.C - added use of 3 'solver levels' and check of certificate of inconsistency * linbox/algorithms * diophantine-solver.h - added use of 3 'solver levels', improved documentation * diophantine-solver.inl - added use of 3 solver levels * lifting-container.h - changed normblackbox to properly compute "norm" of composed boxes * rational-reconstruction.h - added getRational2 for solver use, hopefully will be las-vegas * rational-solver.h - added use of 3 solver levels, certifying of inconsistency, documentation * rational-solver.inl - added use of 3 solver levels, certifying inconsistency - combined 'solve' and 'getRandomSolution' to be both variants of 'solveMonolithic' * vector-fraction.h - simplified constructor * linbox/fflapack/fflapack_ludivine.inl - bugfix for LQUP of rectangular matrices (specifically M x 1 case) * linbox/field/unparametric.h - removed dumb comment * linbox/matrix/blas-matrix.h - added method extendTrivially to embed permutation in larger row/column size * linbox/tests/test-common.C - bugfix 2004-07-30 David Pritchard (dpritcha@ens-lyon.fr, daveagp@mit.edu) * examples/solver/t-rdisolve.C - added diophantine checking+certification, more options - moved VectorFraction class to own file in algorithms - moved new command-line stuff into test-common.C (should be backwards-compatible) * linbox/algorithms * vector-fraction.h - added new file. for storing fractions like [n1 n2 n3 n4 ... ]/d - has various combination functions used by diophantine-solver * blas-domain.inl - fixed a broken linbox_check for vector-matrix product * diophantine-solver.h - diophantine checking, min-denom certification works now * diophantine-solver.inl - diophantine checking, min-denom certification works now * rational-solver.h - made SolverReturnStatus a global enum, preceded by SS_ * rational-solver.inl - added generation of a partial certificate to randomSolve - solveDeterministic is now fully Las Vegas * apply.h - added applyVTrans(vector, const matrix, vector) * linbox/fflas/fflas_fgemv.inl - fixed errors in transpose matrix product * linbox/matrix * blas-matrix.h - fixed flipped row/coldim in constructor * dense-submatrix.h - fixed typo, removed unimplemented operator[] * dense.h - removed debug output * transpose.h - replaced Column with Col * tests/test-common.h - example string can now be passed as null and intelligently generated by default * tests/test-common.C - boolean options can now be turned off like "-b false", "-b -", "-b N" - added a string to write all current switch options to an ostream * tests/test-rational-solver.C - updated to reflect new return type of rational solver 2004-07-26 David Pritchard (dpritcha@ens-lyon.fr, daveagp@mit.edu) * linbox/algorithms * added diophantine-solver.{h,inl} (no diophantine functionality yet) * Makefile.am - added diophantine-solver.h * blas-domain.h - added forms of inv and invin that return the nullity of the matrix * blas-domain.inl - added forms of inv and invin that return the nullity of the matrix, fixed typo * last-invariant-factor.h - changed type of b vector from int to Integer * lifting-container.h - changed blackbox norm to square of 'induced norm', fixed lifting length calculation - added graceful failure to digit (eg if Ring is used improperly) * rational-reconstruction.h - added debug switch DEBUG_RR, graceful failure * matrix-rank.h - changed tabbing * rational-solver.h - many changes to Dixon; Wiedemann may not work - added DEFAULT_PRIMESIZE = 14 (since 30 bit default size would screw up some fields) - added maxPrimes argument to solving routines, will retry that many primes - added const modifier to solving routines, made _prime mutable * rational-solver.inl - many changes to Dixon; Wiedemann may not work - added debug switches, graceful failure for solving routines - changed BlasMatrixDomain routines to BlasApplyDomain to avoid erroneous calculations - in singular/random solve, check solution before returning, and multiply by conditioner P correctly - added consistency check to random solver * linbox/blackbox/blas-blackbox - added to CVS * linbox/blackbox/dense.h - matrix reading bugfix * linbox/fflapack/fflapack.h - pass nullity back in Invert2, and return NULL when matrix is singular * linbox/fflas/fflas_fgemv.inl - remove assumption that alpha=-1, beta=1 * linbox/fflas/fflas_ftrmm.inl - fixed computation of matrix size bound for embedding into FFLAS * linbox/field * PID-double.h - changed 'c=abs(c)' to 'if (c<0) c = -c', no abs found for double * PID-integer.h - changed documentation of isDivisor(a, b) (returns yes if b|a) * givaro-montg.h - fixed init from integer * givaro-zpz.h - fixed init from integer, double and Log16 specializations * givaro-gfq.h - fixed init from integer * modular.h - added init from double - added several specializations of Modular * modular-double.h - fixed operator<< * modular-int.h - fixed init/convert with double * modular-int32.h - fixed init/convert with double * ntl-ZZ.h - changed const to static for convert method - changed documentation of isDivisor(a, b) (returns yes if b|a) * ntl-ZZ_p.h - added init/convert from/to integer, double - put NTL_ZZ_p at top and specialization at bottom for compiler - changed random generator to give fuller range * ntl-zz_p.h - added init from double, integer * unparametric.h - added convert to double * linbox/matrix/dense-submatrix.h - added mapleFormat option to DenseSubmatrix writing * linbox/matrix/dense-submatrix.inl - added mapleFormat option to DenseSubmatrix writing * linbox/randiter/random-prime.h - the class now takes a 'bits' argument on construction and makes primes of that size * linbox/vector/vector-domain.inl - fixed reading bug * tests/Matio.h - added mapleFormat option to write_field * tests/test-fflapack.C - matched Invert2 to new 'nullity' argument format * tests/test-iliopoulos-elimination.C - #define int32 LinBox::int32 to avoid ambiguity with Givaro * tests/test-last-invariant-factor.C - int32 -> LinBox::int32 to avoid ambiguity with Givaro * tests/test-last-rational-solver.C - int32 -> LinBox::int32 to avoid ambiguity with Givaro - now handles solver failures without crashing - added check to ensure that system is solvable (ie no zero elements on diagonal) * tests/test-smith-form.C - int32 -> LinBox::int32 to avoid ambiguity with Givaro * examples/solver/t-rdisolve.C - test driver for rational solver, compile and run t-rdisolve -? * examples/solver/Makefile.am - make file 2004-07-16 Pascal Giorgi * linbox/field/lidia-gfq.h : fixing bug and improvement * tests/Makefile.am : retrieving test-lidia-gfq, fixing modular and gssv redundancy * tests/test-modular.C : using namespace std 2004-07-16 Pascal Giorgi * linbox-config.in : switching order of LiDIA in libs * linbox/randiter/envelope.h : modify random function ( assignement is not needed) * linbox/matrix/dense-submatrix.h : setting input and output functions public * linbox/field/givaro-zpz.h : adding linbox/utils/debug.h header * linbox/field/lidia-gfq.h : setting default degree extension to 1 * linbox/field/ntl-ZZ_p.h : overloading the constructor of UnparamField 2004-07-08 Dan Roche * Adding examples/linbox-program.C which will eventually do a wide variety of operations on integer matrices * gmp++/gmp++_int.h,inl : Little fixes * linbox/algorithms/wiedemann.inl : Little fixes * linbox/matrix/blas-matrix.h : Little fixes * linbox/util/gmp++/gmp++_int_compare.C, gmp++_int_mod.C : Little fixes * linbox/vector/sparse.h : Little fixes * tests/test-fields.C : Little fixes * tests/Makefile.am : Moved everything that uses rational-solver to ATLAS_TESTS rational-solver won't work without BLAS. * fields/field-traits.h : Took implementation out of this file and put it in each field header file. * fields/givaro-gfq.h : Added init and convert from/to a padic number * fields/modular.inl : Fixed some problems with MVProductDomain functions over unsigned types 2004-07-06 Bradford Hovinen * linbox/blackbox/dense.h (class DenseMatrix): Add _AT, a TransposeMatrix of this * linbox/blackbox/dense.inl (DenseMatrix::applyTranspose): Use _AT * linbox/matrix/matrix-domain.h (class MatrixDomain): Get rid of template argument MatrixTrait on specialized permute * linbox/vector/vector-domain.h (class VectorDomain): Get rid of template argument VectorTrait on specialized permute, swap * linbox/matrix/sparse.h (struct MatrixTraits): * linbox/vector/vector-domain.inl (class VectorDomain): * linbox/vector/vector-domain.h (class VectorDomain): * linbox/matrix/matrix-domain.h (class MatrixDomain): * linbox/matrix/transpose.h (struct MatrixTraits): * linbox/matrix/dense.h (struct MatrixTraits): Remove templates from matrix tags 2004-07-02 pascal giorgi * blackbox/apply.h : adding BlasApply domain * blackbox/compose.h : adding accessor to left an right blackbox * blackbox/sparse.h : make write function const * field/ all givaro file : fixe bugs * field/lidia-gfq.h : make it works * field/modular-double.h : add reset function in axpy domain * field/field-traits.h : add specialization for some fields * field/double-fmod.h : include * field/ntl-ZZ.h : remove all static and replace by const function * field/PID-double field/PID-integer.h : adding 2 new PID * matrix/dense.h.inl matrix/sparse.h.inl : make interators work * randiter/ntl-ZZ.h randiter/lidia-gfq.h : fix bugs and make clearer * solutions/method.h : add new traits for rational solvers * algorithms/ * blackbox-container-base.h : adding new constructor allowing size of sequence as parameter * blackbox-container.h : adding new constructor allowing size of sequence as parameter * lifting-containe.h : make a new interface for lifting (give specialization for Wiedemann and Dixon methods) * matrix-inverse.h : put Field as template and require a field as parameter (not restrictive to blackboxes) * matrix-mod.h : giving a specializatino * rational-reconstruction.h : make it clear with lifting interface * rational-solver.h : make a new interface for rational solver * rational-solver.inl : give specialization for Wiedemann and Dixon methods 2004-06-21 bds * removed NAGSparse blackbox which has been replaced by Triplesbb. Mods to linbox/util/xml/reader-blackbox-factory.h tests/Makefile.am Removed Files: blackbox/nag-sparse.h tests/test-nag-sparse.C 2004-06-16 Zhendong Wan * linbox/solutions/lu.h, tests/test-lu.C, fix the block lu and make test work. 2004-06-10 Dan Roche * Added linbox/field/modular-balance-int32.h to use int32 type * Added more fields to tests/test-fields.C * Added more fields and functionality to linbox/field/field-traits.h * Changed most fields so that every field constructor takes two arguments, a modulus and an exponent. Default values are put in so everything should still work the same. 2004-06-10 bds * New version 0.1.4 * final doc mods before release 0.1.4 2004-06-09 bds * Little tweaks. 2004-06-08 Dan Roche * Updated Modular to use the int32 type in integer.h * Added linbox/field/modular-int32.h * Added linbox/field/PIR-modular-int32.h * Updated tests/test-modular-int.h * Updated tests/test-iliopoulos-elimination.C * Updated tests/test-last-invariant-factor.C * Updated tests/test-rational-solver.C * Updated tests/test-smith-form.C * Updated tests/test-fields.C to use types from integer.h and to determine number of iterations based on machine speed. Also uses goodModulus method from FieldTraits struct. * Added linbox/field/field-traits.h, containing struct FieldTraits which can do other things but for now just provides information about valid moduli for a given field. 2004-06-08 bds * assorted documentation mods. * introduced BlackboxInterface, similar to FieldInterface, an empty base class solely for the purpose of organizing the heirarchy in the documentation. 2004-06-07 bds * assorted documentation mods. 2004-06-05 bds and Zhendong Wan * linbox/field/double-fmod.h is now redundant * linbox/field/modular-double.h uses the fmod approach * tests/test-generic.h now has a basic concept check for randiter and a chi-sq randomiterator check that doesn't fail on reasonably uniform random iterators over int elements. * tests/test-double-fmod.C and tests/test-modular-double.C now work. 2004-06-04 Dan Roche * Added tests/test-double-fmod.C Added tests/test-fields.C which benchmarks ops for fields Added tests/test-modular-double.C Added linbox/randiter/generic.h which is a generic random iterator used in double-fmod Added linbox/field/double-fmod.h which is like modular-double, but uses the fmod command from math.h 2004-06-04 bds * comments in rational.h suggesting that it is nowhere used. Shall we delete? 2004-04-20 Zhendong Wan * Add linbox/blackbox/blackbox_parallel.h, blackbox_thread.h, subrowmatrix.h, parallel blackbox apply and applyTranspose by using posix threads. * Modify linbox/blackbox/sparse.h, dense.h, dense.inl, linbox/vector/subvector.h, add parallel apply and applyTranspose for SparseMatrix and DenseMatrix. 2004-03-25 bds * documentation mods 2004-03-17 bds * gmp++/gmp++_int.h linbox/util/gmp++/gmp++_int.C, gmp++_int_add.C, gmp++_int_compare.C, gmp++_int_cstor.C, gmp++_int_div.C, gmp++_int_gcd.C, gmp++_int_io.C, gmp++_int_misc.C, gmp++_int_mod.C, gmp++_int_mul.C, gmp++_int_pow.C, gmp++_int_sub.C, tests/test-common.h: mods to make flag -DLinBoxSrcOnly work. 2004-03-04 Zhendong Wan * linbox/blackbox/sparse.h, set default Row to be SparseMap, which is more efficient to call setEntry, refEntry member function. * tests/test-minpoly.h, make it works with change in sparse.h. 2004-03-04 Zhendong Wan * linbox/blackbox/diagonal.h linbox/blackbox/hilbert.h, linbox/blackbox/scalar-matrix.h linbox/blackbox/submatrix.h, linbox/field/PIR-modular-int.h linbox/field/PIR-ntl-ZZ_p.h, linbox/field/modular-byte.h linbox/field/modular-int.h, linbox/field/modular-short.h linbox/field/modular.h, linbox/field/modular.inl linbox/matrix/matrix-domain.h, linbox/matrix/matrix-domain.inl linbox/matrix/sparse.h, linbox/matrix/sparse.inl linbox/vector/stream.h, linbox/vector/vector-domain.h linbox/vector/vector-domain.inl, linbox/vector/vector-traits.h tests/test-common.h, make these Tag classes non-template, since they are only used to distinguish vector types and for this purpose, ordinary classes suffice. 2004-03-04 Zhendong Wan * linbox/blackbox/dense.h linbox/blackbox/sparse.h, linbox/matrix/archetype.h linbox/matrix/dense-submatrix.h, linbox/matrix/dense.h linbox/matrix/matrix-domain.h, linbox/matrix/sparse.h linbox/matrix/transpose.h, tests/test-matrix-domain.C, make struct RowMatrixTag, struct ColMatrixTag, struct RowColMatrixTag non-template classes, since they are only used to distinguish the matrix types and in this case, non-template classes suffice and codes become simpler. 2004-03-02 Zhendong Wan * remove linbox/vector/const-iterator-type.h, since in new gcc, std::vector::iteretor is not same type as Element*, it doesnot work anymore. * modify linbox/vector/subvector.h, add one template parameter const_iterator. * linbox/blackbox/dense.h, dense.inl, use MatrixDomain to conform SparseMatrix implementation. 2004-03-02 Zhendong Wan * linbox/blackbox/sparse.h, remove field VectorDomain _VD, since it is not used in any member function. 2004-02-07 Zhendong Wan * linbox/algorithms/rational-reconstruction.h, speed it up bu only reconstructing the rationals at every threshold position. 2004-02-06 bds * linbox/gen_superlu/gssv_rank.h linbox/gen_superlu/trsv.h tests/Makefile.am tests/test-gssv_rank.C tests/data/gssv_rank_data: fix gssv_rank test (works except for A'+A case). 2004-02-04 Zhendong Wan * Add linbox/field/PIR-modular-int.h, which is an extension of Modular with PIR functions. 2004-02-03 Zhendong Wan * Modify linbox/field/PIR-ntl-ZZ_p.h, add MVProductDomain, DotProductDomain for PIR_ntl_ZZ_p 2004-01-28 Zhendong Wan * Modify linbox/algorithms/iliopoulos-elimination.h, making it work in a PIR suggest by bds. * Modify linbox/tests/test-iliopoulos-elimination.C, making it work upon change of iliopoulos-elimination * Add linbox/field/PIR-ntl-ZZ_p.h, adpating ntl-ZZ_p, and adding PIR interface (gcd, xgcd, dxgcd). 2004-01-27 Zhendong Wan * Modify linbox/algorithms/bitonic-sort.h, minor name change * Add linbox/tests/test-bitonic.C, test for bitonic-sort 2004-01-27 BDS * Modify linbox.dxx doc/.cvsignore doc/doc.dxx, min doc change 2004-01-27 BDS *add linbox/field/ntl-pid-zz_p.h, linbox/field/local2_32.h, linbox/algroithms/local-smith.h, code for local smith form computation. *add linbox/tests/test-local-smith.C, modify linbox/tests/Makefile.am, add test for local smith algorithm 2004-01-26 Zhendong Wan * add linbox/field/ntl-ZZ.h, linbox/randiter/ntl-ZZ.h, adapter NTL::ZZ to linbox. * add linbox/algorithms/lifting-container.h, linbox/algorithms/rational-reconstruction.h, linbox/algorithms/rational-solver.h, solve the linear systems over the rationals by lifting. * add linbox/algorithms/bitonic-sort.h, implement bitonic-sort, a sort network sequential implemenation. * add linbox/algorithms/iliopoulos-elimination.h, implement the Iliopoulos algorithm for Smith form. * add linbox/blackbox/apply.h, linbox/blackbox/scompose.h, linbox/blackbox/compose-traits.h, linbox/blackbox/random-matrix-traits.h, linbox/blackbox/random-matrix.h, linbox/blackbox/submatrix-traits.h, linbox/algorithms/ith-invariant-factor.h, linbox/algorithms/last-invariant-factor.h, linbox/algorithms/matrix-inverse.h, linbox/algorithms/matrix-mod.h, linbox/algorithms/smith-form.h, implement EGV/EGV+/EGV++ algorithm for Smith Form computation. * add linbox/tests/test-last-invariant-factor.C, linbox/tests/test-smith-form.C, linbox/tests/test-iliopoulos-elimination.C, add test for smith form computation and iliopoulos elimination. 2004-01-26 Zhendong Wan * linbox/blackbox/submatrix.h, add specialization for submatrix of denese matrices. * linbox/matrix/dense-submatrix.h, linbox/matrix/dense-submatrix.inl, fixed output / input 2004-1-15 bds * field/archetype.h field/field-interface.h: doc tweaks * matrix/dense-submatrix.h matrix/dense-submatrix.inl: fixed write trouble. * vector/subvector.h: fixed swap 2004-01-07 Pascal Giorgi Fix some printing messages in : * macro/atlas-check.m4 * macro/expat-check.m4 * macro/givaro-check.m4 * macro/lidia-check.m4 * macro/ntl-check.m4 * macro/saclib-check.m4 2003-12-29 Bradford Hovinen * linbox/matrix/transpose.h (class TransposeMatrix): Remove const requirement on input matrix; add in regular iterators * tests/test-matrix-domain.C (transpose): Remove const (testInvMulOver, testInvMulUnder, testInvLeftMulinOver) (testInvRightMulinOver): Remove const from parameter M 2003-12-28 Bradford Hovinen * linbox/vector/vector-domain.h (class VectorDomain): Add permute, swap functions * linbox/vector/vector-domain.inl (swapSpecialized, permuteSpecialized): Implement * linbox/matrix/matrix-domain.inl (permuteRowsByRow) (permuteRowsByCol, permuteColsByRow, permuteColsByCol): Implement * linbox/matrix/matrix-domain.h (class MatrixDomain): Add row/column permutation functions 2003-12-19 bds * tests/Makefile.am: just clean up some comments 2003-12-19 Pascal Giorgi * added files : linbox/gen_superlu/Makefile.am: missing file macros/config-header.m4: create linbox-config.h from config.h by prefixing all variable by __LINBOX_ macros/linbox-misc.m4: allow --with-all and --with-default options Modify Makefile such they use pkg variable * gmp++/Makefile.am * interfaces/Makefile.am * interfaces/maple/Makefile.am * linbox/Makefile.am * linbox/algorithms/Makefile.am * linbox/blackbox/Makefile.am * linbox/element/Makefile.am * linbox/fflapack/Makefile.am * linbox/fflas/Makefile.am * linbox/field/Makefile.am * linbox/iterators/Makefile.am * linbox/matrix/Makefile.am * linbox/randiter/Makefile.am * linbox/solutions/Makefile.am * linbox/switch/Makefile.am * linbox/util/Makefile.am * linbox/util/xml/Makefile.am * linbox/vector/Makefile.am Modify all macro such that they use --with-package terminology + some new features * macros/Makefile.am * macros/atlas-check.m4 * macros/expat-check.m4 * macros/givaro-check.m4 * macros/gmp-check.m4 * macros/lidia-check.m4 * macros/maple-check.m4 * macros/ntl-check.m4 * macros/saclib-check.m4 modify sources and headers files such that the use the new terminology variable from linbox-config.h * linbox/blackbox/archetype.h * linbox/blackbox/compose.h * linbox/blackbox/dense.h * linbox/blackbox/diagonal.h * linbox/blackbox/nag-sparse.h * linbox/blackbox/ntl-toeplitz.h * linbox/blackbox/ntl-toeplitz.inl * linbox/blackbox/permutation.h * linbox/blackbox/scalar-matrix.h * linbox/blackbox/sparse.h * linbox/blackbox/triplesbb.h * linbox/blackbox/zero-one.h * linbox/blackbox/zero-one.inl * linbox/fflas/fflas.h * linbox/fflas/fflas_fgemm.inl * linbox/field/abstract.h * linbox/field/archetype.h * linbox/field/envelope.h * linbox/field/gf2.h * linbox/field/givaro-gfq.h * linbox/field/givaro-zpz.h * linbox/field/gmp-rational.h * linbox/field/lidia-gfq.h * linbox/field/modular.h * linbox/field/ntl-RR.h * linbox/field/ntl-ZZ_p.h * linbox/field/ntl-ZZ_pE.h * linbox/field/unparametric.h * linbox/matrix/dense.h * linbox/matrix/dense.inl * linbox/matrix/sparse.h * linbox/matrix/sparse.inl * linbox/randiter/gf2.h * linbox/randiter/gmp-rational.h * linbox/randiter/lidia-gfq.h * linbox/randiter/modular.h * linbox/randiter/nonzero.h * linbox/randiter/unparametric.h * linbox/util/xml/field-reader-analyzer.h * linbox/util/xml/reader-blackbox-factory.h * configure.in: Modification for new features * tests/Makefile.am: disable some tests and put tests in right place according to their dependencies * tests/test-lsp.C: changing the verification of result to be faster * Hacking: Adding new way of installation * maple stuff installation have been improved 2003-12-15 Saunders/Wan/Lobo * lbmaple.C: getField -> field, template for triplebb. 2003-11-18 Saunders/Wan * merge newBB branch into main branch (note: there is an indented section of branch changelog notes down below.) 2003-10-21 Pascal Giorgi Modify few Makefile.am in order to synchronise make dist and make check * linbox/algorithm/Makefile.am adding lsp.h * linbox/field/Makefile.am add modular-balance-int.h hom.h image-field.h * linbox/blackbox/Makefile.am add missing files * tests/Makefile.am fixe some bugs. move test-gssv.C to EXTRA PROGRAM 2003-10-08 wan@udel.edu * linbox/matrix/dense.inl, remove the width in write member function, since it causes problem for some ring and it is not necessary, for example, linbox integer doesnot have fixed length 2003-09-29 wan@udel.edu * linbox/util/field-zxpy.h, linbox/vector/vector-domain.h,.inl, linbox/field/givaro-zpz.h,modular-balance-int.h,modular-byte.h,modular-int.h,modular-short.h,modular.h,unparametric.h, add a new member reset to FieldAXPY, set initial accumulator's value to zero, thus we can put an instantiation of FieldAXPY into field of VectorDomain, instead of temporily instantiating FieldAXPY whenever we need it. 2003-09-27 wan@udel.edu * linbox/field/ntl* linbox/randiter/mersenne-twister.* linbox/randiter/unparametric.h, make them work with the new random memebr function. 2003-09-27 wan@udel.edu * linbox/blackbox/dense.h, change the parameter RandIter &iter --> const RandIter &iter in its constructor. 2003-09-27 wan@udel.edu * linbox/randiter/*.h, make each random member function to be a const member function in each random class, since the member will not change the instantiation of the random class at all, just generate a random element. * linbox/matrix/dense.inl, make RowIterator and ColIterator support operator --() and operator-- (int). 2003-09-26 wan@udel.edu * linbox/matrix/dense.h, fit to g++3 change, add std to endl. 2003-08-15 saunders@udel.edu * sundry minor doc++ tweaks. 2003-08-14 saunders@udel.edu * sundry doc++ comments in doc/ examples/ and tests/ * added files (in newbB branch) linbox.dxx doc/fix-index examples/ex-integers.C examples/examples.dxx examples/blackbox/blackbox.dxx examples/fields/fields.dxx tests/tests.dxx * linbox/blackbox/sparse.h added default sizes * removed FROZEN, it's contents added to CHANGED-INTERFACES 2003-08-13 saunders@udel.edu * test-generic.h blackbox tests simplified, testBB() added * ntl-zz_p.h field fixed * tests/test-ntl-toeplitz/hankel to newBB. begin newBB branch notes 2003-11-05 Pascal Giorgi * add file /linbox/field/modular-double.h * /linbox/field/modular.h include modular-double.h 2003-10-23 wan@udel.edu * linbox/blackbox/dense.h, in the operator= , I forced the assignment for field _F. 2003-10-22 wan@udel.edu * tests/Makefile.am, comment test-lsp, since g++ complains its syntax error. * linbox/blackbox/compose.h, correct a few typos. 2003-10-22 wan@udel.edu * linbox/field/modular-byte.h, minor change for write member function, output the modulus as a int instead of a char. 2003-10-22 wan@udel.edu * linbox/blackbox/compose.h, add specialization for Compose 2003-10-08 wan@udel.edu * linbox/matrix/dense.inl, remove the width in write member function, since it causes problem for some ring and it is not necessary, for example, linbox integer doesnot have fixed length 2003-09-29 wan@udel.edu * linbox/util/field-zxpy.h, linbox/vector/vector-domain.h,.inl, linbox/field/givaro-zpz.h,modular-balance-int.h,modular-byte.h,modular-int.h,modular-short.h,modular.h,unparametric.h, add a new member reset to FieldAXPY, set initial accumulator's value to zero, thus we can put an instantiation of FieldAXPY into field of VectorDomain, instead of temporily instantiating FieldAXPY whenever we need it. 2003-09-27 wan@udel.edu * linbox/field/ntl* linbox/randiter/mersenne-twister.* linbox/randiter/unparametric.h, make them work with the new random memebr function. 2003-09-27 wan@udel.edu * linbox/blackbox/dense.h, change the parameter RandIter &iter --> const RandIter &iter in its constructor. 2003-09-27 wan@udel.edu * linbox/randiter/*.h, make each random member function to be a const member function in each random class, since the member will not change the instantiation of the random class at all, just generate a random element. * linbox/matrix/dense.inl, make RowIterator and ColIterator support operator --() and operator-- (int). 2003-09-26 wan@udel.edu * linbox/matrix/dense.h, fit to g++3 change, add std to endl. 2003-08-15 saunders@udel.edu * sundry minor doc++ tweaks. 2003-08-14 saunders@udel.edu * sundry doc++ comments in doc/ examples/ and tests/ * added files (in newbB branch) linbox.dxx doc/fix-index examples/ex-integers.C examples/examples.dxx examples/blackbox/blackbox.dxx examples/fields/fields.dxx tests/tests.dxx * linbox/blackbox/sparse.h added default sizes * removed FROZEN, it's contents added to CHANGED-INTERFACES 2003-08-13 saunders@udel.edu * test-generic.h blackbox tests simplified, testBB() added * ntl-zz_p.h field fixed * tests/test-ntl-toeplitz/hankel to newBB. end newBB branch notes 2003-08-09 saunders@udel.edu * sundry documentation mods * blackbox/companion.h fix 2003-08-08 Rich Seagraves * linbox/util/xml/field-reader-analyzer.C: * linbox/util/xml/reader-blackbox-factory.C: Removed files (depricated) * gmp++/gmp++_int.h: * linbox/util/gmp++/gmp++_int_misc.C: Added operator bool to LinBox Integer class (casts integer to remainder upon division by 2) * linbox/blackbox/archetype.h: Add XML support to BlackboxArchetype * linbox/blackbox/companion.h: Add XML support * linbox/blackbox/compose.h: Added partial XML support (incomplete) * linbox/blackbox/scalar-matrix.h: * linbox/blackbox/triplesbb.h: * linbox/blackbox/zero-one.h: * linbox/blackbox/zero-one.inl: * linbox/blackbox/dense.h: * linbox/blackbox/nag-sparse.h: * linbox/blackbox/ntl-toeplitz.h: * linbox/blackbox/ntl-toeplitz.inl: * linbox/matrix/sparse.inl: Modified XML Reading, Writing methods for these Blackboxes * linbox/field/abstract.h: * linbox/field/envelope.h: Added reading & writing methods to envelope & abstract * linbox/field/givaro-zpz.h: * linbox/field/modular.h: * linbox/field/unparametric.h: Modified XML Reading, Writing methods for these Blackboxes * linbox/field/archetype.h: Added XML support to Field archetype (incomplete) * linbox/util/xml/field-reader-analyzer.h: * linbox/util/xml/reader-blackbox-factory.h: Completed experimental version of FieldReaderAnalyzer & ReaderBlackBoxFactory * linbox/util/xml/Makefile.am: Added entries for reader-blackbox-factory.h & field-reader-analyzer.h 2003-08-07 Bradford Hovinen * linbox/element/Makefile.am (EXTRA_DIST): Remove abstract.dxx * linbox/Makefile.am (EXTRA_DIST): Remove interfaces.dxx * RELEASE-INSTRUCTIONS: Add this file * tests/Makefile.am (BASIC_TESTS): Remove test-givaro-zpz (EXTRA_PROGRAMS): Add $(GIVARO_TESTS) * linbox/algorithms/wiedemann.inl (precondition): Allocate all Compose objects dynamically * tests/test-solve.C (main): Restore call to testPreconditionedSolve * linbox/field/gmp-rational.h (GMPRationalField::read): Compilation fix 2003-07-25 Bradford Hovinen * linbox/algorithms/block-lanczos.inl: Add calls for detailed timing information 2003-07-20 Bradford Hovinen * linbox/field/modular.inl (mulColDenseSpecialized): Compilation fixes * linbox/algorithms/block-lanczos.h (class BlockLanczosSolver): Initialize _MD in all constructors 2003-07-23 wan@udel.edu * linbox/field/modular-int.h, linbox/field/modular-short.h, linbox/field/modular-byte.h add MVProductionDomain specialization. 2003-07-21 Rich Seagraves * linbox/util/xml/field-reader-analyzer.C: * linbox/util/xml/field-reader-analyzer.h: added files for Reader->Field conversion * linbox/util/xml/reader-blackbox-factory.h: * linbox/util/xml/reader-blackbox-factory.C: added files for Reader->BlackBox conversion * linbox/blackbox/dense.h: * linbox/matrix/dense.h: Added XML support to DenseMatrix class * linbox/blackbox/diagonal.h: "" Diagonal class * linbox/blackbox/nag-sparse.h: "" NAGSparse class * linbox/blackbox/ntl-toeplitz.h: * linbox/blackbox/ntl-toeplitz.inl: "" NTLToeplitz class * linbox/blackbox/permutation.h: "" Permutation class * linbox/blackbox/scalar-matrix.h: "" ScalarMatrix class * linbox/blackbox/sparse.h: * linbox/matrix/sparse.h: "" SparseMatrix class * linbox/blackbox/triplesbb.h: "" TriplesBB class * linbox/blackbox/zero-one.h: * linbox/blackbox/zero-one.inl: "" ZeroOne class * linbox/field/gf2.h: "" GF2 class * linbox/field/gf2.inl: * linbox/field/givaro-gfq.h: "" GivaroGfq class * linbox/field/givaro-zpz.h: * linbox/field/givaro-zpz.inl: "" GivaroZpz class * linbox/field/gmp-rational.h: "" GMPRationalField class * linbox/field/lidia-gfq.h: "" LidiaGfq class * linbox/field/modular.h: "" Modular class * linbox/field/ntl-RR.h: "" NTL::RR specilization of Unparametric * linbox/field/ntl-ZZ_p.h: "" NTL::ZZ_p "" * linbox/field/ntl-zz_p.h: "" NTL::zz_p "" * linbox/field/ntl-ZZ_pE.h: "" NTL::ZZ_pE "" * linbox/field/unparametric.h: Added XML support to UnparametricField * linbox/randiter/gmp-rational.h: "" GMPRationalRandIter class * linbox/randiter/lidia-gfq.h: "" LidiaGfq randiter * linbox/randiter/modular.h: "" Modular randiter * linbox/randiter/nonzero.h: "" NonZero randiter * linbox/randiter/unparametric.h: "" UnparametricRanditer * linbox/util/xml/linbox-reader.h: * linbox/util/xml/linbox-writer.h: * linbox/util/xml/xml-tree.h: Updated XML reading & writing API 2003-07-21 saunders@udel.edu * Documentation modifications in doc/doc.dxx linbox/archetypes.dxx linbox/linbox.dxx linbox/blackbox/blackbox.dxx linbox/blackbox/direct-sum.h linbox/element/abstract.h linbox/element/archetype.h linbox/element/envelope.h Removed Files: linbox/interfaces.dxx linbox/wrappers.dxx linbox/element/abstract.dxx linbox/element/archetype.dxx 2003-07-21 wan@udel.edu * linbox/field/modular-balance-int.h, add balance representation for modular field. * tests/test-modular-balance-int.C, add test for balance representation for modular field. 2003-07-14 saunders@udel.edu * tests/Makefile.am givaro test now works * various.dxx some doc tweaks 2003-07-11 Bradford Hovinen * linbox/algorithms/block-lanczos.inl (iterate): Add TIMER_* calls to report detailed timings when DETAILED_PROFILE is set * linbox/randiter/mersenne-twister.h: * linbox/randiter/mersenne-twister.C: Eliminate #pragma directives 2003-07-10 Bradford Hovinen * linbox/blackbox/matrix-blackbox.h (class MatrixBlackbox): Add this file 2003-07-06 Bradford Hovinen * linbox/matrix/transpose.h (class TransposeMatrix): Add missing Row, Col, Column declarations * linbox/field/modular.h (class MVProductDomain): Add specializations for uint8, uint16, and uint32 2003-07-05 Bradford Hovinen * linbox/matrix/matrix-domain.h (class MVProductDomain): Create this class and move mulColSpecialized for dense vectors into it * linbox/algorithms/block-lanczos.inl (solve): Try checking system solution even if iterate returned false, just in case enough of the Krylov basis was obtained to get the true solution. 2003-07-03 Bradford Hovinen * linbox/blackbox/diagonal.h (Diagonal::apply): Don't resize the output * linbox/blackbox/transpose.h (class Transpose): Parameterize by black box; add versions of apply and applyTranspose separately parameterized by vector * linbox/blackbox/compose.h (class Compose): Add versions of apply and applyTranspose separately parameterized by vector (class Compose): Parameterize by blackboxes * tests/test-sparse.C (runSparseMatrixTests): Disable testing sparse matrix against non-dense vectors, since I don't support them any more * linbox/blackbox/sparse.h (class SparseMatrix): Add versions of apply and applyTranspose parameterized by two vector types; add MatrixDomain _MD; Use _MD for arithmetic and eliminate specializations as they are no longer needed; eliminate applyTransposeSpecialized * linbox/matrix/matrix-domain.h (MatrixDomain::blackboxMul): Rename blackboxMulLeft, blackboxMulRight; parameterize by black box and not by vector 2003-07-02 Bradford Hovinen * linbox/solutions/solve.h (solve): Eliminate Vector from BlockLanczosSolver declaration; parameterize by black box * linbox/algorithms/block-lanczos.inl (iterate): Declare tmp and tmp1 locally (mulin): Use Vector::Dense::iterator rather than Vector * linbox/algorithms/block-lanczos.h (class BlockLanczosSolver): Eliminate v and Av (class BlockLanczosSolver): Eliminate _t1; replace _t with _tmp * linbox/algorithms/block-lanczos.inl (solve): Parameterize by black box and vector (iterate): Ditto (solve): Eliminate v and Av * linbox/algorithms/block-lanczos.h: (class BlockLanczosSolver): Make generic wrt internal matrix type used; no longer parameterize by vector * linbox/algorithms/block-lanczos.inl (compute_Winv_S): Compute and return rank of V^T AV (iterate): Keep track of Ni and add trace statements to report it; abort if total of Ni's is too large (iterate): Use Vi = 0 as termination condition (iterate): Add variable progress_interval giving number of iterations between each call to commentator.progress (compute_Winv_S): Don't call commentator.progress unless DETAILED_TRACE is set 2003-07-09 saunders@cis.udel.edu * field/ntl-zz_p.h unparametric.h fix yesterday's version - syntax of new constructor from p,e. 2003-07-08 saunders@cis.udel.edu * Documentation tweaks, especially vis a vis @memo entries. * See doc/doc.dxx for discussion of documentation conventions. * For now, let's try to make the html documentation work and leave tex for later. 2003-07-07 Rich Seagraves * macros/expat-check.m4: Disabled automatic detection of expat in system standard locations, expat must now be manually specified in configure step 2003-06-30 Rich Seagraves * macros/expat-check.m4: * linbox/blackbox/triplesbb.h: * linbox/field/modular.h: Files altered to use "XMLENABLED" pre-processor flag instead of "RWENABLED" * linbox/matrix/sparse.h: * linbox/matrix/sparse.inl: * linbox/blackbox/sparse.h: * linbox/blackbox/sparse.inl: Added XML support to all SparseMatrix variants * linbox/blackbox/nag-sparse.h: Added XML support to NAGSparse blackbox * linbox/blackbox/zero-one.h: Added XML support to ZeroOne blackbox * linbox/util/xml/linbox-reader.h: Added constructor from initalized Writer * linbox/util/xml/linbox-writer.h: begun adding ability to traverse written Tag structure, add tags BEFORE as well as after the current Tag 2003-06-26 Rich Seagraves * add macros/expat-check.m4, * add linbox/util/xml, * add linbox/util/xml/linbox-reader.h, * add linbox/util/xml/linbox-writer.h, * add linbox/util/xml/xml-tree.h, * add linbox/util/xml/README, * add linbox/util/xml/Makefile.am: Defines LinBox/XML framework * configure.in: Alters build system to make expat package optional dependency * linbox/util/Makefile.am: make xml a subdir of util * linbox/blackbox/triplesbb.h: Add XML reading & Writing to TriplesBB class * linbox/field/modular.h: Add XML reading & Writing to ModularBase class * linbox/solutions/det.h: commented out debug output 2003-06-24 wan@udel.edu * linbox/field/modular-int.h, linbox/field/modular-short.h, linbox/field/modular-byte.h, use a fast way to compute 2^64 % modulus. * linbox/tests/test-modular-int.h, change the modulus to a 30 big integer. 2003-06-20 wan@udel.edu * linbox/blackbox/butterfly.h, linbox/blackbox/dense.h * linbox/blackbox/dif.h,linbox/blackbox/inverse.h * linbox/blackbox/sparse.h, linbox/blackbox/submatrix.h : for high performance reason, and a field only occupies a small memory, change const Field& to const Field in private field. 2003-06-16 wan@udel.edu * add linbox/field/modular-int.h, modular-short.h , modular-byte, combining the trick of NTL for arithmetic operation and dot product of modluar * add linbox/tests/test-modular-int.C, test-modular-short.C, test-modular-byte.C. * linbox/randiter/modular.h, remove field _card, since it only uses to initialize _size. 2003-06-12 wan@udel.edu * linbox/field/givaro-gfq.h, enforce that the cardinality must be <2^16, for givaro-gfq * linbox/randiter/modular.h, replace static-cast with init in the random function. 2003-06-05 saunders@udel.edu * work on documentation in linbox/blackbox (particularly blackbox.dxx and archetype.h). * Note: renamed blackboxes.dxx to blackbox.dxx and removed some cruft files. 2003-06-03 zhendong wan * linbox/blackbox/ntl-sylvester.inl remove the warning message. 2003-06-03 zhendong wan * linbox/field/ntl-zz-p.h, set default prime to be 65521 * tests/test-sum.C, correct a type name error. 2003-06-03 zhendong wan * linbox/util/commentator.C, tests/test-commentator.C, temporarily fixed the bug in test-commentator, left a little memory leaking. 2003-06-02 saunders@udel.edu * blackbox/zero-one.h, .inl: mods to avoid g++ 3.2.1 typename warnings. 2003-05-30 saunders@udel.edu * field/unparametric.h field/ntl-zz_p.h tests/test-ntl-zz_p.cpp: put in prototype of a constructor * I propose to have all field classes have a constructor from a prime and optionally an exponent -- * FieldClass(integer q) if a prime field class, (allow q = 0) * FieldClass(integer q, size_t e) if an extension of degree e. 2003-05-30 saunders@udel.edu * tests/test-commentator.C - adjust so passes on solaris. Note: there is apparently still a bug to fix. 2003-05-30 zhendong wan * linbox/blackbox/null-matrix.h: remove getInstance member function. Make default constructor public, remove static member nullMatrix * linbox/blackbox/direct-sum.h: update the include file for NullMatrix. * tests/Makefile.am: comment some tests lacking of source codes * linbox/blackbox/Makefile.am: put in null-matrix.h direct-sum.h 2003-05-29 saunders@udel.edu * change name to null-matrix.h and depreciate applyIn and a doc++ comment. 2003-05-29 zhendong wan * linbox/blackbox/nullmatrix.h : added a new singelton class. a matrix of size 0 * linbox/black/direct-sum.h : solved some ugly problem 2003-05-28 zhendong wan * tests/test-direct-sum.c: update the tests for DirectSum 2003-05-28 austin lobo david saunders * Changed blackbox/direct-sum.h to allow for 0 x 0 blocks * Changed blackbox/scalar-matrix.h to properly handle 0 x 0 matrix * Added test for 0 x 0 in tests/test-direct-sum.C * Added test for 0 x 0 in tests/test-scalar-matrix.C * New blackbox/frobenius.h and tests/test-frobenius.C 2003-05-27 zhendong wan * linbox/blackbox/companion.h, tests/test-companion.h: revised the Compa nion class, remove template parameter Polynomial, modify the constructor with ra ndom genertor. 2003-05-27 saunders@udel.edu * blackbox/companion.h, tests/test-companion.h: added class inherits from triplesbb * tests/test-triplesbb.C: add test from other constructor 2003-05-26 Pascal Giorgi * linbox/FFLAS/fflas.h : modify field_trsm to be closed to blas standard * linbox/FFLAS.fflas.inl : put macro LEFT,RIGHT,UNIT,NOUNIT,LOWER,UPPER, to specialize field_trsm function * linbox/algorithms/lsp.h : adding function to retrieve index of zero and non-zero rows in S. * linbox/algorithms/lsp-tools.h: adding function to handle row permutation , synchronization with field_trsm 2003-05-23 saunders@udel.edu * tests/test-generic.h: make testSmallBlackbox work, put it in with linearity and transpose in testBlackbox. 2003-05-20 saunders@udel.edu * linbox/blackbox/compose.h: add constructor from references, &A &B. * linbox/blackbox/sum.h: add constructor from refs, &A &B; remove cloning; copy field for speed. * linbox/field/ntl-zz_p.h: typdef to name NTL_zz_p * macros/atlas-check.m4: remove f77blas refs which break things for me. Hope not needed by others. * tests/test-butterfly.C: also check Compose constructor with refs (vs ptrs) * tests/test-generic.h: fix vector size bug in testTranspose(). * tests/test-rank.C: add testZeroAndIdentRank(). * tests/test-sum.C: also check Sum constructor with refs (vs ptrs), calls testBlackbox() too. * Added Files: linbox/blackbox/direct-sum.h tests/test-direct-sum.C: DirectSum BB is direct sum of 2 BBs, similar in structure to Compose, Sum. 2003-05-14 Bradford Hovinen * tests/Makefile.am (BASIC_TESTS): Reintroduce test-solve * tests/test-solve.C (testSingularInconsistentSolve): Check status == ...INCONSISTENT, not status == SINGULAR 2003-04-23 Pascal Giorgi * linbox/algorithms/lsp.h: delete typo errors * linbox/algorithms/lsp-tools.h : clarify Compute-G function * tests/Makefile.am: retrieve test-lsp 2003-04-19 -bds - comment out non working tests in tests/Makefile.am 2003-04-11 Pascal Giorgi * linbox/FFLAS/FFFMMBLAS.h: use of init and convert with double in MatGfq2MatDouble, MatGfq2MatDouble_Triangular and MatDouble2MatGfq * linbox/field/givaro-zpz.h: define convert to double 2003-04-11 Austin Lobo * Added rules for ntl-sylvester and test-ntl-sylvester * Added ntl-sylvester.h ntl-sylvester.inl to the repository 2003-04-10 Pascal Giorgi * linbox/algorithms/lsp.h : optimization * linbox/FFLAS.fflas.inl : new version of Field_trsm (more effficient) 2003-04-04 Pascal Giorgi * linbox/field/givaro-zpz.h: fix bug with init from double * linbox/field/givaro-zpz.inl: fix some warnings * linbox/FFLAS/FFFMMBLAS.h: fix some bugs * linbox/FFLAS/fflas.inl: fix some bugs * linbox/algorithms/lsp.h: adding header * linbox/tests/test-lsp.C: adding test for LSP factorization with atlas library * linbox/tests/Makefile.am: adding tests and variables for atlas library 2003-04-02 Pascal Giorgi * linbox/matrix/dense.h: adding parameter _ptr as a pointer on the first Element of the matrix adding FullIterator() function (returning _ptr) 2003-04-02 Jean-Guillaume Dumas * gmp++/gmp++_int.h: Backed out my commit * linbox/util/gmp++/gmp++_int_misc.C: Backed out my commit * macros/gmp-check.m4 : added GMP_VERSION Makefile variable to enable gmp-3.xxx compatibility * All this is made to have fully SIMILAR gmp++ files within givaro * and linbox (e.g. no "#include " nor * "#include " 2003-04-02 Giorgi Pascal * linbox/macros/atlas-check.m4: adding checking for atlas tuning library * linbox/configure.in: adding check for atlas * linbox/field/givaro-zpz.h: adding init function from double * linbox/algorithms/lsp.h : * linbox/algorithms/lsp-tools.h : algorithm to compute the LSP decomposition of a dense matrix stored contiguously by row. * linbox/FFLAS/ : new directory containing FFLAS routine of jean-guillaume and clement and also LinBox wrappers * linbox/FFLAS/FFFMMBLAS.h: FFLAS routine (j-g and clement code) * linbox/FFLAS/ FFFMMBLAS.inl: FFLAS routine (j-g and clement code) * linbox/FFLAS/lin_wrap_c++.h: FFLAS routine (j-g and clement code) * linbox/FFLAS/lin_wrap_c++.inl: FFLAS routine (j-g and clement code) * linbox/FFLAS/fflas.h: wrappers including field_dgemm and field_trsm * linbox/FFLAS/fflas.inl: wrappers including field_dgemm and field_trsm 2003-04-01 Bradford Hovinen * linbox/matrix/matrix-domain.inl: * linbox/matrix/matrix-domain.h: Back out previous changes 2003-03-31 Bradford Hovinen * tests/test-vector-domain.C (main): Add test for uint8 * linbox/field/modular.h (class FieldAXPY): typedef uint8 Element 2003-03-29 Bradford Hovinen * linbox/vector/bit-vector.h: Be generic wrt word length, so we can use 64-bit arithmetic when available * linbox/util/debug.h: Remove GCCisms 2003-03-27 Bradford Hovinen * gmp++/gmp++_int.h: Add operator unsigned char * gmp++/gmp++_int.h: Backed out previous commit, since it broke the build for the entire library * linbox/util/gmp++/gmp++_int_misc.C: Backed out previous commit, since it broke the build for this file * tests/test-modular.C (main): Add test for Modular * linbox/field/modular.h (class FieldAXPY): Add specialization for uint8 (class Modular): Add specialization for uint8 (class DotProductDomain): Add specialization for uint8 2003-03-26 Bradford Hovinen * linbox/matrix/matrix-domain.h (class MatrixVectorDomain): Create this class and move mulRowSpecialized and mulColSpecialized functions into it (class MatrixDomain): Inherit MatrixVectorDomain (class MatrixDomain): Move _VD to MatrixVectorDomain * linbox/field/gf2.inl (class Diagonal): Add specialization for GF2 * linbox/blackbox/diagonal.h (class Diagonal): Use RandIter, not RandomIterator * linbox/field/gf2.inl (addinSpecialized): Remember to increment other iterators * tests/test-gf2.C (testDotProductGF2): Create new version for dense/sparse test (testDotProductGF2): Use generic vector names (main): Use unsigned int rather than size_t for n * linbox/field/gf2.inl (dotSpecializedDD): Use mask at the end of the vector * linbox/vector/bit-vector.inl (class BitVector::const_iterator): Add operator = (iterator) (class BitVector::iterator): Make const_iterator a friend (class BitVector::reference): Ditto (class BitVector::iterator, class BitVector::const_iterator): Add equality checks with each other * tests/test-gf2.C (testDotProduct): Enable this * linbox/field/gf2.inl (class RandomSparseStreamGF2, class RandomDenseStreamGF2): Require seed as a parameter (addSpecialized): Swap x and y in if statement (VectorDomain::addinSpecialized): Fix call to copy * linbox/vector/bit-vector.inl (operator ==): Make this operation a bit smarter 2003-03-23 Bradford Hovinen * linbox/field/gf2.inl (class VectorDomain): Sprinkle this-> before copy liberally to make SGI CC happy * linbox/vector/bit-vector.inl (operator =): Return *this * tests/test-dif.C (testZeroApply): Remove neg_one * linbox/util/field-axpy.h (FieldAXPY::operator =): Don't try to assign the field * tests/test-sparse.C (main): Don't use NonzeroRandIter for RandomSparseStream -- that's already implied * linbox/field/gf2.inl (class RandomDenseStreamGF2, class RandomSparseStreamGF2): Rename from specializations of RandomDenseStream and RandomSparseStream * tests/Makefile.am: Enable test-gf2 * linbox/vector/bit-vector.inl (BitVector::resize): Set _size * linbox/randiter/mersenne-twister.h (MersenneTwister::randomDoubleRange): Move this to the header file * linbox/randiter/mersenne-twister.C (randomInt): Make this not inline * linbox/field/gf2.inl (class RandomDenseStream): Use the Mersenne Twister (class RandomSparseStream): Use the Mersenne Twister * linbox/randiter/gf2.h (class GF2RandIter): Use the Mersenne Twister (GF2RandIter::random): Overload with two reference types rather than using template * linbox/field/gf2.h (class GF2): Eliminate template declarations; instead use manual overloading. This means we only support bool & and BitVector::reference. Use a straight bool on const parameters * linbox/vector/bit-vector.inl: Add inserter and extractor overloading for BitVector::(const_)reference * linbox/vector/Makefile.am (include_HEADERS): Add missing bit-vector.inl * linbox/randiter/Makefile.am (BASIC_HDRS): Add missing gf2.h 2003-03-16 Bradford Hovinen * linbox/util/commentator.C (Commentator::setMaxDepth, Commentator::setMaxDetailLevel): Use ++i, not i++ * linbox/vector/subvector.h (Subvector::at): Use const_reference rather than const reference * linbox/vector/reverse.h (ReverseVector): Use const_reference rather than const reference * linbox/util/commentator.h (class Commentator): Add setMaxDepth and setMaxDetailLevel to disabled commentator 2003-03-21 Austin Lobo * test-generic.h: added testApply(..) and testApplyTranspose(...) to testBlackBox, so that timings for these two operations can be obtained. * test-ntl-toeplitz.C, test-ntl-hankel.C: cosmetic changes to give slightly cleaner status message. * ntl-toeplitz.inl: modifications in the limits of iterations to take into account the possibility of rectangular matrices. 2003-03-20 Giorgi Pascal * linbox/field/givaro-zpz.h fix bugs for init function 2003-03-15 Bradford Hovinen * linbox/randiter/modular.h (RandIter::RandIter): Copy _size and _seed in copy constructor * linbox/vector/stream.h (class RandomSparseStream): Use MersenneTwister (class RandomSparseStream): Declare the base random iterator locally * linbox/randiter/modular.h (Modular::RandIter, Modular::RandIter): New specializations; use the new Mersenne Twister random number generator * linbox/randiter/Makefile.am (noinst_LTLIBRARIES): Add libranditer.la (libranditer_la_SOURCES): Add mersenne-twister.C (BASIC_HDRS): Add mersenne-twister.h * linbox/Makefile.am (liblinbox_la_LIBADD): Add libranditer.la 2003-02-07 Bradford Hovinen * linbox/matrix/Makefile.am (BASIC_HDRS): Add matrix-domain.{h|inl} * linbox/vector/Makefile.am (include_HEADERS): Add vector-domain.{h|inl} 2002-03-04 Pascal Giorgi * linbox/field/givaro-zpz.h added specialization for DotProductDomain and FieldAxpy * linbox/field/givaro-zpz.inl added specialization for DotProductDomain and FieldAxpy 2003-03-03 Zhendong Wan *linbox/matrix/matrix-domain.h, include header file linbox/vector/vector-domain.h 2003-02-26 Austin Lobo * linbox/blackbox/Makefile.am (include_HEADERS) : added ntl-hankel.h * linbox/blackbox/ntl-hankel.h: added to library after testing * linbox/blackbox/ntl-hankel.inl: added to library after testing * linbox/tests/test-ntl-hankel.C: added to library after testing * linbox/tests/Makefile.am: (test_ntl_hankel_SOURCES) added * linbox/tests/test-generic.h: minor changes to make output clearer. 2003-02-25 Zhendong Wan *linbox/blackbox/zero-one.h, zero-one.inl. Correct one typo. 2003-02-25 Zhendong Wan *linbox/blackbox/zero-one.h, zero-one.inl. Seperate the Intereface and i implementation, put them in seperate files.And make apply specialization for Modular work. 2003-02-24 David Saunders and Zhendong Wan * linbox/util/timer.h: #define __LINBOX_TIMER_H to avoid conflict with givaro timer * tests/Makefile.am: reinstate givaro test 2003-02-22 David Saunders * tests/test-solve.C: comment out "Sparse preconditioner", MethodTrait::Wiedemann::SPARSE It's segfaulting, likely due to Compose changes. * linbox/blackbox/transpose.h compose.h: remove cloning * linbox/blackbox/triplesbb.h: coupla "typename"s to remove warnings. * linbox/field/hom.h image-field.h: Introduce a scheme for homomorphic images with injections in extension fields in mind, isoms in mind, ints to modular in mind. Specializations are now needed. * tests/test-hom.C test-image-field.C: Add prototype tests for 'em. * tests/test-generic.h: make statistical randiter test more likely to pass. 2003-02-05 Bradford Hovinen * tests/Makefile.am (NTL_TESTS): Move test-ntl-toeplitz here (NTL_TESTS): Move test-gssv_rank here * tests/test-solve.C (testSingularPreconditionedSolve) (testSingularInconsistentSolve): Use version of solve without exceptions * linbox/solutions/solve.h (solve): Return WiedemannSolver return status rather than reference to solution vector. Require parameter for certificate of inconsistency. New version that throws exceptions * linbox/algorithms/wiedemann.h (class WiedemannSolver): Remove exception code; have all functions return a new enum ReturnStatus 2003-02-04 Bradford Hovinen * linbox/vector/stream.h (class RandomSparseStream): Remove specialization for dense vectors * tests/test-generic.h: Remove testFieldAXPY (runFieldTests): Remove call to testFieldAXPY * linbox/vector/vector-traits.h (struct VectorCategories): Add ZeroOneVectorTag, SparseVectorTag for GF(2) 2003-02-03 Bradford Hovinen * tests/test-vector-domain.C: Include test-generic.h * tests/test-generic.h (testRandomIterator): Move from test-modular.C here (testDotProduct, testAddMul, testSubMul, testAXPY, testCopyEqual): Move from test-vector-domain.C here * tests/test-rank.C (testEliminationRank): New test * linbox/matrix/sparse.h (class SparseMatrixBase): Add operator [] for row access (class SparseMatrixBase): Add typedef ConstRow * examples/blackbox/Makefile.am (EXTRA_PROGRAMS): Add random-rank * linbox/matrix/Makefile.am (BASIC_HDRS): Add dense-rows-matrix.h * linbox/vector/Makefile.am (include_HEADERS): Add bit-vector.h * linbox/field/Makefile.am (BASIC_HDRS): Add gf2.h, gf2.inl * linbox/algorithms/wiedemann.inl (makeLambdaSparseMatrix): Update RandomSparseStream * linbox/vector/stream.h (RandomSparseStream::RandomSparseStream): Put probability parameter before vector dimension * linbox/algorithms/gauss.h: Rename gauss_rankin as rankin and gauss_rank as rank * linbox/algorithms/block-lanczos.h (class BlockLanczosSolver): * linbox/algorithms/block-lanczos.inl (solve): * linbox/algorithms/lanczos.h (class LanczosSolver): * linbox/algorithms/lanczos.inl (solve): * linbox/solutions/solve.h (solve): * linbox/algorithms/wiedemann.h (class WiedemannSolver): * linbox/algorithms/wiedemann.inl: Port to new SolverTraits interface * linbox/solutions/methods.h (struct WiedemannTraits): Move Wiedemann-dependent traits here (struct LanczosTraits): Move Lanczos-dependent traits here (struct BlockLanczosTraits): New structure (struct SolverTraits): Parameterize by MethodTraits and include an instance thereof; remove all method-specific traits * linbox/matrix/dense.h (DenseMatrixBase::columnDensity): New function * linbox/matrix/archetype.h (MatrixArchetype::columnDensity, MatrixArchetype::transpose): New functions * linbox/matrix/sparse.h (SparseMatrixBase::columnDensity): New function * linbox/solutions/methods.h (struct RankTraits): New structure (struct MethodTrait): Add BlockLanczos 2003-03-4 Rich Seagraves * interfaces/maple/demonstration.mws: Finished * interfaces/maple/lbmaple.C: Fixed the final bugs with LinBoxV handling code. * interfaces/maple/lbmaple.mpl.tail: ditto. Also, renamed LBApply and LBApplyTranpose as LBaply and LBapplyTranspose to be like the rest of the names * interfaces/maple/lbmaple.mpl.tail: ditto. * configure.in: Removed a double reference to matrix/Makefile in AC_OUTPUT[...] 2003-03-4 Rich Seagraves * interfaces/maple/demonstration.mws: Updated file, should be working * interfaces/maple/README: Added file * interfaces/maple/lbmaple.mpl.tail: Edited final line, lbmaple.mpl script now puts LinBox module into global maple namespace when run 2003-02-3 Rich Seagraves * interfaces/maple/lbmaple.mpl.tail: Fixed some interface bugs * interfaces/maple/demosntration.mws: Updated file, it's almost finished 2003-01-30 Rich Seagrves * interfaces/maple/Makefile.am: * interfaces/maple/Makefile.in.2: * macros/maple-check.m4: Fixed bug in maple interface build setup * linbox/blackbox/triplesbb.h: Added missing _max() function 2003-01-30 Rich Seagraves * tests/Makefile.am: Added entry for test-zero-one.C * tests/test-zero-one.C: Fixed file, now complies with standard for tests * macros/maple-check.m4: Now install maple interface in "prefix" directory * interfaces/maple/Makefile.am: Ditto * interfaces/maple/Makefile.in.2: Ditto as well :-) * linbox/blackbox/triplesbb.h: Added file (copy of maplebb.h) * interfaces/maple/maplebb.h: Removed file * interfaces/maple/lbmaple.C: Now use TriplesBB blackbox instead of MapleBB * linbox/blackbox/zero-one.h: Removed some warnings 2003-01-30 Saunders * tests/test-scalar-matrix.C: simplify test to generic testBlackbox. * tests/test-*.C: modify " ... test suite" header line of output to be preceeded by blank line rather than followed. * linbox/blackbox/hilbert.h, tests/test-hilbert.C: fix hilbert example (for dense vector only) and insert a generic test 2003-01-29 Rich Seagraves * interfaces/maple/lbmaple.C: Killed all bugs * interfaces/maple/lbmaple.mpl.tail: Ditto * macros/maple-check.m4: Fixed problem with check whether specified maple dir IS actually valid maple distribution 2003-01-29 Ahmet Duran and David Saunders * examples/gen_superlu/*: examples added and also removed as a subdir within linbox, i.e. linbox/gen_superlu/example/ subdir. 2003-01-29 Ahmet Duran and David Saunders * linbox/gen_superlu/: directory and contents are a generic version of superlu created by Ahmet. Basics work but header comments and the like will be brought up to form in the near future, * tests/test-gssv_rank: a proto test for gen_superlu, improvements will come. * test/data/gssv_rank_data: input matrix for test-gssv_rank. 2003-01-29 Rich Seagraves * interfaces/maple/Makefile.am: Remove "if HAVE_MAPLE" check * interfaces/maple/lbmaple.C: Fixed some bugs, warnings * interfaces/maple/maplebb.h: Fixed some bugs, warnings * interfaces/maple/lbmaple.mpl.head: Changed formatting a bit * interfaces/maple/lbmaple.mpl.tail: Changed formatting a bit * macros/maple-check.m4: Requires the flag "--enable-shared" to build maple interface, made some fixes to ensure proper building of lbmaple.mpl, interface script * linbox/blackbox/zero-one.h: Fixed in-file test functions * tests/test-zero-one.C: Added test for ZeroOne blackbox 2003-01-20 Austin Lobo * linbox/field/ntl-RR.h: Corrected clashes with LinBox namespace 2003-01-20 Austin Lobo * tests/test-ntl-toeplitz.C: Corrected clashes with LinBox namespace * linbox/blackbox/ntl-toeplitz.inl: Corrected clashes with LinBox namespace * linbox/blackbox/ntl-toeplitz.h: Corrected clashes with LinBox namespace 2003-01-20 Austin Lobo * tests/Makefile.am: reinstated test-ntl-toeplitz * tests/test-generic.h: added LinBox namespace to commentator calls 2003-01-17 Bradford Hovinen * configure.in: Give a sane default for CFLAGS and CXXFLAGS 2003-01-17 David Saunders * CHANGED-INTERFACES: coupla edits to bring this summary up to date a bit 2003-01-16 Bradford Hovinen * configure.in: Disable shared again 2003-01-14 David Saunders *linbox/linbox.dxx, interfaces.dxx: Text edits. interfaces.dxx should be renamed archetypes.dxx. Much text added to interfaces.dxx, some of it speculative. Further editing definitely desirable. 2003-01-14 Bradford Hovinen * linbox/matrix/matrices.dxx: Add missing * interfaces/maple/Makefile.am (mapledir): Put all build rules inside a conditional * configure.in: Add linbox/matrix/Makefile * linbox/matrix/matrix-domain.h: Move from linbox/field * linbox/matrix/matrix-domain.inl: Move from linbox/field * linbox/vector/vector-domain.h: Move from linbox/field * linbox/vector/vector-domain.inl: Move from linbox/field/vector-domain.C 2003-01-11 Bradford Hovinen * linbox/blackbox/Makefile.am (BASIC_HDRS): Remove files listed below * */*.{h|C|inl}: Update to reflect changes below; s/SparseMatrix0/SparseMatrix/ * linbox/matrix/dense.h: Move from blackbox/dense-base.h * linbox/matrix/dense.inl: Move from blackbox/dense-base.inl * linbox/matrix/sparse.h: Move from blackbox/sparse-base.h * linbox/matrix/sparse.inl: Move from blackbox/sparse-base.inl * linbox/matrix/transpose.h: Move from blackbox/transpose-matrix.h * linbox/matrix/dense-submatrix.h: Move from blackbox/dense-submatrix.h * linbox/matrix/dense-submatrix.inl: Move from blackbox/dense-submatrix.inl * linbox/Makefile.am (SUBDIRS): Add matrix 2003-01-09 Bradford Hovinen * linbox/solutions/det.h (det): Give correct solution when deg minpoly is odd 2003-01-08 Brad Botting * linbox/blackbox/dense.h (DenseMatrix::read, DenseMatrix::write): Use fully-qualified name for calling overloaded read and write 2003-01-08 Rich Seagraves * linbox/blackbox/dif.h (very top): changed __TRANSPOSE_H to __DIF_H in the preprocessor test directive at the top of the file * linbox/blackbox/sum.h (very top): changed __TRANSPOSE_H to __SUM_H in the preprocessor test directive at the top of the file * linbox/blackbox/zero-one.h: begin implementing modular template specialization * linbox/util/timer.h (class Timer): change members ut, st, and rt into private members instead of public members (changed second appearance of "public" to "private"). 2003-01-08 Saunders * tests/test-dif.C, blackbox/dif.h: difference of two matrices. Minor tweak on sum.h. 2003-01-08 Bradford Hovinen * linbox/blackbox/dense.h (DenseMatrix::write): Use os, not file * tests/test-matrix-domain.C (testMatrixDomain): Don't refer to stream.dim when constructing stream (remaining two specializations) 2003-01-07 Brad Botting * linbox/switch/Makefile.am (includedir): Install to switch, not vector 2003-01-07 Bradford Hovinen * linbox/algorithms/block-lanczos.h: Undefine _S, _M, _N for the benefit of Solaris 2003-01-07 Bradford Hovinen * linbox/algorithms/wiedemann.h: #include sparse.h * tests/test-matrix-domain.C (testMatrixDomain): Don't refer to stream.dim when constructing stream 2002-1-7 Saunders * tests/test-subvector.cpp: removed. Superceded by test-subvector.C 2002-1-6 Rich Seagraves * linbox/algorithms/massey-domain.h: changed swap() to std::swap() * linbox/randiter/modular.h: changed endl to std::endl in commentator line * linbox/blackbox/zero-one.h: added RawIterator and RawIndexIterator support to ZeroOne blackbox 2003-01-06 Bradford Hovinen * tests/test-common.C: #include 2002-12-23 Bradford Hovinen * tests/test-common.h: Add incompleteGamma, chiSquaredCDF * tests/test-modular.C (testRandomIterator): New test (main): Call testRandomIterator 2002-12-18 Bradford Hovinen * linbox/* (LinBox): Doc++ fixes * configure.in: Add check for latex 2002-12-16 Rich Seagraves * linbox/blackbox/zero-one.h: Added file * linbox/blackbox/nag-sparse.h: Fixed some errors 2002-12-11 Bradford Hovinen * linbox/util/commentator.h: Include streambuf * linbox/blackbox/butterfly.h (buildIndices): Remove check that _n is nonnegative, since _n is unsigned * linbox/blackbox/dense-base.inl (ColIterator::operator +): Make this non-const (ConstColIterator::operator +): Ditto * linbox/blackbox/diagonal.h (class Diagonal): * linbox/blackbox/moore-penrose.h (class MoorePenrose): * linbox/blackbox/butterfly.h (class Butterfly): * linbox/blackbox/dense.h (class DenseMatrix): * linbox/blackbox/compose.h (class Compose): * linbox/blackbox/scalar-matrix.h (class ScalarMatrix): Parameterize on _Vector and typedef Vector * linbox/field/modular.h: Cast to signed quantities when comparing with 0 (LinBox): Add template <> when needed * linbox/blackbox/butterfly.h (setButterfly): Eliminate unused j_1, j_2 (setButterfly): Eliminate check for j < 0, as we are dealing with unsigned quantities * linbox/blackbox/archetype.h (class BlackboxArchetype): Remove std:: from size_t * linbox/algorithms/block-lanczos.inl (eliminate_col) (find_pivot_row, permute): Take an std::vector for indices rather than a pointer (compute_Winv_S): Use _indices; don't declare indices (compute_Winv_S, find_pivot_row, eliminate_col): Make these non-const * linbox/algorithms/block-lanczos.h (class BlockLanczosSolver): Add vector _indices * linbox/blackbox/sparse-base.inl (refEntry): * linbox/field/vector-domain.C: Make sure there's an std:: before pair * linbox/util/debug.C: * linbox/field/lidia-gfq.h: * linbox/util/debug.h: * linbox/blackbox/archetype.h: Get rid of 'using namespace std' * linbox/blackbox/transpose.h (class Transpose): Use linbox_check * linbox/blackbox/sparse.h: * linbox/vector/stream.h: Parameterize all classes by _Vector and typedef to Vector * linbox/field/modular.h: * tests/test-common.C: * linbox/util/debug.h: * linbox/field/vector-domain.C: * linbox/field/vector-domain.h: * linbox/blackbox/sparse-base.inl: Make sure there's an std:: before iostream references * gmp++/gmp++_int.inl: Move constructor and destructor definitions to gmp++_int.h to avoid compiler complaints 2002-12-09 Bradford Hovinen * linbox/blackbox/dense-base.inl (RowIterator): Add operator += (ColIterator): Ditto 2002-12-10 Bradford Hovinen * tests/test-solve.C (main): Add CLI option for blocking factor * linbox/algorithms/lanczos.inl (iterate): Use DETAILED_TRACE ala block-lanczos.inl * linbox/solutions/methods.h (SolverTraits::Preconditioner): Add DEFAULT * linbox/algorithms/wiedemann.inl (precondition): Add default case label for unsupported preconditioners * linbox/solutions/solve.h (solve): Add support for Block Lanczos * tests/test-solve.C (testRandomSolve): New test (main): Add calls to testRandomSolve for Lanczos and Block Lanczos * linbox/solutions/methods.h (SolverTraits::Method): Add BLOCK_LANCZOS (struct SolverTraits): Add _blockingFactor and related methods * linbox/algorithms/Makefile.am (include_HEADERS): Add block-lanczos.{h|inl} * linbox/algorithms/lanczos.inl (solve): Import code from block-lanczos.inl to support more preconditioner types 2002-12-09 Bradford Hovinen * configure.in: Bump version number to 0.1.4 2002-12-07 Bradford Hovinen * linbox/util/commentator.C (Commentator::finishActivityReport): Show the timings in the finalized report, if requested * linbox/field/modular.h (Modular::negin): Fix in case where x == 0 * linbox/util/commentator.C (Commentator::printActivityReport): Reset _last_line_len if no length is given * linbox/field/vector-domain.C (axpyinSpecialized): Add explicit specializations for Dense/* * linbox/field/matrix-domain.inl (mulColSpecialized): Fix non-dense code * linbox/field/matrix-domain.h (MatrixDomain::mulColSpecialized): Create specializations for dense/* and have everything route to that combination * linbox/solutions/methods.h (SolverTraits::Preconditioner): Add SYMMETRIZE, PARTIAL_DIAGONAL, and FULL_DIAGONAL 2002-12-06 Bradford Hovinen * linbox/blackbox/sparse-base.inl (write): Tweak output slightly * linbox/blackbox/sparse.h (class MatrixTraits): Define specialization for SparseMatrix0 * linbox/blackbox/dense-base.inl (ConstRowIterator::operator +): Don't return a reference (write): Tweak output slightly 2002-12-05 Rich Seagaves * interfaces/maple/Makefile.in.1: fixed a small break in the build stage 2002-12-01 Rich Seagraves * interfaces/maple/Makefile.blank: removed, not needed * interfaces/maple/lbmaple.mpl: also removed * interfaces/maple/Makefile.in.1: * interfaces/maple/Makefile.in.2: added files * macros/maple-check.m4: modified for new maple build system * interfaces/maple/lbmaple.C: fixed a bunch of boo-boo's * interfaces/maple/maplebb.h: fixed a boo-boo 2002-12-01 Rich Seagraves * interfaces/maple/lbmaple.C: * interfaces/maple/lbmaple.mpl.head: * interfaces/maple/lbmaple.mpl.tail: * interfaces/maple/maplebb.h: * interfaces/maple/Makefile.am: * interfaces/maple/Makefile.blank: * interfaces/maple/demonstration.mws: * macros/maple-check.m4: Added files for interface * configure.in: Added checks for interface build, installation 2002-12-01 Bradford Hovinen * configure.in (AC_OUTPUT): Add missing interfaces/Makefile 2002-11-30 Bradford Hovinen * linbox/field/matrix-domain.inl (axpyinRowRowRow) (axpyinColColCol): Fix allocation sizes for t * tests/test-matrix-domain.C (testInvMul, testInvLeftMulin, testInvRightMulin): Split these into three cases: square, over-determined, and under-determined. Use the product of the matrix and its transpose (in the appropriate order) in the latter cases * linbox/algorithms/block-massey-domain.h (class MasseyBlockDomain): Make _MD a MatrixDomain * linbox/field/matrix-domain.inl: Comment out pow_apply and pow_horn * linbox/blackbox/sparse-base.h (class SparseMatrix0WriteHelper) (class SparseMatrix0ReadWriteHelper): Compilation fixes (class SparseMatrix0Base): Update iterator interfaces to match the dense matrix archetype (class SparseMatrix0Base): Make Row a typedef of _Row * linbox/blackbox/dense.h (DenseMatrix::read, DenseMatrix::write): Swap order of arguments for consistency * linbox/blackbox/dense-submatrix.h (DenseSubmatrix::DenseSubmatrix): Take a reference rather than a pointer * linbox/blackbox/dense-base.inl (ConstRowIterator::operator ++) (RowIterator::operator ++): Use ++*this rather than ++_row * tests/Makefile.am (BASIC_TESTS): Add test-matrix-domain * linbox/randiter/modular.h (ModularRandIter::ModularRandIter): clock was always returning 0, so go back to time (NULL) * linbox/blackbox/sparse.h (SparseMatrix0::write): Make FORMAT_PRETTY the default * linbox/blackbox/sparse-base.h (SparseMatrix0Base::write): Make FORMAT_PRETTY the default * linbox/field/Makefile.am (BASIC_HDRS): Add matrix-domain.h, matrix-domain.inl * linbox/util/commentator.C (Commentator::printActivityReport): (Commentator::updateActivityReport): (Commentator::finishActivityReport): Don't indent * tests/test-trace.C: * tests/test-sum.C: * tests/test-submatrix.C: * tests/test-sparse.C: * tests/test-solve.C: * tests/test-rank.C: * tests/test-moore-penrose.C: * tests/test-minpoly.C: * linbox/blackbox/dense-base.inl: * linbox/blackbox/sparse-base.inl: * tests/test-matrix-domain.C: * tests/test-inverse.C: * tests/test-diagonal.C: * tests/test-det.C: * tests/test-dense.C: * tests/test-butterfly.C: * tests/test-vector-domain.C: * tests/test-generic.h: Eliminate calls to commentator.indent * linbox/util/commentator.C (Commentator::report): Don't initially indent * linbox/util/commentator.h (class MessageClass): Define smartStreambuf, build _stream from that; add Commentator to all constructors; add copy constructor * linbox/util/commentator.C (Commentator::indent): Make this const 2002-11-29 Bradford Hovinen * linbox/field/vector-domain.h (class VectorDomain): Add support for add/sub/mul/axpy with vectors of different representations, using GenericVectorTag to control the number of specializations required * linbox/vector/vector-traits.h (struct VectorCategories): Add GenericVectorTag; make everything else inherit that * linbox/blackbox/dense-base.inl (DenseMatrixBase::read): Return the input stream * linbox/blackbox/dense-base.h (DenseMatrixBase::read, DenseMatrixBase::write): Swap order of arguments, to be consistent with SparseMatrix0Base * linbox/blackbox/dense-base.h: * linbox/blackbox/dense-submatrix.h: * linbox/blackbox/sparse-base.h: Add struct MatrixTraits * linbox/blackbox/dense-base.h: * linbox/blackbox/sparse-base.h: * linbox/blackbox/dense-submatrix.h: Make Element a typedef from _Element 2002-11-28 Bradford Hovinen * linbox/blackbox/dense-submatrix.h (class DenseSubmatrix): Use a reference rather than a pointer * linbox/blackbox/sparse-base.h (class SparseMatrix0ReadWriteHelper): Make all methods const 2002-11-26 Bradford Hovinen * linbox/blackbox/Makefile.am (BASIC_HDRS): Add transpose-matrix.h * linbox/blackbox/dense-submatrix.h (struct MatrixTraits): Define * linbox/blackbox/dense-base.h (struct MatrixTraits): Define * linbox/field/matrix-domain.h (struct MatrixCategories) (struct MatrixTraits): Define * linbox/field/matrix-domain.inl: Moved all the arithmetic from matrix-domain.C here, in accordance with the convention * linbox/field/matrix-domain.h: Added detailed documentation, cleaned up the interface slightly, and added support for matrix traits. Added read, write, neg, negin, axpy, matrix-vector and matrix-black box operations * linbox/field/vector-domain.h (class VectorDomain): Extend axpyin so that it can work with vectors of more than one representation. Create specializations for input and output vectors of different representations that just use copy. For the benefit of MatrixDomain 2002-11-27 Rich Seagraves and David Saunders * interfaces, interfaces/maple: directories added to hold the Maple linbox interface (which Rich will put there soon ). * Makefile.am interfaces/Makefile.am: subdir entries. 2002-10-29 Bradford Hovinen * linbox/blackbox/dense-base.inl (ColIterator::operator +): Make this work like a real + operator (RowIterator::operator +): Ditto (RowIterator, ConstRowIterator): Fixed some ID10T errors 2002-10-28 Bradford Hovinen * linbox/blackbox/dense-submatrix.inl: Ditto below * linbox/blackbox/dense-base.h: Rename ColOfRowsIterator as RowIterator; similarly with RowOfColsIterator 2002-10-28 Zhendong Wan and David Saunders * linbox/blackbox/dense.h: tweak doc++, delete RowIterator and ColIterator types in matrix class. Change name of RawIndexIterator to RawIndexedIterator. * linbox/blackbox/dense.inl: update impl to reflect dense.h changes. 2002-10-28 Bradford Hovinen * tests/test-trace.C (testDiagonalTrace): Make sure vectors get declared to the right length * tests/test-sum.C (testZeroApply): Make sure vectors get declared to the right length * linbox/vector/stream.h (RandomSparseStream::get, RandomDenseStream::get): Don't try to resize the vector * linbox/blackbox/dense-base.inl (write): Make output format a little prettier * linbox/algorithms/lanczos.inl (solve): Length of b1 should be row dimension of A * linbox/field/vector-domain.h (neg, negin): Add these interfaces and implement (class VectorDomain): Parameterize arithmetic methods by separate vector types for each vector argument. Though they do not support arithmetic on different vector *representations* at the same time, one can use this to, say, add a column vector into a standalone vector 2002-10-27 Bradford Hovinen * linbox/blackbox/dense.inl: * linbox/blackbox/dense.h: Split out container/iterator functionality into new DenseMatrixBase * linbox/blackbox/Makefile.am (BASIC_HDRS): Add dense-submatrix.h, dense-submatrix.inl * linbox/blackbox/dense.inl (read): Compilation fix (write): Prefer ISO standard outputs * linbox/blackbox/dense-submatrix.inl: Rename from densesubmatrix.C * linbox/blackbox/dense-submatrix.h (class DenseSubmatrix): Fix constructor interface; add interfaces missing from DenseMatrix; add Doc++ documentation; reindent * linbox/blackbox/dense-submatrix.h: Rename from densesubmatrix.h * linbox/blackbox/dense.h (DenseMatrix::refEntry): Define (class DenseMatrix): Reorder the declarations to match SparseMatrix0Base; reindent; add Doc++ documentation to the interfaces (DenseMatrix::getEntry): Add a form that returns a read-only reference to the entry (class DenseMatrix): Make generic wrt vector type (class DenseMatrix): Move some of the one-liners from dense.inl into the class (DenseMatrix::resize): Implement * macros/saclib-check.m4: * macros/givaro-check.m4: * macros/lidia-check.m4: * macros/ntl-check.m4: * macros/gmp-check.m4: Preserve user-specified CXXFLAGS and LIBS when running test 2002-10-26 Bradford Hovinen * tests/Makefile.am (CLEANFILES): Add $(TESTS) * .cvsignore: Update * acconfig.h: Remove this file * macros/gmp-check.m4: * macros/ntl-check.m4: * macros/lidia-check.m4: * macros/givaro-check.m4: * macros/saclib-check.m4: Use modernized AC_DEFINE * configure.in: Bump version to 0.1.3 * .cvsignore: * tests/.cvsignore: Update * tests/test-solve.C (testIdentitySolve, testNonsingularSolve): Don't explicitly give whether the matrix is symmetric * linbox/algorithms/Makefile.am (include_HEADERS): Add lanczos.{h|inl} * linbox/solutions/solve.h (solve): Add support for Lanczos iteration * tests/test-solve.C (testIdentitySolve, testNonsingularSolve) (testSingularConsistentSolve, testSingularInconsistentSolve): Add support for specifying the solver to be used (testSingularPreconditionedSolve): Add support for specifying the preconditioner to be used 2002-10-14 Bradford Hovinen * linbox/algorithms/wiedemann.inl (solveNonsingular): Add support for symmetric containers, using _traits.symmetric * linbox/algorithms/blackbox-container-symmetric.h (class BlackboxContainerSymmetric): Add parameter for the field * linbox/solutions/methods.h (struct SolverTraits): Add parameter symmetric, telling whether the matrix is symmetric * tests/test-solve.C: Update with changes to solve 2002-10-13 Bradford Hovinen * linbox/solutions/methods.h (struct SolverTraits): Add documentation; remove unimplemented string constructor * linbox/solutions/solve.h (solve): Add a variant that does not throw any exceptions * linbox/solutions/methods.h (struct SolverTraits): Make default maxTries 100 * linbox/solutions/methods.h (class InconsistentSystem, class SolveFailed): Move these from WiedemannSolver here, since they apply to more than just Wiedemann 2002-10-09 Bradford Hovinen * linbox/blackbox/ntl-toeplitz.inl: Compilation fixes * tests/test-ntl-toeplitz.C: Compilation fixes 2002-10-03 Bradford Hovinen * linbox/switch/cekstv.h (applyTranspose, apply): Fix formulae * linbox/algorithms/wiedemann.inl (findNullspaceElement) (findRandomSolution): Pass _randiter to RandomDenseStream constructor * linbox/algorithms/wiedemann.h (class WiedemannSolver): Add constructor that accepts random iterator * linbox/algorithms/wiedemann.inl (solveNonsingular) (precondition, makeLambdaSparseMatrix): Use _randiter (solveNonsingular): Add parameter useRandIter to determine whether to use the random iterator, or to use b for the Krylov sequence computation (findNullspaceElement, certifyInconsistency): Remove preconditioner support (solveSingular): Use non-preconditioned A for certificate of inconsistency (makeLambdaSparseMatrix): Use the existing randiter, since RandomSparseStream already constructs a NonzeroRandIter (certifyInconsistency): Pass _randiter to WiedemannSolver constructor * linbox/algorithms/wiedemann.h (class WiedemannSolver): Add _randiter * linbox/algorithms/wiedemann.inl (solveSingular): Throw a BadPreconditioner exception if the reason for failure was a bad preconditioner, since this means the rank computation was probably correct and can be reused (solveSingular): Move rank computation to solve (solve): Compute rank and try to reuse when possible; set rank to (unsigned long) -1 when SolveFailed thrown * tests/test-solve.C (testSingularPreconditionedSolve): Return success value rather than always returning true * linbox/randiter/modular.h (LinBox): Use clock () rather than time (NULL) to get a higher-resolution timer * tests/test-solve.C (testSingularPreconditionedSolve): Don't fill matrix with 1's; just build a diagonal black box 2002-10-02 Bradford Hovinen * linbox/algorithms/wiedemann.h: Refactoring: Put everything inside a WiedemannSolver class, with the following interface solveNonsingular - Solve a nonsingular system solveSingular - Solve a general singular system findRandomSolution - Find a random solution to a singular preconditioned problem findNullSpaceElement - Find an element of the right nullspace certifyInconsistency - Find a certificate of inconsistency for a linear system precondition - Form a preconditioner and return it * tests/test-solve.C (testSingularPreconditionedSolve) (testSingularInconsistentSolve, testSingularConsistentSolve): Update according to interface changes in wiedemann.h * linbox/field/vector-domain.C (VectorDomain::writeSpecialized): Remove debugging code * tests/test-butterfly.C (main): Use Modular and make GF(2147483647) the default (testCekstvSwitch): Use preconditioner PDQ rather than just PD * tests/test-solve.C (testSingularPreconditionedSolve): Always return true * linbox/blackbox/moore-penrose.h (MoorePenrose::MoorePenrose): Update use of Submatrix * tests/test-moore-penrose.C (testRandomApply1): Update use of Submatrix * tests/test-solve.C (main): Reenable tests other than preconditioned solve * linbox/algorithms/wiedemann.h (solveWiedemannSingular): Implement sparse preconditioner * linbox/blackbox/sparse-base.h (class SparseMatrix0Base): Add method transpose (class SparseMatrix0Base): Rename VectorTrait as RowTrait in specializations * linbox/blackbox/sparse-base.inl (transpose): Implement 2002-09-30 Bradford Hovinen * linbox/solutions/methods.h (struct SolverTraits): Add enum Preconditioner; rename precondition to preconditioner; add methods to set parameters (SolverTraits::SolverTraits): Initialize _singular with singular, not UNKNOWN * linbox/vector/stream.h (RandomSparseStream::setP): Implement * tests/test-butterfly.C (testSetButterfly): Reset the stream * tests/test-solve.C (testSingularPreconditionedSolve): Use a SparseMatrix0 and fill in the entries below the zeros with 1's * tests/test-butterfly.C (testCekstvSwitch): Ditto 2002-09-26 Bradford Hovinen * linbox/algorithms/wiedemann.h (solveWiedemannSingular): Construct a CekstvSwitchFactory and use it as input for the CekstvSwitch constructor (solveWiedemannSingular): Commentator fixes * linbox/blackbox/butterfly.h (class Butterfly): Parameterize on the field, give a reasonable default for Vector * linbox/switch/boolean.h (class BooleanSwitch): * linbox/switch/cekstv.h (class CekstvSwitch): Don't maintain vector of 2x2 block information; just hold data for one 2x2 block; eliminate field and temporary * linbox/blackbox/butterfly.h (Butterfly): Make the vector of switches (class Butterfly): Constructor reorganization; see header file 2002-09-25 Bradford Hovinen * linbox/switch/cekstv.h (class CekstvSwitch): Add copy constructor (CekstvSwitch::CekstvSwitch): Implement copy constructor * tests/test-butterfly.C (testRandomTranspose) (testRandomLinearity): Implement these tests (testCekstvSwitch): Construct a random vector and pass it to CekstvSwitch * linbox/algorithms/wiedemann.h (solveWiedemannSingular): Prepare rhs before obtaining minpoly * linbox/blackbox/submatrix.h (Submatrix::apply, Submatrix::applyTranspose): Fill unused portions of temporary input vector with zeros (class Submatrix): Parameterize by field (class Submatrix): Give a reasonable default for the vector type * tests/test-submatrix.C (testRandomLinearity) (testRandomTranspose): Implement these tests * linbox/blackbox/submatrix.h (Submatrix::Submatrix): Initialize _z with column dimension * tests/test-submatrix.C (testRandomApply): Make vector output LEVEL_UNIMPORTANT (testRandomTranspose): Implement this * linbox/blackbox/submatrix.h (class Submatrix): Make _z, _y mutable; delete _zt, _yt (Submatrix::apply, Submatrix::applyTranspose): Don't declare local vectors * tests/test-submatrix.C (testRandomApply): Reset stream when done (testRandomLinearity): Implement this test 2002-09-23 Bradford Hovinen * linbox/algorithms/wiedemann.h (solveWiedemannSingular): Don't use DenseVector (solveWiedemann): Compute m_A rather than m_A,b (solveWiedemannSingular): Fix generator for random solution (solveWiedemannSingular): Add butterfly preconditioner support (solveWiedemannSingular): Cancel this loop iteration if the leading principal minor turned out to be singular * tests/test-solve.C (testSingularConsistentSolve): Implement (testNonsingularSolve): Rename from testDiagonalSolve (testSingularInconsistentSolve): Implement * linbox/algorithms/cra.h (cra): Use unsigned long in casts (cra): Fix order of arguments to invmod (cra): Reduce the result modulo the product of the primes * linbox/blackbox/sparse-base.h (_RawIndexIterator::operator ++): Update _curr.second properly * linbox/util/prime-stream.h (PrimeStream::next): Move _curr by 2 * linbox/algorithms/cra.h (cra): Invoke commentator * linbox/solutions/det.h (det): Invoke commentator * tests/test-det.C (testIntegerDet): Implement this test (main): Call testIntegerDet * linbox/blackbox/sparse.inl (makeBlackbox): Implement (smarter version now, taking over for the constructor that was removed) * linbox/blackbox/sparse.h (class SparseMatrix0): Remove constructor from SparseMatrix0Base -- this will be handled by SparseMatrixFactory from now on * linbox/blackbox/sparse-base.h (class SparseMatrix0Base::RawIterator): Remove _A, add _A_end; add default constructor; update other constructors (class SparseMatrix0Base::RawIndexIterator): Ditto (class SparseMatrix0Base): Remove implementations from default class (class SparseMatrix0Base::RawIterator): Make this a parameterized class to allow const version to be defined easily (N.B. I hate C++) (class SparseMatrix0Base::RawIndexIterator): Same as RawIterator (N.B. Same note applies, doubly so) * linbox/blackbox/sparse.h (SparseMatrixFactory): Pull declaration of tmp out of the loop * tests/test-det.C (testDiagonalDet2): Don't specify template parameters explicitly (testSingularDiagonalDet): Ditto * linbox/blackbox/factory.h: Include vector-traits.h * gmp++/gmp++_int.h (Integer::invmod): Make this static * linbox/algorithms/cra.h (cra): Compilation fixes * linbox/solutions/det.h (det): Compilation fixes * linbox/blackbox/sparse.h (class SparseMatrixFactory): Make sure SparseMatrix0Base is used with its own element and row types * linbox/blackbox/factory.h (BlackboxFactory::makeBlackbox): Make F const * linbox/algorithms/cra.h (cra): Use integer:: on integer operations * linbox/blackbox/sparse-base.h (class SparseMatrix0Base): Provide a reasonable default for Row; clean up template declaration * linbox/blackbox/sparse.h (class SparseMatrix0): Clean up template declaration 2002-09-22 Bradford Hovinen * linbox/blackbox/sparse-base.inl (write): Add support for FORMAT_MATLAB in sparse parallel specialization (write): Write closing bracket; put opening bracket at the beginning of the matrix, not the beginning of each row * linbox/blackbox/sparse.h (SparseMatrixFactory::maxNorm, SparseMatrixFactory::rowdim, SparseMatrixFactory::coldim): Implement * linbox/util/gmp++/gmp++_int_gcd.C (invmod): Implement * gmp++/gmp++_int.h (class Integer): Add invmod * linbox/field/modular.h (class ModularBase): Remove assignment operator (Modular::operator =): Copy documentation from ModularBase; use F rather than rhs; copy _two_64 rather than calling init again * linbox/util/gmp++/gmp++_int_misc.C (nextprime, prevprime): Implement Include cmath * gmp++/gmp++_int.h (class Integer): Add nextprime, prevprime * linbox/blackbox/factory.h (class BlackboxFactory): Make a reasonable default for Vector * linbox/Makefile.am (BASIC_HDRS): Add rational.h * linbox/rational.h: Add this file * tests/test-butterfly.C (testBooleanSwitch): Remove this test; it is redundant * linbox/switch/cekstv.h (class CekstvSwitch): Make _iter, _riter, and _R mutable * linbox/blackbox/diagonal.h (class Diagonal): Give a reasonable default for Vector * tests/test-butterfly.C (testSetButterfly): Use stock typedef for dense vectors (testCekstvSwitch): Implement 2002-09-21 Bradford Hovinen * linbox/solutions/det.h (det): Add versions for integer and rational determinant Comilation fixes * examples/dot-product.C (main): Update according to new interfaces; remove unnecessary typedefs * linbox/vector/vector-traits.h (class RawVector): Rename from Vector; parameterize on Element rather than Field (class Vector): Declare to inherit RawVector * linbox/blackbox/sparse.h (class SparseMatrixFactory): Don't require that the field and the SparseMatrixBase share the same element type * examples/blackbox/.cvsignore: Update * linbox/field/modular.h: Reinsert two deleted lines * linbox/util/commentator.C (Commentator::printActivityReport): Don't print percentage unless _len is positive 2002-09-21 Rich Seagraves * linbox/field/modular.h: Added = assignment operator. 2002-09-21 Bradford Hovinen * examples/blackbox/Makefile.am (EXTRA_PROGRAMS): Add load-minpoly * linbox/blackbox/sparse-base.inl (readMatlab): Use is.putback, not is.unget * linbox/blackbox/sparse-base.h (SparseMatrix0WriteHelper::Format): Add FORMAT_MATLAB 2002-09-20 Bradford Hovinen * linbox/randiter/param-fuzzy.h (ParamFuzzyRandIter::random): Uncomment ElementAbstract version Include element/abstract.h, element/envelope.h * linbox/field/param-fuzzy.h: Reintroduce forward declaration of RandIter; move include randiter/... to the end * linbox/randiter/param-fuzzy.h (class ParamFuzzyRandIter): Add a version of the constructor that *really* takes a field as an argument * tests/test-param-fuzzy.C (main): Add arguments n and i; call runFieldTests * tests/test-lidia-gfq.C (main): Add arguments n and i; fix description text for argument q; call runFieldTests * tests/test-ntl-RR.cpp (main): * tests/test-unparametric-field.C (main): Return 0 always * linbox/randiter/unparametric.h (UnparametricRandIter::random): Remove debugging code * tests/test-unparametric-field.C (main): * tests/test-ntl-RR.cpp (main): * tests/test-ntl-ZZ_p.cpp (main): * tests/test-ntl-zz_p.cpp (main): Add arguments n and i; call runFieldTests * tests/test-gmp-rational.C (main): * tests/test-givaro-zpz.C (main): * tests/test-modular.C (main): Reverse order of iterations and n when calling runFieldTests * tests/test-generic.h: Do b / a rather than a / b * tests/test-givaro-zpz.C (main): Add arguments n and i; fix description text for argument q; call runFieldTests (main): Don't print out separate headers for each test; just use the runFieldTests wrapper. (main): Add a parameter e and a field F5 which is GF(q^e); run a test on that * linbox/randiter/gmp-rational.h: Reindent (GMPRationalRandIter::random): Initialize value properly (GMPRationalRandIter::random): Canonicalize before returning * linbox/field/gmp-rational.h: * linbox/element/gmp-rational.h: Reindent * linbox/randiter/gmp-rational.h (class GMPRationalRandIter): Fix compile errors * tests/test-generic.h (runFieldTests): Move from test-modular.C here * linbox/field/gmp-rational.h (GMPRationalField::GMPRationalField): Initialize all the const integers (class GMPRationalField): Make integers not static const; fix compile errors * linbox/blackbox/dense.inl (apply): Remove unused variables (applyTranspose): Remove unused variables * linbox/blackbox/dense.h: Include vector-domain.h * linbox/blackbox/sparse1.h: Fix compile warning * examples/mmZZ_pE.C: Fix header and indentation; include dense.h rather than dense-matrix1.h 2002-09-18 zhendong wan * linbox/blackbox/dense.h Add RawIndexIterator, which looks like RawIterator expect that it has two more member function. rowIndex returns the row index, colIndex returns the column index. 2002-09-17 Bradford Hovinen * linbox/solutions/det.h (det): Use commentator.start / commentator.stop * linbox/field/vector-domain.h (VectorDomain::copySpecialized): Don't call resize * linbox/blackbox/dense.h (class DenseMatrix): Remove template parameter from VectorStream constructor; support a different vector type in the representation * tests/.cvsignore: Update * linbox/blackbox/dense.h (class DenseMatrix): Add constructor that takes a VectorStream 2002-09-16 Bradford Hovinen * linbox/blackbox/dense.h (class DenseMatrix): Define a vector domain _VD * linbox/blackbox/dense.inl (applyTranspose, apply): Use vector domain 2002-09-15 Bradford Hovinen * linbox/blackbox/sparse-base.h (class SparseMatrix0ReadWriteHelper): Add readMatlab (SparseMatrix0WriteHelper::Format): Add FORMAT_MATLAB (SparseMatrix0Base::Format): Add FORMAT_MATLAB * linbox/blackbox/sparse-base.inl (write, read): Add support for FORMAT_MATLAB (readMatlab): Implement 2002-09-12 Bradford Hovinen * configure.in (EIGHT_BYTES): Fix typo 2002-09-11 Rich Seagraves * linbox/blackbox/nag-sparse.h: Add RawIterator and RawIndexIterator support, altered test suite appropriately * linbox/blackbox/archetype.h: include cstddef to ensure support for size_t type. 2002-09-10 Bradford Hovinen * tests/test-generic.h (testFieldInversion): Make sure a is nonzero 2002-09-09 Bradford Hovinen * configure.in: Support older versions of autoconf that give AC_SIZEOF results in bits 2002-09-09 Saunders & Wan * solutions/lu.h: add comments 2002-09-08 Bradford Hovinen * examples/blackbox/load-det.C: Cut out unnecessary typedefs * linbox/blackbox/sparse.h (class SparseMatrixFactory): Define (class SparseMatrix0): Introduce default of Dense for vector type 2002-09-08 Bradford Hovinen * .cvsignore: Update * linbox/vector/stream.h (class RandomDenseStream, class RandomSparseStream): Set default vector types to dense and sparse, respectively * linbox/vector/vector-traits.h: Add class Vector with canonical vector types * linbox/vector/Makefile.am (include_HEADERS): Add stream.h * linbox/util/Makefile.am (include_HEADERS): Remove vector-factory.h * tests/test-trace.C: * tests/test-sum.C: * tests/test-submatrix.C: * tests/test-minpoly.C: * tests/test-inverse.C: * tests/test-diagonal.C: * linbox/solutions/trace.h: * linbox/algorithms/wiedemann.h: * tests/test-butterfly.C: * linbox/algorithms/wiedemann.h: * tests/test-generic.h: * tests/test-vector-domain.C: * tests/test-solve.C: * tests/test-moore-penrose.C: * tests/test-sparse.C: Update with changes to linbox/vector/stream.h * tests/test-moore-penrose.C (buildRandomSparseMatrix): Work with sparse parallel vectors 2002-09-05 Bradford Hovinen * linbox/vector/stream.h: - Renamed to stream.h and moved to linbox/vector - VectorFactory is now called VectorStream, which fits its purpose somewhat better - The interface is now closer to the interface for istream - RandomDenseVectorFactory, et al. are refactored into classes parameterized on the vector type and specialized appropriately. This allows, e.g. construction of a random dense vector in sparse representation and so on. - New constructor interface for RandomSparseStream accepts proportion of nonzero entries - Reindented, since the other changes are so numerous that diffs aren't a big deal anyway * linbox/blackbox/archetype.h: s/stddef.h/cstddef/ 2002-09-04 * tests/test-vector-domain.C (main): Remove srand call * examples/blackbox/load-symmetrize.C (main): Remove srand call (main): Fix help text * examples/blackbox/load-det.C (main): Remove srand call 2002-08-28 Bradford Hovinen * NEWS: Updated text * tests/Makefile.am (BASIC_TESTS): Remove test-lu due to compilation problems * configure.in: Bump version to 0.1.2 * linbox/field/lidia-gfq.h (LidiaGfq::read, LidiaGfq::write): Use std::ostream, std::istream * macros/gmp-check.m4: Add directives to allow use of uninstalled GMP * configure.in: Use AM_CONDITIONAL statements for Doc++; Add arguments --enable-doc and --enable-doc-tex for building documentation * doc/Makefile.am (SUBDIRS): Mandary inclusion of html and tex * doc/html/Makefile.am: * doc/tex/Makefile.am: Add mechanism for optionally compiling in targets if USE_DOCPLUSPLUS is set 2002-08-27 Bradford Hovinen * NEWS: Update text * linbox/*/Makefile.am (EXTRA_DIST): Merge in contents of EXTRA_HEADERS * NEWS: Update text * configure.in: Bump version number to 0.1.1 * tests/test-commentator.C (testBriefReport): Output brief report data to the same file used for the other data * linbox/util/commentator.C (MessageClass::checkConfig): Make depth and level unsigned (Commentator::Commentator): Set default max depth of BRIEF_REPORT to 1 (Commentator::start): Push new activity after printing activity report (Commentator::stop): Pop new activity before finishing activity report (Commentator::progress): Test on _activities.size () - 1 for updateActivityReport (Commentator::progress): Tweak output (Commentator::setPrintParameters, Commentator::setMaxDepth, Commentator::setMaxDetailLevel): Omit BRIEF_REPORT (Commentator::printActivityReport, Commentator::updateActivityReport, Commentator::finishActivityReport): Tweak output parameters (Commentator::updateActivityReport): Don't show progress if deeper messages are printed * linbox/util/commentator.h (Commentator::isPrinted, MessageClass::isPrinted): Make depth and level unsigned * tests/.cvsignore: Update * tests/Makefile.am (BASIC_TESTS): Add test-commentator.C * linbox/algorithms/blackbox-container-base.h (BlackboxContainerBase::~BlackboxContainerBase): Delete _BB, as it was a clone * linbox/util/commentator.h (Commentator::MessageLevel): Renumber so that LEVEL_ALWAYS is 0 * linbox/util/commentator.C (MessageClass::fixDefaultConfig): Add a directive to make sure LEVEL_ALWAYS messages always get printed * linbox/util/commentator.h (Commentator::setPrintParameters, MessageClass::setPrintParameters): Interface adjustment: only one depth is specified, the maximum for which the directive is valid; make depth and level unsigned 2002-08-26 Bradford Hovinen * linbox/randiter/modular.h (ModularRandIter::random): Fix call to linbox_check * tests/test-sparse.C (runSparseMatrixTests): Tweak text * linbox/util/vector-factory.h (RandomSparseSeqVectorFactory::next, RandomSparseParVectorFactory::next): Initialize i to -1 so that the first index might get an entry * tests/test-generic.h (testTranspose, testLinearity): Declare new reports inside the loop * tests/test-sparse.C (testRandomApply2): Reset A_factory when done * linbox/util/field-axpy.h (class FieldAXPY): Make _F mutable * tests/test-sparse.C (testRandomApply2): Remove this test (testRandomApply3): Rename as testRandomApply2 (testRandomApply1, testRandomApply2): Accept a factory as a parameter and use it to build the matrix (testRandomTranspose, testRandomLinearity): Accept a factory as a parameter and use it to build the matrix * tests/test-generic.h (testGeometricSummation): Make sure a != 1 * tests/test-modular.C (runFieldTests): Implement; copy code from relevant section of main (main): Use runFieldTests 2002-08-25 Bradford Hovinen * linbox/field/.cvsignore: Update * tests/.cvsignore: Update * linbox/blackbox/butterfly.h (applyTranspose, apply): Call std::copy (x.begin (), x.end (), y.begin ()) * configure.in (AC_OUTPUT): Add linbox/switch/Makefile * macros/ntl-check.m4: Remove EX_FIELDS_NTL, as it is not needed * linbox/Makefile.am (BASIC_HEADERS): Rename from include_HEADERS; have include_HEADERS use the mechanism in tests/Makefile.am for optional inclusion * macros/ntl-check.m4 (NTL_HEADERS_*): Remove * macros/givaro-check.m4 (GIVARO_HEADERS_*): Remove * macros/lidia-check.m4 (LIDIA_HEADERS_*): Remove * linbox/field/Makefile.am (BASIC_HEADERS): Rename from include_HEADERS; have include_HEADERS use the mechanism in tests/Makefile.am for optional inclusion * tests/test-ntl-toeplitz.C: Rename from test-toeplitz.C * tests/Makefile.am: Rename test-toeplitz as test-ntl-toeplitz * macros/lidia-check.m4 (HAVE_LIDIA): Define * macros/givaro-check.m4 (HAVE_GIVARO): Define * macros/ntl-check.m4 (HAVE_NTL): Define * tests/Makefile.am: Put {NTL|GIVARO|LIDIA}_TESTS in here; use conditionals to make inclusion in TESTS optional 2002-08-20 Bradford Hovinen * linbox/blackbox/butterfly.h (setButterfly): Remove Commentator parameter; update uses of commentator to current interface; remove TRACE code * linbox/Makefile.am (SUBDIRS): Add switch * examples/.cvsignore: Update 2002-08-19 Bradford Hovinen * linbox/randiter/modular.h (ModularRandIter::random): Protect from getting a result equal to the size of the sample * tests/test-sparse.C (testRandomApply1): Remove debugging code * linbox/randiter/modular.h (class ModularRandIter): Make _size a double and _seed an Element, as they can never be larger than Element (ModularRandIter::randIter): Initialize _card (ModularRandIter::random): Don't use temp_integer; don't mod out by cardinality as it should not be necessary; don't convert _size to a double 2002-08-18 Bradford Hovinen * linbox/field/modular.inl (dotSpecializedDSP): Add optimized variant for very short vectors, to avoid cost of additional mod operation (dotSpecializedDSP, dotSpecializedDD): Defer declarations until needed * configure.in (AC_DEFINE_UNQUOTED): Don't quote description * examples/blackbox/ex-mat0.C (main): Use Modular * examples/blackbox/example.C: Use Modular * examples/fields/ex-fields0.C (main): Use Modular * examples/fields/ex-fields.C (main): Use Modular * examples/blackbox/load-symmetrize.C: Use Modular * examples/blackbox/load-det.C: Use Modular * examples/dot-product.C: Use Modular * linbox/field/modular.inl (dotSpecializedDD, dotSpecializedDSP): Update signatures of specialization * tests/test-trace.C (main): Use Modular * tests/test-sum.C (main): * tests/test-submatrix.C (main): * tests/test-sparse.C (main): * tests/test-solve.C (main): * tests/test-scalar-matrix.C (main): * tests/test-minpoly.C (main): * tests/test-inverse.C (main): * tests/test-diagonal.C (main): * tests/test-det.C (main): * tests/test-rank.C (main): * tests/test-dense.C (main): * tests/test-randiter-nonzero.C (main): * tests/test-moore-penrose.C (main): * tests/test-vector-domain.C: Use Modular * tests/test-modular.C: * linbox/field/modular.h: Change Modular, FieldAXPY, and DotProductDomain specializations to use new Linbox uint* types * linbox/integer.h: Add typedefs for int* * acconfig.h: Add #undef __LINBOX_INT* * configure.in: Define __LINBOX_INT* based on results of AC_SIZEOF * linbox/field/modular.inl (dotSpecializedDD, dotSpecializedDSP): Reintroduce faster modding out * linbox/field/modular.h (Modular::init_two_64): Start counter at 0 * tests/test-vector-domain.C (main): Test vector domains for all basic modular types (testVectorDomain): Implement * examples/blackbox/.cvsignore: Update * examples/Makefile.am (EXTRA_PROGRAMS): Add dot-product 2002-08-13 Bradford Hovinen * configure.in: Bump version to 0.1.0 * linbox/field/modular.inl (dotSpecializedDSP, dotSpecializedDD): Use traditional modding out pending getting the more advanced version working correctly * linbox/algorithms/wiedemann.h (solveWiedemannSingular): Fix start/stop pairing * linbox/field/modular.h (Modular::inv): Keep the inputs from sign-extending to long long * linbox/util/commentator.C (Commentator::startIteration): Store string in _iteration_str so that it is not deallocated when the call returns * linbox/util/commentator.h (class Commentator): Add _iteration_str * tests/test-diagonal.C (testRandomMinpoly): Make vector reports at LEVEL_UNIMPORTANT (testRandomTranspose): Use factory to generate diagonal vector; make it a dense vector, use VectorDomain::write (testRandomLinearity): Implement * tests/test-vector-domain.C (main): Used unsigned short field * tests/test-modular.C (main): Make default n 10000; reorder test invocations to group fields together 2002-08-12 Bradford Hovinen * tests/test-vector-domain.C (testDotProduct): Make vector output LEVEL_UNIMPORTANT (testCopyEqual, testAXPY, testSubMul, testAddMul, testDotProduct): Terminate vector displays with endl's * linbox/field/modular.inl (dotSpecializedDD, dotSpecializedDSP): Make sure arithmetic takes place without sign-extension * tests/test-generic.h (testFieldAssociativity): Implement 2002-08-11 Bradford Hovinen * tests/test-modular.C (main): Call tests indicated below for each modular type * tests/test-generic.h (testFieldNegation, testFieldInversion) (testFieldAxioms, testGeometricSummation) (testFieldCharacteristic, testFreshmansDream) (testArithmeticConsistency, testAxpyConsistency): Implement * tests/test-minpoly.C (main): Make A_factory sparse parallel (testIdentityMinpoly, testNilpotentMinpoly): Define Row to be sparse parallel * linbox/field/modular.h (read): Do arithmetic in the domain integer * linbox/randiter/modular.h (ModularRandIter::random): Remove check for negativity * linbox/field/modular.h (Modular::init): Fix in case modulus > 2^15 (Modular::init): Perform modding out operation in class integer (class Modular): Convert to Modular to allow larger moduli * tests/test-modular.C (main): Test Modular and Modular as well; add CLI parameters for that * linbox/field/modular.h (class Modular): Make _k a long long (class FieldAXPY >): Make sure _y uses long long arithmetic (class Modular): Do add and sub in a long to remove restriction on modulus * tests/test-vector-domain.C (main): Use a typedef for the field * linbox/field/modular.h (class Modular): Rename 'k' as '_k' * linbox/field/modular.inl (dotSpecializedDSP): Fix compiler errors (dotSpecializedDD): Ditto * linbox/field/modular.h: Add specializations of DotProductDomain; include modular.inl (class Modular): Make DotProductDomain<...> a friend (Modular::init_two_64): Implement (class Modular): Add field _two_64 (Modular::Modular): Call init_two_64 * linbox/blackbox/sparse-base.inl (setEntry): Use v.first.size () * examples/blackbox/load-symmetrize.C: Ditto * examples/blackbox/load-det.C: Don't explicitly specify row type * linbox/field/vector-domain.h (class VectorDomain): Pull out the dense/dense and dense/sparse parallel dot products into a separate class DotProductDomain, which VectorDomain inherits. Put the field in a virtual base class VectorDomainBase (VectorDomain::field): Implement this * linbox/blackbox/sparse.h (class SparseMatrix0): Make default row type a sparse parallel * examples/blackbox/Makefile.am (EXTRA_PROGRAMS): Add load-symmetrize * linbox/algorithms/blackbox-container-symmetrize.h (class BlackboxContainerSymmetrize): Fix compiler warnings * linbox/blackbox/sparse-base.inl (read): Fix arguments to readPretty (read): Remove unused variables (read): Add dummy return statement * examples/blackbox/load-det.C: Fix order of template arguments; add using namespace std * linbox/blackbox/sparse-base.h (class SparseMatrix0Base): Fix member initializer order 2002-08-10 Bradford Hovinen * linbox/util/vector-factory.h (class StandardBasisFactory): Add specialization for sparse parallel vectors * tests/test-generic.h (testLinearity): Use VD.write (testTranspose): Use VD.write (testFieldAXPY): Use VD.write, commentator.startIteration * tests/test-sparse.C (test*): Use VD.write rather than printVector * linbox/blackbox/sparse-base.inl (write): Implement specialization for sparse parallel vectors * linbox/blackbox/sparse-base.h (class SparseMatrix0ReadWriteHelper): Implement class NoField to avoid having twice as many implementations as otherwise (class SparseMatrix0ReadWriteHelper): Split out writing portions into SparseMatrix0WriteHelper, which is partially specialized for sparse parallel vectors * linbox/blackbox/sparse-base.inl (getEntry, refEntry, setEntry): Implement specializations for sparse parallel vectors * linbox/blackbox/sparse.h: Implement specialization for sparse parallel vectors * linbox/blackbox/sparse.h (class SparseMatrix0): Specialize applyTranspose so that it can handle sparse parallel vectors, without having to specialize the entire class * linbox/algorithms/Makefile.am (include_HEADERS): Add wiedmemann.h * linbox/solutions/Makefile.am (include_HEADERS): Add solve.h 2002-08-09 Bradford Hovinen * tests/Makefile.am (BASIC_TESTS): Remove test-dense-matrix * tests/.cvsignore: Update * linbox/blackbox/Makefile.am (include_HEADERS): Remove dense-matrix.h (include_HEADERS): Change dense-matrix1.[Ch] to dense.inl, dense.h * tests/test-submatrix.C: #include dense.h * tests/test-inverse.C: * linbox/blackbox/dense.h (class DenseMatrix): Make F const 2002-08-09 Dave Saunders * linbox/vector/subvector.h: homage to the indentation police. 2002-08-09 Bradford Hovinen * linbox/blackbox/dense.h (class DenseMatrix): Make _F a const reference (DenseMatrix::DenseMatrix): Make F const * linbox/blackbox/dense.h: * linbox/blackbox/dense.inl: Reindent and remove compiler warnings * tests/test-dense.C: Rename from test-dense-matrix1.C; update header * linbox/algorithms/wiedemann.h (solveWiedemannSingular): Give up if tries exceeds maxTries (solveWiedemannSingular, solveWiedemann): Fix order of arguments to VD.axpy * linbox/solutions/methods.h (struct SolverTraits): Add maxTries * linbox/algorithms/wiedemann.h (solveWiedemann): Output minimal polynomial at LEVEL_UNIMPORTANT * tests/test-solve.C (main): Correct output (testDiagonalSolve): Correct output (testDiagonalSolve): Print output vector too * linbox/util/commentator.C (Commentator::start): Don't output starting activity method if messages at that activity's depth aren't printed (Commentator::stop): Give a different message if this is the greatest depth at which messages are printed * linbox/algorithms/wiedemann.h (solveWiedemann): Use traditional indexing approach; eliminate count (solveWiedemannSingular): Ditto * linbox/solutions/methods.h (struct SolverTraits): Add singular, checkResult, certificate * tests/Makefile.am (BASIC_TESTS): Remove test-solver, add test-solve * linbox/solutions/solve.h: Move solveWiedemann[Singular] to linbox/algorithms/wiedemann.h; solve is now just a wrapper * linbox/solutions/solve.h: Rename from solver.h, tweak indentation, add header (solve): Add argument SolverTraits (solve): Remove randiter (solve): Use P.front () rather than P[0] (solve): Use iterator to go through polynomial (solve): Don't use applyIn and axpyin; allocate another vector (solve): Split into nonsingular case (solveWiedemann): Move Wiedemann-based method here (solveWiedemann): Rename y as b * linbox/solutions/methods.h (struct SolverTraits): Add a constructor that takes a string * linbox/blackbox/inverse.h (apply, applyTranspose): Remove template spec on minpoly call * linbox/solutions/rank.h: Update header * linbox/solutions/trace.h (trace): Reorder template parameters so that only Vector need be specified explicitly * tests/test-moore-penrose.C: Remove compiler warnings * tests/test-det.C: Remove compiler warnings * tests/test-rank.C: Remove compiler warnings * linbox/solutions/rank.h (rank): Make i a size_t * linbox/solutions/det.h (det): Make i a size_t * tests/test-trace.C: Remove compiler warnings * linbox/solutions/trace.h (trace): Remove unused int i * linbox/blackbox/dense-matrix.h (DenseMatrix::DenseMatrix): Make F a const (class DenseMatrix): Make _F a const * tests/test-common.h (multiEvalPoly): Make j a size_t * tests/test-inverse.C: Fix compiler warnings (testHilbertInverse, testIdentityInverse, testVandermondeInverse) (testDiagonalInverse): Make generic wrt vector type; use VectorFactory (main): Add CLI argument -N for number of vectors to apply Vandermonde inverse to * tests/test-diagonal.C: Update header; remove compiler warnings (testIdentityApply): Use commentator.startIteration; make generic wrt vector type; use VectorFactory (testRandomMinpoly): Ditto above * linbox/blackbox/scalar-matrix.h: Remove unused y_end * linbox/field/vector-domain.C (VectorDomain::writeSpecialized): Make idx a size_t * linbox/blackbox/inverse.h (Inverse::apply): Fix order of arguments to axpy (Inverse::applyTranspose): Ditto * linbox/field/vector-domain.C (VectorDomain::axpySpecialized): Fix order of arguments to _F.axpy * linbox/algorithms/blackbox-container-base.h (class BlackboxContainerBase): Add virtual destructor * linbox/algorithms/massey-domain.h (MasseyDomain::massey): Cast to avoid compiler warning * tests/test-common.h (printPolynomial): Make val a size_t * tests/test-minpoly.C (testRandomMinpoly1): Use VD in more places (testRandomMinpoly1): Use startIteration (testRandomMinpoly1): Use a vector factory to build the matrix (testRandomMinpoly): Rename from testRandomMinpoly1 (testRandomMinpoly2): Eliminate this test, as it is now redundant (main): Remove CLI argument -N; construct vector factories (testNilpotentMinpoly): Make i a size_t * tests/test-common.h (applyPoly): Fix order of arguments to VD.axpy (applyPoly): Make generic wrt vector type 2002-08-08 Bradford Hovinen * tests/.cvsignore: Remove test-dense-vector-domain, add test-subiterator, test-param-fuzzy, test-dense-matrix1 * linbox/vector/subvector.h (Subvector::Subvector): Use Iterator () rather than 0 * linbox/field/param-fuzzy.h (class ParamFuzzy): Use std:: for istream and ostream * tests/test-scalar-matrix.C (testScalarApply): Make j a size_t * tests/test-submatrix.C (testRandomApply): Make i, j, k, l size_t's * tests/test-subvector.C (testSubvector): Remove unused variable i, make z a size_t * linbox/vector/const-iterator-type.h: Qualify vector with std:: * tests/test-subiterator.C (test): Use Subiterator::iterator> * linbox/vector/subiterator.h: Reindent * linbox/vector/const-iterator-type.h: Rename from constiteratortype.h; reindent * tests/test-randiter-nonzero.C: Remove #include 2002-08-06 Bradford Hovinen * tests/.cvsignore: Update * examples/blackbox/example.C: Compilation fixes * linbox/blackbox/sparse.h: Rename from sparse0.h * linbox/blackbox/sparse.inl: Rename from sparse0.inl * linbox/blackbox/sparse-base.h: Rename from sparse0-base.h * linbox/blackbox/sparse-base.inl: Rename from sparse0-base.inl * tests/test-sparse.C: Rename from test-sparse0.C 2002-08-05 Bradford Hovinen * Change local variable header so that it actually works 2002-08-05 Bradford Hovinen * linbox/blackbox/Makefile.am (include_HEADERS): Update * tests/Makefile.am (BASIC_TESTS): Remove test-toeplitz and test-lu, since they depends on an optional library (i.e. NTL) (EXTRA_PROGRAMS): Add test-toeplitz, test-lu (BASIC_TESTS): Remove test-stub (test-stub.C is missing) 2002-08-03 Dave Saunders * linbox/field/param-fuzzy.h, linbox/randiter/param-fuzzy.h: update. * tests/test-param-fuzzy.C: Added this test. Passes, but fails thru archetype We need to sharpen our testing. Fields should work thru the arch and there should be exact field tests that fuzzy fields fail. 2002-08-02 Dave Saunders * linbox/field/field-interface.h: empty parent class for fields added for the sake of doc++ * linbox/interfaces.dxx: summary of the various interface concepts. Many have archtypes, but not all * consequential changes to these files: doc/Makefile.am doc/html/Makefile.am linbox/Makefile.am linbox/linbox.dxx linbox/field/Makefile.am linbox/field/archetype.h linbox/field/fields.dxx linbox/field/givaro-gfq.h linbox/field/givaro-zpz.h linbox/field/gmp-rational.h linbox/field/lidia-gfq.h linbox/field/modular.h linbox/field/param-fuzzy.h linbox/field/unparametric.h 2002-08-01 Dave Saunders * linbox/field/Makefile.am: delete ref to the previously removed dense-vector-domain * tests/Makefile.am: add comments * HACKING: mod to indent policy, more "cvs up" info. 2002-07-31 Bradford Hovinen * linbox/blackbox/nag-sparse.h: Tweak header * linbox/blackbox/sparse0-base.h (class SparseMatrix0Base): Remove copyToRow and swapRows, as they are unnecessary 2002-07-31 Dave Saunders * linbox/blackbox/ntl-toeplitz.h: fix indentation * linbox/blackbox/ntl-toeplitz.inl: replace .C and fix indentation 2002-07-30 Saunders and Lobo * linbox/blackbox/ntl-toeplitz.* and it's test. Adding a toeplitz black box. * First version, more general capability is coming. 2002-07-26 Bradford Hovinen * linbox/field/modular.h (class Modular, class FieldAXPY): Add specializations for int element type * linbox/util/commentator.h (Commentator::nullstreambuf::showmanyc): Return std::streamsize 2002-07-29 Rich Seagraves * linbox/blackbox/Makefile.am (include_HEADERS): Added nag-sparse.h 2002-07-26 Bradford Hovinen * linbox/blackbox/sparse0-base.C (readTurner, readGuillaume): Use A.refEntry * linbox/blackbox/sparse0.[Ch]: Move apply, applyTranspose definitions to sparse0.C * tests/test-minpoly.C (testRandomMinpoly1, testRandomMinpoly2): Update as per change below * linbox/blackbox/sparse0-base.C (getEntry): Make the Row reference const (getEntry): Have specialization for sparse associative vectors use find to avoid const issues * tests/test-sparse0.C (testRandomApply1, testRandomApply2) (testRandomApply3, testRandomTranspose, testRandomLinearity): Update as per change below * tests/test-moore-penrose.C (buildRandomSparseMatrix): Update as per change below * linbox/blackbox/sparse0-base.h (class SparseMatrix0Base): Change non-const version of getEntry to refEntry 2002-07-26 Bradford Hovinen * linbox/blackbox/Makefile.am (include_HEADERS): Remove densesubmatrix.H 2002-07-25 Bradford Hovinen * linbox/util/commentator.C (Commentator::stop): Make sure all timings get the same precision * linbox/field/modular.h (clsas Modular): Define k for delayed modding out (class FieldAXPY): Use static modding out procedure; make _y a long long 2002-07-24 Bradford Hovinen * tests/test-vector-domain.C (main): Add calls to test sparse parallel vectors Use VD.write rather than printVector * linbox/util/vector-factory.h (class RandomSparseParVectorFactory): Added this class for random sparse parallel vectors * tests/test-vector-domain.C (testDotProduct, testAddMul) (testSubMul, testAXPY, testCopyEqual): Reset factories when done * linbox/field/vector-domain.C (VectorDomain::addinSpecialized, VectorDomain::subinSpecialized, VectorDomain::axpyinSpecialized): Use a temporary vector and copy when done for the sparse sequence specialization (O(n) vs. O(n^2)) Don't use iterator operator < unless necessary * linbox/field/vector-domain.h (class VectorDomain): Add support for SparseParallelVectorTag (VectorDomain::copySpecialized): Use std::copy for inline implementations, just in case there are two different vector types with the same tag * linbox/vector/vector-traits.h (struct VectorCategories): Add SparseParallelVectorTag (struct VectorTraits): Add specialization for sparse parallel vectors (refSpecialized, constRefSpecialized, ensureDimSpecialized): Add specialization for sparse parallel vectors * tests/test-moore-penrose.C (testRandomApply1): Add commentator activity for constructing the matrix (testRandomApply1): Delete A when done * linbox/field/vector-domain.C (VectorDomain::copySpecialized): Add version optimized for copying to vectors of the same type 2002-07-23 Bradford Hovinen * examples/blackbox/load-det.C: Fix include directive * linbox/field/vector-domain.C (VectorDomain::write): Write out i->second, not *i * tests/test-moore-penrose.C (testRandomApply1): Make this generic wrt vector and row type (buildRandomSparseMatrix): Use VectorDomain and facilities of new SparseMatrix0; make generic wrt row type (testRandomApply1): Indent correct and computed output messages * linbox/field/vector-domain.C (VectorDomain::copySpecialized): Implement version described below * linbox/field/vector-domain.h (class VectorDomain): Add a form of copy that allows copying a subvector into a subvector * linbox/util/commentator.C (MessageClass::fixDefaultConfig): Clear entire list 2002-07-23 Saunders * tests/Makefile.am includes test-subiterator. Advise me if it doesn't work for you. 2002-07-22 Bradford Hovinen * tests/test-minpoly.C: Updated to reflect changes to SparseMatrix0 (testNilpotentMinpoly, testIdentityMinpoly): Use a StandardBasisFactory object * tests/test-sparse0.C: Updated to reflect changes to SparseMatrix0 * linbox/blackbox/sparse0.h: * linbox/blackbox/sparse0-base.h: Refactoring: - Eliminated SparseMatrix0Aux and moved that functionality into Sparse0 - Made SparseMatrix0Base parameterized only on the element type - New read/write implementations for SparseMatrix0Base, supporting multiple formats - Eliminated Gaussian elimination code - Added iterators, including ColOfRowsIterator, RawIterator, and RawIndexIterator - Eliminated operator []; added getEntry; changed put_value to setEntry * linbox/util/commentator.C (Commentator::progress): Enable act->_timer.stop () * linbox/util/timer.C (stop, start): Use _start_t * linbox/util/timer.h (class BaseTimer): Added _start_t * linbox/vector/subvector.h (struct VectorTraits): Use Subvector to get value_type 2002-07-18 Bradford Hovinen * linbox/vector/vector-traits.h: Add #include * linbox/util/commentator.h (class Commentator): Add form of isPrinted that does not require activity depth; add isNullStream * macros/*-check.m4: Don't add a -I and -L arguments if they refer only to /usr or to /usr/local * macros/*-check.m4: Add rules for cross-compiling * macros/*-check.m4: Tweak argument documentation * macros/gmp-check.m4: Remove note that GMP installation is optional 2002-07-12 Bradford Hovinen * linbox/field/ntl-RR.h (LinBox): Ditto * linbox/field/ntl-ZZ_p.h (LinBox): Ditto * linbox/field/ntl-zz_p.h (LinBox): Ditto * linbox/blackbox/submatrix.h (LinBox): Ditto * linbox/blackbox/hilbert.h (LinBox): Ditto * linbox/blackbox/diagonal.h (LinBox): Ditto * linbox/blackbox/scalar-matrix.h (LinBox): Ditto * tests/test-scalar-matrix.C: Update as per C++ standard * linbox/solutions/methods.h (struct SolverTraits): First stab at this structure * linbox/algorithms/blackbox-container.h (LinBox): Ditto * linbox/vector/reverse.h (LinBox): Ditto * linbox/vector/subvector.h: Ditto * linbox/vector/subiterator.h (LinBox): Ditto * linbox/field/unparametric.h (LinBox): Update as per C++ standard * linbox/util/commentator.C (Commentator::updateActivityReport): Make i signed * linbox/util/error.C: Ditto * linbox/util/timer.C: Updates to C++ standard; place everything inside LinBox namespace * linbox/util/gmp++/gmp++_int_misc.C: Ditto * linbox/util/gmp++/gmp++_int_io.C: Update header file names Add using namespace std Updates to conform to C++ standard * linbox/util/gmp++/gmp++_int_cstor.C: s/iostream.h/iostream/ * linbox/vector/vector-traits.h (struct SparseSequenceVectorPairLessThan): Use std:: namespace qualifier (class CompareSparseEntries): Use std:: namespace qualifier (refSpecialized): Use std:: namespace qualifier * linbox/util/error.h: s/iostream.h/iostream/ Use std:: namespace qualifier for iostream * linbox/field/envelope.h (class FieldEnvelope): Ditto * linbox/field/archetype.h (class FieldArchetype): Ditto * linbox/field/abstract.h (class FieldAbstract): Use std:: namespace qualifier for ostream/istream * gmp++/gmp++_int.inl (Integer::random): Eliminate default from definition * gmp++/gmp++_int.h: Use namespace qualifier std:: for parts of the STL; update header names in accordance with C++ standard * linbox/util/timer.h: s/iostream.h/iostream/ as per updated C++ standard; put everything inside the LinBox namespace; use std::ostream 2002-07-08 Bradford Hovinen * linbox/solutions/methods.h: Put everything inside the LinBox namespace * linbox/solutions/rank.h (rank): Update (rank): Use VectorWrapper::ensureDim; add commentator calls * linbox/solutions/det.h (det): Update * linbox/solutions/minpoly.h (minpoly): Update * linbox/solutions/methods.h: Changed the name _DEFAULT_EarlyTerm_THRESHOLD_ to the more standard-consistent DEFAULT_EARLY_TERM_THRESHOLD; changed the name Early_Term_Threshold to earlyTermThreshold, also in keeping with the standard. 2002-07-05 Bradford Hovinen * linbox/blackbox/sparse0-aux.h (SparseMatrix0Aux::applyTranspose): Avoid use of operator []; tweak performance with iterators * linbox/util/field-axpy.h (class FieldAXPY): Add assignment operator; make _F a real copy and not a reference * linbox/field/modular.h (FieldAXPY::FieldAXPY): Add copy constructor; use direct assignment for 0 (class FieldAXPY): Make _F a real copy; add assignment operator * linbox/util/field-axpy.h (class FieldAXPY): Add copy constructor * linbox/blackbox/sparse0-base.h (SparseMatrix0Base::prettyPrint): Make i, j size_t's * linbox/blackbox/sparse0-aux.h (class SparseMatrix0Aux): Add _faxpy (SparseMatrix0Aux::applyTranspose): Use _faxpy vector to enable delayed modding out 2002-07-02 Bradford Hovinen * linbox/field/modular.h (class FieldAXPY): Add template <> * examples/blackbox/.cvsignore: Update * tests/.cvsignore: Update * tests/test-moore-penrose.C (testIdentityApply): Make display of vectors LEVEL_UNIMPORTANT (testRandomApply1): Ditto (testRandomApply1): Put the construction of Adagger inside a commentator activity; change "Computing" to "Applying" for the activity surrounding the application * HACKING: Update instructions for adding a test * tests/Makefile.am (BASIC_TESTS): Move all mandatory tests here (TESTS): Include BASIC_TESTS (EXTRA_PROGRAMS): Include BASIC_TESTS (noinst_PROGRAMS): Remove * linbox/util/vector-factory.h (RandomSparseSeqVectorFactory::next): Make i a size_t * linbox/field/vector-domain.C (VectorDomain::mulSpecialized): Eliminate unused j (VectorDomain::addinSpecialized, VectorDomain::subinSpecialized, VectorDomain::axpyinSpecialized): Make i a size_t (VectorDomain::copySpecialized, VectorDomain::areEqualSpecialized): Make idx a size_t * linbox/util/vector-factory.h (RandomSparseSeqVectorFactory::RandomSparseSeqVectorFactory): Reorder initializers (class VectorFactory): Add virtual destructor * tests/test-vector-domain.C (testSubMul): Remove unused i, j (testAXPY): Ditto * linbox/blackbox/inverse.h (Inverse::apply): Eliminate unused j * tests/test-vector-domain.C (testCopyEqual, testAddMul): Remove unused i, j (testDotProduct): Make j a size_t * linbox/util/vector-factory.h (StandardBasisFactory::next): Make idx a size_t * linbox/blackbox/sparse0-aux.h (SparseMatrix0Aux::applyTranspose): Initialize y to all zeros first * tests/test-sparse0.C (testRandomApply3, testRandomApply2, testRandomApply1): Remove unused VD * linbox/util/vector-factory.h (RandomSparseSeqVectorFactory::next): Don't die if skip is 0; just increment i * tests/test-generic.h (testTranspose, testLinearity): Remove unused i, j 2002-07-01 Bradford Hovinen * linbox/field/vector-domain.C (dotSpecialized): Don't initialize res; it's not necessary here * linbox/algorithms/blackbox-container-base.h (class BlackboxContainerBase): Tweak indentation * linbox/blackbox/sparse0-aux.h (SparseMatrix0Aux::applyTranspose): Use linbox_check and _F.axpyin * linbox/algorithms/Makefile.am (include_HEADERS): Add blackbox-container-symmetrize.h * linbox/field/modular.h (FieldAXPY::get, FieldAXPY::assign): inline these * linbox/util/field-axpy.h (FieldAXPY::get, FieldAXPY::assign): inline these * linbox/field/vector-domain.C (VectorDomain::dotSpecialized): inline this * linbox/blackbox/sparse0-aux.h (SparseMatrix0Aux::apply): Eliminate Element temp * linbox/util/commentator.C (Commentator::progress): Show elapsed time (Commentator::progress): Get a pointer to the top activity first * linbox/algorithms/massey-domain.h (MasseyDomain::massey): Use COMMOD for progress reports * linbox/util/commentator.C (Commentator::updateActivityReport): Use a strstream and update _last_line_len (Commentator::finishActivityReport): Use _last_line_len (Commentator::setReportStream): Disable brief report if we are outputing to the same stream it is * linbox/util/commentator.h (class Commentator): Add _last_line_len * linbox/util/commentator.C (Commentator::stop): Increase output precision; make sure output is nonnegative * examples/blackbox/Makefile.am (EXTRA_PROGRAMS): Add load-det * linbox/field/givaro-zpz.h: Reindent * examples/run/Makefile.am: Kill _DEPENDENCIES lines * examples/integers/Makefile.am: Kill _DEPENDENCIES lines * examples/fields/Makefile.am: Kill _DEPENDENCIES lines * examples/blackbox/Makefile.am: Kill _DEPENDENCIES lines * examples/Makefile.am: Kill _DEPENDENCIES lines * HACKING: Remove note about _DEPENDENCIES lines * tests/Makefile.am: Get rid of _DEPENDENCIES lines; turns out they aren't necessary * linbox/util/commentator.C (Commentator::stop): Modified report format; display all three timings 2002-06-28 Bradford Hovinen * linbox/util/commentator.C (Commentator::updateActivityReport): Use floor (percent + 0.5) rather than round (percent) * linbox/util/commentator.h (Commentator): Redefine Commentator to CommentatorDisabled when disabled; define the existing commentator regardless of whether it is disabled -- the new #defines will deflect any access * tests/test-minpoly.C (main): Re-enable commentator * linbox/util/commentator.C (Commentator::Commentator): Set default max depth for BRIEF_REPORT to 2; use macros for detail levels (MessageClass::fixDefaultConfig): Make sure j is not erased from the list before insertion * gmp++/gmp++_int.h: Add short, unsigned short implicit conversions 2002-06-27 Bradford Hovinen * linbox/util/commentator.C (Commentator::updateActivityReport): Use round (percent) rather than setting precision (MessageClass::checkConfig): Use depth < (*i).first (MessageClass::fixDefaultConfig): Erase everything after _max_depth and everything before _max_depth that is not more restrictive * tests/test-vector-domain.C (testAXPY): Update use of VD.axpy * tests/test-common.h (applyPoly): Update use of VD.axpy * tests/test-generic.h (testLinearity): Update use of VD.axpy * linbox/blackbox/inverse.h (Inverse::apply, Inverse::applyTranspose): Update * linbox/field/vector-domain.h (class VectorDomain): Change order of parameters to match FieldArchetype::axpy 2002-06-26 Bradford Hovinen * tests/test-minpoly.C: Report minpoly degree; tweak report parameters * linbox/algorithms/blackbox-container.h (BlackboxContainer::BlackboxContainer): Initialize _applyTime and _dotTime if INCLUDE_TIMING is defined 2002-06-26 Bradford Hovinen * linbox/field/vector-domain.C (VectorDomain::addinSpecialized, VectorDomain::subinSpecialized): Use i->first < j->first * linbox/util/vector-factory.h (RandomSparseSeqVectorFactory::next): Add check that skip > 0 * linbox/field/vector-domain.C (VectorDomain::axpySpecialized): Fix order of arguments to F.axpy * tests/test-generic.h (testLinearity): Fix variable names to be more descriptive * linbox/util/vector-factory.h (LinBox): Use v[] rather than v.insert * tests/test-generic.h (testDenseConsistency): Eliminate this test (testLinearity): Fix formulae * linbox/solutions/trace.h (trace): Make sure v has correct dimension * tests/test-inverse.C (testRandomTranspose): Update according to changes in testTranspose * tests/test-diagonal.C (testRandomTranspose): Update according to changes in testTranspose * linbox/blackbox/sparse0-aux.h (SparseMatrix0Aux::SparseMatrix0Aux): Initialize _VD for sparse associative specialization * tests/test-generic.h (testTranspose): Use VectorFactory, make this generic wrt vector type * tests/test-sparse0.C (testRandomTranspose, testRandomLinearity): New tests (main): Call tests on all combinations of vector types * linbox/util/vector-factory.h (StandardBasisFactory::next): Initialize the whole vector for the dense case * linbox/blackbox/sparse0-base.h (SparseMatrix0Base::put_value, SparseMatrix0Base::operator[]): Use linbox_check * tests/test-sparse0.C (testRandomApply1, testRandomApply2, testRandomApply3): Make these generic wrt vector and row type * */*.[Ch]: Change top Emacs identifier to mode: C++ so that it does the correct thing with templates and so on * linbox/util/vector-factory.h (class RandomDenseVectorFactory): Use RandIter, not Field::RandIter for _r 2002-06-25 Bradford Hovinen * tests/test-sparse0.C (testIdentityApply): Use VectorFactory (testNilpotentApply): Use VectorFactory * linbox/blackbox/sparse0-aux.h (class SparseMatrix0Aux): Use VectorDomain for the sparse associative specialization; replace Field1 with VectorDomain (SparseMatrix0Aux::apply): Use VectorDomain::dot for all specializations (class SparseMatrix0Aux): Restore compilation of sparse associative specialization (SparseMatrix0Aux::apply): Use iterator rather than integer * tests/Makefile.am (TESTS): Add test-subvector * linbox/algorithms/blackbox-container.h (class BlackboxContainer): Add optional timing facilities, enabled with INCLUDE_TIMING * linbox/algorithms/massey-domain.h (class MasseyDomain): Add optional timing facilities, enabled with INCLUDE_TIMING * linbox/vector/Makefile.am (include_HEADERS): Add subvector.h, subiterator.h, reverse.h * linbox/vector/subvector.h: Reindent; fix headers * linbox/algorithms/massey-domain.h (class MasseyDomain): Replace _field with _F; declare VectorDomain _VD; use const long rather than #define when possible * linbox/algorithms/blackbox-container-base.h (class BlackboxContainerBase): Add member VectorDomain _VD; rename _field to _F (for consistency); eliminate operators; align members (BlackboxContainerBase::size): Make this const * linbox/algorithms/blackbox-container.h (BlackboxContainer::_launch): Use _VD.dot rather than home-cooked dot product (class BlackboxContainer): Make RandIter a template parameter, defaulted to Field::RandIter * linbox/algorithms/Makefile.am (include_HEADERS): Add blackbox-container-symmetric.h * linbox/solutions/trace.h (trace): Use factory.j () - 1 2002-06-24 Bradford Hovinen * tests/test-vector-domain.C (main): Reset factory 5 before sparse sequence/sparse associative dot product; factory 6 before sparse associative add/mul test (testDotProduct): Add timing * linbox/util/vector-factory.h (VectorFactory): Fix output of j () * HACKING: Update with consolidated ChangeLogs * linbox/vector/vector-traits.h (refSpecialized, cosntRefSpecialized): Check that size is nonzero before conducting binary search; check that return iterator is not past-the-end 2002-06-21 Bradford Hovinen * examples/integers/.cvsignore: Update * examples/.cvsignore: Update 2002-06-21 Bradford Hovinen * linbox/field/vector-domain.C (VectorDomain::axpyinSpecialized): Don't use an iterator here, since we invalidate iterators by calling insert * linbox/field/modular.h (Modular::neg): Make sure -0 = 0 * linbox/field/vector-domain.C (VectorDomain::axpySpecialized): Use _F.axpy when possible; avoid use of temporaries (VectorDomain::addSpecialized, VectorDomain::addinSpecialized, VectorDomain::subSpecialized, VectorDomain::subinSpecialized, VectorDomain::isZeroSpecialized, VectorDomain::areEqualSpecialized, VectorDomain::convertSpecialized, VectorDomain::readSpecialized, VectorDomain::writeSpecialized, VectorDomain::copySpecialized): Implement (VectorDomain::mulSpecialized, VectorDomain::mulinSpecialized): Implement specialization for sparse associative vectors * linbox/randiter/nonzero.h (class NonzeroRandIter): Set default RandIter to Field::RandIter * linbox/util/vector-factory.h (class RandomSparseSeqVectorFactory, class RandomSparseMapVectorFactory): Use NonzeroRandIter * linbox/vector/vector-traits.h (class CompareSparseEntries): Implement (refSpecialized, constRefSpecialized): Use lower_bound * tests/test-generic.h (testLinearity): New test * tests/test-vector-domain.C (testAddMul, testSubMul, testCopyEqual): New tests; call these from main * tests/test-vector-domain.C (testAXPY): Use VD.isZero * tests/.cvsignore: Update 2002-06-20 Bradford Hovinen * examples/Makefile.am (EXTRA_PROGRAMS): Add mmZZ_pE * examples/integers/Makefile.am (EXTRA_PROGRAMS): Don't compile programs by default 2002-06-20 Bradford Hovinen * examples/blackbox/Makefile.am (EXTRA_PROGRAMS): Don't compile examples by default * examples/fields/Makefile.am (EXTRA_PROGRAMS): Don't compile programs by default * linbox/blackbox/dense-matrix1.h (DenseMatrix::Row::Row): Fix typos in default initialization * linbox/blackbox/dense-matrix1.C (DenseMatrix::write): Remove default for parameter (DenseMatrix::ColOfRowsIterator::ColOfRowsIterator): Remove default for first parameter (DenseMatrix::RowOfColsIterator::RowOfColsIterator): Remove default for first parameter (class DenseMatrix::RowOfColsIterator): Add constructor with no parameters (class DenseMatrix::ColOfRowsIterator): Add constructor with no parameters * linbox/field/Makefile.am (EXTRA_DIST): Add EXTRA_HEADERS 2002-06-20 Pascal Giorgi * linbox/field/givaro-gfq.h: Replace cast according to gmp++ . 2002-06-20 Bradford Hovinen * linbox/randiter/Makefile.am (include_HEADERS): Add nonzero.h * linbox/util/vector-factory.h (class RandomDenseVectorFactory, class RandomSparseSeqVectorFactory, class RandomSparseMapVectorFactory): Add constructor specifying a particular random iterator 2002-06-20 Dave Saunders * insert LinBoxSrcOnly flag for all-source compilation (fixed) 2002-06-20 Bradford Hovinen * macros/ntl-check.m4 (AC_TRY_LINK): Don't include iostream -- it was causing compiler trouble wrt autoconf (NTL_HEADERS_FIELD): Add ntl-ZZ_pE.h * tests/Makefile.am (TESTS): Add test-randiter-nonzero (test_diagonal_DEPENDENCIES): Remove duplicate definition 2002-06-19 Bradford Hovinen * configure.in (AC_OUTPUT): Remove linbox/iterators/Makefile, remove examples/run/Makefile 2002-06-19 Bradford Hovinen * examples/Makefile.am (SUBDIRS): Add integers * examples/fields/Makefile.am (ex_fields_wrapper_SOURCES): Don't comment out this line * linbox/util/gmp++/Makefile.am (INCLUDES): Add -I$(top_srcdir) * linbox/util/vector-factory.h (RandomSparseSeqVectorFactory::next): Use simpler formulas ala Knuth (class RandomSparseSeqVectorFactory): Remove extraneous variables * tests/test-sum.C (main): Use GF(101) by default (testZeroApply): Use VD.mul rather than VD.axpy 2002-06-18 Bradford Hovinen * Makefile.am (SUBDIRS): Add gmp++ * configure.in (AC_OUTPUT): s/integer/gmp++/ 2002-06-18 Bradford Hovinen * examples/blackbox/ex-mat0.C: Add using namespace std * linbox/integer.h: Use GMP++ 2002-06-18 Zhendong Wan * dense-matrix1.h dense-matrix1.C * FieldBASL.h FieldBLAS.C * linbox/field/ntl-ZZ_pE.h 2002-06-18 Bradford Hovinen * linbox/util/vector-factory.h (RandomSparseMapVectorFactory::next): Use a simpler mechanism for constructing vectors * linbox/util/gmp++/gmp++_int.h: Define GMPXX_PREFIX if not already done * linbox/util/gmp++/*.[Ch]: Prefix #include lines with GMPXX_PREFIX * linbox/util/Makefile.am (SUBDIRS): s/integer/gmp++/ (libutil_la_LIBADD): s/integer/gmpxx/ 2002-06-14 Bradford Hovinen * examples/blackbox/.cvsignore: Update 2002-06-14 Bradford Hovinen * linbox/field/vector-domain.C (VectorDomain::dotSpecialized): Make sure not to accumulate if j is at v2.end. (VectorDomain::dotSpecialized): Add specialization for sparse associative/sparse associative dot product * linbox/field/modular.h (class ModularBase, class Modular): Replace Modular[Base]::Modular[Base] (Element) with unsigned long version 2002-06-14 zhenddong wan * linbox/vector/subvector.h: fix the const_iterator problem 2002-06-14 Bradford Hovinen * tests/test-vector-domain.C (main): Add call to test sparse associative/sparse associative dot product 2002-06-13 Bradford Hovinen * .cvsignore: Remove config.h[.in] and add linbox-config.h[.in] * configure.in: Change AM_CONFIG_HEADER to linbox-config.h * */*.C: Change #include "config.h" to #include "linbox-config.h" * Makefile.am (include_HEADERS): Add linbox-config.h * acconfig.h: Add GMP_VERSION_4 2002-06-13 Bradford Hovinen * examples/blackbox/.cvsignore: Update * linbox/integer.h: Only use extern "C" if GMP_VERSION_4 is not set * linbox/vector/vector-traits.h: Add #include linbox/field/archetype.h * macros/gmp-check.m4: Added check for GMP 4.0 or greater * tests/test-vector-domain.C (main): Invoke testDotProduct for sparse sequence/sparse sequence vectors * tests/Makefile.am: Commented out subiterator and solveNonsingular as the former has compilation problems and the latter was not added properly 2002-06-11 Dave Saunders * linbox/field/ntl-ZZ_p.h: include sys/time.h 2002-06-11 Dave Saunders * tests/test-subiterator.C: new test of vector/subiterator.h 2002-06-10 Dave Saunders * linbox/vector/subiterator.h, subvector.h: subvector now constructs from subiterators, not from underlying vector. This avoids copy and reference problems with underlying vector. 2002-06-07 Bradford Hovinen * linbox/field/vector-domain.C (VectorDomain::axpySpecialized): Implement specialization for sparse associative vectors (VectorDomain::axpyinSpecialized): Implement specialization for sparse associative vectors (VectorDomain::dotSpecialized): Implement specialization for sparse sequence/sparse sequence and sparse associative/sparse sequence vectors 2002-06-07 Bradford Hovinen * tests/test-vector-domain.C (main): Add call to test sparse associative vector axpy 2002-06-06 Bradford Hovinen * linbox/field/vector-domain.C (VectorDomain::dotSpecialized): Implement specialization for sparse associative/dense dot product * linbox/field/vector-domain.h (class VectorDomain): Add return statements 2002-06-06 Bradford Hovinen * linbox/util/vector-factory.h (RandomSparseSeqVectorFactory::RandomSparseSeqVectorFactory): Make sure k < n (RandomSparseSeqVectorFactory::next): Tweak formulae (RandomSparseMapVectorFactory::next): Tweak formulae the same way as above * tests/test-vector-domain.C (testAXPY): Rename from testDenseAXPY. Make this generic with respect to the vector type being tested (main): Update according to the above * tests/.cvsignore: Update * tests/test-vector-domain.C (main): Add call to test sparse associative dot product 2002-06-05 Bradford Hovinen * tests/test-vector-domain.C (testDotProduct): Rename from testDenseDotProduct. Make this generic with respect to the vector type being tested 2002-06-04 Bradford Hovinen * .cvsignore: Update 2002-06-04 Bradford Hovinen * examples/run/.cvsignore: Update 2002-06-04 Bradford Hovinen * linbox/blackbox/inverse.h (class Inverse): Update use of VectorDomain * linbox/blackbox/sparse0-aux.h (class SparseMatrix0Aux): Update use of VectorDomain * linbox/blackbox/dense-matrix.h (class DenseMatrix): Update use of VectorDomain 2002-06-04 Bradford Hovinen * linbox/blackbox/moore-penrose.h (class MoorePenrose): s/_B/_B1/ since _B seems to be a macro of some type on Solaris 2002-06-04 Bradford Hovinen * linbox/field/vector-domain.h (class VectorDomainBase, class VectorDomain): Merge these classes together (class VectorDomain): Parameterize methods on the vector types rather than parameterizing the whole class. Add methods * Specialized for template specialization * linbox/field/vector-domain.C: Update according to changes in vector-domain.h 2002-06-04 Dave Saunders * linbox/vector/subvector.h: tweak to have reference semantics to underlying vect. * tests/test-subvector.C: new test for check adapted from Will's test-subvector.cpp * tests/Makefile.am: new target test-subvector, part of check. 2002-06-04 Bradford Hovinen * tests/test-moore-penrose.C (testRandomApply1): s/VectorDomainBase/VectorDomain/ and update * tests/test-common.h (applyPoly): Update use of VectorDomain * tests/test-generic.h (testDenseConsisntency): Update use of VectorDomain (testTranspose): Update use of VectorDomain 2002-05-31 Bradford Hovinen * macros/gmp-check.m4 (min_gmp_version): s/{gmp_prefix}/${gmp_prefix}/ 2002-05-28 Bradford Hovinen * configure.in: AC_OUTPUT linbox-config * Makefile.am (bin_SCRIPTS): Add linbox-config 2002-05-28 Bradford Hovinen * linbox/blackbox/Makefile.am: Add sum.h 2002-05-25 Bradford Hovinen * linbox/blackbox/compose.h (Compose::Compose): Add call to VectorWrapper::ensureDim (class Compose): Make _z mutable 2002-05-25 Bradford Hovinen * tests/Makefile.am (TESTS): Reorder tests in approximate order of dependence (TESTS): Add test-sum 2002-05-19 Bradford Hovinen * linbox/blackbox/sparse0-aux.h (SparseMatrix0Aux::applyTranspose): Don't construct a new vector for y; just fill in existing values * linbox/blackbox/inverse.h (class Inverse): Add _transposeMinpoly for the minimal polynomial of the transpose of the matrix (Inverse::Inverse): Don't construct minimal polynomials; just clear them (Inverse::apply, Inverse::applyTranspose): Construct minimal polynomials if needed * linbox/blackbox/moore-penrose.h (MoorePenrose::MoorePenrose): Reverse order of arguments for call to Submatrix (MoorePenrose::MoorePenrose): Construct _B too * linbox/blackbox/compose.h (Compose::Compose): Don't set _z's size (Compose::apply, Compose::applyTranspose): use VectorWrapper::ensureDim rather than setting _z's size * linbox/blackbox/inverse.h (Inverse::apply, Inverse::applyTranspose): Don't resize the output vector (Inverse::Inverse): Check that the input matrix is square (Inverse::Inverse): Use VectorWrapper::ensureDim rather than _z.resize * linbox/blackbox/Makefile.am (include_HEADERS): Added moore-penrose.h 2002-05-19 Bradford Hovinen * linbox/field/modular.h (class FieldAXPY): Update get () form; remove obsolete forms * linbox/field/vector-domain.C (VectorDomain::dotprod): Fix use of FieldAXPY::get * linbox/solutions/trace.h (trace): Use constRef * linbox/util/field-axpy.h (class FieldAXPY): Remove obsolete get form * linbox/util/vector-factory.h (class VectorFactory): Add interface n(), which returns the dimension of the space from which vectors are being generated * linbox/vector/vector-traits.h (class VectorWrapper): Add method ensureDim (namespace VectorWrapper): Convert this to a namespace and use function specialization * tests/test-moore-penrose.C (main): Switch to field GF(2147483647) by default * tests/test-generic.h (testTranspose): Rename from testTranpose (testTranspose): Use commentator.startIteration * tests/test-moore-penrose.C (testIdentityApply): Ensure w has space for result (buildRandomSparseMatrix): Implement (testRandomApply1): New test * tests/test-trace.C (testDiagonalTrace): Use constRef 2002-05-18 Bradford Hovinen * configure.in: Make disabling shared libraries the default 2002-05-18 Bradford Hovinen * linbox/util/vector-factory.h: Refactor: Create one class StandardBasisFactory, parameterized by vector type, with specializations for dense, sparse map, and sparse associative vectors * linbox/util/commentator.C (Commentator::setMaxDepth, Commentator::setMaxDetailLevel): Implement * linbox/vector/vector-traits.h (class VectorWrapper): Implement 2002-05-17 Bradford Hovinen * examples/.cvsignore: Update 2002-05-17 Bradford Hovinen * linbox/blackbox/submatrix.h (class Submatrix): Add Trait to template parameters and specialize for dense vectors (Submatrix::Submatrix): Check that the row and column dimensions given are valid * linbox/blackbox/sparse0-aux.h: Backed out revision 1.6 (SparseMatrix0Aux::apply): Restore use of _VD.dotprod * linbox/field/vector-domain.h (LinBox): Added specialization for SparseSequence, SparseSequence type * linbox/field/vector-domain.C: Update as per changes in vector-domain.h (VectorDomainBase::mul, VectorDomainBase::mulin): Don't resize and don't invalidate iterators * linbox/field/vector-domain.h (class VectorDomainBase): New class. Pull out all functions from VectorDomain that only need one vector type. * linbox/util/vector-factory.h (RandomDenseVectorFactory::next): Resize input vector * linbox/util/debug.h (PreconditionFailed::PreconditionFailed): Put out a couple of newlines before printing the error message * linbox/util/vector-factory.h (class VectorFactory): Add method reset () * linbox/util/commentator.C (Commentator::startIteration): Implement Include strstream and not cstdio * linbox/util/commentator.h (class Commentator): Add startIteration * macros/ntl-check.m4 (EX_FIELDS_NTL): Define * tests/Makefile.am (test_moore_penrose_SOURCES): New test * tests/test-submatrix.C: Don't include fstream or cstdio (testRandomApply): Use commentator.startIteration rather than forming a new string and calling start (testRandomApply): Put the declaration for report inside the loop and remove the call to indent (testRandomApply): Update report output (main): Don't construct factory2 * tests/.cvsignore: Update 2002-05-14 William J. Turner * linbox/field/archetype.h, envelope.h: changed randIter to RandIter. 2002-05-14 William J. Turner * linbox/randiter/modular.h: Seeded random number generator in constructor. _seed was never used before. 2002-05-07 William J. Turner * linbox/field/ntl-zz_p.h, ntl-ZZ_p.h: modified random generator constructor and creating functions to use NTL functions. 2002-05-07 William J. Turner * linbox/randiter/unparametric.h: static cast added to constructor 2002-04-26 Pascal Giorgi * configure.in, acconfig.h: updating to allow Lidia Library 2002-04-26 Pascal Giorgi * linbox/field/lidia-gfq.h, lidia.h: adding wrapper of extensions fields for Lidia * linbox/field/givaro-gfq.h, givaro-zpz.h: To use these wrappers you need to get a modified version of givaro. You can find these version at this address : http://www.ens-lyon.fr/~pgiorgi/software.html version 3.0.1. * linbox/field/givaro-gfq.h: adding wrapper of extensions fields for Givaro * linbox/field/givaro.h: adding givaro-gfq.h * linbox/field/Makefile.am: adding givaro-gfq.h * linbox/randiter/lidia-gfq.h: adding randiter for lidia gfq field * linbox/randiter/lidia.h: file for all randiter of lidia library * linbox/randiter/Makefile.am: adding the header of Lidia and an EXTRA_DIST variable * macros/givaro-check.m4: adding headers of givaro fields wrappers and the test test-givaro-zpz.h * macros/lidia-check.m4: creating for the library LiDIA * macros/Makefile.am: adding lidia-check.m4 to the EXTRA_DIST * tests/test-givaro-zpz.C: test for prime finites fields of givaro using all type of zpz fields of givaro and an extension field of degree 1 for gfq. * tests/test-lidia-gfq.C: test for Lidia Gfq field. But the Gfq field is tested as a prime field (the extension degree is 1) * tests/test-generic.h: Put in comment the line 56 which is inconsistant. Also make the test for the init/convert function generic for every fields (finite and inifinite fields). 2002-04-25 Zhendong Wan * tests/test-dense-vector-domain.C: test for dense vector domain. 2002-04-24 Pascal Giorgi * linbox/givaro.h: include file for all Givaro wrappers * linbox/lidia.h: include file for all Lidia wrappers * linbox/Makefile.am: adding file givaro.h and lidia.h and adding all Lidia header base 2002-04-24 Pascal Giorgi * linbox/field/givaro-zpz.h, givaro.h: Adding wrappers of primes fields for givaro and his file givaro.h associated. NB: this wrappers is template class which wrapps three sorts of givaro fields. For more information see the file itself. * linbox/field/Makefile.am: adding givaro fields wrapper 2002-04-18 William J. Turner * linbox/vector/subvector.h, subiterator.h: New wrappers for subvector of dense vector. 2002-04-18 William J. Turner * tests/test-subvector.cpp: New partial test program for subvector wrapper class. This needs a lot of work, and is not in the makefile yet. 2002-04-17 Dave Saunders * tweak identity case to copy 2002-04-13 Bradford Hovinen * linbox/field/modular.h (FieldAXPY >): Add form of get where the element in which to store result is also passed 2002-04-13 Bradford Hovinen * linbox/util/Makefile.am (include_HEADERS): Added vector-factory.h * linbox/util/field-axpy.h (class FieldAXPY): Add form of get where the place in which to store the result is passed * tests/test-vector-domain.C (testDenseDotProduct): Convert this to use VectorFactories 2002-04-12 Bradford Hovinen * s/element/Element/ everywhere except in comments (I hope!) * Add a file dummy.C to fool libtool into actually building liblinbox.la * Move debug.[Ch] and error.[Ch] to linbox/util 2002-04-12 William J. Turner * linbox/blackbox/sparse0-aux.h: Made dense vector apply not invalidate iterators 2002-04-12 Bradford Hovinen * linbox/util/commentator.h (class Commentator): Added compatibility layer for Jean-Guillaume's code (class Commentator): Move cnull above protected section to fix crashes on DISABLE_COMMENTATOR * linbox/util/commentator.h: Added null commentator * linbox/util/Makefile.am (include_HEADERS): Put debug.h, error.h here (libutil_la_SOURCES): Put error.C, debug.C here * macros/givaro-check.m4: Fix definition of GIVARO_HEADERS_*, GIVARO_TESTS * tests/test-unparametric-field.C: Rename from test-unparametric-field.cpp 2002-04-11 Bradford Hovinen * Makefile.am: Remove EXTRA_DIST, since both of these files are for CVS developers only 2002-04-11 Bradford Hovinen * linbox/field/modular.h (FieldAXPY >::accumulate): Use -t for overflow check (FieldAXPY >::accumulate): Cast to unsigned when modding out to avoid sign flip problem (FieldAXPY >::get): Cast to unsigned when modding out * tests/test-modular.C (main): Call testFieldAXPY * tests/test-generic.h (testField): Make title const (testFieldAXPY): Add this test * tests/test-diagonal.C (testRandomTranspose): Report diagonal vector used as input * tests/test-scalar-matrix.C: #include "modular.h" (main): Use integers mod 2147483647; update to use Modular interface * tests/.cvsignore: Add test-submatrix * tests/test-submatrix.C (main): Fix banner string * tests/test-diagonal.C (main): Enable printing of detailed messages * tests/test-unparametric-field.cpp (main): * tests/test-modular.C (main): * tests/test-inverse.C (main): * tests/test-minpoly.C (main): * tests/test-diagonal.C (main): * tests/test-rank.C (main): Use GF(2147483647) by default; fix relevant documentation * tests/test-sparse0.C (main): Fix documentation string for default modulus 2002-04-10 Bradford Hovinen * examples/example.C: Update with new Modular signature 2002-04-10 Dave Saunders * linbox/blackbox/scalar-matrix.h: New (simple) black box - sparse vector part not checked. 2002-04-10 Bradford Hovinen * macros/ntl-check.m4: Set NTL_TESTS, NTL_HEADERS_* to empty strings by default and to real data if NTL was found. Call AC_SUBST in all cases Fix check for whether NTL prefix was set * tests/.cvsignore: Add test-unparametric-field; s/test-sparse-matrix/test-sparse0/ 2002-04-10 Dave Saunders * tests/test-scalar-matrix.C: New test for new blackbox. 2002-04-08 Bradford Hovinen * linbox/util/commentator.h (class Commentator): Use std:: namespace for ofstream (class Commentator): Add std:: specifiers for nullstreambuf declarations and cnull 2002-04-08 Pascal Giorgi * macros/gmp-check.m4: Keep the current LD_LIBRARY_PATH * tests/test-generic.h: WARNING: The test of a field is not generic. The test of init and convert functions use a fixed number 49193295. So the test failed if the characteristic is less than this number. 2002-04-05 William J. Turner * linbox/Makefile.am: Install NTL and Givaro wrapper headers only if libraries are installed. 2002-04-05 William J. Turner * linbox/blackbox/Makefile.am: Only install NTL and Givaro wrapper header files if libraries are installed. * linbox/blackbox/sparse0-aux.h: Fixed apply and applyTranspose for sparse vectors. * macros/ntl-check.m4, givaro-check.m4: Only run tests of NTL and Givaro wrappers, and install header files, if libraries are installed. * tests/test-common.h: Fix printVector to print correct number of zeros for sparse sequence vectors. Made functions for testing equality of two vectors of the same type and to test if a vector is the zero vector. These may need some work still. * tests/Makefile.am: Only run tests of NTL and Givaro wrappers if libraries are installed. * tests/test-sparse0.C: Attempted to convert test functions to be generic for the Row and Vector types. These still need more work to be complete. In particular, there still needs to be a function to create a vector with no zero elements. 2002-04-04 William J. Turner * configure.in: removed requirement of givaro 2002-04-04 William J. Turner * linbox/ntl.h: include file for all NTL wrappers. * linbox/blackbox/archetype.h: Added virtual destructor to avoid warning. Removed resize() from apply and applyTranspose. * linbox/blackbox/sparse0-base.h: Fixed comparison between signed and unsigned integers, accessor function to field. * linbox/blackbox/sparse0-aux.h: Fixed constructor from SparseMatrix0Base. 2002-04-04 William J. Turner * linbox/field/Makefile.am: Install NTL and Givaro wrapper header files only if libraries are installed. * linbox/field/ntl.h, ntl-RR.h, ntl-ZZ_p.h, ntl-zz_p.h: Broke NTL field wrappers into separate files. 2002-04-04 Pascal Giorgi * macros/ntl-check.m4, givaro-check.m4: Use GMP_CFLAGS and GMP_LIBS and appending to LD_LIBRARY_PATH, and removed UNSET LD_LIBRARY_PATH at end of file * macros/gmp-check.m4: removed UNSET LD_LIBRARY_PATH at end of file 2002-04-04 William J. Turner * macros/ntl-check.m4: Use GMP_CFLAGS and GMP_LIBS * tests/test-ntl-zz_p.cpp, test-ntl-ZZ_p.cpp, test-ntl-RR.cpp: New tests * tests/test-common.h, test-vector-domain.C: generalized printVector to all vector types. Created areVectorsEqual function. Both need to be generalized to sparse associative vectors. 2002-04-03 William J. Turner * examples/example.C: changed sparse-matrix to sparse0 2002-04-03 William J. Turner * linbox/blackbox/sparse1.h: Original port; needs work! * linbox/blackbox/sparse0*.h: Renamed from sparse-matrix*.h. 2002-04-03 Bradford Hovinen * linbox/field/modular.h (class Modular): Rename from LargeModular, make this a class parameterized on the element type 2002-04-03 William J. Turner * linbox/field/ntl.h: Fixed random iterator random(x) for zz_p 2002-04-03 Bradford Hovinen * linbox/randiter/modular.h (class Modular): Rename from LargeModular; make this a class parameterized on the element type 2002-04-03 William J. Turner * linbox/randiter/unparametric.h: Ported UnparametricRandIter from old module * macros/givaro-check.m4: Copy from gmp-check.m4 and fix for Givaro * macros/ntl-check.m4: Change to version >= 5.0 and C++ namespace * tests/test-unparametric-field.cpp: New test * tests/test-minpoly.C: Changed sparse-matrix to sparse0 * tests/test-sparse0.C: Changed sparse-matrix to sparse0 2002-04-02 Bradford Hovinen * s/*_{abstract|archetype|envelope}/Abstract|Archetype|Envelope/g 2002-04-02 Bradford Hovinen * linbox/blackbox/dense-matrix.h (DenseMatrix::apply): Signedness fix * linbox/blackbox/submatrix.h (class Submatrix): Don't parameterize on the field; add rowdim, coldim (Submatrix::Submatrix): Pass rowdim, coldim; initialize vectors directly * linbox/field/Makefile.am (include_HEADERS): Add ntl.h * linbox/field/vector-domain.C (VectorDomain::axpy): Remove unused iterator k * linbox/util/commentator.C (Commentator::printActivityReport, Commentator::indent) (Commentator::updateActivityReport, Commentator::finishActivityReport): Make i unsigned (MessageClass::checkConfig): Signedness fix * linbox/util/integer/integer-io.C: Return v * tests/test-dense-matrix.C (test*): s/size_t/long/ for parameter n * tests/Makefile.am (TESTS): Add test test-submatrix * tests/test-common.h (printSparseSeqVector, printVector): Signedness fix * tests/test-vector-domain.C (test*): s/size_t/long/ for parameter n * tests/.cvsignore: Added test-det, test-rank 2002-04-01 Bradford Hovinen * Makefile.am (SUBDIRS): Build documentation last 2002-04-01 Bradford Hovinen * linbox/blackbox/transpose.h (Transpose::Transpose): Make A_ptr const (Transpose::Transpose): Use Transpose, not Compose for copy constructor * linbox/blackbox/compose.h (Compose::apply, Compose::applyTranspose): Declare local intermediate vector, since it was not compiling (for what reason I do not know) with the class member * linbox/solutions/rank.h: #include blackbox-container.h (rank): Compilation fixes * linbox/solutions/det.h: #include blackbox-container.h * tests/test-det.C (test*): Supply iterations to commentator.start * tests/Makefile.am (TESTS): Add test test-rank 2002-03-30 Bradford Hovinen * linbox/blackbox/compose.h (Compose::Compose): Use const pointers for inputs (Compose::Compose): Initialize _z directly 2002-03-30 Bradford Hovinen * linbox/solutions/det.h (det): Compilation fixes 2002-03-29 Bradford Hovinen * tests/test-generic.h (testDenseConsisntency): New test 2002-03-28 Bradford Hovinen * Makefile.am (EXTRA_DIST): Typo fix 2002-03-28 Bradford Hovinen * linbox/blackbox/dense-matrix.h (DenseMatrix::clone): Implement nontrivially (DenseMatrix::DenseMatrix): Implement copy constructor * linbox/util/commentator.C (Commentator::Commentator): Set default max depth for errors and warnings to 10; set max detail to 3 (Commentator::registerMessageClass): Accept parameters max_depth and max_level for initial configuration of message class * tests/test-inverse.C (main): Set maximum depth on internal descriptions to 3 (testDiagonalInverse): Add this test (main): Disable Hilbert inverse test pending test of Hilbert black box * tests/Makefile.am (test_large_modular_SOURCES): s/test-field-common/test-generic/ * tests/test-large-modular.C: Update * tests/test-field-common.h: Obsolete now; remove * tests/test-field-common.h (testField): Move to test-generic.h * tests/test-common.[Ch] (test_header, test_trailer): Remove * tests/test-field-common.h (isPower): Move to test-common.c/.h 2002-03-27 Bradford Hovinen * linbox/util/commentator.h (Commentator::Activity::Activity): Initialize _progress to 0 * linbox/util/commentator.C (Commentator::Commentator): Initialize cnull (Commentator::Commentator): Kill customization of BRIEF_REPORT (MessageClass::dumpConfig): Implement. Dumps the state of this MessageClass (Commentator::updateActivityReport): #if out estimated time * linbox/util/commentator.h (class Commentator): Make cnull no longer static * linbox/util/commentator.C (MessageClass::MessageClass): Accept max_depth and max_level parameters (Commentator::progress): Remove redundant isPrinted check (MessageClass::checkConfig): Return false if we get all the way through the loop 2002-03-27 Bradford Hovinen * tests/test-inverse.C (test*): Use commentator, kill report parameter * tests/test-generic.h (testTranpose): Use commentator, kill report parameter * tests/test-diagonal.C (test*): Use commentator, kill report parameter * tests/test-minpoly.C (test*): Use commentator, kill report parameter * tests/test-large-modular.C (main): Kill report * tests/test-sparse-matrix.C (test*): Use commentator, kill report parameter * tests/test-dense-matrix.C (testVandermonde, testIdentity): Use commentator, kill report parameter 2002-03-26 Bradford Hovinen * configure.in: Add default CXXFLAGS 2002-03-26 Bradford Hovinen * linbox/util/commentator.[Ch]: Complete rewrite * tests/test-*.C (main): Fix argument list * tests/test-large-modular.C (main): Update; add Dave Saunders to credits * tests/test-field-common.h (test_field): Rename to testField (testField): Remove report parameter; rename iters as iterations (testField): Fix indentation (testField): Use commentator 2002-03-24 Bradford Hovinen * linbox/algorithms/massey-domain.h (class MasseyDomain): Remove commentator; use global commentator instead. Update 2002-03-24 Bradford Hovinen * tests/test-common.C (parseArguments): Remove report argument (parseArguments): Use commentator to set default report file * tests/test-vector-domain.C (testDenseDotProduct): Use commentator 2002-03-19 Bradford Hovinen * linbox/blackbox/dense-matrix.h (class DenseMatrix): Use VectorDomain rather than MatrixDomain; typedef Vector and use it throughout (DenseMatrix::setEntry): Implement (DenseMatrix::rowdim, DenseMatrix::coldim): Fix signatures (DenseMatrix::clone): Define this; implementation deferred (DenseMatrix::DenseMatrix): Accept field and build VectorDomain object 2002-03-19 Bradford Hovinen * tests/test-field-common.h: Prevent multiple inclusion * tests/Makefile.am (TESTS): Beatify listing; put test-large-modular at top 2002-03-18 Bradford Hovinen * tests/test-diagonal.C (testRandomTranspose): Add this test * tests/test-common.h (applyPoly, multiEvalPoly): Return resulting vector (interpolatePoly): Implement * tests/Makefile.am (TESTS): Add test-dense-matrix 2002-03-15 Bradford Hovinen * tests/test-inverse.C (testVandermondeInverse): New test; construct the inverse of a Vandermonde matrix and check that it behaves correctly * tests/test-common.h (applyPoly): Use VectorDomain; typedef Vector to reduce verbosity (multiEvalPoly): Implement 2002-03-12 Bradford Hovinen * CHANGED-INTERFACES: Updated text * TODO: Updates 2002-03-12 Bradford Hovinen * examples/example.C: Update to new interface * linbox/blackbox/sparse-matrix-aux.h (LinBox): Rename references to MatrixDomain to VectorDomain (apply): Use vector domain dotprod * linbox/blackbox/inverse.h (LinBox): Use matrix domain vector axpy (LinBox): Compute the negative of the inverse of the constant coefficient first, then multiply through by that (Inverse): Rename MatrixDomain _MD to VectorDomain _VD * linbox/field/large-modular.h (LinBox): Rename ParamModular to LargeModular * linbox/field/Makefile.am (include_HEADERS): Rename param-modular.h to large-modular.h * linbox/field/vector-domain.[Ch]: Rename references to MatrixDomain to VectorDomain * linbox/field/Makefile.am (include_HEADERS): Rename matrix-domain.* to vector-domain.* * linbox/field/matrix-domain.h (LinBox): Add scalar-vector multiplication * linbox/field/matrix-domain.C (LinBox): Use FieldAXPY for dot products (MatrixDomain::axpy): Remember to increment i in the last loop (LinBox): Use axpy and axpyin when possible (LinBox): Specialize everything using MatrixDomainType rather than MatrixDomainSimpleType * linbox/randiter/large-modular.h: Rename ParamModularRandIter to LargeModularRandIter * linbox/randiter/Makefile.am (include_HEADERS): Rename param-modular.h to large-modular.h * tests/test-*.C: Update * tests/.cvsignore: Update * tests/test-vector-domain.C: Rename references to MatrixDomain to VectorDomain * tests/Makefile.am (test_vector_domain_SOURCES): Rename test-matrix-domain to test-vector-domain * tests/test-matrix-domain.C (testSparseAXPY, testDenseAXPY): Add these tests 2002-03-11 Bradford Hovinen * linbox/field/matrix-domain.C (LinBox): Remove precondition checks for sparse axpy (LinBox): Check that i has not gone past the end of y in the loop 2002-03-06 Bradford Hovinen * linbox/field/matrix-domain.h (LinBox): Remove definitions that derive from the field class; they are not necessary right now 2002-02-28 Bradford Hovinen * TODO: Added notes here 2002-02-28 Bradford Hovinen * linbox/field/matrix-domain.h (LinBox): Remove extraneous template specialization * linbox/field/matrix-domain.C (LinBox): Use _F.init to initialize field elements * linbox/field/matrix-domain.h: #include vector-traits.h * tests/test-common.h (printSparseSeqVector): Implement * tests/test-matrix-domain.C: Added this test 2002-02-27 Bradford Hovinen * doc/Makefile.am (SUBDIRS): Add $({DOCPLUSPLUS|TEX}_SUBDIRS) 2002-02-27 Bradford Hovinen * configure.in: Added doc/{html|tex}/Makefile; added call to check for Doc++; Add a check for latex and only build latex documentation if that is present (TEX_SUBDIRS): Make sure this gets included even if Doc++ isn't found * examples/example.C (main): Comment alignment fix * linbox/*/*.dxx: Update paths * Added missing *-wrappers.dxx * linbox/*/*.dxx: Update paths; add missing .dxx files * linbox/field/matrix-domain.h (LinBox): Add specialization for SparseSequence vectors 2002-02-20 Bradford Hovinen * tests/Makefile.am (noinst_PROGRAMS): Use $(TESTS) 2002-02-13 Bradford Hovinen * HACKING: Update information on directory structure * configure.in: Properly quote error message strings Use exit status 1 rather than -1 on error * HACKING: Added section with checklists for adding header files and tests to Linbox. * configure.in: Print error message if GMP was not found * HACKING: Update text (http): Added a section on having the right development tools and added some information on autogen.sh/configure options * CHANGED-INTERFACES: Update text 2002-02-09 Bradford Hovinen * COPYING: Copy over LGPL 2002-02-08 Bradford Hovinen * all: s/element_/Element_/g 2002-02-08 Saunders * examples/Makefile.am: change load order 2002-02-08 Bradford Hovinen * linbox/blackbox/inverse.h: Update #include vector-traits.h (Inverse): Correctly instantiate minpoly Include minpoly.h (class Inverse): Make _z mutable 2002-02-08 Saunders * macros/gmp-check.m4: set LD_LIBRARY_PATH 2002-02-08 Bradford Hovinen * macros/*-check.m4: Unset *_{CFLAGS|LIBS} if the library was not found Invoke found macro only if version check succeeded Invoke not found macro if version check failed 2002-02-08 Saunders * tests/Makefile.am: change link order. 2002-02-08 Bradford Hovinen * tests/test-inverse.C (main): Use prevprime(2^32) for default modulus (main): Fix banner * tests/test-diagonal.C (main): Use prevprime(2^32) for default modulus * tests/test-sparse-matrix.C (main): Use 101 for default modulus * tests/test-minpoly.C (main): Use prevprime(2^32) for default modulus * tests/Makefile.am (TESTS): Added test test-inverse 2002-02-07 Bradford Hovinen * tests/test-sparse-matrix.C (main): Use GF(65521) by default * tests/test-minpoly.C (main): Use GF(65521) by default * tests/test-diagonal.C (main): Use GF(65521) by default * tests/Makefile.am (TESTS): Added test test-diagonal * tests/test-sparse-matrix.C: Don't #include minpoly.h 2002-02-04 Bradford Hovinen * configure.in (AC_OUTPUT): Add examples/data/Makefile 2002-02-04 Bradford Hovinen * configure.in (CFLAGS): Make sure all CFLAGS variables make it in to compilations (CXXFLAGS): s/CFLAGS/CXXFLAGS/ * Makefile.am (SUBDIRS): Put examples last in the list * linbox/blackbox/sparse-matrix-aux.h (apply): Initialize *y_iter to 0 before looping * macros/ntl-check.m4: Correct check in error message * macros/*.m4: Remove setting LD_LIBRARY_PATH, etc. * tests/test-sparse-matrix.C (testNilpotentApply): Reset even with every iteration * tests/test-minpoly.C (testNilpotentMinpoly): Fix test of correctness * tests/test-common.h (printPolynomial): Write 0 for the zero polynomial (printPolynomial): Make sure 1 polynomial gets printed correctly * tests/test-minpoly.C (testIdentityMinpoly): Swap coefficients in the test * tests/test-minpoly.C (main): Update banner * tests/test-common.h (applyPoly): Implement; copy from linbox/blackbox/inverse.h * tests/test-sparse-matrix.C: Move minpoly tests to test-minpoly * tests/Makefile.am (TESTS): Add test test-minpoly 2002-02-03 Bradford Hovinen * */*.{C|h|inl}: Change Element to element, Integer to integer * */*.{C|h|inl}: Updated header comments to reflect correct filename locations * */.cvsignore: Added/updated .cvsignore files * configure.in: Add AC_PROG_CC, AC_PROG_RANLIB for building static libraries Add AM_PROG_LIBTOOL * */Makefile.am: Added infrastructure for building static library liblinbox.a so that we can avoid symbol collisions 2001-12-31 Bradford Hovinen * HACKING: Added documentation on coding style, fleshed out algorithms a bit linbox-1.3.2/INSTALL000066400000000000000000000366001176453053400140560ustar00rootroot00000000000000Installation Instructions ************************* Copyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. This file is offered as-is, without warranty of any kind. Basic Installation ================== Briefly, the shell commands `./configure; make; make install' should configure, build, and install this package. The following more-detailed instructions are generic; see the `README' file for instructions specific to this package. Some packages provide this `INSTALL' file but do not implement all of the features documented below. The lack of an optional feature in a given package is not necessarily a bug. More recommendations for GNU packages can be found in *note Makefile Conventions: (standards)Makefile Conventions. 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 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. Running `configure' might take a while. 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, generally using the just-built uninstalled binaries. 4. Type `make install' to install the programs and any data files and documentation. When installing into a prefix owned by root, it is recommended that the package be configured and built as a regular user, and only the `make install' phase executed with root privileges. 5. Optionally, type `make installcheck' to repeat any self-tests, but this time using the binaries in their final installed location. This target does not install anything. Running this target as a regular user, particularly if the prior `make install' required root privileges, verifies that the installation completed correctly. 6. 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. 7. Often, you can also type `make uninstall' to remove the installed files again. In practice, not all packages have tested that uninstallation works correctly, even though it is required by the GNU Coding Standards. 8. Some packages, particularly those that use Automake, provide `make distcheck', which can by used by developers to test that all other targets like `make install' and `make uninstall' work correctly. This target is generally not run by end users. 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=c99 CFLAGS=-g 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 can use 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 `..'. This is known as a "VPATH" build. With a non-GNU `make', it is safer 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. On MacOS X 10.5 and later systems, you can create libraries and executables that work on multiple system types--known as "fat" or "universal" binaries--by specifying multiple `-arch' options to the compiler but only a single `-arch' option to the preprocessor. Like this: ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ CPP="gcc -E" CXXCPP="g++ -E" This is not guaranteed to produce working output in all cases, you may have to build one architecture at a time and combine the results using the `lipo' tool if you have problems. Installation Names ================== By default, `make install' installs the package's commands under `/usr/local/bin', include files under `/usr/local/include', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=PREFIX', where PREFIX must be an absolute file name. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you pass the option `--exec-prefix=PREFIX' to `configure', the package uses PREFIX as the prefix for installing programs and libraries. Documentation and other data files 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. In general, the default for these options is expressed in terms of `${prefix}', so that specifying just `--prefix' will affect all of the other directory specifications that were not explicitly provided. The most portable way to affect installation locations is to pass the correct locations to `configure'; however, many packages provide one or both of the following shortcuts of passing variable assignments to the `make install' command line to change installation locations without having to reconfigure or recompile. The first method involves providing an override variable for each affected directory. For example, `make install prefix=/alternate/directory' will choose an alternate location for all directory configuration variables that were expressed in terms of `${prefix}'. Any directories that were specified during `configure', but not in terms of `${prefix}', must each be overridden at install time for the entire installation to be relocated. The approach of makefile variable overrides for each directory variable is required by the GNU Coding Standards, and ideally causes no recompilation. However, some platforms have known limitations with the semantics of shared libraries that end up requiring recompilation when using this method, particularly noticeable in packages that use GNU Libtool. The second method involves providing the `DESTDIR' variable. For example, `make install DESTDIR=/alternate/directory' will prepend `/alternate/directory' before all installation names. The approach of `DESTDIR' overrides is not required by the GNU Coding Standards, and does not work on platforms that have drive letters. On the other hand, it does better at avoiding recompilation issues, and works well even when some directory options were not specified in terms of `${prefix}' at `configure' time. Optional Features ================= 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'. 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. Some packages offer the ability to configure how verbose the execution of `make' will be. For these packages, running `./configure --enable-silent-rules' sets the default to minimal output, which can be overridden with `make V=1'; while running `./configure --disable-silent-rules' sets the default to verbose, which can be overridden with `make V=0'. Particular systems ================== On HP-UX, the default C compiler is not ANSI C compatible. If GNU CC is not installed, it is recommended to use the following options in order to use an ANSI C compiler: ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" and if that doesn't work, install pre-built binaries of GCC for HP-UX. HP-UX `make' updates targets which have the same time stamps as their prerequisites, which makes it generally unusable when shipped generated files such as `configure' are involved. Use GNU `make' instead. On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot parse its `' header file. The option `-nodtk' can be used as a workaround. If GNU CC is not installed, it is therefore recommended to try ./configure CC="cc" and if that doesn't work, try ./configure CC="cc -nodtk" On Solaris, don't put `/usr/ucb' early in your `PATH'. This directory contains several dysfunctional programs; working variants of these programs are available in `/usr/bin'. So, if you need `/usr/ucb' in your `PATH', put it _after_ `/usr/bin'. On Haiku, software installed for all users goes in `/boot/common', not `/usr/local'. It is recommended to use the following options: ./configure --prefix=/boot/common 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 option `--target=TYPE' 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 causes the specified `gcc' to be used as the C compiler (unless it is overridden in the site shell script). Unfortunately, this technique does not work for `CONFIG_SHELL' due to an Autoconf bug. Until the bug is fixed you can use this workaround: CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash `configure' Invocation ====================== `configure' recognizes the following options to control how it operates. `--help' `-h' Print a summary of all of the options to `configure', and exit. `--help=short' `--help=recursive' Print a summary of the options unique to this package's `configure', and exit. The `short' variant lists options used only in the top level, while the `recursive' variant lists options also present in any nested packages. `--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. `--prefix=DIR' Use DIR as the installation prefix. *note Installation Names:: for more details, including other options available for fine-tuning the installation locations. `--no-create' `-n' Run the configure checks, but stop before creating any output files. `configure' also accepts some other, not widely useful, options. Run `configure --help' for more details. linbox-1.3.2/Makefile.am000066400000000000000000000052341176453053400150600ustar00rootroot00000000000000# Copyright (c) 2010 the LinBox group # # ========LICENCE======== # This file is part of the library LinBox. # # LinBox is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # # This library 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 # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # ========LICENCE======== #/ ACLOCAL_AMFLAGS = -I macros SUBDIRS=linbox macros tests interfaces doc examples benchmarks # I intend to pare down the target "check" so as to be a smaller check used # at installation time with a focus on confirming that dependencies on # other packages and compilation environment are in order. In contrast, the # target "fullcheck" should become as exhaustive as possible to serve # developers for regression testing. -bds 2011Feb ...also benchmarks will be. # Fullcheck provides a full check for regression testing purposes. fullcheck: (${MAKE} ; cd tests; ${MAKE} fullcheck) docs:doc/linbox-html/index.html doc/linbox-html/index.html: (cd doc; ${MAKE} docs) docs_dev:doc/linbox-dev-html/pages.html doc/linbox-dev-html/pages.html: (cd doc; ${MAKE} docs_dev) examples: ( ${MAKE} ; cd examples; ${MAKE} examples) benchmarks: (cd benchmarks; ${MAKE} benchmarks) .PHONY:examples benchmarks bin_SCRIPTS=linbox-config bundled: sh auto-install.sh uninstall-hook: (test -d "$(includedir)/linbox" && rmdir "$(bindir)" \ "$(libdir)" \ "$(mandir)/man1" \ "$(mandir)" \ "$(includedir)/linbox/algorithms/gauss" \ "$(includedir)/linbox/algorithms" \ "$(includedir)/linbox/blackbox" \ "$(includedir)/linbox/element" \ "$(includedir)/linbox/field/Givaro" \ "$(includedir)/linbox/field/Modular" \ "$(includedir)/linbox/field/NTL" \ "$(includedir)/linbox/field/" \ "$(includedir)/linbox/kaapi" \ "$(includedir)/linbox/matrix" \ "$(includedir)/linbox/randiter" \ "$(includedir)/linbox/ring" \ "$(includedir)/linbox/solutions" \ "$(includedir)/linbox/switch" \ "$(includedir)/linbox/util/formats" \ "$(includedir)/linbox/util" \ "$(includedir)/linbox/vector" \ "$(includedir)/linbox" \ "$(datarootdir)/" \ "$(includedir)" ) || true VERSION=1.3.2 EXTRA_DIST=auto-install.sh #incremente-versions linbox-1.3.2/Makefile.in000066400000000000000000000762641176453053400151040ustar00rootroot00000000000000# Makefile.in generated by automake 1.11.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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@ # Copyright (c) 2010 the LinBox group # # ========LICENCE======== # This file is part of the library LinBox. # # LinBox is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # # This library 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 # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # ========LICENCE======== #/ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd 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 = : build_triplet = @build@ host_triplet = @host@ subdir = . DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/config.h.in \ $(srcdir)/linbox-config.in $(top_srcdir)/configure AUTHORS \ COPYING COPYING.LESSER ChangeLog INSTALL NEWS TODO \ build-aux/config.guess build-aux/config.sub \ build-aux/install-sh build-aux/ltmain.sh build-aux/missing ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/macros/aclocal-include.m4 \ $(top_srcdir)/macros/config-header.m4 \ $(top_srcdir)/macros/debug.m4 \ $(top_srcdir)/macros/expat-check.m4 \ $(top_srcdir)/macros/fflas-ffpack-check.m4 \ $(top_srcdir)/macros/fplll-check.m4 \ $(top_srcdir)/macros/givaro-check.m4 \ $(top_srcdir)/macros/gmp-check.m4 \ $(top_srcdir)/macros/iml-check.m4 \ $(top_srcdir)/macros/lapack-check.m4 \ $(top_srcdir)/macros/libtool.m4 \ $(top_srcdir)/macros/lidia-check.m4 \ $(top_srcdir)/macros/linbox-benchmark.m4 \ $(top_srcdir)/macros/linbox-doc.m4 \ $(top_srcdir)/macros/linbox-misc.m4 \ $(top_srcdir)/macros/linbox-opt.m4 \ $(top_srcdir)/macros/ltoptions.m4 \ $(top_srcdir)/macros/ltsugar.m4 \ $(top_srcdir)/macros/ltversion.m4 \ $(top_srcdir)/macros/lt~obsolete.m4 \ $(top_srcdir)/macros/m4ri-check.m4 \ $(top_srcdir)/macros/m4rie-check.m4 \ $(top_srcdir)/macros/maple-check.m4 \ $(top_srcdir)/macros/mpfr-check.m4 \ $(top_srcdir)/macros/ntl-check.m4 \ $(top_srcdir)/macros/saclib-check.m4 \ $(top_srcdir)/macros/sage-check.m4 $(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 config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = linbox-config CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(bindir)" SCRIPTS = $(bin_SCRIPTS) depcomp = am__depfiles_maybe = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir dist dist-all distcheck ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ if test -d "$(distdir)"; then \ find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -rf "$(distdir)" \ || { sleep 5 && rm -rf "$(distdir)"; }; \ else :; fi am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best distuninstallcheck_listfiles = find . -type f -print am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BLAS_CFLAGS = @BLAS_CFLAGS@ BLAS_LIBS = @BLAS_LIBS@ CC = @CC@ CCNAM = @CCNAM@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DBG = @DBG@ DEBUG_CFLAGS = @DEBUG_CFLAGS@ DEFAULT_CFLAGS = @DEFAULT_CFLAGS@ DEFS = @DEFS@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXPAT_CFLAGS = @EXPAT_CFLAGS@ EXPAT_LIBS = @EXPAT_LIBS@ FFLAS_FFPACK_CFLAGS = @FFLAS_FFPACK_CFLAGS@ FFLAS_FFPACK_LIBS = @FFLAS_FFPACK_LIBS@ FFLAS_FFPACK_LOC = @FFLAS_FFPACK_LOC@ FGREP = @FGREP@ FPLLL_CFLAGS = @FPLLL_CFLAGS@ FPLLL_LIBS = @FPLLL_LIBS@ GIVARO_CFLAGS = @GIVARO_CFLAGS@ GIVARO_LIBS = @GIVARO_LIBS@ GMP_CFLAGS = @GMP_CFLAGS@ GMP_LIBS = @GMP_LIBS@ GMP_VERSION = @GMP_VERSION@ GREP = @GREP@ IML_CFLAGS = @IML_CFLAGS@ IML_LIBS = @IML_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIDIA_CFLAGS = @LIDIA_CFLAGS@ LIDIA_LIBS = @LIDIA_LIBS@ LINBOX_BENCH_PATH = @LINBOX_BENCH_PATH@ LINBOX_DOC_PATH = @LINBOX_DOC_PATH@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ M4RIE_CFLAGS = @M4RIE_CFLAGS@ M4RIE_LIBS = @M4RIE_LIBS@ M4RI_CFLAGS = @M4RI_CFLAGS@ M4RI_LIBS = @M4RI_LIBS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAPLE_CFLAGS = @MAPLE_CFLAGS@ MAPLE_HOME = @MAPLE_HOME@ MAPLE_LIBS = @MAPLE_LIBS@ MAPLE_VERSION = @MAPLE_VERSION@ MKDIR_P = @MKDIR_P@ MPFR_CFLAGS = @MPFR_CFLAGS@ MPFR_LIBS = @MPFR_LIBS@ NM = @NM@ NMEDIT = @NMEDIT@ NTL_CFLAGS = @NTL_CFLAGS@ NTL_LIBS = @NTL_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PROF = @PROF@ RANLIB = @RANLIB@ RM = @RM@ SACLIB_CFLAGS = @SACLIB_CFLAGS@ SACLIB_LIBS = @SACLIB_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TESTS_CFLAGS = @TESTS_CFLAGS@ VERSION = 1.3.2 WARN = @WARN@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__leading_dot = @am__leading_dot@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ ACLOCAL_AMFLAGS = -I macros SUBDIRS = linbox macros tests interfaces doc examples benchmarks bin_SCRIPTS = linbox-config EXTRA_DIST = auto-install.sh all: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: am--refresh: Makefile @: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --gnu --ignore-deps'; \ $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu --ignore-deps \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu --ignore-deps Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu --ignore-deps Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): config.h: stamp-h1 @if test ! -f $@; then rm -f stamp-h1; else :; fi @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status config.h $(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) rm -f stamp-h1 touch $@ distclean-hdr: -rm -f config.h stamp-h1 linbox-config: $(top_builddir)/config.status $(srcdir)/linbox-config.in cd $(top_builddir) && $(SHELL) ./config.status $@ install-binSCRIPTS: $(bin_SCRIPTS) @$(NORMAL_INSTALL) @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n' \ -e 'h;s|.*|.|' \ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) { files[d] = files[d] " " $$1; \ if (++n[d] == $(am__install_max)) { \ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ else { print "f", d "/" $$4, $$1 } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binSCRIPTS: @$(NORMAL_UNINSTALL) @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 's,.*/,,;$(transform)'`; \ dir='$(DESTDIR)$(bindir)'; $(am__uninstall_files_from_dir) mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool config.lt # 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): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__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; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ 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 || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) $(am__remove_distdir) test -d "$(distdir)" || mkdir "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done -test -n "$(am__skip_mode_fix)" \ || find "$(distdir)" -type d ! -perm -755 \ -exec chmod u+rwx,go+rx {} \; -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 $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r "$(distdir)" dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 $(am__remove_distdir) dist-lzip: distdir tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz $(am__remove_distdir) dist-lzma: distdir tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma $(am__remove_distdir) dist-xz: distdir tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz $(am__remove_distdir) dist-tarZ: distdir tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__remove_distdir) dist-shar: distdir shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__remove_distdir) dist dist-all: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lzma*) \ lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\ *.tar.lz*) \ lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(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) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(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 \ && cd "$$am__cwd" \ || exit 1 $(am__remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: @test -n '$(distuninstallcheck_dir)' || { \ echo 'ERROR: trying to run $@ with an empty' \ '$$(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ $(am__cd) '$(distuninstallcheck_dir)' || { \ echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ || { 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 $(SCRIPTS) config.h installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -f Makefile distclean-am: clean-am distclean-generic distclean-hdr \ distclean-libtool distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-binSCRIPTS install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-binSCRIPTS @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) uninstall-hook .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all \ ctags-recursive install-am install-strip tags-recursive \ uninstall-am .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am am--refresh check check-am clean clean-generic \ clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \ dist-gzip dist-lzip dist-lzma dist-shar dist-tarZ dist-xz \ dist-zip distcheck distclean distclean-generic distclean-hdr \ distclean-libtool distclean-tags distcleancheck distdir \ distuninstallcheck dvi dvi-am html html-am info info-am \ install install-am install-binSCRIPTS install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-am uninstall-binSCRIPTS uninstall-hook # I intend to pare down the target "check" so as to be a smaller check used # at installation time with a focus on confirming that dependencies on # other packages and compilation environment are in order. In contrast, the # target "fullcheck" should become as exhaustive as possible to serve # developers for regression testing. -bds 2011Feb ...also benchmarks will be. # Fullcheck provides a full check for regression testing purposes. fullcheck: (${MAKE} ; cd tests; ${MAKE} fullcheck) docs:doc/linbox-html/index.html doc/linbox-html/index.html: (cd doc; ${MAKE} docs) docs_dev:doc/linbox-dev-html/pages.html doc/linbox-dev-html/pages.html: (cd doc; ${MAKE} docs_dev) examples: ( ${MAKE} ; cd examples; ${MAKE} examples) benchmarks: (cd benchmarks; ${MAKE} benchmarks) .PHONY:examples benchmarks bundled: sh auto-install.sh uninstall-hook: (test -d "$(includedir)/linbox" && rmdir "$(bindir)" \ "$(libdir)" \ "$(mandir)/man1" \ "$(mandir)" \ "$(includedir)/linbox/algorithms/gauss" \ "$(includedir)/linbox/algorithms" \ "$(includedir)/linbox/blackbox" \ "$(includedir)/linbox/element" \ "$(includedir)/linbox/field/Givaro" \ "$(includedir)/linbox/field/Modular" \ "$(includedir)/linbox/field/NTL" \ "$(includedir)/linbox/field/" \ "$(includedir)/linbox/kaapi" \ "$(includedir)/linbox/matrix" \ "$(includedir)/linbox/randiter" \ "$(includedir)/linbox/ring" \ "$(includedir)/linbox/solutions" \ "$(includedir)/linbox/switch" \ "$(includedir)/linbox/util/formats" \ "$(includedir)/linbox/util" \ "$(includedir)/linbox/vector" \ "$(includedir)/linbox" \ "$(datarootdir)/" \ "$(includedir)" ) || true #incremente-versions # 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: linbox-1.3.2/NEWS000066400000000000000000000017451176453053400135260ustar00rootroot00000000000000Version 0.1.2, 28 August 2002 - Fixed documentation build problems - Made documentation building optional, using --enable arguments - Added field () method to SparseMatrix0 - Added ability to detect that a GMP prefix given is for an uninstalled copy Version 0.1.1, 27 August 2002 - Fixed memory leak in BlackboxContainerBase - Size checking at build time and definition of data types int8, int16, int32, int64 and unsigned variants, guaranteed to be of their respective lengths. Specializations of Modular have been updated to use these types - Performance tweaks to Modular specialization of dot product - New test suites for the commentator and butterfly preconditioner - Numerous commentator bugfixes and output tweaks - Removed inefficiency in the Modular random iterator - Reorganization and simplification of modular, vector domain, and sparse matrix tests - Enhancements and fixes in the build system - Various other bugfixes and enhancementslinbox-1.3.2/README000066400000000000000000000013211176453053400136750ustar00rootroot00000000000000 ****** The Linbox Library ****** PURPOSE: The Linbox library provides functionalities for exact linear algebra. See doc/mainpage.doxy for more info. INSTALLATION: See doc/install*html for particulars. See INSTALL for generic installation information. AVAILABILITY: from linalg.org REQUIREMENTS: GMP, ATLAS (or other cblas, lapack), NTL, Givaro See doc/install*html for details. This library requires the GNU C++ compiler (gcc-4.3 or newer) or any compiler supporting advanced template features. ========================================================== The linbox website is http://linalg.org Corrections, suggestions and comments to : linbox-use@googlegroups.com Last update : 2009 September linbox-1.3.2/TODO000066400000000000000000000016201176453053400135070ustar00rootroot00000000000000cvs rm field/matrix-domain.C (after verifying uselessness) cvs rm randiter/archetype.doxy file docs of examples fixed file docs of */archetype.h removed eliminate */archetype.doxy's ? eliminate randiter/randiters.doxy's ? resolve modular-balance-int32 vs modular-int32 wierdness (same ifndef, can't coexist?). ------- older below ----------- - Test suite for random iterators - Test suite for vector stream - Import commentator time estimate code - - Everything in tests/TODO Before meeting: - Complete GF2 tests and get them working (BitVector tested implicitly) - Write tests for Compose, Permutation, Transpose - Add DenseRowsMatrix test to matrix-domain test suite - Fix filenames in CVS - Updates to Jean-Guillaume's gauss code? - Add solver, determinant to Jean-Guillaume's code? - Add more pivoting strategies? - New Compose implementation? ---- - NoCblasErrorChecks on release version ? linbox-1.3.2/aclocal.m4000066400000000000000000001075401176453053400146670ustar00rootroot00000000000000# generated automatically by aclocal 1.11.5 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2007, 2008, 2009, 2010, 2011 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. m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, [m4_warning([this file was generated for autoconf 2.69. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically `autoreconf'.])]) # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software # Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 1 # 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. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.11' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. m4_if([$1], [1.11.5], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) # _AM_AUTOCONF_VERSION(VERSION) # ----------------------------- # aclocal traces this macro to find the Autoconf version. # This is a private macro too. Using m4_define simplifies # the logic in aclocal, which can simply ignore this definition. m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.11.5])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 1 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to # `$srcdir', `$srcdir/..', or `$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is `.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [dnl Rely on autoconf to set up CDPATH properly. AC_PREREQ([2.50])dnl # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 9 # 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])dnl AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl _AM_SUBST_NOTMAKE([$1_FALSE])dnl m4_define([_AM_COND_VALUE_$1], [$2])dnl if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009, # 2010, 2011 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 12 # 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], UPC, [depcc="$UPC" am_compiler_list=], [$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'. rm -rf conftest.dir 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 am__universal=false m4_case([$1], [CC], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac], [CXX], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac]) 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 # 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. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; 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 ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj 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='\' am__nodep='_no' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH])dnl _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl AC_SUBST([am__nodep])dnl _AM_SUBST_NOTMAKE([am__nodep])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. #serial 5 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ # Autoconf 2.62 quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf 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. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` AS_MKDIR_P([$dirpart/$fdir]) # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking # is enabled. FIXME. This creates each `.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 8 # 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 -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2008, 2009 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 16 # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.62])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 if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl # test to see if srcdir already configured if test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi 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 dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, [m4_fatal([AC_INIT should be called with package and version arguments])])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) AC_REQUIRE([AM_PROG_INSTALL_SH])dnl AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl AC_REQUIRE([AM_PROG_MKDIR_P])dnl # We need awk for the "check" target. The system "awk" is bad on # some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES(CC)], [define([AC_PROG_CC], defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES(CXX)], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES(OBJC)], [define([AC_PROG_OBJC], defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl ]) _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl dnl The `parallel-tests' driver may need to know about EXEEXT, so add the dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl ]) dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further dnl mangled by Autoconf and run in a shell conditional statement. m4_define([_AC_COMPILER_EXEEXT], m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) # 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_arg=$1 _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation, # Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 1 # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi AC_SUBST(install_sh)]) # Copyright (C) 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Add --enable-maintainer-mode option to configure. -*- Autoconf -*- # From Jim Meyering # Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008, # 2011 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 5 # AM_MAINTAINER_MODE([DEFAULT-MODE]) # ---------------------------------- # Control maintainer-specific portions of Makefiles. # Default is to disable them, unless `enable' is passed literally. # For symmetry, `disable' may be passed as well. Anyway, the user # can override the default with the --enable/--disable switch. AC_DEFUN([AM_MAINTAINER_MODE], [m4_case(m4_default([$1], [disable]), [enable], [m4_define([am_maintainer_other], [disable])], [disable], [m4_define([am_maintainer_other], [enable])], [m4_define([am_maintainer_other], [enable]) m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) dnl maintainer-mode's default is 'disable' unless 'enable' is passed AC_ARG_ENABLE([maintainer-mode], [ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful (and sometimes confusing) to the casual installer], [USE_MAINTAINER_MODE=$enableval], [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) AC_MSG_RESULT([$USE_MAINTAINER_MODE]) AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) MAINT=$MAINTAINER_MODE_TRUE AC_SUBST([MAINT])dnl ] ) AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 6 # 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 AC_REQUIRE_AUX_FILE([missing])dnl if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= AC_MSG_WARN([`missing' script is too old or missing]) fi ]) # Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation, # Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 1 # AM_PROG_MKDIR_P # --------------- # Check for `mkdir -p'. AC_DEFUN([AM_PROG_MKDIR_P], [AC_PREREQ([2.60])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, dnl while keeping a definition of mkdir_p for backward compatibility. dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of dnl Makefile.ins that do not define MKDIR_P, so we do our own dnl adjustment using top_builddir (which is defined more often than dnl MKDIR_P). AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl case $mkdir_p in [[\\/$]]* | ?:[[\\/]]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac ]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software # Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 5 # _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], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 5 # 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 # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[[\\\"\#\$\&\'\`$am_lf]]*) AC_MSG_ERROR([unsafe absolute working directory name]);; esac case $srcdir in *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; esac # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi rm -f conftest.file if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT(yes)]) # Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 1 # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor `install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in `make install-strip', and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be `maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 3 # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. # This macro is traced by Automake. AC_DEFUN([_AM_SUBST_NOTMAKE]) # AM_SUBST_NOTMAKE(VARIABLE) # -------------------------- # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of `v7', `ustar', or `pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AC_SUBST([AMTAR], ['$${TAR-tar}']) m4_if([$1], [v7], [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], [m4_case([$1], [ustar],, [pax],, [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' _am_tools=${am_cv_prog_tar_$1-$_am_tools} # Do not fold the above two line into one, because Tru64 sh and # Solaris sh will not grok spaces in the rhs of `-'. for _am_tool in $_am_tools do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR m4_include([macros/aclocal-include.m4]) m4_include([macros/config-header.m4]) m4_include([macros/debug.m4]) m4_include([macros/expat-check.m4]) m4_include([macros/fflas-ffpack-check.m4]) m4_include([macros/fplll-check.m4]) m4_include([macros/givaro-check.m4]) m4_include([macros/gmp-check.m4]) m4_include([macros/iml-check.m4]) m4_include([macros/lapack-check.m4]) m4_include([macros/libtool.m4]) m4_include([macros/lidia-check.m4]) m4_include([macros/linbox-benchmark.m4]) m4_include([macros/linbox-doc.m4]) m4_include([macros/linbox-misc.m4]) m4_include([macros/linbox-opt.m4]) m4_include([macros/ltoptions.m4]) m4_include([macros/ltsugar.m4]) m4_include([macros/ltversion.m4]) m4_include([macros/lt~obsolete.m4]) m4_include([macros/m4ri-check.m4]) m4_include([macros/m4rie-check.m4]) m4_include([macros/maple-check.m4]) m4_include([macros/mpfr-check.m4]) m4_include([macros/ntl-check.m4]) m4_include([macros/saclib-check.m4]) m4_include([macros/sage-check.m4]) linbox-1.3.2/auto-install.sh000077500000000000000000000466721176453053400160120ustar00rootroot00000000000000#!/bin/bash - # Copyright(c) 2011 LinBox # Written by BB # see COPYING for more details. # TODO : create .extracted, .configured, .build, .installed and use a switch # (like --force) when you want to rebuild # TODO : manage icc/gcc # TODO : add gmp in givaro and use auto-install in givaro # TODO : use an optionnal message in die function. # TODO : rpath instead of LD_LIBRARY_PATH ? STABLE_FFLAS=1.6.0 STABLE_GIVARO=3.7.0 GIV_TAR=207 GIV_MD5=208 #switches STABLE_VAR="true" DEBUG="" DEBUG_VAR="" WARNINGS="" WARNINGS_VAR="" OPTIM="--enable-optimization" OPTIM_VAR="" CHECK_VAR="" #options PREFIX_LOC="/tmp" PREFIX_VAR="" PREFIX="--prefix=$PREFIX_LOC" BLAS="" BLAS_VAR="" NTL="--with-ntl" NTL_VAR="" EXTRA="" EXTRA_VAR="" IML="--with-iml" IML_VAR="" SAGE="" SAGE_VAR="false" DRIV="" DRIV_VAR="false" MAKEOPT= MAKE_VAR="" DONE="\033[0;36m done !\033[0m" BEG="\033[1;32m * \033[0m" ######### # die # ######### die() { echo -ne "\n\033[1;31m * \033[0mfailed" ; if [[ -n $1 ]] ; then echo " ($1)" else echo "." fi exit -1 ; } cool() { echo -e $DONE } ############## # helper # ############## help() { echo echo " script for building and installing linbox the simple way (hopefully)" echo echo " * usage :" echo echo " --stable=[yes,no] : install latest stable versions or latest svn versions." echo " Default : yes, even if switch ommitted. No argument means yes" echo " --prefix=MY/PATH : install all libraries under MY/PATH." echo " Default : /tmp/" echo echo " >> Libraries to search for <<" echo echo " If some library cannot be linked, don't forget to export LD_LIBRARY_PATH ! " echo echo " --with-gmp=GMP/PATH : tell where gmp is." echo " Default : /usr, /usr/local. No argument is Default" echo " --with-blas=BLAS/PATH : same as GMP for BLAS. (will check anyway)" echo " --with-ntl=NTL/PATH : same as GMP for NTL. (default)" echo " --with-iml=IML/PATH : same as GMP for IML. (default)" echo " --extra-flags=\"\" : give extra compiler flags." echo " Default : empty" echo " --make-flags=\"\" : give extra makefile flags." echo " Default : empty" echo echo " >> for the next switches, nothing, Y, y, yes or 1 after \"=\" <<" echo " >> means enabled. Anything else or omission means disabled <<" echo echo " --enable-debug : build in debugging mode." echo " Default : disabled." echo " --enable-check : run make check." echo " Default : disabled." echo " --enable-warnings : build with extra compile warnings." echo " Default : disabled. May be \'full\' " echo " --enable-optimization : build with compile-time optimization." echo " Default : enabled." echo " --enable-sage : build with sage support." echo " Default : disabled." echo " --enable-drivers : build with drivers support." echo " Default : disabled." echo echo " >> calling helllp <<" echo echo " --help, -h, -? : print help and exit." } ############ # parser # ############ for i in "$@" ; do case "$i" in # switches "--help"|"-h"|"-?") help exit 0 ;; "--stable") if [ "x$STABLE_VAR" = "xfalse" ] ; then echo "stable or not ?"; help ; exit -1 ; fi STABLE_VAR=true; ;; "--enable-debug") if [ "x$DEBUG_VAR" = "xfalse" ] ; then echo "enable-debug or not ?" ; help ; exit -1 ; fi DEBUG="$i"; DEBUG_VAR="true"; ;; "--enable-check") if [ "x$CHECK_VAR" = "xfalse" ] ; then echo "enable-check or not ?"; help ; exit -1; fi CHECK_VAR="true"; ;; "--enable-warnings") if [ "x$WARNINGS_VAR" = "xfalse" ] ; then echo "enable-warnings or not ?"; help ; exit -1; fi WARNINGS="$i"; WARNINGS_VAR="true"; ;; "--enable-optimization") if [ "x$OPTIM_VAR" = "xfalse" ] ; then echo "enable-optimization or not ?"; help ; exit -1; fi OPTIM="$i"; OPTIM_VAR="true"; ;; "--disable-debug") if [ "x$DEBUG_VAR" = "xtrue" ] ; then echo "enable-debug or not ?" ; help ; exit -1 ; fi DEBUG_VAR="false"; ;; "--disable-check") if [ "x$CHECK_VAR" = "xtrue" ] ; then echo "enable-check or not ?"; help ; exit -1; fi CHECK_VAR="false"; ;; "--disable-warnings") if [ "x$WARNINGS_VAR" = "xtrue" ] ; then echo "enable-warnings or not ?"; help ; exit -1; fi WARNINGS_VAR="false"; ;; "--disable-optimization") if [ "x$OPTIM_VAR" = "xtrue" ] ; then echo "enable-optimization or not ?"; help ; exit -1; fi OPTIM_VAR="false"; ;; "--with-ntl") if [ "x$NTL_VAR" = "xfalse" ] ; then echo "with-ntl or not ?"; help ; exit -1; fi NTL="$i"; NTL_VAR="true"; ;; "--with-gmp") if [ "x$GMP_VAR" = "xfalse" ] ; then echo "with-gmp or not ?"; help ; exit -1; fi GMP="$i" GMP_VAR="true" ;; "--with-iml") if [ "x$IML_VAR" = "xfalse" ] ; then echo "with-iml or not ?"; help ; exit -1; fi IML="$i " IML_VAR="true" ;; "--enable-sage") if [ "x$SAGE_VAR" = "xfalse" ] ; then echo "enable-sage or not ?"; help ; exit -1; fi SAGE="$i" SAGE_VAR="true" ;; "--enable-drivers") if [ "x$DRIV_VAR" = "xfalse" ] ; then echo "enable-drivers or not ?" ; help ; exit -1; fi DRIV="$i" DRIV_VAR="true" ;; "--disable-sage") if [ "x$SAGE_VAR" = "xtrue" ] ; then echo "enable-sage or not ?"; help ; exit -1; fi SAGE="" SAGE_VAR="false" ;; "--disable-drivers") if [ "x$DRIV_VAR" = "xtrue" ] ; then echo "enable-drivers or not ?" ; help ; exit -1; fi DRIV="" DRIV_VAR="false" ;; *) if [[ ! "$i" =~ --.*=.+ ]] ; then echo "bad switch : $i" help ; exit -1 ; fi # options (now we can cut) QUI="`echo $i | cut -d'=' -f1`" QUOI="`echo $i | cut -d'=' -f2`" # echo "$QUI = $QUOI" case "$QUI" in "--stable") OK=2 [[ "$QUOI" = "yes" ]] && OK=1 [[ "$QUOI" = "no" ]] && OK=0 if [[ "$OK" = "2" ]] ; then echo "stable=[yes/no] !" ; help ; exit -1 ; fi [[ "OK" = "1" ]] && STABLE_VAR="true" || STABLE_VAR="false" ;; "--prefix") if [ "x$PREFIX_VAR" = "xtrue" ] ; then echo "prefix already set ?" ; help ; exit -1; fi PREFIX=$i PREFIX_LOC=$QUOI PREFIX_VAR="true" ;; "--extra-flags") if [ "x$EXTRA_VAR" = "xtrue" ] ; then echo "extra-flags already set ?" ; help ; exit -1; fi EXTRA="$QUOI" EXTRA_VAR="true" ;; "--make-flags") if [ "x$MAKE_VAR" = "xtrue" ] ; then echo "make-flags already set ?" ; help ; exit -1; fi MAKEOPT="$QUOI" MAKE_VAR="true" ;; "--with-gmp") if [ "x$GMP_VAR" = "xtrue" ] ; then echo "GMP path already set ?" ; help ; exit -1; fi GMP="$i" GMP_VAR="true" ;; "--with-blas") if [ "x$BLAS_VAR" = "xtrue" ] ; then echo "GMP path already set ?" ; help ; exit -1; fi BLAS=$QUI=\"$QUOI\" BLAS_VAR="true" ;; "--with-ntl") if [ "x$NTL_VAR" = "xtrue" ] ; then echo "NTL path already set ?" ; help ; exit -1; fi NTL="$i" NTL_VAR="true" ;; "--with-iml") if [ "x$IML_VAR" = "xtrue" ] ; then echo "IML path already set ?" ; help ; exit -1; fi IML="$i" IML_VAR="true" ;; "--enable-optimization") [[ "$QUOI" =~ y|yes|Y|1 ]] && OK=1 || OK=0 if [ "x$OPTIM_VAR" = "xtrue" -a "OK" = "0" ] ; then echo "optim or not optim ?" ; help ; exit -1; fi if [ "x$OPTIM_VAR" = "xfalse" -a "OK" = "1" ] ; then echo "optim or not optim ?" ; help ; exit -1; fi if [[ "x$OK" = "x1" ]] ; then OPTIM=$QUI ; OPTIM_VAR="true" ; else OPTIM_VAR="false" ; fi ;; "--enable-warnings") [[ "$QUOI" =~ y|yes|Y|1|full ]] && OK=1 || OK=0 if [ "x$WARNING_VAR" = "xtrue" -a "OK" = "0" ] ; then echo "warning or not warning ?" ; help ; exit -1; fi if [ "x$WARNING_VAR" = "xfalse" -a "OK" = "1" ] ; then echo "warning or not warning ?" ; help ; exit -1; fi if [[ "x$OK" = "x1" ]] ; then WARNINGS=$QUI ; WARNING_VAR="true" else WARNING_VAR="false" fi [[ "x$QUOI" = "xfull" ]] && WARNINGS=$i ;; "--enable-debug") [[ "$QUOI" =~ y|yes|Y|1 ]] && OK=1 || OK=0 if [ "x$DEBUG_VAR" = "xtrue" -a "OK" = "0" ] ; then echo "debug or not debug ?" ; help ; exit -1; fi if [ "x$DEBUG_VAR" = "xfalse" -a "OK" = "1" ] ; then echo "debug or not debug ?" ; help ; exit -1; fi if [[ "x$OK" = "x1" ]] ; then DEBUG=$QUI ; DEBUG_VAR="true" else DEBUG_VAR="false" fi ;; "--enable-check") [[ "$QUOI" =~ y|yes|Y|1 ]] && OK=1 || OK=0 if [ "x$CHECK_VAR" = "xtrue" -a "OK" = "0" ] ; then echo "check or not check ?" ; help ; exit -1; fi if [ "x$CHECK_VAR" = "xfalse" -a "OK" = "1" ] ; then echo "check or not check ?" ; help ; exit -1; fi if [[ "x$OK" = "x1" ]] ; then CHECK=$QUI ; CHECK_VAR="true" else CHECK_VAR="false" fi ;; "--enable-sage") [[ "$QUOI" =~ y|yes|Y|1 ]] && OK=1 || OK=0 if [ "x$OPTIM_VAR" = "xtrue" -a "OK" = "0" ] ; then echo "sage or not sage ?" ; help ; exit -1; fi if [ "x$OPTIM_VAR" = "xfalse" -a "OK" = "1" ] ; then echo "sage or not sage ?" ; help ; exit -1; fi if [[ "x$OK" = "x1" ]] ; then OPTIM=$QUI ; OPTIM_VAR="true" else OPTIM_VAR="false" fi ;; "--enable-drivers") [[ "$QUOI" =~ y|yes|Y|1 ]] && OK=1 || OK=0 if [ "x$OPTIM_VAR" = "xtrue" -a "OK" = "0" ] ; then echo "drivers or not drivers ?" ; help ; exit -1; fi if [ "x$OPTIM_VAR" = "xfalse" -a "OK" = "1" ] ; then echo "drivers or not drivers ?" ; help ; exit -1; fi if [[ "x$OK" = "x1" ]] ; then DRIV=$QUI ; DRIV_VAR="true" else DRIV_VAR="false" fi ;; *) echo "unkown swith option $i" ; help ; exit -1 ; ;; esac ;; esac done MAKEPROG="make ${MAKEOPT}" ###################### # create build dir # ###################### #first tee creates a new log. echo -en "${BEG}Preparing build directory..."| tee auto-install.log if [ -e build ] ; then if [ ! -d build ] ; then rm -rf build ; mkdir build; fi # echo -n "emptying build directory..." # rm -rf build/ # mkdir build else # echo -n "creating empty build directory..." mkdir build fi cool #################### # fectch sources # #################### cd build ; ### Givaro ### echo -en "${BEG}fetching Givaro..."| tee -a ../auto-install.log if [ "$STABLE_VAR" = "true" ]; then if [ -f givaro-$STABLE_GIVARO.tar.gz ] ; then echo -ne " already there!\n" echo -ne "${BEG}fetching md5sum" ; [ -f givaro-$STABLE_GIVARO.tar.gz.md5sum ] && rm givaro-${STABLE_GIVARO}.tar.gz.md5sum ; wget --no-check-certificate https://forge.imag.fr/frs/download.php/$GIV_MD5/givaro-$STABLE_GIVARO.tar.gz.md5sum >/dev/null 2>&1 || die [ -f givaro-$STABLE_GIVARO.tar.gz.md5sum ] || die cool echo -ne "${BEG}" md5sum -c givaro-$STABLE_GIVARO.tar.gz.md5sum || die else wget --no-check-certificate https://forge.imag.fr/frs/download.php/$GIV_TAR/givaro-$STABLE_GIVARO.tar.gz >/dev/null 2>&1 || die [ -f givaro-$STABLE_GIVARO.tar.gz ] || die echo -ne "${BEG}fetching md5sum" ; wget --no-check-certificate https://forge.imag.fr/frs/download.php/$GIV_MD5/givaro-$STABLE_GIVARO.tar.gz.md5sum >/dev/null 2>&1 || die cool echo -ne "${BEG}" md5sum -c givaro-$STABLE_GIVARO.tar.gz.md5sum || die fi else OK=0 ; svn co svn://scm.forge.imag.fr/var/lib/gforge/chroot/scmrepos/svn/givaro/trunk 2>&1 >/dev/null && OK=1 [ "$OK" = "1" ] && cool || die fi ### Fflas-ffpack ### echo -en "${BEG}fetching Fflas-Ffpack..."| tee -a ../auto-install.log if [ "$STABLE_VAR" = "true" ]; then if [ -f fflas-ffpack-$STABLE_FFLAS.tar.gz ] ; then echo -ne " already there!\n" echo -ne "${BEG}fetching md5sum" ; [ -f fflas-ffpack-$STABLE_FFLAS.tar.gz.md5sum ] && rm fflas-ffpack-${STABLE_FFLAS}.tar.gz.md5sum ; wget http://linalg.org/fflas-ffpack-$STABLE_FFLAS.tar.gz.md5sum >/dev/null 2>&1 || die [ -f fflas-ffpack-$STABLE_FFLAS.tar.gz.md5sum ] || die cool echo -ne "${BEG}" md5sum -c fflas-ffpack-$STABLE_FFLAS.tar.gz.md5sum || die else wget http://linalg.org/fflas-ffpack-$STABLE_FFLAS.tar.gz >/dev/null 2>&1 || die [ -f fflas-ffpack-$STABLE_FFLAS.tar.gz ] || die echo -ne "${BEG}fetching md5sum" ; wget http://linalg.org/fflas-ffpack-$STABLE_FFLAS.tar.gz.md5sum >/dev/null 2>&1 || die cool echo -ne "${BEG}" md5sum -c fflas-ffpack-$STABLE_FFLAS.tar.gz.md5sum || die fi else OK=0 ; svn co svn://linalg.org/fflas-ffpack 2>&1 >/dev/null && OK=1 [ "$OK" = "1" ] && cool || die fi ##################### # extract sources # ##################### ### Givaro ### OK=0 if [ "$STABLE_VAR" = "true" ]; then echo -en "${BEG}extracting Givaro..."| tee -a ../auto-install.log tar xzf givaro-$STABLE_GIVARO.tar.gz && OK=1 [ "$OK" = "1" ] && cool || die fi ### Fflas-ffpack ### OK=0 if [ "$STABLE_VAR" = "true" ]; then echo -en "${BEG}extracting Fflas-Ffpack..."| tee -a ../auto-install.log tar xzf fflas-ffpack-$STABLE_FFLAS.tar.gz && OK=1 [ "$OK" = "1" ] && cool || die fi #################### # install Givaro # #################### if [ "$STABLE_VAR" = "true" ]; then cd givaro-$STABLE_GIVARO || die else cd trunk/ || die fi if [ -f Makefile ] ; then echo -e "${BEG}cleaning Givaro..."| tee -a ../../auto-install.log ${MAKEPROG} clean | tee -a ../../auto-install.log|| die ${MAKEPROG} distclean | tee -a ../../auto-install.log|| die # ${MAKEPROG} unistall || die cool fi echo -e "${BEG}configuring Givaro..." if [ "$STABLE_VAR" = "true" ]; then echo "./configure $PREFIX $DEBUG $OPTIM $GMP $WARNINGS " echo "./configure $PREFIX $DEBUG $OPTIM $GMP $WARNINGS " > configure.givaro.exe chmod +x configure.givaro.exe ./configure.givaro.exe | tee -a ../../auto-install.log rm -rf configure.givaro.exe #./configure $PREFIX $DEBUG $OPTIM $GMP $WARNINGS || die else echo "./autogen.sh $PREFIX $DEBUG $OPTIM $GMP $WARNINGS" echo "./autogen.sh $PREFIX $DEBUG $OPTIM $GMP $WARNINGS" > autogen.givaro.exe chmod +x autogen.givaro.exe ./autogen.givaro.exe| tee -a ../../auto-install.log rm -rf autogen.givaro.exe #./autogen.sh $PREFIX $DEBUG $OPTIM $GMP $WARNINGS || die fi echo -e "${BEG}building Givaro..."| tee -a ../../auto-install.log echo "${MAKEPROG} CXXFLAGS+=\"$EXTRA\" LDFLAGS+=\"-Wl,-rpath,$PREFIX_LOC\""| tee -a ../../auto-install.log if [ -n "$EXTRA" ] ; then ${MAKEPROG} "CXXFLAGS+=\"$EXTRA\" LDFLAGS+=\"-Wl,-rpath,$PREFIX_LOC\"" | tee -a ../../auto-install.log|| die else ${MAKEPROG} | tee -a ../../auto-install.log|| die fi if [ "$CHECK_VAR" = "true" ] ; then echo -e "${BEG}checking Fflas-Ffpack..."| tee -a ../../auto-install.log ${MAKEPROG} check | tee -a ../../auto-install.log|| die fi echo -e "${BEG}installing Givaro..."| tee -a ../../auto-install.log ${MAKEPROG} install | tee -a ../../auto-install.log|| die #return in build cd .. export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${PREFIX_LOC}/lib cool| tee -a ../auto-install.log ########################## # install fflas-ffpack # ########################## if [ "$STABLE_VAR" = "true" ]; then cd fflas-ffpack-$STABLE_FFLAS/ || die else cd fflas-ffpack/ || die fi if [ -f Makefile ] ; then echo -e "${BEG}cleaning Fflas-Ffpack..."| tee -a ../../auto-install.log ${MAKEPROG} clean | tee -a ../../auto-install.log|| die ${MAKEPROG} distclean | tee -a ../../auto-install.log|| die # ${MAKEPROG} unistall || die cool| tee -a ../../auto-install.log fi echo -e "${BEG}configuring Fflas-Ffpack..."| tee -a ../../auto-install.log if [ "$STABLE_VAR" = "true" ]; then echo "./configure $PREFIX $DEBUG $OPTIM $BLAS $WARNINGS"| tee -a ../../auto-install.log echo "./configure $PREFIX $DEBUG $OPTIM $BLAS $WARNINGS" > configure.fflas.exe chmod +x configure.fflas.exe ./configure.fflas.exe| tee -a ../../auto-install.log rm -rf configure.fflas.exe #./configure "$PREFIX" "$DEBUG" "$OPTIM" "$BLAS" "$GIVARO" "$WARNINGS" || die else echo "./autogen.sh $PREFIX $DEBUG $OPTIM $BLAS $WARNINGS"| tee -a ../../auto-install.log echo "./autogen.sh $PREFIX $DEBUG $OPTIM $BLAS $WARNINGS" > configure.fflas.exe chmod +x configure.fflas.exe ./configure.fflas.exe| tee -a ../../auto-install.log rm -rf configure.fflas.exe #./autogen.sh "$PREFIX" "$DEBUG" "$OPTIM" "$BLAS" "$GIVARO" "$WARNINGS" || die fi echo -e "${BEG}building Fflas-Ffpack..."| tee -a ../../auto-install.log echo "${MAKEPROG} CXXFLAGS+=\"$EXTRA\"" if [ -n "$EXTRA" ] ; then ${MAKEPROG} "CXXFLAGS+=\"$EXTRA\"" | tee -a ../../auto-install.log|| die else ${MAKEPROG} | tee -a ../../auto-install.log|| die fi if [ "$CHECK_VAR" = "true" ] ; then echo -e "${BEG}checking Fflas-Ffpack..."| tee -a ../../auto-install.log ${MAKEPROG} check | tee -a ../../auto-install.log|| die fi echo -e "${BEG}installing Fflas-Ffpack..." ${MAKEPROG} install | tee -a ../../auto-install.log|| die cool| tee -a ../../auto-install.log #return in build cd .. #return in linbox cd .. ##################### # cleaning LinBox # ##################### if [ -f Makefile ] ; then echo -e "${BEG}cleaning LinBox..."| tee -a ./auto-install.log ${MAKEPROG} clean | tee -a ./auto-install.log|| die ${MAKEPROG} distclean | tee -a ./auto-install.log|| die # ${MAKEPROG} unistall || die cool| tee -a ./auto-install.log fi echo -e "${BEG}configuring LinBox..."| tee -a ./auto-install.log echo ""| tee -a ./auto-install.log echo -e "${BEG}Don't forget to run something like"| tee -a ./auto-install.log echo -e " * 'export LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:$PREFIX_LOC/lib'"| tee -a ./auto-install.log echo -e " * to ensure you don't get undefined symbols !"| tee -a ./auto-install.log echo ""| tee -a ./auto-install.log GIVARO="--with-givaro=$PREFIX_LOC" FFLAFLAS="--with-fflas-ffpack=$PREFIX_LOC" if [ -x autogen.sh ] ; then echo "./autogen.sh $PREFIX $DEBUG $OPTIM $GMP $BLAS $NTL $GIVARO $FFLAFLAS $WARNINGS $IML $SAGE $DRIV"| tee -a ./auto-install.log ./autogen.sh "$PREFIX" "$DEBUG" "$OPTIM" "$GMP" "$BLAS" "$NTL" "$GIVARO" "$FFLAFLAS" "$WARNINGS" "$IML" "$SAGE" "$DRIV" | tee -a ./auto-install.log|| die else echo "./configure $PREFIX $DEBUG $OPTIM $GMP $BLAS $NTL $GIVARO $FFLAFLAS $WARNINGS $IML $SAGE $DRIV"| tee -a ./auto-install.log # ./configure $PREFIX $DEBUG $OPTIM $GMP $BLAS $NTL $GIVARO $FFLAFLAS $WARNINGS $IML $SAGE $DRIV || die ./configure "$PREFIX" "$DEBUG" "$OPTIM" "$GMP" "$BLAS" "$NTL" "$GIVARO" "$FFLAFLAS" "$WARNINGS" "$IML" "$SAGE" "$DRIV" | tee -a ./auto-install.log|| die fi echo -e "${BEG}building LinBox..."| tee -a ./auto-install.log echo "${MAKEPROG} CXXFLAGS+=\"$EXTRA\" LDFLAGS+=\"-Wl,-rpath,$PREFIX_LOC\""| tee -a ./auto-install.log if [ -n "$EXTRA" ] ; then ${MAKEPROG} "CXXFLAGS+=\"$EXTRA\" LDFLAGS+=\"-Wl,-rpath,$PREFIX_LOC\"" | tee -a ./auto-install.log|| die else ${MAKEPROG} "LDFLAGS+=\"-Wl,-rpath,$PREFIX_LOC\""| tee -a ./auto-install.log|| die fi if [ "$CHECK_VAR" = "true" ] ; then echo -e "${BEG}checking LinBox..."| tee -a auto-install.log ${MAKEPROG} check | tee -a auto-install.log|| die fi echo -e "${BEG}installing LinBox..."| tee -a auto-install.log ${MAKEPROG} install | tee -a auto-install.log|| die cool| tee -a auto-install.log echo " " | tee -a auto-install.log echo -e "${BEG}Don't forget to run something like"| tee -a auto-install.log echo -e " * 'export LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:$PREFIX_LOC/lib'"| tee -a auto-install.log echo -e " * to ensure you don't get undefined symbols !"| tee -a auto-install.log echo "" | tee -a auto-install.log echo -e " * Happy LinBoxing ! (installed in $PREFIX_LOC)"| tee -a auto-install.log echo " "| tee -a auto-install.log cool| tee -a auto-install.log linbox-1.3.2/benchmarks/000077500000000000000000000000001176453053400151355ustar00rootroot00000000000000linbox-1.3.2/benchmarks/Makefile.am000066400000000000000000000061531176453053400171760ustar00rootroot00000000000000# Copyright (c) 2011 the LinBox group # Brice Boyer # ========LICENCE======== # This file is part of the library LinBox. # # LinBox is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # # This library 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 # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # ========LICENCE======== AM_CPPFLAGS=-I$(top_srcdir) -I$(top_srcdir)/linbox # SAFER_FLAGS=-g -Wall -Wextra -Wno-unused-parameter AM_CXXFLAGS= @DEFAULT_CFLAGS@ -DLinBoxSrcOnly AM_CPPFLAGS+= $(GMP_CFLAGS) $(NTL_CFLAGS) $(GIVARO_CFLAGS) $(LIDIA_CFLAGS) $(FFLAS_FFPACK_CFLAGS) LDADD= $(NTL_LIBS) $(GIVARO_LIBS) $(LIDIA_LIBS) $(BLAS_LIBS) $(GMP_LIBS) AM_LDFLAGS=-static $(LDFLAGS) BENCH_BASIC= \ benchmark-fgemm \ benchmark-crafixed \ benchmark-ftrXm TODO= benchmark-matmul \ benchmark-spmv \ benchmark-fields # BENCH_ALGOS= \ TODO= benchmark-solve \ benchmark-rank \ benchmark-det \ benchmark-nullspace # BENCH_FORMS= \ TODO= benchmark-lu benchmark-echelon \ benchmark-hermite \ benchmark-smith EXTRA_PROGRAMS= $(BENCH_BASIC) EXTRA_DIST= benchmark.h benchmark.doxy benchmarks: ${EXTRA_PROGRAMS} ### BASE BENCHMARK ### benchmark_fgemm_SOURCES = benchmark-fgemm.C benchmark_ftrXm_SOURCES = benchmark-ftrXm.C benchmark_crafixed_SOURCES = benchmark-crafixed.C benchmark_crafixed_CPPFLAGS = $(IML_CFLAGS) $(AM_CPPFLAGS) benchmark_crafixed_LDADD = $(IML_LIBS) $(LDADD) # benchmark_matmul_SOURCES = benchmark-matmul.C # benchmark_spmv_SOURCES = benchmark-spmv.C # benchmark_fields_SOURCES = benchmark-fields.C ### BENCHMARK ALGOS and SOLUTIONS ### # benchmark_solve_SOURCES = benchmark-solve.C # benchmark_rank_SOURCES = benchmark-rank.C # benchmark_det_SOURCES = benchmark-det.C # benchmark_nullspace_SOURCES = benchmark-nullspace.C ### BENCHMARK MATRIX FACTORISATIONS ### # benchmark_lu_SOURCES = benchmark-lu.C # benchmark_echelon_SOURCES = benchmark-echelon.C # benchmark_hermite_SOURCES = benchmark-hermite.C # benchmark_smith_SOURCES = benchmark-smith.C LINBOX=@prefix@ LINBOX_BIN=@bindir@ # for compilation of new benchmarks %:%.C $(CXX) $(AM_CXXFLAGS) $(CXXFLAGS) $(OPTFLAGS) ${INCLUDES} $(AM_CPPFLAGS) $*.C -o $@ $(LDFLAGS) $(LDADD) $(LOADLIBES) $(top_srcdir)/linbox/.libs/liblinbox.a %:%.cpp $(CXX) $(AM_CXXFLAGS) $(CXXFLAGS) $(OPTFLAGS) ${INCLUDES} $(AM_CPPFLAGS) $*.cpp -o $@ $(LDFLAGS) $(LDADD) $(LOADLIBES) $(top_srcdir)/linbox/.libs/liblinbox.a linbox-1.3.2/benchmarks/Makefile.in000066400000000000000000000504371176453053400172130ustar00rootroot00000000000000# Makefile.in generated by automake 1.11.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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@ # Copyright (c) 2011 the LinBox group # Brice Boyer # ========LICENCE======== # This file is part of the library LinBox. # # LinBox is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # # This library 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 # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # ========LICENCE======== VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd 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 = : build_triplet = @build@ host_triplet = @host@ EXTRA_PROGRAMS = $(am__EXEEXT_1) subdir = benchmarks DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/macros/aclocal-include.m4 \ $(top_srcdir)/macros/config-header.m4 \ $(top_srcdir)/macros/debug.m4 \ $(top_srcdir)/macros/expat-check.m4 \ $(top_srcdir)/macros/fflas-ffpack-check.m4 \ $(top_srcdir)/macros/fplll-check.m4 \ $(top_srcdir)/macros/givaro-check.m4 \ $(top_srcdir)/macros/gmp-check.m4 \ $(top_srcdir)/macros/iml-check.m4 \ $(top_srcdir)/macros/lapack-check.m4 \ $(top_srcdir)/macros/libtool.m4 \ $(top_srcdir)/macros/lidia-check.m4 \ $(top_srcdir)/macros/linbox-benchmark.m4 \ $(top_srcdir)/macros/linbox-doc.m4 \ $(top_srcdir)/macros/linbox-misc.m4 \ $(top_srcdir)/macros/linbox-opt.m4 \ $(top_srcdir)/macros/ltoptions.m4 \ $(top_srcdir)/macros/ltsugar.m4 \ $(top_srcdir)/macros/ltversion.m4 \ $(top_srcdir)/macros/lt~obsolete.m4 \ $(top_srcdir)/macros/m4ri-check.m4 \ $(top_srcdir)/macros/m4rie-check.m4 \ $(top_srcdir)/macros/maple-check.m4 \ $(top_srcdir)/macros/mpfr-check.m4 \ $(top_srcdir)/macros/ntl-check.m4 \ $(top_srcdir)/macros/saclib-check.m4 \ $(top_srcdir)/macros/sage-check.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__EXEEXT_1 = benchmark-fgemm$(EXEEXT) benchmark-crafixed$(EXEEXT) \ benchmark-ftrXm$(EXEEXT) am_benchmark_crafixed_OBJECTS = \ benchmark_crafixed-benchmark-crafixed.$(OBJEXT) benchmark_crafixed_OBJECTS = $(am_benchmark_crafixed_OBJECTS) am__DEPENDENCIES_1 = am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) benchmark_crafixed_DEPENDENCIES = $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_2) am_benchmark_fgemm_OBJECTS = benchmark-fgemm.$(OBJEXT) benchmark_fgemm_OBJECTS = $(am_benchmark_fgemm_OBJECTS) benchmark_fgemm_LDADD = $(LDADD) benchmark_fgemm_DEPENDENCIES = $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) am_benchmark_ftrXm_OBJECTS = benchmark-ftrXm.$(OBJEXT) benchmark_ftrXm_OBJECTS = $(am_benchmark_ftrXm_OBJECTS) benchmark_ftrXm_LDADD = $(LDADD) benchmark_ftrXm_DEPENDENCIES = $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = am__depfiles_maybe = CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(benchmark_crafixed_SOURCES) $(benchmark_fgemm_SOURCES) \ $(benchmark_ftrXm_SOURCES) DIST_SOURCES = $(benchmark_crafixed_SOURCES) \ $(benchmark_fgemm_SOURCES) $(benchmark_ftrXm_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BLAS_CFLAGS = @BLAS_CFLAGS@ BLAS_LIBS = @BLAS_LIBS@ CC = @CC@ CCNAM = @CCNAM@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DBG = @DBG@ DEBUG_CFLAGS = @DEBUG_CFLAGS@ DEFAULT_CFLAGS = @DEFAULT_CFLAGS@ DEFS = @DEFS@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXPAT_CFLAGS = @EXPAT_CFLAGS@ EXPAT_LIBS = @EXPAT_LIBS@ FFLAS_FFPACK_CFLAGS = @FFLAS_FFPACK_CFLAGS@ FFLAS_FFPACK_LIBS = @FFLAS_FFPACK_LIBS@ FFLAS_FFPACK_LOC = @FFLAS_FFPACK_LOC@ FGREP = @FGREP@ FPLLL_CFLAGS = @FPLLL_CFLAGS@ FPLLL_LIBS = @FPLLL_LIBS@ GIVARO_CFLAGS = @GIVARO_CFLAGS@ GIVARO_LIBS = @GIVARO_LIBS@ GMP_CFLAGS = @GMP_CFLAGS@ GMP_LIBS = @GMP_LIBS@ GMP_VERSION = @GMP_VERSION@ GREP = @GREP@ IML_CFLAGS = @IML_CFLAGS@ IML_LIBS = @IML_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIDIA_CFLAGS = @LIDIA_CFLAGS@ LIDIA_LIBS = @LIDIA_LIBS@ LINBOX_BENCH_PATH = @LINBOX_BENCH_PATH@ LINBOX_DOC_PATH = @LINBOX_DOC_PATH@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ M4RIE_CFLAGS = @M4RIE_CFLAGS@ M4RIE_LIBS = @M4RIE_LIBS@ M4RI_CFLAGS = @M4RI_CFLAGS@ M4RI_LIBS = @M4RI_LIBS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAPLE_CFLAGS = @MAPLE_CFLAGS@ MAPLE_HOME = @MAPLE_HOME@ MAPLE_LIBS = @MAPLE_LIBS@ MAPLE_VERSION = @MAPLE_VERSION@ MKDIR_P = @MKDIR_P@ MPFR_CFLAGS = @MPFR_CFLAGS@ MPFR_LIBS = @MPFR_LIBS@ NM = @NM@ NMEDIT = @NMEDIT@ NTL_CFLAGS = @NTL_CFLAGS@ NTL_LIBS = @NTL_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PROF = @PROF@ RANLIB = @RANLIB@ RM = @RM@ SACLIB_CFLAGS = @SACLIB_CFLAGS@ SACLIB_LIBS = @SACLIB_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TESTS_CFLAGS = @TESTS_CFLAGS@ VERSION = @VERSION@ WARN = @WARN@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__leading_dot = @am__leading_dot@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/linbox $(GMP_CFLAGS) \ $(NTL_CFLAGS) $(GIVARO_CFLAGS) $(LIDIA_CFLAGS) \ $(FFLAS_FFPACK_CFLAGS) # SAFER_FLAGS=-g -Wall -Wextra -Wno-unused-parameter AM_CXXFLAGS = @DEFAULT_CFLAGS@ -DLinBoxSrcOnly LDADD = $(NTL_LIBS) $(GIVARO_LIBS) $(LIDIA_LIBS) $(BLAS_LIBS) $(GMP_LIBS) AM_LDFLAGS = -static $(LDFLAGS) BENCH_BASIC = \ benchmark-fgemm \ benchmark-crafixed \ benchmark-ftrXm TODO = EXTRA_DIST = benchmark.h benchmark.doxy ### BASE BENCHMARK ### benchmark_fgemm_SOURCES = benchmark-fgemm.C benchmark_ftrXm_SOURCES = benchmark-ftrXm.C benchmark_crafixed_SOURCES = benchmark-crafixed.C benchmark_crafixed_CPPFLAGS = $(IML_CFLAGS) $(AM_CPPFLAGS) benchmark_crafixed_LDADD = $(IML_LIBS) $(LDADD) # benchmark_matmul_SOURCES = benchmark-matmul.C # benchmark_spmv_SOURCES = benchmark-spmv.C # benchmark_fields_SOURCES = benchmark-fields.C ### BENCHMARK ALGOS and SOLUTIONS ### # benchmark_solve_SOURCES = benchmark-solve.C # benchmark_rank_SOURCES = benchmark-rank.C # benchmark_det_SOURCES = benchmark-det.C # benchmark_nullspace_SOURCES = benchmark-nullspace.C ### BENCHMARK MATRIX FACTORISATIONS ### # benchmark_lu_SOURCES = benchmark-lu.C # benchmark_echelon_SOURCES = benchmark-echelon.C # benchmark_hermite_SOURCES = benchmark-hermite.C # benchmark_smith_SOURCES = benchmark-smith.C LINBOX = @prefix@ LINBOX_BIN = @bindir@ all: all-am .SUFFIXES: .SUFFIXES: .C .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu --ignore-deps benchmarks/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu --ignore-deps benchmarks/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): benchmark-crafixed$(EXEEXT): $(benchmark_crafixed_OBJECTS) $(benchmark_crafixed_DEPENDENCIES) $(EXTRA_benchmark_crafixed_DEPENDENCIES) @rm -f benchmark-crafixed$(EXEEXT) $(CXXLINK) $(benchmark_crafixed_OBJECTS) $(benchmark_crafixed_LDADD) $(LIBS) benchmark-fgemm$(EXEEXT): $(benchmark_fgemm_OBJECTS) $(benchmark_fgemm_DEPENDENCIES) $(EXTRA_benchmark_fgemm_DEPENDENCIES) @rm -f benchmark-fgemm$(EXEEXT) $(CXXLINK) $(benchmark_fgemm_OBJECTS) $(benchmark_fgemm_LDADD) $(LIBS) benchmark-ftrXm$(EXEEXT): $(benchmark_ftrXm_OBJECTS) $(benchmark_ftrXm_DEPENDENCIES) $(EXTRA_benchmark_ftrXm_DEPENDENCIES) @rm -f benchmark-ftrXm$(EXEEXT) $(CXXLINK) $(benchmark_ftrXm_OBJECTS) $(benchmark_ftrXm_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c .C.o: $(CXXCOMPILE) -c -o $@ $< .C.obj: $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .C.lo: $(LTCXXCOMPILE) -c -o $@ $< benchmark_crafixed-benchmark-crafixed.o: benchmark-crafixed.C $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(benchmark_crafixed_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o benchmark_crafixed-benchmark-crafixed.o `test -f 'benchmark-crafixed.C' || echo '$(srcdir)/'`benchmark-crafixed.C benchmark_crafixed-benchmark-crafixed.obj: benchmark-crafixed.C $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(benchmark_crafixed_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o benchmark_crafixed-benchmark-crafixed.obj `if test -f 'benchmark-crafixed.C'; then $(CYGPATH_W) 'benchmark-crafixed.C'; else $(CYGPATH_W) '$(srcdir)/benchmark-crafixed.C'; fi` mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs 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; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ 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; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) 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; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool ctags distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am benchmark-matmul \ benchmark-spmv \ benchmark-fields # BENCH_ALGOS= \ #TODO= benchmark-solve \ benchmark-rank \ benchmark-det \ benchmark-nullspace # BENCH_FORMS= \ #TODO= benchmark-lu benchmark-echelon \ benchmark-hermite \ benchmark-smith benchmarks: ${EXTRA_PROGRAMS} # for compilation of new benchmarks %:%.C $(CXX) $(AM_CXXFLAGS) $(CXXFLAGS) $(OPTFLAGS) ${INCLUDES} $(AM_CPPFLAGS) $*.C -o $@ $(LDFLAGS) $(LDADD) $(LOADLIBES) $(top_srcdir)/linbox/.libs/liblinbox.a %:%.cpp $(CXX) $(AM_CXXFLAGS) $(CXXFLAGS) $(OPTFLAGS) ${INCLUDES} $(AM_CPPFLAGS) $*.cpp -o $@ $(LDFLAGS) $(LDADD) $(LOADLIBES) $(top_srcdir)/linbox/.libs/liblinbox.a # 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: linbox-1.3.2/benchmarks/benchmark-crafixed.C000066400000000000000000000257051176453053400207670ustar00rootroot00000000000000 /* Copyright (C) 2011 LinBox * Written by BB * * * * ========LICENCE======== * This file is part of the library LinBox. * * LinBox is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ========LICENCE======== */ /*! @file benchmarks/benchmark-crafixed.C * @ingroup benchmarks * @brief Benchmarking fixed CRA routines. * Here we make benchmarks for CRT (Chinese Remaindering Theorem/Algorithm) in * the following case. Let \f$\mathbf{v}\f$ be a vector of size \f$n\f$ and * whose entries have at most \f$l\f$ bits (signed or unsigned). Suppose that * we only know \f$\mathbf{v} \mod p_i\f$ for many primes \f$p_i\f$. We try * and reconstruct \f$\mathbf{v}\f$ from these residues. * * We benchmark for one vector or \f$m\f$ repetitions on different vectors. * * We use the implementations in LinBox, Givaro, IML and NTL (if the latter two * are available). * * @warning this is not a benchmark for one integer to reconstruct or a for BlasMatrix. */ #include "benchmarks/benchmark.h" #include "linbox/util/debug.h" #include "linbox/field/modular.h" #include "linbox/field/modular-balanced.h" #include "linbox/matrix/random-matrix.h" #include "linbox/algorithms/blas-domain.h" #include "linbox/algorithms/rns.h" #include "linbox/algorithms/cra-domain.h" #include "linbox/algorithms/cra-early-multip.h" #include "linbox/integer.h" #ifdef __LINBOX_HAVE_IML #include "linbox/util/iml_wrapper.h" #endif #define _LB_LOG2 0.69314718055994530941 using Givaro::Timer ; using LinBox::integer; // typedef std::vector Ivect ; // typedef std::vector Fvect ; struct ReductVect { std::vector & _v ; ReductVect(std::vector &v) : _v(v) { } ; template std::vector & operator()(std::vector & r, const Field & F) const { typedef typename Field::Element Element; typedef std::vector Fvect; typedef typename Fvect::iterator Iter; //! @todo LinBox hom or magic here ? std::vector::iterator j = _v.begin(); for (Iter i = r.begin() ; i != r.end() ; ++i,++j) { F.init(*i,*j); } return r ; } }; struct ReductVectIterator ; namespace LinBox { template struct CRATemporaryVectorTrait { typedef typename std::vector::iterator Type_t; }; } struct ReductVectIterator { std::vector & _v ; mutable std::vector _r ; ReductVectIterator(std::vector &v) : _v(v) { _r.resize(v.size()); } ; template Iterator & operator()(Iterator & r, const Field & F) const { typedef typename Field::Element Element; typedef std::vector Fvect; typedef typename Fvect::iterator Iter; //! @todo LinBox hom or magic here ? std::vector::iterator j = _v.begin(); for (std::vector::iterator i = _r.begin() ; i != _r.end() ; ++i,++j) { F.init(*i,*j); } return r= _r.begin() ; } }; template struct ReductPoint { integer & _v ; typedef typename Field::Element Element; ReductPoint(integer &v) : _v(v) {} ; Element & operator()(Element & r, const Field & F) { F.init(r,_v); return r ; } }; /*! Bench CRA. * @param n size of vector to reconstruct (>1) * @param m number of vectors to reconstruct * @param l size of the integers * @tparam Unsigned use >=0 random integers or not. * @param Data collects timings */ template int bench_cra(index_t n, index_t m, index_t l , LinBox::PlotData & Data) { Timer tim, chrono ; typedef std::vector Ivect ; { /* LinBox CRA */ tim.clear(); typedef LinBox::Modular ModularField ; typedef LinBox::FullMultipFixedCRA< ModularField > CRAbase ; unsigned int PrimeSize = 22; double logV = l*_LB_LOG2 ; if (!Unsigned) logV += _LB_LOG2 ; std::cout << "size to reconstruct : " << logV << std::endl; LinBox::RandomPrimeIterator genprime( PrimeSize ); for (size_t i = 0 ; i < (size_t) m ; ++i) { // repeat m times // create the vector to reconstruct Ivect V(n),R(n) ; for (Ivect::iterator it = V.begin() ; it != V.end() ; ++it) { integer::random_lessthan(*it,l) ; } #ifdef _LB_DEBUG for (Ivect::iterator it = V.begin() ; it != V.end() ; ++it) { if (naturallog(*it) > logV) { std::cout << *it << " too big (" << naturallog(*it) << ")" << std::endl; } } #endif LinBox::ChineseRemainder< CRAbase > cra( std::pair(n, logV) ); ReductVectIterator iteration(V); chrono.clear(); chrono.start(); Ivect::iterator Rit = R.begin(); cra(Rit, iteration, genprime); chrono.stop(); tim += chrono ; if (!std::equal(R.begin(),R.end(),V.begin())) { std::cerr << "*** LinBox CRA failed " << (Unsigned?"positive":"general") << " ***" << std::endl; std::cerr << R << std::endl << "expecting " << std::endl << V << std::endl; } // else // std::cerr << "ok" << std::endl; } std::cout << "LinBox CRA :" << tim << std::endl; } { /* LinBox Early CRA */ tim.clear(); typedef LinBox::Modular ModularField ; typedef LinBox::EarlyMultipCRA< ModularField > CRAbase ; unsigned int PrimeSize = 22; LinBox::RandomPrimeIterator genprime( PrimeSize ); for (size_t i = 0 ; i < (size_t) m ; ++i) { // repeat m times // create the vector to reconstruct Ivect V(n),R(n) ; for (Ivect::iterator it = V.begin() ; it != V.end() ; ++it) { integer::random_lessthan(*it,l) ; } LinBox::ChineseRemainder< CRAbase > cra (4); ReductVect iteration(V); chrono.clear(); chrono.start(); // Ivect::iterator Rit = R.begin(); cra(R, iteration, genprime); chrono.stop(); tim += chrono ; if (!std::equal(R.begin(),R.end(),V.begin())) { std::cerr << "*** LinBox early CRA failed " << (Unsigned?"positive":"general") << " ***" << std::endl; std::cerr << R << std::endl << "expecting " << std::endl << V << std::endl; } // else // std::cerr << "ok" << std::endl; } std::cout << "LinBox early CRA :" << tim << std::endl; } { /* do givaro crt */ // Init RNS typedef LinBox::Modular ModularField ; tim.clear(); LinBox::RNS rns(l) ; chrono.clear() ; chrono.start() ; rns.initCRA(); chrono.stop(); tim += chrono; for (size_t i = 0 ; i < (size_t) m ; ++i) { // repeat m times Ivect V(n),R(n) ; for (Ivect::iterator it = V.begin() ; it != V.end() ; ++it) { integer::random_lessthan(*it,l) ; } ReductVect iteration(V); chrono.clear(); chrono.start(); rns.cra(R,iteration); chrono.stop(); tim += chrono ; if (!std::equal(R.begin(),R.end(),V.begin())) { std::cerr << "*** Givaro CRT failed " << (Unsigned?"positive":"general") << "***" << std::endl; std::cerr << R << std::endl << "expecting " << std::endl << V << std::endl; } // else // std::cerr << "ok" << std::endl; } std::cout << "GivCRT :" << tim << std::endl; } { /* do givaro fixed */ // Init RNS typedef LinBox::Modular ModularField ; tim.clear(); LinBox::RNSfixed rns(l) ; chrono.clear() ; chrono.start() ; rns.initCRA(); chrono.stop(); tim += chrono; for (size_t i = 0 ; i < (size_t) m ; ++i) { // repeat m times Ivect V(n),R(n) ; for (Ivect::iterator it = V.begin() ; it != V.end() ; ++it) { integer::random_lessthan(*it,l) ; } ReductVect iteration(V); chrono.clear(); chrono.start(); rns.cra(R,iteration); chrono.stop(); tim += chrono ; if (!std::equal(R.begin(),R.end(),V.begin())) { std::cerr << "*** givaro fixed failed " << (Unsigned?"positive":"general") << "***" << std::endl; std::cerr << R << std::endl << "expecting " << std::endl << V << std::endl; } // else // std::cerr << "ok" << std::endl; } std::cout << "Giv CRT Fixed :" << tim << std::endl; } #if 1 /* IML */ #ifdef __LINBOX_HAVE_IML { /* do iml cra */ typedef LinBox::Modular ModularField ; tim.clear(); /* Init RNS */ chrono.clear() ; chrono.start() ; long basislen = 0 ; IML::Double primesize; integer product ; primesize = pow(2,22); product = pow((integer)2,l); // mpz_init(maxi); mpz_init(mp_maxInter); // comment les trouver ? IML::FiniteField ** RNS = IML::findRNS(primesize,product.get_mpz(),&basislen); IML::FiniteField * liftbasis = RNS[0] ; // findLiftbasisSmall(n, maxi, &basislen); IML::FiniteField * cmbasis = RNS[1] ; // combBasis(basislen,basis); mpz_t mp_prod ; IML::FiniteField * bdcoeffs = NULL ; IML::Double * Vp = IML_XMALLOC(IML::Double,n*basislen); if (!Unsigned) { mpz_init(mp_prod); IML::basisProd(basislen,liftbasis,mp_prod); bdcoeffs = IML::repBound(basislen, liftbasis, cmbasis) ; } chrono.stop(); tim += chrono; /* loop m times */ for (size_t i = 0 ; i < (size_t) m ; ++i) { // repeat m times /* init result */ Ivect V(n),R(n) ; for (Ivect::iterator it = V.begin() ; it != V.end() ; ++it) { integer::random_lessthan(*it,l) ; } ReductVect iteration(V); for (size_t j = 0 ; j < (size_t)basislen ; ++j) { std::vector G ; iteration(G,ModularField((integer)liftbasis[j])); for (size_t k = 0 ; k < (size_t)n ; ++k) Vp[j+k*basislen] = G[k] ; } /* CRA */ // fooooooooooooooor if (!Unsigned) { for (size_t j = 0 ; j < (size_t)n ; ++j) IML::ChineseRemainderPos(basislen, liftbasis, cmbasis, Vp+j, R[j].get_mpz()); } else { for (size_t j = 0 ; j < (size_t)n ; ++j) IML::ChineseRemainder(basislen, mp_prod, liftbasis, cmbasis, bdcoeffs, Vp+j, R[j].get_mpz()) ; } IML_XFREE(cmbasis); IML_XFREE(liftbasis); if (!Unsigned) { mpz_clear(mp_prod); IML_XFREE(bdcoeffs); } /* END */ } } #endif // __LINBOX_HAVE_IML #endif /* do ntl cra */ // Init primes for (size_t i = 0 ; i < (size_t) m ; ++i) { // repeat m times } return EXIT_SUCCESS ; } int main(int ac, char** av) { static index_t m = 10 ; static index_t l = 200 ; static index_t n = 10 ; LinBox::PlotData Data(n,m); bench_cra(n,m,l,Data); bench_cra(n,m,l,Data); return EXIT_SUCCESS ; } // vim:sts=8:sw=8:ts=8:noet:sr:cino=>s,f0,{0,g0,(0,:0,t0,+0,=s // Local Variables: // mode: C++ // tab-width: 8 // indent-tabs-mode: nil // c-basic-offset: 8 // End: linbox-1.3.2/benchmarks/benchmark-fgemm.C000066400000000000000000000661751176453053400203030ustar00rootroot00000000000000 /* Copyright (C) 2011 LinBox * Written by BB * * * * ========LICENCE======== * This file is part of the library LinBox. * * LinBox is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ========LICENCE======== */ /*! @file benchmarks/benchmark-fgemm.C * @ingroup benchmarks * @brief Benchmarking dense matrix multiplication on finite fields. * This file benchmarks the FFLAS::fgemm implementation for various fields, * shape and parameters. Actually, we use the wrapper member \c mul of LinBox::BlasMatrixDomain. * @todo make graphs look better (legends, units,...) */ #include "benchmarks/benchmark.h" #include "linbox/util/error.h" #include "fflas-ffpack/fflas-ffpack.h" #include "linbox/field/modular.h" #include "linbox/field/modular-balanced.h" #include "linbox/matrix/random-matrix.h" #include "linbox/matrix/blas-matrix.h" #include "linbox/algorithms/blas-domain.h" #include // setprecision /* ********************** */ /* Outils */ /* ********************** */ using Givaro::Timer; /*! @brief Watches a timer and a number and repet and signals if over. * * We want at least 2 repetions but not more than maxtime spent on timing. * * @param repet number of previous repetitions. Should be 0 on the first time * \c whatchon is called. * @param tim timer to watch * @param maxtime maximum time (in seconds) until \c keepon tells stop. * @return \c true if we conditions are not met to stop, \c false otherwise. * @pre \c tim was clear at the beginning and never started. * */ bool keepon(index_t & repet, const Timer & tim, double maxtime=0.2) { if (repet<2 || tim.usertime() < maxtime) { ++repet ; return true; } return false ; } bool keepon(index_t & repet, const double & tim, double maxtime=0.2) { if (repet<2 || tim < maxtime) { ++repet ; return true; } return false ; } /*! @brief Watches a timer and a number and repet and signals if over. * * We want at least 2 repetions but not more than maxtime spent on timing. * * @param repet number of previous repetitions. Should be 0 on the first time \c whatchon is called. * @param tim timer to watch * @param maxtime maximum time (in seconds) until \c watchon tells stop. * @return \c true if we conditions are not met to stop, \c false otherwise. * @pre \c tim should have been started previously ! * */ bool whatchon(index_t & repet, /* const */Timer & tim, double maxtime=0.5) { if (repet<2 || tim.userElapsedTime() < maxtime) { ++repet ; return true; } return false ; } void showAdvanceLinear(int curr, int min, int max) { std::cout << std::setprecision(4) << "\033[2K" << "\033[30D" << min < void launch_bench_square(Field & F // const problem , index_t min, index_t max, int step , LinBox::PlotData & Data , index_t series_nb) { index_t l = 0 ; Timer fgemm_sq_tim ; Timer chrono ; double mflops ; typedef typename Field::Element Element; typedef typename Field::RandIter Randiter ; Randiter R(F) ; LinBox::BlasMatrixDomain BMD(F) ; LinBox::RandomDenseMatrix RandMat(F,R); // index_t repet = 3 ; for ( index_t i = min ; i < max ; i += step , ++l ) { showAdvanceLinear(i,min,max); int ii = i ; // sinon, le constructeur le plus proche serait (_Matrix,_Field)... n'impnawak... LinBox::BlasMatrix A (F,ii,ii); LinBox::BlasMatrix B (F,ii,ii); LinBox::BlasMatrix C (F,ii,ii); if (!series_nb) Data.setAbsciName(l,i); // only write abscissa for serie 0 index_t j = 0 ; // number of repets. RandMat.random(A); RandMat.random(B); RandMat.random(C); fgemm_sq_tim.clear() ; while( keepon(j, fgemm_sq_tim) ) { chrono.clear() ; chrono.start() ; BMD.mul(C,A,B) ; // C = AB chrono.stop(); fgemm_sq_tim += chrono ; } if (!j){ std::cout << "multiplication did not happen" << std::endl; } #ifdef _LB_DEBUG else { std::cout << i << ',' << j << std::endl; } #endif mflops = compute_mflops(fgemm_sq_tim,fgemm_mflops(i,i,i),j); Data.setEntry(series_nb,l,mflops); } std::ostringstream nam ; nam << '\"' ; F.write(nam); nam << '\"' ; Data.setSerieName(series_nb,nam.str()); } /*! @internal * @brief launches the benchmarks for the square case directly BLAS. * @param min min size to bench * @param max max size to bench * @param step step between two sizes * @param Data where data is stored * @param series_nb index of the current series. */ template void launch_bench_blas(Field & F , index_t min, index_t max, int step , LinBox::PlotData & Data , index_t series_nb ) { // typedef LinBox::Modular Field ; // Field F((int)charact); index_t l = 0 ; Timer fgemm_blas_tim ; Timer chrono ; double mflops ; typedef typename Field::Element Element ; typedef typename Field::RandIter Randiter; Randiter R(F) ; // LinBox::BlasMatrixDomain BMD(F) ; // LinBox::RandomDenseMatrix RandMat(F,R); // index_t repet = 3 ; index_t mm = max * max ; Element * A = new Element[mm] ; Element * B = new Element[mm] ; Element * C = new Element[mm] ; // typedef typename LinBox::UnparametricField FloatingDomain ; // FloatingDomain G ; for ( index_t i = min ; i < max ; i += step , ++l ) { showAdvanceLinear(i,min,max); int ii = i ; // sinon, le constructeur le plus proche serait (_Matrix,_Field)... n'impnawak... index_t mimi = (index_t) ii*ii ; if (!series_nb) Data.setAbsciName(l,i); // only write abscissa for serie 0 for (index_t j = 0 ; j < mimi ; ++j) R.random(A[j]); for (index_t j = 0 ; j < mimi ; ++j) R.random(B[j]); for (index_t j = 0 ; j < mimi ; ++j) R.random(C[j]); index_t j = 0 ; fgemm_blas_tim.clear() ; // double fgemm_blas_tim = 0 ; while(keepon(j,fgemm_blas_tim)) { chrono.clear(); chrono.start() ; FFLAS::fgemm((typename Field::Father_t)F,FFLAS::FflasNoTrans,FFLAS::FflasNoTrans, ii,ii,ii, F.one, A,ii,B,ii, F.zero, C,ii) ; chrono.stop() ; fgemm_blas_tim += chrono ; } mflops = compute_mflops(fgemm_blas_tim,fgemm_mflops(i,i,i),j); // #ifndef NDEBUG if (i >=950 && i <= 1050 ) { std::cerr << std::endl<< typeid(Field).name() << ' ' << i << ':' << mflops << std::endl; std::cerr << fgemm_blas_tim << std::endl; } // #endif Data.setEntry(series_nb,l,mflops); } delete[] A ; delete[] B ; delete[] C ; std::ostringstream nam ; nam << '\"' ; F.write(nam); nam << '\"' ; Data.setSerieName(series_nb,nam.str()); } /*! @internal * @brief launches the benchmarks for the square case. * C= AB * @param F field * @param m rows in A * @param k cols in A * @param n cols in C * @param Data where data is stored * @param point_nb point to be computed */ template void launch_bench_rectangular(Field & F // const problem , int m, int k, int n , LinBox::PlotData & Data , index_t point_nb) { Timer fgemm_rect_tim ; Timer chrono ; chrono.clear(); double mflops ; typedef typename Field::Element Element; typedef typename Field::RandIter Randiter ; Randiter R(F) ; LinBox::BlasMatrixDomain BMD(F) ; LinBox::RandomDenseMatrix RandMat(F,R); // index_t repet = 3 ; LinBox::BlasMatrix A (F,m,k); LinBox::BlasMatrix B (F,k,n); LinBox::BlasMatrix C (F,m,n); index_t j = 0 ; fgemm_rect_tim.clear() ; while (keepon(j,fgemm_rect_tim)) { RandMat.random(A); RandMat.random(B); RandMat.random(C); chrono.clear() ; chrono.start() ; BMD.mul(C,A,B) ; // C = AB chrono.stop(); fgemm_rect_tim += chrono ; } if (!j) { std::cout << "multiplication did not happen" << std::endl; } #ifdef _LB_DEBUG else { std::cout << point_nb << std::endl; } #endif mflops = compute_mflops(fgemm_rect_tim,fgemm_mflops(m,k,n),j); Data.setEntry(0,point_nb,mflops); std::ostringstream nam ; nam << "\"(" << m << ',' << k << ',' << n << ")\"" ; Data.setAbsciName(point_nb,nam.str()); } /*! @internal * @brief launches the benchmarks for various parameters of a, b. * D = aAB+bC and C = aAB+bC ("in place" versions) * Are tested the following couples \c (a,b) (where \c p is invertible in \p F. This has * to be true when \c a=p.) : * - b=0 and a=1,-1,p ; * - a=1 and b=1,-1,p ; * - a=-1 and id. ; * - a=p and id. ; * . * We call xA = ^tA if tA is true, A otherwise. * @param F field * @param m rows in xA * @param k cols in xA and rows in xB * @param n cols in xB * @param alpha alpha (not zero) * @param beta beta * @tparam tA is A transposed ? * @tparam tB is B transposed ? * @param Data where data is stored * @param point_nb point to be computed * @param inplace in place or not (ie C is overwritten or not ? default = \c false. */ template void launch_bench_scalar(Field & F // const problem , int m, int k, int n , const typename Field::Element & alpha, const typename Field::Element & beta , LinBox::PlotData & Data , index_t point_nb , bool inplace = false) { Timer fgemm_scal_tim ; Timer chrono ; fgemm_scal_tim.clear(); double mflops ; typedef typename Field::Element Element; typedef typename Field::RandIter Randiter ; typedef typename LinBox::BlasMatrix Matrix ; typedef typename LinBox::TransposedBlasMatrix TransposedMatrix ; Randiter R(F) ; LinBox::BlasMatrixDomain BMD(F) ; LinBox::RandomDenseMatrix RandMat(F,R); // index_t repet = 3 ; int mm = tA?k:m ; int kk = tA?m:k ; int nn = tB?k:n ; Matrix A (F,mm,kk); Matrix B (F,kk,nn); Matrix C (F,m,n); Matrix D (F,m,n); TransposedMatrix At(A); TransposedMatrix Bt(B); // LinBox::BlasMatrix A (mm,kk); // LinBox::BlasMatrix B (kk,nn); // LinBox::BlasMatrix C (m,n); // LinBox::BlasMatrix D (m,n); // LinBox::TransposedBlasMatrix > At(A); // LinBox::TransposedBlasMatrix > Bt(B); index_t j = 0 ; while (keepon(j,fgemm_scal_tim)) { RandMat.random(A); RandMat.random(B); RandMat.random(C); chrono.clear() ; chrono.start(); if (inplace) { if (tA) { if (tB) { BMD.muladdin(beta,C,alpha,At,Bt) ; // C = alphaAB+beta C } else{ BMD.muladdin(beta,C,alpha,At,B) ; } } else { if (tB) { BMD.muladdin(beta,C,alpha,A,Bt) ; } else{ BMD.muladdin(beta,C,alpha,A,B) ; } } } else { if (tA) { if (tB) { BMD.muladd(D,beta,C,alpha,At,Bt) ; // D = alphaAB+beta C } else{ BMD.muladd(D,beta,C,alpha,At,B) ; } } else { if (tB) { BMD.muladd(D,beta,C,alpha,A,Bt) ; } else{ BMD.muladd(D,beta,C,alpha,A,B) ; } } } chrono.stop() ; fgemm_scal_tim += chrono ; } if (!j) { std::cout << "multiplication did not happen" << std::endl; } #ifdef _LB_DEBUG else { std::cout << point_nb << std::endl; } #endif mflops = compute_mflops(fgemm_scal_tim,fgemm_mflops(m,k,n),j); Data.setEntry(0,point_nb,mflops); std::ostringstream nam ; nam << "\"(" << m << ',' << k << ',' << n << ") "; nam << (inplace?"C":"D") << "=" << alpha << " " ; nam << (tA?"t":"")<< "A." << (tB?"t":"")<< "B+" << beta << " C\"" ; Data.setAbsciName(point_nb,nam.str()); } /* ********************** */ /* Tests */ /* ********************** */ /*! Benchmark fgemm Y=AX for several sizes of sqare matrices. * @param min min size * @param max max size * @param step step of the size between 2 benchmarks * @param charac characteristic of the field. */ void bench_blas( index_t min, index_t max, int step, int charac ) { int nb = 1 ;// une col de plus (la première) typedef LinBox::Modular Field0 ; ++nb ; typedef LinBox::Modular Field1 ; ++nb ; typedef LinBox::Modular Field2 ; ++nb ; typedef LinBox::ModularBalanced Field3 ; ++nb ; typedef LinBox::ModularBalanced Field4 ; ++nb ; typedef LinBox::ModularBalanced Field5 ; ++nb ; typedef LinBox::UnparametricFieldField6 ; ++nb ; typedef LinBox::UnparametricField Field7 ; ++nb ; int nb_pts = (int) std::ceil((double)(max-min)/(double)step) ; LinBox::PlotData Data(nb_pts,nb); int it = 0 ; Field0 F0(charac) ; launch_bench_blas(F0,min,max,step,Data,it++); showFinish(it,nb); if (charac < 2048) { Field1 F1(charac) ; launch_bench_blas(F1,min,max,step,Data,it++); showFinish(it,nb); } else { showSkip(it,nb); } Field2 F2(charac) ; launch_bench_blas(F2,min,max,step,Data,it++); showFinish(it,nb); Field3 F3(charac) ; launch_bench_blas(F3,min,max,step,Data,it++); showFinish(it,nb); if (charac < 2048) { Field4 F4(charac) ; launch_bench_blas(F4,min,max,step,Data,it++); showFinish(it,nb); } else { showSkip(it,nb); } Field5 F5(charac) ; launch_bench_blas(F5,min,max,step,Data,it++); showFinish(it,nb); Field6 F6(charac) ; launch_bench_blas(F6,min,max,step,Data,it++); showFinish(it,nb); if (charac < 2048) { Field7 F7((float)charac) ; launch_bench_blas(F7,min,max,step,Data,it++); showFinish(it,nb); } else { showSkip(it,nb); } linbox_check(it <= nb); LinBox::PlotStyle Style; // Style.setTerm(LinBox::PlotStyle::pdf); // Style.setTerm(LinBox::PlotStyle::png); // Style.setTerm(LinBox::PlotStyle::svg); Style.setTerm(LinBox::PlotStyle::Term::eps); Style.setTitle("FFLAS::fgemm","Mflops","dimensions"); // Style.setType(LinBox::PlotStyle::histogram); // Style.setStyle("set style histogram cluster gap 1"); // Style.addStyle("set style fill solid border -1"); // Style.addStyle("set boxwidth 0.9"); Style.setPlotType(LinBox::PlotStyle::Plot::graph); Style.setLineType(LinBox::PlotStyle::Line::linespoints); Style.setUsingSeries(std::pair(2,nb)); LinBox::PlotGraph Graph(Data,Style); Graph.setOutFilename("fgemm_blas"); // Graph.plot(); Graph.print_gnuplot(); Graph.print_latex(); return ; } /*! @brief Benchmark square fgemm Y=AX for several fields. * @param min min size * @param max max size * @param step step of the size between 2 benchmarks * @param charac characteristic of the field. */ void bench_square( index_t min, index_t max, int step, int charac ) { int nb = 1 ;// une col de plus (la première) typedef LinBox::Modular Field0 ; ++nb ; typedef LinBox::Modular Field1 ; ++nb ; typedef LinBox::Modular Field2 ; ++nb ; typedef LinBox::ModularBalanced Field3 ; ++nb ; typedef LinBox::ModularBalanced Field4 ; ++nb ; typedef LinBox::ModularBalanced Field5 ; ++nb ; // GivaroZpZ int nb_pts = (int) std::ceil((double)(max-min)/(double)step) ; LinBox::PlotData Data(nb_pts,nb); int it = 0 ; Field0 F0(charac) ; launch_bench_square(F0,min,max,step,Data,it++); showFinish(it,nb); if (charac < 2048) { Field1 F1(charac) ; launch_bench_square(F1,min,max,step,Data,it++); showFinish(it,nb); } else { showSkip(it,nb); } Field2 F2(charac) ; launch_bench_square(F2,min,max,step,Data,it++); showFinish(it,nb); Field3 F3(charac) ; launch_bench_square(F3,min,max,step,Data,it++); showFinish(it,nb); if (charac < 2048) { Field4 F4(charac) ; launch_bench_square(F4,min,max,step,Data,it++); showFinish(it,nb); } else { showSkip(it,nb); } Field5 F5(charac) ; launch_bench_square(F5,min,max,step,Data,it++); showFinish(it,nb); linbox_check(it <= nb); LinBox::PlotStyle Style; // Style.setTerm(LinBox::PlotStyle::Term::pdf); // Style.setTerm(LinBox::PlotStyle::Term::png); // Style.setTerm(LinBox::PlotStyle::Term::svg); Style.setTerm(LinBox::PlotStyle::Term::eps); Style.setTitle("BlasMatrixDomain mul","Mflops","dimensions"); Style.setPlotType(LinBox::PlotStyle::Plot::graph); Style.setLineType(LinBox::PlotStyle::Line::linespoints); Style.setUsingSeries(std::pair(2,nb)); LinBox::PlotGraph Graph(Data,Style); Graph.setOutFilename("bmdmul_square"); // Graph.plot(); Graph.print_gnuplot(); Graph.print_latex(); return ; } /*! @brief Benchmark fgemm Y=AX for several shapes. * Let n=k^2. * we test the following shapes : * - (l,nk,nk), (nk,l,nk), (nk,nk,l) : like vector-product * - (kl,nk,n), (nk,kl,n),(nk,n,kl) : one small rectangular matrix * - (kl,n,nk), (n,kl,nk),(n,nk,kl) : same * - (nl,n,n),(n,nl,n),(n,n,nl) : square (or close to) * . * @param k parameter. * @param charac characteristic of the field. * @param l small parameter (ie close to 1) */ void bench_rectangular( index_t k, int charac, index_t l = 2 ) { int n = k*k ; int nk = n*k ; int kl = k*l ; int nl = n*l ; typedef LinBox::Modular Field ; Field F(charac) ; index_t it = 0 ; index_t nb = 12 ; LinBox::PlotData Data(nb,1); Data.setSerieName(0,"mflops"); launch_bench_rectangular(F,l,nk,nk,Data,it++); launch_bench_rectangular(F,nk,l,nk,Data,it++); launch_bench_rectangular(F,nk,nk,l,Data,it++); launch_bench_rectangular(F,kl,nk,n,Data,it++); launch_bench_rectangular(F,nk,kl,n,Data,it++); launch_bench_rectangular(F,nk,n,kl,Data,it++); launch_bench_rectangular(F,n,nk,kl,Data,it++); launch_bench_rectangular(F,nk,n,kl,Data,it++); launch_bench_rectangular(F,nk,kl,n,Data,it++); launch_bench_rectangular(F,nl,n,n,Data,it++); launch_bench_rectangular(F,n,nl,n,Data,it++); launch_bench_rectangular(F,n,n,nl,Data,it++); //!@todo resize if it>nb !! linbox_check(it==nb); LinBox::PlotStyle Style; Style.setTerm(LinBox::PlotStyle::Term::eps); Style.setTitle("fgemm","x","y"); Style.setPlotType(LinBox::PlotStyle::Plot::histo); Style.setXtics(LinBox::PlotStyle::Options::oblique);// make long legends oblique. Style.addPlotType("set style histogram cluster gap 1"); Style.addPlotType("set style fill solid border -1"); Style.addPlotType("set boxwidth 0.9"); // Style.setType(LinBox::PlotStyle::lines); Style.setUsingSeries(2); LinBox::PlotGraph Graph(Data,Style); Graph.setOutFilename("fgemm_rect"); // Graph.plot(); Graph.print_gnuplot(); Graph.print_latex(); return ; } /*! @brief Benchmark fgemm \f$D\gets\alpha A B+\beta C\f$ for general \f$\alpha,\beta\f$. * @param k parameter. * @param charac characteristic of the field. * @param inplace "inplace" matmul (ie. C=D is overwritten) */ void bench_scalar( index_t k, int charac, bool inplace ) { typedef LinBox::Modular Field ; typedef Field::Element Element; typedef Field::RandIter Randiter ; Field F(charac) ; index_t it = 0 ; index_t nb = 12 ; LinBox::PlotData Data(nb,1); Data.setSerieName(0,"fgemm"); Element one, zero, mOne, alpha, beta ; F.init(one,1); F.init(mOne,-1); F.init(zero,0); Randiter R(F) ; linbox_check(charac >=5) ; do { R.random(alpha) ; } // non trivial alpha while (F.areEqual(alpha,one) || F.areEqual(alpha,mOne) || F.areEqual(alpha,zero)) ; do { R.random(beta) ; }// non trivial beta while (F.areEqual(beta,one) || F.areEqual(beta,mOne) || F.areEqual(beta,zero)) ; // D = AB + beta C launch_bench_scalar(F,k,k,k,one,zero,Data,it++,inplace); launch_bench_scalar(F,k,k,k,one,mOne,Data,it++,inplace); launch_bench_scalar(F,k,k,k,one,one ,Data,it++,inplace); launch_bench_scalar(F,k,k,k,one,beta,Data,it++,inplace); // D = -AB + beta C launch_bench_scalar(F,k,k,k,mOne,zero,Data,it++,inplace); launch_bench_scalar(F,k,k,k,mOne,mOne,Data,it++,inplace); launch_bench_scalar(F,k,k,k,mOne,one ,Data,it++,inplace); launch_bench_scalar(F,k,k,k,mOne,beta,Data,it++,inplace); // D = alpha AB + beta C launch_bench_scalar(F,k,k,k,alpha,zero,Data,it++,inplace); launch_bench_scalar(F,k,k,k,alpha,mOne,Data,it++,inplace); launch_bench_scalar(F,k,k,k,alpha,one ,Data,it++,inplace); launch_bench_scalar(F,k,k,k,alpha,beta,Data,it++,inplace); linbox_check(it==nb); LinBox::PlotStyle Style; Style.setTerm(LinBox::PlotStyle::Term::eps); Style.setTitle("fgemm","x","y"); Style.setPlotType(LinBox::PlotStyle::Plot::histo); Style.setXtics(LinBox::PlotStyle::Options::oblique);// make long legends oblique. Style.addPlotType("set style histogram cluster gap 1"); Style.addPlotType("set style fill solid border -1"); Style.addPlotType("set boxwidth 0.9"); // Style.setType(LinBox::PlotStyle::lines); Style.setUsingSeries(2); LinBox::PlotGraph Graph(Data,Style); Graph.setOutFilename("fgemm_scal"); // Graph.plot(); Graph.print_gnuplot(); Graph.print_latex(); return ; } /*! @brief Benchmark fgemm \f$D\gets\alpha A^x B^y+\beta C\f$ for \f$x,y=1,\top\f$ (transpose or not). * @param k parameter. * @param charac characteristic of the field. * @param inplace "inplace" matmul (ie. C=D is overwritten) */ void bench_transpose( index_t k, int charac, bool inplace ) { typedef LinBox::Modular Field ; typedef Field::Element Element; typedef Field::RandIter Randiter ; Field F(charac) ; index_t it = 0 ; index_t nb = 8 ; LinBox::PlotData Data(nb,1); Data.setSerieName(0,"fgemm"); Element one, zero, mOne, alpha, beta ; F.init(one,1); F.init(mOne,-1); F.init(zero,0); Randiter R(F) ; linbox_check(charac >=5) ; do { R.random(alpha) ; } // non trivial alpha while (F.areEqual(alpha,one) || F.areEqual(alpha,mOne) || F.areEqual(alpha,zero)) ; do { R.random(beta) ; }// non trivial beta while (F.areEqual(beta,one) || F.areEqual(beta,mOne) || F.areEqual(beta,zero)) ; // D = A^xB^y launch_bench_scalar(F,k,k,k,one,zero,Data,it++,inplace); launch_bench_scalar(F,k,k,k,one,zero,Data,it++,inplace); launch_bench_scalar(F,k,k,k,one,zero,Data,it++,inplace); launch_bench_scalar(F,k,k,k,one,zero,Data,it++,inplace); // D = alpha A^xB^y + beta C launch_bench_scalar(F,k,k,k,alpha,beta,Data,it++,inplace); launch_bench_scalar(F,k,k,k,alpha,beta,Data,it++,inplace); launch_bench_scalar(F,k,k,k,alpha,beta,Data,it++,inplace); launch_bench_scalar(F,k,k,k,alpha,beta,Data,it++,inplace); linbox_check(it==nb); LinBox::PlotStyle Style; Style.setTerm(LinBox::PlotStyle::Term::eps); Style.setTitle("fgemm","x","y"); Style.setPlotType(LinBox::PlotStyle::Plot::histo); Style.setXtics(LinBox::PlotStyle::Options::oblique);// make long legends oblique. Style.addPlotType("set style histogram cluster gap 1"); Style.addPlotType("set style fill solid border -1"); Style.addPlotType("set boxwidth 0.9"); // Style.setType(LinBox::PlotStyle::lines); Style.setUsingSeries(2); LinBox::PlotGraph Graph(Data,Style); Graph.setOutFilename("fgemm_trans"); // Graph.plot(); Graph.print_gnuplot(); Graph.print_latex(); return ; } /* Benchmark fgemm Y = a AX + b Y for various (a,b) couples */ /* main */ int main( int ac, char ** av) { /* Argument parsing/setting */ static index_t min = 100; /* min size */ static index_t max = 1500; /* max size (not included) */ static index_t step = 100; /* step between 2 sizes */ static std::list lst ; /* what bench to start ? */ lst.push_front(1);// ={1,2} vivement le nouveau std... lst.push_front(2); static Argument as[] = { { 'm', "-m min" , "Set minimal size of matrix to test." , TYPE_INT , &min }, { 'M', "-M Max" , "Set maximal size." , TYPE_INT , &max }, { 's', "-s step", "Sets the gap between two matrix sizes.", TYPE_INT , &step }, { 'l', "-l list", "Only launches a subset of available benchmarks\n - 1: compare to raw blas\n - 2:various square sizes\n - 3:various shapes\n - 4: various parameters (a,b)\n - 5 : various transp. combinations", TYPE_INTLIST, &lst }, END_OF_ARGUMENTS }; LinBox::parseArguments (ac, av, as); if (min >= max) { throw LinBox::LinBoxError("min value should be smaller than max..."); } if (min + step >= max) { std::cout << "Warning : your x axis has only one point. You should have a smaller step." << std::endl; } //! @todo use commentator. lst.unique(); lst.sort(); if (lst.empty()) { std::cerr << "Warning, you are not benchmarking anything. Please check the -l value." << std::endl; } std::list::iterator it = lst.begin(); /* against pure blas routine */ if (*it == 1) { std::cout << "bench 1 : blas" << std::endl; bench_blas(min,max,step,13); bench_blas(min,max,step,2011); bench_blas(min,max,step,65537); if (++it == lst.end()) return EXIT_SUCCESS ; } /* square for various fields */ if (*it == 2) { std::cout << "bench 2 : square" << std::endl; bench_square(min,max,step,13); bench_square(min,max,step,2011); bench_square(min,max,step,65537); if (++it == lst.end()) return EXIT_SUCCESS ; } /* various shapes. */ if (*it == 3) { std::cout << "bench 3 : shapes" << std::endl; int cube = (int) std::pow(max,double(1/3.)); bench_rectangular(cube,2011); if (++it == lst.end()) return EXIT_SUCCESS ; } /* various parameters */ if (*it == 4) { std::cout << "bench 4 : scalars" << std::endl; bench_scalar(max,65537,false); bench_scalar(max,65537,true); if (++it == lst.end()) return EXIT_SUCCESS ; } /* various tranpositions */ if (*it == 5) { std::cout << "bench 2 : transp" << std::endl; bench_transpose(max,65537,true); bench_transpose(max,65537,true); if (++it != lst.end()) { std::cerr << "*** error *** your list contains (at least) one unknown element : " << *it << '!' << std::endl; } } else { std::cerr << "*** error *** your list contains (at least) one unknown element : " << *it << '!' << std::endl; } return EXIT_SUCCESS ; } // Local Variables: // mode: C++ // tab-width: 8 // indent-tabs-mode: nil // c-basic-offset: 8 // End: // vim:sts=8:sw=8:ts=8:noet:sr:cino=>s,f0,{0,g0,(0,\:0,t0,+0,=s linbox-1.3.2/benchmarks/benchmark-ftrXm.C000066400000000000000000000563271176453053400203060ustar00rootroot00000000000000 /* Copyright (C) 2011 LinBox * Written by BB * * * * ========LICENCE======== * This file is part of the library LinBox. * * LinBox is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ========LICENCE======== */ /*! @file benchmarks/benchmark-ftrXm.C * @ingroup benchmarks * @brief Benchmarking triangular matrix multiplication on finite fields. * This file benchmarks the FFLAS::ftrmm, FFLAS::ftrsm implementation for various fields, * shape and parameters. Actually, we use the wrapper member \c mul of LinBox::BlasMatrixDomain. * @todo ftrmm has an 'alpha' but mul/mulin in BMd don't... That could be useful for \f$\alpha=-1\f$... * @todo benchmark ftrsm too here. */ #include "benchmarks/benchmark.h" #include "linbox/util/error.h" #include "linbox/field/modular.h" #include "linbox/field/modular-balanced.h" #include "fflas-ffpack/ffpack/ffpack.h" #include "fflas-ffpack/fflas/fflas.h" #include "linbox/matrix/random-matrix.h" #include "linbox/matrix/blas-matrix.h" #include "linbox/algorithms/blas-domain.h" #define _LB_LEFT true #define _LB_RITE false #define _LB_TRANS false #define _LB_NOTRS true #define _LB_UNIT true #define _LB_DIAG false #define _LB_TSUP true #define _LB_TLOW false using LinBox::Timer ; /* ********************** */ /* Outils */ /* ********************** */ /*! @brief Watches a timer and a number and repet and signals if over. * * We want at least 2 repetions but not more than maxtime spent on timing. * * @param repet number of previous repetitions. Should be 0 on the first time * \c whatchon is called. * @param tim timer to watch * @param maxtime maximum time (in seconds) until \c watchon tells stop. * @return \c true if we conditions are not met to stop, \c false otherwise. * @pre \c tim was clear at the beginning and never started. * */ bool keepon(index_t & repet, Timer & tim, double maxtime=0.5) { if (repet<2 || tim.usertime() < maxtime) { ++repet ; return true; } return false ; } /*! @brief Watches a timer and a number and repet and signals if over. * * We want at least 2 repetions but not more than maxtime spent on timing. * * @param repet number of previous repetitions. Should be 0 on the first time \c whatchon is called. * @param tim timer to watch * @param maxtime maximum time (in seconds) until \c watchon tells stop. * @return \c true if we conditions are not met to stop, \c false otherwise. * @pre \c tim should have been started previously ! * */ bool whatchon(index_t & repet, Timer & tim, double maxtime=0.5) { if (repet<2 || tim.userElapsedTime() < maxtime) { ++repet ; return true; } return false ; } double ftrmm_mflops(index_t m, index_t n, index_t k) { return (double)m*(double)n/1e6*(double)k ; } double compute_mflops(const Timer & t, const double mflo, const int rpt = 1) { linbox_check(rpt); return (double) ((mflo*rpt)/t.usertime()); } /*! @internal * @brief launches the benchmarks for the square case. * @param F field * @param min min size to bench * @param max max size to bench * @param step step between two sizes * @param Data where data is stored * @param series_nb index of the current series. */ template void launch_bench_square(Field & F // const problem , index_t min, index_t max, int step , LinBox::PlotData & Data , index_t series_nb) { index_t l = 0 ; Timer fgemm_sq_tim ; Timer chrono ; double mflops ; typedef typename Field::Element Element; typedef typename Field::RandIter Randiter ; Randiter R(F) ; LinBox::NonzeroRandIter Rn(F,R); LinBox::BlasMatrixDomain BMD(F) ; LinBox::RandomDenseMatrix RandMat(F,R); // index_t repet = 3 ; for ( index_t i = min ; i < max ; i += step , ++l ) { int ii = i ; // sinon, le constructeur le plus proche serait (_Matrix,_Field)... n'impnawak... LinBox::TriangularBlasMatrix A (ii,ii, (TriSup?LinBox::LinBoxTag::Upper:LinBox::LinBoxTag::Lower), (UnitDiag?LinBox::LinBoxTag::Unit:LinBox::LinBoxTag::NonUnit)); LinBox::BlasMatrix B (ii,ii); if (!series_nb) Data.setAbsciName(l,i); // only write abscissa for serie 0 index_t j = 0 ; // number of repets. fgemm_sq_tim.clear() ; while( keepon(j,fgemm_sq_tim) ) { RandMat.random(A); for (size_t k=0 ; k<(size_t)ii ; ++k) Rn.random(A.refEntry(k,k)) ; RandMat.random(B); chrono.clear() ; chrono.start() ; if(LeftSide) BMD.mulin_right(A,B) ; // B <- AB else BMD.mulin_left(B,A) ; // B <- BA chrono.stop(); fgemm_sq_tim += chrono ; } if (!j){ std::cout << "multiplication did not happen" << std::endl; } #ifdef _LB_DEBUG else { std::cout << i << ',' << j << std::endl; } #endif mflops = compute_mflops(fgemm_sq_tim,ftrmm_mflops(i,i,i),j); Data.setEntry(series_nb,l,mflops); } std::string nam = "\""; if (TriSup) nam += "upper " ; else nam += "lower " ; if (LeftSide) nam += "left " ; else nam += "right " ; if (UnitDiag) nam += "non-" ; nam += "unit\"" ; Data.setSerieName(series_nb,nam); } /*! @internal * @brief launches the benchmarks for the square case directly BLAS. * @param min min size to bench * @param max max size to bench * @param step step between two sizes * @param Data where data is stored * @param series_nb index of the current series. */ template void launch_bench_blas(index_t min, index_t max, int step , LinBox::PlotData & Data , index_t series_nb , index_t charact) { typedef LinBox::Modular Field ; Field F((int)charact); index_t l = 0 ; Timer ftrmm_blas_tim ; Timer chrono ; double mflops ; typedef typename Field::Element Element ; typedef typename Field::RandIter Randiter; Randiter R(F) ; // LinBox::BlasMatrixDomain BMD(F) ; // LinBox::RandomDenseMatrix RandMat(F,R); // index_t repet = 3 ; index_t mm = max * max ; Element * A = new Element[mm] ; Element * B = new Element[mm] ; Element * C = new Element[mm] ; typedef typename LinBox::UnparametricField FloatingDomain ; FloatingDomain G ; for ( index_t i = min ; i < max ; i += step , ++l ) { int ii = i ; // sinon, le constructeur le plus proche serait (_Matrix,_Field)... n'impnawak... index_t mimi = (index_t) ii*ii ; index_t j = 0 ; ftrmm_blas_tim.clear() ; while(keepon(j,ftrmm_blas_tim)) { for (index_t j = 0 ; j < mimi ; ++j) R.random(A[j]); for (index_t j = 0 ; j < mimi ; ++j) R.random(B[j]); for (index_t j = 0 ; j < mimi ; ++j) R.random(C[j]); chrono.clear(); chrono.start() ; FFLAS::ftrmm(G,FFLAS::FflasLeft,FFLAS::FflasUpper, FFLAS::FflasNoTrans, FFLAS::FflasUnit, ii,ii, 1., A,ii, B,ii) ; chrono.stop() ; ftrmm_blas_tim += chrono ; } mflops = compute_mflops(ftrmm_blas_tim,ftrmm_mflops(i,i,i),j); Data.setEntry(series_nb,l,mflops); } delete[] A ; delete[] B ; delete[] C ; std::ostringstream nam ; nam << '\"' ; G.write(nam); nam << '\"' ; Data.setSerieName(series_nb,nam.str()); } /*! @internal * @brief launches the benchmarks for the square case. * C= AB * @param F field * @param m rows in A * @param n cols in A * @param Data where data is stored * @param point_nb point to be computed */ template void launch_bench_rectangular(Field & F // const problem , index_t m, index_t n , LinBox::PlotData & Data , index_t point_nb) { Timer ftrmm_rect_tim ; Timer chrono ; chrono.clear(); double mflops ; typedef typename Field::Element Element; typedef typename Field::RandIter Randiter ; typedef typename LinBox::TriangularBlasMatrix TriangularMatrix ; typedef typename LinBox::BlasMatrix Matrix ; Randiter R(F) ; LinBox::BlasMatrixDomain BMD(F) ; LinBox::RandomDenseMatrix RandMat(F,R); index_t k = (LeftSide?m:n); TriangularMatrix A (k,k, (TriSup?LinBox::LinBoxTag::Upper:LinBox::LinBoxTag::Lower), (UnitDiag?LinBox::LinBoxTag::Unit:LinBox::LinBoxTag::NonUnit)); Matrix B ((int)m,(int)n); index_t j = 0 ; ftrmm_rect_tim.clear() ; while (keepon(j,ftrmm_rect_tim)) { RandMat.random(A); RandMat.random(B); chrono.clear() ; chrono.start() ; if(LeftSide) BMD.mulin_right(A,B) ; // B <- AB else BMD.mulin_left(B,A) ; // B <- BA chrono.stop(); ftrmm_rect_tim += chrono ; } if (!j) { std::cout << "multiplication did not happen" << std::endl; } #ifdef _LB_DEBUG else { std::cout << point_nb << std::endl; } #endif mflops = compute_mflops(ftrmm_rect_tim,ftrmm_mflops(m,k,n),(int)j); Data.setEntry(0,point_nb,mflops); std::ostringstream nam ; if (LeftSide) nam << "\"(" << k << ':' << m << ',' << n << ")" ; else nam << "\"(" << m << ',' << n << ':' << k << ")" ; nam << " (" << (UnitDiag?"":"non") << "unit) on "; F.write(nam); nam << '\"' ; Data.setAbsciName(point_nb,nam.str()); return ; } /*! @internal * @brief launches the benchmarks for various parameters of a, b. * B = aAB or B=aBA with A triangular. * @todo We test various parameters \f$alpha\f$. * We test A being transposed or not. * @param F field * @param m rows in B * @param n cols in B * @param alpha alpha (not zero) * @param Data where data is stored * @param point_nb point to be computed */ template void launch_bench_scalar(Field & F // const problem , int m, int n , const typename Field::Element & alpha //!@warning not used yet. , LinBox::PlotData & Data , index_t point_nb) { Timer ftrmm_scal_tim ; Timer chrono ; ftrmm_scal_tim.clear(); double mflops ; typedef typename Field::Element Element; typedef typename Field::RandIter Randiter ; typedef typename LinBox::BlasMatrix Matrix ; typedef typename LinBox::TriangularBlasMatrix TriangularMatrix ; typedef typename LinBox::TransposedBlasMatrix TransposedTriangular ; Randiter R(F) ; LinBox::BlasMatrixDomain BMD(F) ; LinBox::RandomDenseMatrix RandMat(F,R); index_t k = (LeftSide?m:n); TriangularMatrix A (k,k, (TriSup?LinBox::LinBoxTag::Upper:LinBox::LinBoxTag::Lower), (UnitDiag?LinBox::LinBoxTag::Unit:LinBox::LinBoxTag::NonUnit)); TransposedTriangular At(A); Matrix B (m,n); index_t j = 0 ; while (keepon(j,ftrmm_scal_tim)) { RandMat.random(A); RandMat.random(B); chrono.clear() ; chrono.start(); if (tA) { if(LeftSide) BMD.mulin_right(At,B) ; // B <- AB else BMD.mulin_left(B,At) ; // B <- BA } else { if(LeftSide) BMD.mulin_right(A,B) ; // B <- AB else BMD.mulin_left(B,A) ; // B <- BA } chrono.stop() ; ftrmm_scal_tim += chrono ; } if (!j) { std::cout << "multiplication did not happen" << std::endl; } #ifdef _LB_DEBUG else { std::cout << point_nb << std::endl; } #endif mflops = compute_mflops(ftrmm_scal_tim,ftrmm_mflops(m,k,n),(int)j); Data.setEntry(0,point_nb,mflops); std::ostringstream nam ; nam << "\"(" << m << 'x' << n << ") "; nam << "B=" << alpha << " " ; if (LeftSide) nam << (tA?"t":"")<< "A.B" ; else nam << "B." << (tA?"t":"")<< "A" ; nam << " (" << (UnitDiag?"":"non") << "unit) on "; F.write(nam); nam << '\"' ; Data.setAbsciName(point_nb,nam.str()); } /* ********************** */ /* Tests */ /* ********************** */ /*! @brief Benchmark square ftrmm for differenct parameters. * @param min min size * @param max max size * @param step step of the size between 2 benchmarks * @param charac characteristic of the field. */ void bench_square( index_t min, index_t max, int step, int charac ) { int nb = 9 ;// une col de plus (la première) typedef LinBox::Modular Field ; ++nb ; int nb_pts = (int) std::ceil((double)(max-min)/(double)step) ; LinBox::PlotData Data(nb_pts,nb); LinBox::PlotStyle Style; int it = 0 ; Field F(charac) ; std::cout << "0.." << std::flush; /* _LB_LEFT,_LB_UNIT,_LB_TSUP */ launch_bench_square(F,min,max,step,Data,it++); std::cout << "1.." << std::flush; launch_bench_square(F,min,max,step,Data,it++); std::cout << "2.." << std::flush; launch_bench_square(F,min,max,step,Data,it++); std::cout << "3.." << std::flush; launch_bench_square(F,min,max,step,Data,it++); std::cout << "4.." << std::flush; launch_bench_square(F,min,max,step,Data,it++); std::cout << "5.." << std::flush; launch_bench_square(F,min,max,step,Data,it++); std::cout << "6.." << std::flush; launch_bench_square(F,min,max,step,Data,it++); std::cout << "7.." << std::flush; launch_bench_square(F,min,max,step,Data,it++); std::cout << "9!!" << std::endl; linbox_check(it <= nb); Style.setTerm(LinBox::PlotStyle::Term::eps); Style.setTitle("ftrmm","x","y"); Style.setPlotType(LinBox::PlotStyle::Plot::graph); Style.setLineType(LinBox::PlotStyle::Line::linespoints); Style.setUsingSeries(std::pair(2,nb)); LinBox::PlotGraph Graph(Data,Style); Graph.setOutFilename("ftrmm_square"); // Graph.plot(); Graph.print_gnuplot(); Graph.print_latex(); return ; } /*! @brief Benchmark square ftrmm for several fields. * @param min min size * @param max max size * @param step step of the size between 2 benchmarks */ void bench_fields( index_t min, index_t max, int step ) { int nb = 1 ;// une col de plus (la première) typedef LinBox::Modular Field0 ; ++nb ; typedef LinBox::Modular Field1 ; ++nb ; typedef LinBox::ModularBalanced Field2 ; ++nb ; typedef LinBox::ModularBalanced Field3 ; ++nb ; Field0 F0(2011); Field1 F1(65537); Field2 F2(2011); Field3 F3(65537); int nb_pts = (int) std::ceil((double)(max-min)/(double)step) ; LinBox::PlotData Data(nb_pts,nb); LinBox::PlotStyle Style; int it = 0 ; std::cout << "0.." << std::flush; /* _LB_LEFT,_LB_UNIT,_LB_TSUP */ launch_bench_square(F0,min,max,step,Data,it++); std::cout << "1.." << std::flush; launch_bench_square(F1,min,max,step,Data,it++); std::cout << "2.." << std::flush; launch_bench_square(F2,min,max,step,Data,it++); std::cout << "3.." << std::flush; launch_bench_square(F3,min,max,step,Data,it++); std::cout << "4!!" << std::endl; linbox_check(it <= nb); Style.setTerm(LinBox::PlotStyle::Term::eps); Style.setTitle("ftrmm for various fields","x","y"); Style.setPlotType(LinBox::PlotStyle::Plot::graph); Style.setLineType(LinBox::PlotStyle::Line::linespoints); Style.setUsingSeries(std::pair(2,nb)); LinBox::PlotGraph Graph(Data,Style); Graph.setOutFilename("ftrmm_fields"); // Graph.plot(); Graph.print_gnuplot(); Graph.print_latex(); return ; } /*! Benchmark fgemm Y=AX for several sizes of sqare matrices. * @param min min size * @param max max size * @param step step of the size between 2 benchmarks */ void bench_blas( index_t min, index_t max, int step ) { //!@todo compare to cblas_dgemm instead. typedef LinBox::Modular DoubleField ; typedef LinBox::Modular FloatField ; int nb_pts = (int) std::ceil((double)(max-min)/(double)step) ; int it = 0 ; int nb = 5 ; LinBox::PlotData Data(nb_pts,nb); FloatField F0(13) ; /* _LB_LEFT,_LB_UNIT,_LB_TSUP */ launch_bench_square(F0,min,max,step,Data,it++); launch_bench_blas(min,max,step,Data,it++,13); DoubleField F1(65537) ; /* _LB_LEFT,_LB_UNIT,_LB_TSUP */ launch_bench_square(F1,min,max,step,Data,it++); launch_bench_blas(min,max,step,Data,it++,65537); linbox_check(it+1==nb); LinBox::PlotStyle Style; Style.setTerm(LinBox::PlotStyle::Term::eps); Style.setTitle("ftrmm","x","y"); Style.setPlotType(LinBox::PlotStyle::Plot::graph); Style.setLineType(LinBox::PlotStyle::Line::linespoints); Style.setUsingSeries(std::pair(2,nb)); LinBox::PlotGraph Graph(Data,Style); Graph.setOutFilename("ftrmm_blas"); // Graph.plot(); Graph.print_gnuplot(); Graph.print_latex(); return ; } /*! @brief Benchmark fgemm Y=AX for several shapes. * we test the following shapes : * - (2k,2k):2k, 2k:(2k,2k) * - (k,2k):2k, 2k:(2k,k) * - (4k,2k):2k , 2k:(2k,4k) * . * @param k parameter. * @param charac characteristic of the field. */ void bench_rectangular( index_t k, int charac ) { typedef LinBox::Modular Field ; Field F(charac) ; index_t it = 0 ; index_t nb = 6 ; LinBox::PlotData Data(nb,1); Data.setSerieName(0,"mflops"); launch_bench_rectangular(F,2*k,2*k,Data,it++); launch_bench_rectangular(F,2*k,2*k,Data,it++); launch_bench_rectangular(F,2*k,k,Data,it++); launch_bench_rectangular(F,k,2*k,Data,it++); launch_bench_rectangular(F,2*k,4*k,Data,it++); launch_bench_rectangular(F,4*k,2*k,Data,it++); //!@todo resize if it>nb !! linbox_check(it==nb); LinBox::PlotStyle Style; Style.setTerm(LinBox::PlotStyle::Term::eps); Style.setTitle("ftrmm","x","y"); Style.setPlotType(LinBox::PlotStyle::Plot::histo); Style.setXtics(LinBox::PlotStyle::Options::oblique);// make long legends oblique. Style.addPlotType("set style histogram cluster gap 1"); Style.addPlotType("set style fill solid border -1"); Style.addPlotType("set boxwidth 0.9"); //! @todo make long legends oblique. // Style.setType(LinBox::PlotStyle::lines); Style.setUsingSeries(2); LinBox::PlotGraph Graph(Data,Style); Graph.setOutFilename("ftrmm_rect"); // Graph.plot(); Graph.print_gnuplot(); Graph.print_latex(); return ; } /*! @brief Benchmark ftrmm with transpose or alpha parameters on. * @param k parameter. * @param charac characteristic of the field. */ void bench_transpose( index_t k, int charac) { typedef LinBox::Modular Field ; typedef Field::Element Element; typedef Field::RandIter Randiter ; Field F(charac) ; index_t it = 0 ; index_t nb = 2 ; LinBox::PlotData Data(nb,1); Data.setSerieName(0,"fgemm"); Element one, zero, mOne, alpha, beta ; F.init(one,1); F.init(mOne,-1); F.init(zero,0); Randiter R(F) ; linbox_check(charac >=5) ; do { R.random(alpha) ; } // non trivial alpha while (F.areEqual(alpha,one) || F.areEqual(alpha,mOne) || F.areEqual(alpha,zero)) ; do { R.random(beta) ; }// non trivial beta while (F.areEqual(beta,one) || F.areEqual(beta,mOne) || F.areEqual(beta,zero)) ; // D = A^xB^y launch_bench_scalar(F,k,k,one,Data,it++); launch_bench_scalar(F,k,k,one,Data,it++); linbox_check(it==nb); LinBox::PlotStyle Style; Style.setTerm(LinBox::PlotStyle::Term::eps); Style.setTitle("fgemm","x","y"); Style.setPlotType(LinBox::PlotStyle::Plot::histo); Style.setXtics(LinBox::PlotStyle::Options::oblique);// make long legends oblique. Style.addPlotType("set style histogram cluster gap 1"); Style.addPlotType("set style fill solid border -1"); Style.addPlotType("set boxwidth 0.9"); // Style.setType(LinBox::PlotStyle::lines); Style.setUsingSeries(2); LinBox::PlotGraph Graph(Data,Style); Graph.setOutFilename("fgemm_trans"); // Graph.plot(); Graph.print_gnuplot(); Graph.print_latex(); return ; } /* main */ int main( int ac, char ** av) { /* Argument parsing/setting */ static index_t min = 100; /* min size */ static index_t max = 2000; /* max size (not included) */ static index_t step = 200; /* step between 2 sizes */ static std::list lst ; /* what bench to start ? */ lst.push_front(1);// ={1,2} vivement le nouveau std... lst.push_front(2); static Argument as[] = { { 'm', "-m min" , "Set minimal size of matrix to test." , TYPE_INT , &min }, { 'M', "-M Max" , "Set maximal size." , TYPE_INT , &max }, { 's', "-s step", "Sets the gap between two matrix sizes.", TYPE_INT , &step }, { 'l', "-l list", "Only launches a subset of available benchmarks\n - 1: compare to raw blas\n - 2:various square sizes\n - 3:various shapes\n - 4: various parameters (a,b)\n - 5 : various transp. combinations", TYPE_INTLIST, &lst }, END_OF_ARGUMENTS }; parseArguments (ac, av, as); if (min >= max) { throw LinBox::LinBoxError("min value should be smaller than max..."); } if (min + step >= max) { std::cout << "Warning : your x axis has only one point. You should have a smaller step." << std::endl; } //! @todo use commentator. lst.unique(); lst.sort(); bench_square(min,max,step,2011); bench_fields(min,max,step); bench_blas(min,max,step); bench_rectangular(max/2,2011); bench_transpose(max,2011); #if 0 /* to be uncommented */ if (lst.empty()) { std::cerr << "Warning, you are not benchmarking anything. Please check the -l value." << std::endl; } std::list::iterator it = lst.begin(); /* against pure blas routine */ if (*it == 1) { std::cout << "bench 1 : blas" << std::endl; bench_blas(min,max,step); if (++it == lst.end()) return EXIT_SUCCESS ; } /* square for various fields */ if (*it == 2) { std::cout << "bench 2 : square" << std::endl; bench_square(min,max,step,13); bench_square(min,max,step,2011); bench_square(min,max,step,65537); if (++it == lst.end()) return EXIT_SUCCESS ; } /* various shapes. */ if (*it == 3) { std::cout << "bench 3 : shapes" << std::endl; int cube = (int) std::pow(max,double(1/3.)); bench_rectangular(cube,2011); if (++it == lst.end()) return EXIT_SUCCESS ; } /* various parameters */ if (*it == 4) { std::cout << "bench 4 : scalars" << std::endl; bench_scalar(max,65537,false); bench_scalar(max,65537,true); if (++it == lst.end()) return EXIT_SUCCESS ; } /* various tranpositions */ if (*it == 5) { std::cout << "bench 2 : transp" << std::endl; bench_transpose(max,65537,true); bench_transpose(max,65537,true); if (++it != lst.end()) { std::cerr << "*** error *** your list contains (at least) one unknown element : " << *it << '!' << std::endl; } } else { std::cerr << "*** error *** your list contains (at least) one unknown element : " << *it << '!' << std::endl; } #endif return EXIT_SUCCESS ; } #undef _LB_RITE #undef _LB_LEFT #undef _LB_TSUP #undef _LB_TLOW #undef _LB_UNIT #undef _LB_DIAG #undef _LB_TRANS #undef _LB_NOTRS // vim:sts=8:sw=8:ts=8:noet:sr:cino=>s,f0,{0,g0,(0,:0,t0,+0,=s // Local Variables: // mode: C++ // tab-width: 8 // indent-tabs-mode: nil // c-basic-offset: 8 // End: linbox-1.3.2/benchmarks/benchmark.doxy000066400000000000000000000033751176453053400200040ustar00rootroot00000000000000/* * Coypright (c) LinBox * ========LICENCE======== * This file is part of the library LinBox. * * LinBox is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ========LICENCE======== * */ /*! \ingroup linbox * \defgroup benchmarks Benchmarks * @brief This directory is used to perform benchmarks on LinBox. * The benchmarks are meant for : * - the \e user to guide her through the various choices of * algorithms/implementation provided in her particular case. * - the \e developper to test her new algorithms against the others or check * that the newest shiny subroutine she just wrote didn't deteriorate too much * the performance of LinBox :) (regression testing purpose). * . * * Benchmarks can be grouped in : * - basic routines (fflas/ffpack, integer operations,...) ; * - algorithms ; * - solutions. * . * * When another free library (NTL, IML,...) provides a routine that exists in * LinBox, we want to be able to compare it to our implementation. * * Default parameters can be changed on the command-line, just as in \c * examples/ and \c tests/. */ // vim:syntax=doxygen linbox-1.3.2/benchmarks/benchmark.h000066400000000000000000000713321176453053400172460ustar00rootroot00000000000000/* Copyright (C) 2011 LinBox * Written by BB * * * * ========LICENCE======== * This file is part of the library LinBox. * * LinBox is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ========LICENCE======== */ /*! @file benchmarks/benchmark.h * @ingroup benchmarks * @brief Common header to ease benchmarking routines. * We provide a class to easily populate and plot files that represent * benchmarks. * * We use gnuplot for the plotting part * or LaTeX to provide tables. A minimum knowledge of \c Gnuplot is a plus but * the \c benchmark-* files should provide enough examples for creating * standard (not too fancy) plots. * * We fall back to plain latex tabulars when gnuplot is not available. We plot * graphs in files whose name is extended by a random 8-char string to avoid * écraser files. * */ #ifndef __LINBOX_benchmark_H #define __LINBOX_benchmark_H #include #include "linbox/integer.h" #include "linbox/util/debug.h" #include "tests/test-common.h" #include "linbox/util/timer.h" #include #include typedef uint32_t index_t ; namespace LinBox { /*! @brief Represents a table of values to plot. * list of values are reprensented by vectors. the table is a vector * of these vectors. * * @warning NaN, inf are used as missing data. More genenally * we could store data in strings. * @todo Allow for 'speed up against col X' style */ class PlotStyle { public: //! What format the plot should be in? struct Term { //! Term type enum Type { png = 100, //!< png. Portable Network Graphics file. pdf = 101, //!< pdf. Portable Document Format actually, this is eps converted to pdf. eps = 102, //!< eps. Encapsulated PostScript. Cool for inclusion in LaTex files. This is the default. svg = 103, //!< sgv. Scalable Vector Graphics. tex = 104, //!< tex. Simple tabular. html = 105, //!< html. HTML table. other= 106 //!< don't know yet... } ; }; // enum NoType { other = 0 } ; //! What style of graphic : histogram ? graph ? struct Plot { //! Plot type enum Type { histo = 200, //! histogram plot. This is the default. x ticks are evenly spaced, whatever there value and are labelled with their value. graph = 201, //! standard plot. Plots y_i=f(x) with x in the first colum and y_i in ith column. x-ticks are well spaced. other = 202 //! other (ie user supplied). } ; }; struct Line { enum Type { lines = 300, //! lines. histogram = 301, //! histogram (boxes). linespoints= 302, //! lines with points. (default) points = 303, //! only the points. other = 304 //! rien. } ; }; struct Options { enum Type { oblique = 400, other = 401 }; }; /*! @brief Constructor. * By default, creates an histogram representing the data in an eps plot. */ PlotStyle() : _term_(Term::eps),_plot_type_(Plot::histo),_line_type_(Line::histogram) { } /*! @brief sets the titles in the graph. * @param titre Title of the graph * @param titre_y Title of the y-axis (series) * @param titre_x Title of the x-axis (data points) */ void setTitle ( std::string titre , std::string titre_y , std::string titre_x) { _title_ = titre ; _title_x_ = titre_x ; _title_y_ = titre_y ; } /*! @brief Gets the title of the graph. * @return a gnuplot command to set the title of the graph. */ std::string getTitle() { std::string title = "#title\nset title \"" + _title_ + '\"'; if (!_title_x_.empty()) title +="\nset xlabel \"" + _title_x_ +'\"' ; if (!_title_y_.empty()) title +="\nset ylabel \"" + _title_y_ +'\"' ; return title ; } /*! @brief Gets the title of points abscissa. * @return a gnuplot command to set the title of the abscissa. */ std::string getTitleX() { return "\nset xlabel \"" + _title_x_ + '\"' ; } /*! @brief Gets the title of the series. * @return a gnuplot command to set the title of the ordinate (series). */ std::string getTitleY() { return "\nset ylabel \"" + _title_y_ + '\"' ; } /*! @brief get the title string. * @param index can be (0,1,2) */ std::string getRawTitle(int index=0) { switch (index) { case 0 : return _title_ ; case 1 : return _title_x_ ; case 2 : return _title_y_ ; default : return "bad index" ; } } /*! @brief Sets the output format. * @sa TermType * @param term type */ void setTerm( enum Term::Type term) { _term_ = term ; } #if 0 /*! Set additionnal term features */ void setTermOption(std::string & opts) { _termopts_ = opts; } #endif /*! @brief Gets the output format. * @return string for setting the expected output format in gnuplot. */ std::string getTerm() { std::string term = "#term\nset term " ; switch(_term_) { case (Term::png) : term += "png enhanced" ; break; case (Term::pdf) : std::cerr << "warning, pdf not really working for now" << std::endl; term += "postscript eps enhanced color" ; break; case (Term::eps) : term += "postscript eps enhanced color" ; break; case (Term::svg) : term += "svg" ; break; case (Term::other) : default : std::cerr << " *** error ***" << std::endl << "No supported term set" << std::endl; term += "unknown" ; } return term ; } /*! @brief Gets the graph output extension. * By default, this is ".eps". * @return a string for this extension, including the sepatating dot. * */ std::string getExt() { switch(_term_) { case (Term::png) : return ".png" ; case (Term::pdf) : #ifndef __LINBOX_HAVE_GHOSTSCRIPT std::cerr << "warning, pdf not available. falling back to eps" << std::endl; #endif return ".pdf" ; case (Term::eps) : return ".eps" ; case (Term::svg) : return ".svg" ; default : std::cerr << "unknown extension set" << std::endl; return ".xxx" ; } } #if 0 /*! @brief gets the style of the graph. * This is very user-tweakable !! * @return the style for gnuplot. */ std::string getStyle() { return "#style\n"+_styleopts_ ; } /*! @brief sets the style of the graph. * This is very user-tweakable !! * @param style the style for gnuplot as a gnuplot command. */ void setStyle(std::string style) { _styleopts_ = style ; } #endif /*! @brief sets the legend position. * @param keypos the arguments to key (where the legend should be put) * can be : inside, outside,... */ void setKeyPos(std::string keypos) { _legend_pos_ = keypos ; } /*! @brief Gets the legend position. * by default, it is "under". */ std::string getKeyPos() { std::string lgd ="#legend\nset key " ; if (!_legend_pos_.empty()) lgd += _legend_pos_ ; else lgd += " under" ; return lgd; } /*! @brief sets the position of the labels on the X absciss. * @param opt * @param more more stuff */ void setXtics ( enum Options::Type opt, std::string more="") { _xtics_ = "#xtics\nset xtics "; if (opt == Options::oblique) _xtics_ += "nomirror rotate by -45 scale 0 "; else { linbox_check(opt == Options::other); _xtics_ += more ; } } /*! @brief Gets the legend position. * by default, it is 45° inclined (use in on long tics legends). */ std::string getXtics() { return _xtics_ ; } /*! @brief Gets the name of the output graph. * @param basnam the raw name for the output. * @return basnam+extenstion. */ std::string getOutput(std::string basnam) { std::string setout = "#output\nset output \'" ; #ifdef __LINBOX_HAVE_GHOSTSCRIPT if (_term_ == Term::pdf) setout += "| ps2pdf - " ; setout += basnam + getExt() + '\'' ; #else setout += basnam + ".eps\'" ; #endif return setout ; } /*! @brief Sets the type of plot. * @param type the type. * @sa PlotType * */ void setPlotType(enum Plot::Type type) { _plot_type_ = type ; // _plot_extra_ = moreargs ; } /*! @brief Sets the way dots are linked. * @sa LineType * @param type type */ void setLineType( enum Line::Type type) { _line_type_ = type ; } /*! @brief Gets the type of plot. * default is histogram, or if graph is supplied, then the default is linespoints. * Can be totally customized. * @return a string for gnuplot to set the plot type. * @sa PlotType * */ std::string getPlotType() { _styleopts_ += "\nset datafile missing \"inf\"" ; std::string mystyle = "#style\nset style data " ; if (_line_type_ != Line::other) { switch (_line_type_) { case (Line::lines) : mystyle += "lines" ; break; case (Line::histogram) : mystyle += "histogram" ; break; case (Line::points) : mystyle += "points" ; break; case (Line::linespoints) : mystyle += "linespoints" ; break; default : std::cout << __func__ << " : you should have set the LineType when ploting PlotType::graph !" << std::endl; mystyle += "other" ; } } else { // userd defined datastyle return _styleopts_ ; } // some more style args : mystyle += "\n" + _styleopts_ + "\n"; return mystyle ; } /*! @brief adds some style line to the graph. * This is very user-tweakable !! * @param style a style line for gnuplot as a gnuplot command. */ void addPlotType(std::string style) { _styleopts_ += "\n" + style ; } /*! @brief tells which columns to use. * @param col a column to use. * @param moreargs more stuff */ void setUsingSeries(index_t col, std::string moreargs= "") { linbox_check(col>1); std::ostringstream usingcols ; if (_plot_type_ == Plot::histo) { usingcols << " using " << col << ":xtic(1) title columnheader(" << col << ") " << moreargs << " "; } else { linbox_check(_plot_type_ == Plot::graph); usingcols << " using 1:" << col << " title columnheader(" << col << ") " << moreargs << " "; } _usingcols_ = usingcols.str(); } /*! @brief adds a column to use * @param col a column to use. * @param moreargs more stuff * @pre \p _usingcols_ is not empty, ie \c setUsingSeries has already been called. */ void addUsingSeries(index_t col, std::string moreargs= "") { linbox_check(col>2); linbox_check(!_usingcols_.empty()); std::ostringstream usingcols ; usingcols << ", \'\' using " ; if (_plot_type_ == Plot::graph) usingcols << "1:" ; usingcols << col << " ti col " << moreargs << " "; _usingcols_ += usingcols.str(); } /*! @brief tells which columns to use. * @param cols a list of column to use. * @param moreargs more stuff */ void setUsingSeries(std::list cols, std::string moreargs= "") { linbox_check(!cols.empty()); std::list::iterator it = cols.begin(); // no way to check *it< coldim... std::ostringstream usingcols ; if (_plot_type_ == Plot::histo) { usingcols << " using " << *it << ":xtic(1) title columnheader(" << *it << ") " << moreargs << " " ; ++it ; for (;it != cols.end();++it) { usingcols << ", \'\' using " << *it << " ti col " << moreargs << " "; } } else { linbox_check(_plot_type_ == Plot::graph); usingcols << " using 1:" << *it << " title columnheader(" << *it << ") " << moreargs << " "; ++it ; for (;it != cols.end();++it) { usingcols << ", \'\' using 1:" << *it << " ti col " << moreargs << " "; } } _usingcols_ = usingcols.str(); return; } /*! @brief adds a set of columns to use. * @param cols a list of column to use. * @param moreargs more stuff * @pre \p _usingcols_ is not empty, ie \c setUsingSeries has already been called. */ void addUsingSeries(std::list cols, std::string moreargs= "") { linbox_check(!cols.empty()); linbox_check(!_usingcols_.empty()); std::list::iterator it = cols.begin(); std::ostringstream usingcols ; if (_plot_type_ == Plot::histo) { for (;it != cols.end();++it) { usingcols << ", \'\' using " << *it << " ti col " << moreargs << " "; } } else { linbox_check(_plot_type_ == Plot::graph); for (;it != cols.end();++it) { usingcols << ", \'\' using 1:" << *it << " ti col " << moreargs << " "; } } _usingcols_ += usingcols.str(); return; } /*! @brief tells which columns to use. * @param cols all colums between \c cols.first and \c cols.second * will be used. * @param moreargs more stuff * */ void setUsingSeries(std::pair cols, std::string moreargs= "") { std::ostringstream usingcols ; if (_plot_type_ == Plot::histo) { usingcols << " using " << cols.first << ":xtic(1) title columnheader(" << cols.first << ") " << moreargs << " "; usingcols << ", for [i=" << cols.first+1 << ":" << cols.second << "] \'\' using i title columnheader(i) " << moreargs << " "; } else { linbox_check(_plot_type_ == Plot::graph); usingcols << " using 1:" << cols.first << " title columnheader(" << cols.first << ") " << moreargs << " "; usingcols << ", for [i=" << cols.first+1 << ":" << cols.second << "] \'\' using 1:i title columnheader(i) " << moreargs << " "; } _usingcols_ = usingcols.str(); return; } /*! @brief adds contiguous columns to use. * @param cols all colums between \c cols.first and \c * cols.second will be used. * @param moreargs more stuff * @pre \p _usingcols_ is not empty, ie \c setUsingSeries has * already been called. * */ void addUsingSeries(std::pair cols, std::string moreargs= "") { linbox_check(!_usingcols_.empty()); std::ostringstream usingcols ; if (_plot_type_ == Plot::histo) { usingcols << ", for i=[" << cols.first << ":" << cols.second << "] \'\' using i title columnheader(i) " << moreargs << " "; } else { usingcols << ", for i=[" << cols.first << ":" << cols.second << "] \'\' using 1:i title columnheader(i) " << moreargs << " "; linbox_check(_plot_type_ == Plot::graph); } _usingcols_ += usingcols.str(); } /*! @brief Gets the plot command line. * @param File the name of/path to the data file (with extension) * @return a gnuplot "plot" command stream. */ std::string getPlotCommand(std::string File) { std::string PC = "#plot\nplot \'" + File + "\' "; PC += _usingcols_ ; return PC ; // "plot './data/fgemm_square_2ex03aS2.dat' using 1:2 title columnheader(2), for [i=3:5] '' using 1:i title columnheader(i)" } private : // int _precision_ ; //!< precision of the output. by default 2. /* Legend. */ std::string _legend_pos_; //!< legend position /* titles */ std::string _title_ ; //!< name of the graph std::string _title_x_ ; //!< title for the points std::string _title_y_ ; //!< title for the series std::string _xtics_ ; //!< format for the x tics. /* units */ // std::string _unit_ ; /* terminal output */ enum Term::Type _term_ ; //!< output data format. // std::string _termopts_ ; /* plotting style */ enum Plot::Type _plot_type_ ; //!< histogram/graph style // std::string _plot_extra_; //!< extra specification for the plot style. default empty. enum Line::Type _line_type_ ; //!< style for the representation of points std::string _styleopts_ ; //!< gp style command. /* columns to use */ std::string _usingcols_ ; //!< columns to be used (gp command) } ; /*! @brief The raw data to plot. * Represents the series of points and the labels for the points (X) * axis and the series (Y) axis. The internal representation is a * vector of vector, each series of point being a vector of double. * @tparam NAM the X axis is parametered by NAM (string, int, double...) * @todo write members that permute, add, scale,... data. */ template class PlotData { private : std::vector< std::vector< double > > _tableau_ ; //!< data. \c _tableau_[i][j] is the \e jth value of serie \e i. index_t _nb_points_ ; //!< number of points in each series. (size of \c _tableau_[0]) index_t _nb_series_ ; //!< number of series. (size of \c _tableau_) std::vector< std::string > _serie_name_; //!< name for each serie of points std::vector< NAM > _absci_name_; //!< values of the x axis. public : /*! Inits a plot with series of data. * @param nb_pts number of points in each serie. * @param nb_srs number of series of points. Default is 1. */ PlotData(index_t nb_pts, index_t nb_srs=1) : _tableau_(nb_srs),_nb_points_(nb_pts),_nb_series_(nb_srs),_serie_name_(nb_srs),_absci_name_(nb_pts) { linbox_check(nb_srs); linbox_check(nb_pts); for (index_t i = 0 ; i < nb_srs ; ++i) _tableau_[i].resize(nb_pts); } //! destructor. ~PlotData() {} ; //! copy constructor. //! @param PD a PlotData to copy. PlotData(const PlotData & PD): _tableau_(PD.getTable()),_nb_points_(PD.getPointsDim()),_nb_series_(PD.getSeriesDim()),_serie_name_(PD.getSerieNames()),_absci_name_(PD.getAbsciNames()) { } /*! @brief get the number of series. * @return number of series. */ index_t getSeriesDim() { return _nb_series_ ; } /*! @brief get the common number of points in each serie. * @return number of points. */ index_t getPointsDim() { return _nb_points_ ; } /*! @brief Sets the name of a serie. * @param i index of the serie * @param nom name of the serie */ void setSerieName(index_t i, std::string nom) { linbox_check(i<_nb_series_); _serie_name_[i] = nom ; } /*! @brief Sets the name of a point. * @param j index for the the point * @param nom name of the point */ void setAbsciName(index_t j, NAM nom) { linbox_check(j<_nb_points_); _absci_name_[j] = nom ; } /*! @brief gets the name of a serie. * Defaults to \c "serie.i" * @param i its index. * @return its name. */ std::string getSerieName(index_t i) { linbox_check(i<_nb_series_); if (_serie_name_[i].empty()) { std::ostringstream emptytitle ; emptytitle << "serie." << i ; return emptytitle.str(); } return(_serie_name_[i]); } /*! @brief gets the name of a point. * @param j its index. * @return its name. * @warning no default. \c setAbsciName has to be used beforehands. */ NAM getAbsciName(index_t j) { linbox_check(j<_nb_points_); return(_absci_name_[j]) ; } /*! @brief gets all the names in the series. * @return a vector of names. */ std::vector getSerieNames() { return _serie_name_ ; } /*! @brief gets all the names in the points. * @return a vector of names. */ std::vector getAbsciNames() { return _absci_name_ ; } /*! @brief modifies the number of series. * @param n the new number of series. Some data will be lost if n is smaller than * the current size. */ void resizeSeries( index_t & n) { if (n<_nb_series_) { std::cerr << "warning, you are dropping series" << std::endl; } _tableau_.resize(n); return; } /*! @brief modifies the number of points. * @param n the new number of points in every series. Some data * will be lost if n is smaller than the current size. */ void resizePoints( index_t & n) { if (n<_nb_points_) { std::cerr << "warning, you are dropping points in the series" << std::endl; } for (index_t i = 0 ; i < _nb_series_ ; ++i) _tableau_[i].resize(n); } /*! @brief sets a new entry. * @param i index of the serie * @param j index of the point * @param val value to be inserted. */ void setEntry(index_t i, index_t j, double val) { linbox_check(i<_nb_series_); linbox_check(j<_nb_points_); _tableau_[i][j] = val ; return ; } /*! @brief gets a value for an entry. * @param i index of the serie * @param j index of the point * @return val value of point j in serie j. */ double getEntry(index_t i, index_t j) { linbox_check(i<_nb_series_); linbox_check(j<_nb_points_); return _tableau_[i][j] ; } /*! gets a reference to the array of data. * @return a reference to the member \c _tableau_ representing the data. */ std::vector > & getTable() { return _tableau_ ; } }; /*! @brief The graph. * This class joins a PlotStyle and a PlotData to build up a graph. A * filename should be provided as well, indicating where the output * graph and scripts will be generated. * * @warning the filename will get a random suffix before the extension * so as not to overwrite files "par inadvertance". */ template class PlotGraph { private : PlotData & _data_ ; //!< reference to the data points PlotStyle & _style_ ; //!< reference to a plotting style std::string _filename_ ; //!< name for the output file (without extension). a random \c _XXXXXX suffix will be added to make it unique. /*! @internal * @brief random :alnum: \c char. * [[:alnum:]] characters are in range * - num : 48-57 * - AL : 67-90 * - al : 97-122 * . * @return a random alphabetic or numeric char. */ char _randomAlNum() { int c = rand()%62 ; c += 48 ; // c entre 48 et 109 if (c < 58) { return (char) c; } else { c += 7 ; if (c < 91) { return (char)c ; } else { c += 6 ; return (char)c; } } } /*! @internal * @brief Appends random suffix. * Appends to \p _filename_ a random string constituted of an * underscore followed by 8 random alnum chars. * @return the concatenation of \c _filename_ and this suffix. */ std::string _randomName() { std::ostringstream unique_filename ; unique_filename << _filename_ << '_' ; for (index_t i = 8 ; i-- ; ) { unique_filename << _randomAlNum() ; } // std::cout << unique_filename.str() << std::endl; return unique_filename.str() ; } /*! @brief Sets a new data structure. * @param data a reference to a PlotData class. */ void setData( PlotData & data ) { _data_ = data ; } /*! @brief Gets the data. * @param[in,out] data a reference to a PlotData class. */ PlotData & refData( PlotData & data) { return data = _data_ ; } /*! @brief Sets a new style structure. * @param style a reference to a PlotStyle class. */ void setStyle( PlotStyle & style ) { _style_ = style ; } /*! @brief Gets the style. * @param[in,out] style a reference to a PlotStyle class. */ PlotStyle & refStyle( PlotStyle & style) { return style = _style_ ; } public : /*! @brief Constructor for the PlotGraph class. * Plots a series of data according to a style. * @param data data to be plot, will be processed by the style * @param style sets parameters to gnuplot to achieve a nice * plot. */ PlotGraph( PlotData & data, PlotStyle & style ) : _data_(data),_style_(style) { srand((unsigned)time(NULL)); } /*! @brief sets the ouput file name. * All output is put in a "data" subfolder. * @warning Since no file is overwritten, this * directory can rapidly get very populated. */ void setOutFilename( std::string filename ) { if ( filename.empty() ) { _filename_ = "./data/plotdata" ; std::cerr << "you should provide a filename. Using " << _filename_ << " as default ."<}" << std::endl; FN << "\\end{table}" << std::endl ; FN.close(); std::cout << "latex table in " << unique_filename << '.' << std::endl; return ; } /*!@brief Plots the data with gnuplot. * Produces data in a .dat file, creates a .gp gnuplot script and * outputs a graph calling gnuplot. * @warning If gnuplot is not available, fall back to the latex method. */ void print_gnuplot() { #ifndef __LINBOX_HAVE_GNUPLOT std::cout << "gnuplot is not available on your system. using latex table as fallback" << std::endl; print_latex(); #else // srand(time(NULL)); index_t nb_points = _data_.getPointsDim() ; index_t nb_series = _data_.getSeriesDim() ; std::string unique_filename = _randomName(); std::string DataFileName = unique_filename + ".dat" ; std::string PlotFileName = unique_filename + ".gp" ; std::ofstream DF(DataFileName.c_str()); std::ofstream PF(PlotFileName.c_str()); /* Data file to be plot */ // DF.precision(_style_.getPrecision()); DF.precision(2); DF << "legend " ; for (index_t i = 0 ; i < nb_series ; ++i) { DF << _data_.getSerieName(i) << ' ' ; } DF << std::endl; for (index_t j = 0 ; j < nb_points ; ++j) { DF << _data_.getAbsciName(j) ; for (index_t i = 0 ; i < nb_series ; ++i) { DF << " " << _data_.getEntry(i,j) ; } DF << std::endl; } /* Ploting script */ PF << "#" << _filename_ << std::endl; PF << _style_.getTerm() << std::endl; PF << _style_.getOutput(unique_filename) << std::endl; PF << _style_.getTitle() << std::endl; PF << _style_.getKeyPos() << std::endl; PF << _style_.getXtics() << std::endl; PF << _style_.getPlotType() << std::endl; #if 0 for (index_t i = 0 ; i < nb_series ; ++i) { PF << "set style line " << _style_.getLineStyle() << std::endl; } #endif PF << _style_.getPlotCommand(DataFileName) << std::endl; #if 0 for (index_t i = 0 ; i < nb_series ; ++i) { PF << '\"' << DataFileName << "\" using 1:" << i+2 << " with lines " ; PF << " ls " << i+1 ; PF << " title '" << names[i] << "'"; if (i < (nb_series-1)) PF << ",\\" << std::endl; else PF << ';' ; } PF << std::endl; #endif PF.close(); std::string command( "gnuplot " ) ; command += PlotFileName ; int err = system( command.c_str() ) ; if (err) { std::cout << "errors have occured. Look at gnuplot output." << std::endl; } else { std::cout << "Output generated as " << unique_filename + _style_.getExt() << std::endl; } #endif } }; } #endif // __LINBOX_benchmark_H // vim:sts=8:sw=8:ts=8:noet:sr:cino=>s,f0,{0,g0,(0,:0,t0,+0,=s // Local Variables: // mode: C++ // tab-width: 8 // indent-tabs-mode: nil // c-basic-offset: 8 // End: linbox-1.3.2/build-aux/000077500000000000000000000000001176453053400147125ustar00rootroot00000000000000linbox-1.3.2/build-aux/config.guess000077500000000000000000001301321176453053400172320ustar00rootroot00000000000000#! /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, 2006, 2007, 2008, 2009, 2010, # 2011, 2012 Free Software Foundation, Inc. timestamp='2012-02-10' # 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, see . # # 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 (context # diff format) to and include a 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. # # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD 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, 2006, 2007, 2008, 2009, 2010, 2011, 2012 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 "$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 ; set_cc_for_build= ;' # 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 case "${UNAME_SYSTEM}" in Linux|GNU/*) 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 # ifdef __dietlibc__ LIBC=dietlibc # else LIBC=gnu # endif #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` ;; esac # 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 tuples: *-*-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 ;; sh5el) machine=sh5le-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 -q __ELF__ 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 ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} exit ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; *:SolidBSD:*:*) echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} exit ;; macppc:MirBSD:*:*) echo powerpc-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'` # Reset EXIT trap before exiting to avoid spurious non-zero exit code. exitcode=$? trap '' 0 exit $exitcode ;; 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 ;; s390x:SunOS:*:*) echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; 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:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) echo i386-pc-auroraux${UNAME_RELEASE} exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) eval $set_cc_for_build SUN_ARCH="i386" # If there is a compiler, see if it is configured for 64-bit objects. # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. # This test works for both compilers. if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then SUN_ARCH="x86_64" fi fi echo ${SUN_ARCH}-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:*:[4567]) 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 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 -q __LP64__ 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:*:*) UNAME_PROCESSOR=`/usr/bin/uname -p` case ${UNAME_PROCESSOR} in amd64) echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; *) echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; esac exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; i*:MSYS*:*) echo ${UNAME_MACHINE}-pc-msys exit ;; i*:windows32*:*) # uname -m includes "-pc" on this system. echo ${UNAME_MACHINE}-mingw32 exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; *:Interix*:*) case ${UNAME_MACHINE} in x86) echo i586-pc-interix${UNAME_RELEASE} exit ;; authenticamd | genuineintel | EM64T) echo x86_64-unknown-interix${UNAME_RELEASE} exit ;; IA64) echo ia64-unknown-interix${UNAME_RELEASE} exit ;; esac ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; 8664:Windows_NT:*) echo x86_64-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*:*:* | x86_64: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-${LIBC}`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/[-(].*//'`-${LIBC} exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; aarch64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; aarch64_be:Linux:*:*) UNAME_MACHINE=aarch64_be echo ${UNAME_MACHINE}-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 -q ld.so.1 if test "$?" = 0 ; then LIBC="gnulibc1" ; fi echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; arm*:Linux:*:*) eval $set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then echo ${UNAME_MACHINE}-unknown-linux-${LIBC} else if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi else echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf fi fi exit ;; avr32*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; cris:Linux:*:*) echo ${UNAME_MACHINE}-axis-linux-${LIBC} exit ;; crisv32:Linux:*:*) echo ${UNAME_MACHINE}-axis-linux-${LIBC} exit ;; frv:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; hexagon:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; i*86:Linux:*:*) echo ${UNAME_MACHINE}-pc-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:*:* | mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef ${UNAME_MACHINE} #undef ${UNAME_MACHINE}el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=${UNAME_MACHINE}el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=${UNAME_MACHINE} #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; } ;; or32:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; padre:Linux:*:*) echo sparc-unknown-linux-${LIBC} exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-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 ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-${LIBC} exit ;; ppc:Linux:*:*) echo powerpc-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 ;; tile*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; vax:Linux:*:*) echo ${UNAME_MACHINE}-dec-linux-${LIBC} exit ;; x86_64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; xtensa*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 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.[02]*:*) 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 i586. # Note: whatever this is, it MUST be the same as what config.sub # prints for the "djgpp" host, or else GDB configury will decide that # this is a cross-build. echo i586-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; } ;; NCR*:*:4.2:* | MPRAS*:*:4.2:*) OS_REL='.3' 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; } /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; 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.[02]*:*) 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 ;; BePC:Haiku:*:*) # Haiku running on Intel PC compatible. echo i586-pc-haiku 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 ;; SX-7:SUPER-UX:*:*) echo sx7-nec-superux${UNAME_RELEASE} exit ;; SX-8:SUPER-UX:*:*) echo sx8-nec-superux${UNAME_RELEASE} exit ;; SX-8R:SUPER-UX:*:*) echo sx8r-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 i386) eval $set_cc_for_build if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then UNAME_PROCESSOR="x86_64" fi fi ;; 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 ;; NEO-?:NONSTOP_KERNEL:*:*) echo neo-tandem-nsk${UNAME_RELEASE} 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 ;; i*86:rdos:*:*) echo ${UNAME_MACHINE}-pc-rdos exit ;; i*86:AROS:*:*) echo ${UNAME_MACHINE}-pc-aros exit ;; x86_64:VMkernel:*:*) echo ${UNAME_MACHINE}-unknown-esx 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: linbox-1.3.2/build-aux/config.sub000077500000000000000000001055541176453053400167070ustar00rootroot00000000000000#! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, # 2011, 2012 Free Software Foundation, Inc. timestamp='2012-02-10' # 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, see . # # 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 GNU 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. # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD # 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, 2006, 2007, 2008, 2009, 2010, 2011, 2012 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-android* | linux-dietlibc | linux-newlib* | \ linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ knetbsd*-gnu* | netbsd*-gnu* | \ kopensolaris*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; android-linux) os=-linux-android basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown ;; *) 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 | -microblaze) os= basic_machine=$1 ;; -bluegene*) os=-cnk ;; -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 ;; -sco6) os=-sco5v6 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -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/'` ;; -sco5v6*) # 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 \ | aarch64 | aarch64_be \ | 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 | avr32 \ | be32 | be64 \ | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx | dvp \ | epiphany \ | fido | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | hexagon \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ | le32 | le64 \ | lm32 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ | maxq | mb | microblaze | mcore | mep | metag \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64octeon | mips64octeonel \ | mips64orion | mips64orionel \ | mips64r5900 | mips64r5900el \ | mips64vr | mips64vrel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | moxie \ | mt \ | msp430 \ | nds32 | nds32le | nds32be \ | nios | nios2 \ | ns16k | ns32k \ | open8 \ | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle \ | pyramid \ | rl78 | rx \ | score \ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ | spu \ | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ | ubicom32 \ | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ | we32k \ | x86 | xc16x | xstormy16 | xtensa \ | z8k | z80) basic_machine=$basic_machine-unknown ;; c54x) basic_machine=tic54x-unknown ;; c55x) basic_machine=tic55x-unknown ;; c6x) basic_machine=tic6x-unknown ;; m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip) basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; ms1) basic_machine=mt-unknown ;; strongarm | thumb | xscale) basic_machine=arm-unknown ;; xgate) basic_machine=$basic_machine-unknown os=-none ;; xscaleeb) basic_machine=armeb-unknown ;; xscaleel) basic_machine=armel-unknown ;; # 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-* \ | aarch64-* | aarch64_be-* \ | 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-* | avr32-* \ | be32-* | be64-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* \ | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | hexagon-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ | le32-* | le64-* \ | lm32-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64octeon-* | mips64octeonel-* \ | mips64orion-* | mips64orionel-* \ | mips64r5900-* | mips64r5900el-* \ | mips64vr-* | mips64vrel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nds32-* | nds32le-* | nds32be-* \ | nios-* | nios2-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | open8-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ | pyramid-* \ | rl78-* | romp-* | rs6000-* | rx-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ | tahoe-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tile*-* \ | tron-* \ | ubicom32-* \ | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ | vax-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* \ | xstormy16-* | xtensa*-* \ | ymp-* \ | z8k-* | z80-*) ;; # Recognize the basic CPU types without company name, with glob match. xtensa*) basic_machine=$basic_machine-unknown ;; # 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 ;; aros) basic_machine=i386-pc os=-aros ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; blackfin) basic_machine=bfin-unknown os=-linux ;; blackfin-*) basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; bluegene*) basic_machine=powerpc-ibm os=-cnk ;; c54x-*) basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c55x-*) basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c6x-*) basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c90) basic_machine=c90-cray os=-unicos ;; cegcc) basic_machine=arm-unknown os=-cegcc ;; 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 ;; cr16 | cr16-*) basic_machine=cr16-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 ;; dicos) basic_machine=i686-pc os=-dicos ;; 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*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 ;; m68knommu) basic_machine=m68k-unknown os=-linux ;; m68knommu-*) basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; microblaze) basic_machine=microblaze-xilinx ;; mingw32) basic_machine=i386-pc os=-mingw32 ;; mingw32ce) basic_machine=arm-unknown os=-mingw32ce ;; 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 ;; ms1-*) basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; msys) basic_machine=i386-pc os=-msys ;; mvs) basic_machine=i370-ibm os=-mvs ;; nacl) basic_machine=le32-unknown os=-nacl ;; 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 ;; neo-tandem) basic_machine=neo-tandem ;; nse-tandem) basic_machine=nse-tandem ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; openrisc | openrisc-*) basic_machine=or32-unknown ;; 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 ;; parisc) basic_machine=hppa-unknown os=-linux ;; parisc-*) basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pc98) basic_machine=i386-pc ;; pc98-*) basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` ;; 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 | ppcbe) basic_machine=powerpc-unknown ;; ppc-* | ppcbe-*) 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 ;; rdos) basic_machine=i386-pc os=-rdos ;; 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 ;; sde) basic_machine=mipsisa32-sde os=-elf ;; sei) basic_machine=mips-sei os=-seiux ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sh5el) basic_machine=sh5le-unknown ;; 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 ;; strongarm-* | thumb-*) basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'` ;; 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 ;; tile*) basic_machine=$basic_machine-unknown os=-linux-gnu ;; 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 ;; xscale-* | xscalee[bl]-*) basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'` ;; ymp) basic_machine=ymp-cray os=-unicos ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim ;; z80-*-coff) basic_machine=z80-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 ;; sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) 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. -auroraux) os=-auroraux ;; -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* | -cnk* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ | -sym* | -kopensolaris* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* | -aros* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ | -openbsd* | -solidbsd* \ | -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* | -cegcc* \ | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -linux-android* \ | -linux-newlib* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* | -irx* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) # 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* | -haiku* \ | -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 ;; -dicos*) os=-dicos ;; -nacl*) ;; -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 score-*) os=-elf ;; spu-*) os=-elf ;; *-acorn) os=-riscix1.2 ;; arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; c4x-* | tic4x-*) os=-coff ;; tic54x-*) os=-coff ;; tic55x-*) os=-coff ;; tic6x-*) 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 ;; m68*-cisco) os=-aout ;; mep-*) os=-elf ;; 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 ;; *-haiku) os=-haiku ;; *-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 ;; -cnk*|-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: linbox-1.3.2/build-aux/install-sh000077500000000000000000000332561176453053400167270ustar00rootroot00000000000000#!/bin/sh # install - install a program, script, or datafile scriptversion=2011-01-19.21; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the # following copyright and license. # # Copyright (C) 1994 X Consortium # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or # sell copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # # Except as contained in this notice, the name of the X Consortium shall not # be used in advertising or otherwise to promote the sale, use or other deal- # ings in this Software without prior written authorization from the X Consor- # tium. # # # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent # `make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. nl=' ' IFS=" "" $nl" # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit=${DOITPROG-} if test -z "$doit"; then doit_exec=exec else doit_exec=$doit fi # Put in absolute file names if you don't have them in your path; # or use environment vars. chgrpprog=${CHGRPPROG-chgrp} chmodprog=${CHMODPROG-chmod} chownprog=${CHOWNPROG-chown} cmpprog=${CMPPROG-cmp} cpprog=${CPPROG-cp} mkdirprog=${MKDIRPROG-mkdir} mvprog=${MVPROG-mv} rmprog=${RMPROG-rm} stripprog=${STRIPPROG-strip} posix_glob='?' initialize_posix_glob=' test "$posix_glob" != "?" || { if (set -f) 2>/dev/null; then posix_glob= else posix_glob=: fi } ' posix_mkdir= # Desired mode of installed file. mode=0755 chgrpcmd= chmodcmd=$chmodprog chowncmd= mvcmd=$mvprog rmcmd="$rmprog -f" stripcmd= src= dst= dir_arg= dst_arg= copy_on_change=false no_target_directory= usage="\ Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE or: $0 [OPTION]... SRCFILES... DIRECTORY or: $0 [OPTION]... -t DIRECTORY SRCFILES... or: $0 [OPTION]... -d DIRECTORIES... In the 1st form, copy SRCFILE to DSTFILE. In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. In the 4th, create DIRECTORIES. Options: --help display this help and exit. --version display version info and exit. -c (ignored) -C install only if different (preserve the last data modification time) -d create directories instead of installing files. -g GROUP $chgrpprog installed files to GROUP. -m MODE $chmodprog installed files to MODE. -o USER $chownprog installed files to USER. -s $stripprog installed files. -t DIRECTORY install into DIRECTORY. -T report an error if DSTFILE is a directory. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG " while test $# -ne 0; do case $1 in -c) ;; -C) copy_on_change=true;; -d) dir_arg=true;; -g) chgrpcmd="$chgrpprog $2" shift;; --help) echo "$usage"; exit $?;; -m) mode=$2 case $mode in *' '* | *' '* | *' '* | *'*'* | *'?'* | *'['*) echo "$0: invalid mode: $mode" >&2 exit 1;; esac shift;; -o) chowncmd="$chownprog $2" shift;; -s) stripcmd=$stripprog;; -t) dst_arg=$2 # Protect names problematic for `test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac shift;; -T) no_target_directory=true;; --version) echo "$0 $scriptversion"; exit $?;; --) shift break;; -*) echo "$0: invalid option: $1" >&2 exit 1;; *) break;; esac shift done if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. # Otherwise, the last argument is the destination. Remove it from $@. for arg do if test -n "$dst_arg"; then # $@ is not empty: it contains at least $arg. set fnord "$@" "$dst_arg" shift # fnord fi shift # arg dst_arg=$arg # Protect names problematic for `test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac done fi if test $# -eq 0; then if test -z "$dir_arg"; then echo "$0: no input file specified." >&2 exit 1 fi # It's OK to call `install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi if test -z "$dir_arg"; then do_exit='(exit $ret); exit $ret' trap "ret=129; $do_exit" 1 trap "ret=130; $do_exit" 2 trap "ret=141; $do_exit" 13 trap "ret=143; $do_exit" 15 # Set umask so as not to create temps with too-generous modes. # However, 'strip' requires both read and write access to temps. case $mode in # Optimize common cases. *644) cp_umask=133;; *755) cp_umask=22;; *[0-7]) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw='% 200' fi cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; *) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw=,u+rw fi cp_umask=$mode$u_plus_rw;; esac fi for src do # Protect names problematic for `test' and other utilities. case $src in -* | [=\(\)!]) src=./$src;; esac if test -n "$dir_arg"; then dst=$src dstdir=$dst test -d "$dstdir" dstdir_status=$? else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if test ! -f "$src" && test ! -d "$src"; then echo "$0: $src does not exist." >&2 exit 1 fi if test -z "$dst_arg"; then echo "$0: no destination specified." >&2 exit 1 fi dst=$dst_arg # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then if test -n "$no_target_directory"; then echo "$0: $dst_arg: Is a directory" >&2 exit 1 fi dstdir=$dst dst=$dstdir/`basename "$src"` dstdir_status=0 else # Prefer dirname, but fall back on a substitute if dirname fails. dstdir=` (dirname "$dst") 2>/dev/null || expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$dst" : 'X\(//\)[^/]' \| \ X"$dst" : 'X\(//\)$' \| \ X"$dst" : 'X\(/\)' \| . 2>/dev/null || echo X"$dst" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q' ` test -d "$dstdir" dstdir_status=$? fi fi obsolete_mkdir_used=false if test $dstdir_status != 0; then case $posix_mkdir in '') # Create intermediate dirs using mode 755 as modified by the umask. # This is like FreeBSD 'install' as of 1997-10-28. umask=`umask` case $stripcmd.$umask in # Optimize common cases. *[2367][2367]) mkdir_umask=$umask;; .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; *[0-7]) mkdir_umask=`expr $umask + 22 \ - $umask % 100 % 40 + $umask % 20 \ - $umask % 10 % 4 + $umask % 2 `;; *) mkdir_umask=$umask,go-w;; esac # With -d, create the new directory with the user-specified mode. # Otherwise, rely on $mkdir_umask. if test -n "$dir_arg"; then mkdir_mode=-m$mode else mkdir_mode= fi posix_mkdir=false case $umask in *[123567][0-7][0-7]) # POSIX mkdir -p sets u+wx bits regardless of umask, which # is incompatible with FreeBSD 'install' when (umask & 300) != 0. ;; *) tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 if (umask $mkdir_umask && exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 then if test -z "$dir_arg" || { # Check for POSIX incompatibilities with -m. # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or # other-writeable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. ls_ld_tmpdir=`ls -ld "$tmpdir"` case $ls_ld_tmpdir in d????-?r-*) different_mode=700;; d????-?--*) different_mode=755;; *) false;; esac && $mkdirprog -m$different_mode -p -- "$tmpdir" && { ls_ld_tmpdir_1=`ls -ld "$tmpdir"` test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" } } then posix_mkdir=: fi rmdir "$tmpdir/d" "$tmpdir" else # Remove any dirs left behind by ancient mkdir implementations. rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null fi trap '' 0;; esac;; esac if $posix_mkdir && ( umask $mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else # The umask is ridiculous, or mkdir does not conform to POSIX, # or it failed possibly due to a race condition. Create the # directory the slow way, step by step, checking for races as we go. case $dstdir in /*) prefix='/';; [-=\(\)!]*) prefix='./';; *) prefix='';; esac eval "$initialize_posix_glob" oIFS=$IFS IFS=/ $posix_glob set -f set fnord $dstdir shift $posix_glob set +f IFS=$oIFS prefixes= for d do test X"$d" = X && continue prefix=$prefix$d if test -d "$prefix"; then prefixes= else if $posix_mkdir; then (umask=$mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break # Don't fail if two instances are running concurrently. test -d "$prefix" || exit 1 else case $prefix in *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; *) qprefix=$prefix;; esac prefixes="$prefixes '$qprefix'" fi fi prefix=$prefix/ done if test -n "$prefixes"; then # Don't fail if two instances are running concurrently. (umask $mkdir_umask && eval "\$doit_exec \$mkdirprog $prefixes") || test -d "$dstdir" || exit 1 obsolete_mkdir_used=true fi fi fi if test -n "$dir_arg"; then { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 else # Make a couple of temp file names in the proper directory. dsttmp=$dstdir/_inst.$$_ rmtmp=$dstdir/_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 # Copy the file name to the temp name. (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && # and set any options; do chmod last to preserve setuid bits. # # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $cpprog $src $dsttmp" command. # { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && # If -C, don't bother to copy if it wouldn't change the file. if $copy_on_change && old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && eval "$initialize_posix_glob" && $posix_glob set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && $posix_glob set +f && test "$old" = "$new" && $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 then rm -f "$dsttmp" else # Rename the file to the real destination. $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || # The rename failed, perhaps because mv can't rename something else # to itself, or perhaps because mv is so ancient that it does not # support -f. { # Now remove or move aside any old file at destination location. # We try this two ways since rm can't unlink itself on some # systems and the destination file might be busy for other # reasons. In this case, the final cleanup might fail but the new # file should still install successfully. { test ! -f "$dst" || $doit $rmcmd -f "$dst" 2>/dev/null || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } } || { echo "$0: cannot unlink or rename $dst" >&2 (exit 1); exit 1 } } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dst" } fi || exit 1 trap '' 0 fi done # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: linbox-1.3.2/build-aux/ltmain.sh000066400000000000000000010515221176453053400165400ustar00rootroot00000000000000 # libtool (GNU libtool) 2.4.2 # Written by Gordon Matzigkeit , 1996 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, # 2007, 2008, 2009, 2010, 2011 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. # GNU Libtool 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. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, # or obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # Usage: $progname [OPTION]... [MODE-ARG]... # # Provide generalized library-building support services. # # --config show all configuration variables # --debug enable verbose shell tracing # -n, --dry-run display commands without modifying any files # --features display basic configuration information and exit # --mode=MODE use operation mode MODE # --preserve-dup-deps don't remove duplicate dependency libraries # --quiet, --silent don't print informational messages # --no-quiet, --no-silent # print informational messages (default) # --no-warn don't display warning messages # --tag=TAG use configuration variables from tag TAG # -v, --verbose print more informational messages than default # --no-verbose don't print the extra informational messages # --version print version information # -h, --help, --help-all print short, long, or detailed help message # # MODE must be one of the following: # # clean remove files from the build directory # compile compile a source file into a libtool object # execute automatically set library path, then run a program # finish complete the installation of libtool libraries # install install libraries or executables # link create a library or an executable # uninstall remove libraries from an installed directory # # MODE-ARGS vary depending on the MODE. When passed as first option, # `--mode=MODE' may be abbreviated as `MODE' or a unique abbreviation of that. # Try `$progname --help --mode=MODE' for a more detailed description of MODE. # # When reporting a bug, please describe a test case to reproduce it and # include the following information: # # host-triplet: $host # shell: $SHELL # compiler: $LTCC # compiler flags: $LTCFLAGS # linker: $LD (gnu? $with_gnu_ld) # $progname: (GNU libtool) 2.4.2 # automake: $automake_version # autoconf: $autoconf_version # # Report bugs to . # GNU libtool home page: . # General help using GNU software: . PROGRAM=libtool PACKAGE=libtool VERSION=2.4.2 TIMESTAMP="" package_revision=1.3337 # 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+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac fi BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $1 _LTECHO_EOF' } # NLS nuisances: We save the old values to restore during execute mode. lt_user_locale= lt_safe_locale= for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test \"\${$lt_var+set}\" = set; then save_$lt_var=\$$lt_var $lt_var=C export $lt_var lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\" lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\" fi" done LC_ALL=C LANGUAGE=C export LANGUAGE LC_ALL $lt_unset CDPATH # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh # is ksh but when the shell is invoked as "sh" and the current value of # the _XPG environment variable is not equal to 1 (one), the special # positional parameter $0, within a function call, is the name of the # function. progpath="$0" : ${CP="cp -f"} test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'} : ${MAKE="make"} : ${MKDIR="mkdir"} : ${MV="mv -f"} : ${RM="rm -f"} : ${SHELL="${CONFIG_SHELL-/bin/sh}"} : ${Xsed="$SED -e 1s/^X//"} # Global variables: EXIT_SUCCESS=0 EXIT_FAILURE=1 EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. exit_status=$EXIT_SUCCESS # Make sure IFS has a sensible default lt_nl=' ' IFS=" $lt_nl" dirname="s,/[^/]*$,," basename="s,^.*/,," # func_dirname file append nondir_replacement # Compute the dirname of FILE. If nonempty, add APPEND to the result, # otherwise set result to NONDIR_REPLACEMENT. func_dirname () { func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` if test "X$func_dirname_result" = "X${1}"; then func_dirname_result="${3}" else func_dirname_result="$func_dirname_result${2}" fi } # func_dirname may be replaced by extended shell implementation # func_basename file func_basename () { func_basename_result=`$ECHO "${1}" | $SED "$basename"` } # func_basename may be replaced by extended shell implementation # func_dirname_and_basename file append nondir_replacement # perform func_basename and func_dirname in a single function # call: # dirname: Compute the dirname of FILE. If nonempty, # add APPEND to the result, otherwise set result # to NONDIR_REPLACEMENT. # value returned in "$func_dirname_result" # basename: Compute filename of FILE. # value retuned in "$func_basename_result" # Implementation must be kept synchronized with func_dirname # and func_basename. For efficiency, we do not delegate to # those functions but instead duplicate the functionality here. func_dirname_and_basename () { # Extract subdirectory from the argument. func_dirname_result=`$ECHO "${1}" | $SED -e "$dirname"` if test "X$func_dirname_result" = "X${1}"; then func_dirname_result="${3}" else func_dirname_result="$func_dirname_result${2}" fi func_basename_result=`$ECHO "${1}" | $SED -e "$basename"` } # func_dirname_and_basename may be replaced by extended shell implementation # func_stripname prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). # func_strip_suffix prefix name func_stripname () { case ${2} in .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; esac } # func_stripname may be replaced by extended shell implementation # These SED scripts presuppose an absolute path with a trailing slash. pathcar='s,^/\([^/]*\).*$,\1,' pathcdr='s,^/[^/]*,,' removedotparts=':dotsl s@/\./@/@g t dotsl s,/\.$,/,' collapseslashes='s@/\{1,\}@/@g' finalslash='s,/*$,/,' # func_normal_abspath PATH # Remove doubled-up and trailing slashes, "." path components, # and cancel out any ".." path components in PATH after making # it an absolute path. # value returned in "$func_normal_abspath_result" func_normal_abspath () { # Start from root dir and reassemble the path. func_normal_abspath_result= func_normal_abspath_tpath=$1 func_normal_abspath_altnamespace= case $func_normal_abspath_tpath in "") # Empty path, that just means $cwd. func_stripname '' '/' "`pwd`" func_normal_abspath_result=$func_stripname_result return ;; # The next three entries are used to spot a run of precisely # two leading slashes without using negated character classes; # we take advantage of case's first-match behaviour. ///*) # Unusual form of absolute path, do nothing. ;; //*) # Not necessarily an ordinary path; POSIX reserves leading '//' # and for example Cygwin uses it to access remote file shares # over CIFS/SMB, so we conserve a leading double slash if found. func_normal_abspath_altnamespace=/ ;; /*) # Absolute path, do nothing. ;; *) # Relative path, prepend $cwd. func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath ;; esac # Cancel out all the simple stuff to save iterations. We also want # the path to end with a slash for ease of parsing, so make sure # there is one (and only one) here. func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$removedotparts" -e "$collapseslashes" -e "$finalslash"` while :; do # Processed it all yet? if test "$func_normal_abspath_tpath" = / ; then # If we ascended to the root using ".." the result may be empty now. if test -z "$func_normal_abspath_result" ; then func_normal_abspath_result=/ fi break fi func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$pathcar"` func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$pathcdr"` # Figure out what to do with it case $func_normal_abspath_tcomponent in "") # Trailing empty path component, ignore it. ;; ..) # Parent dir; strip last assembled component from result. func_dirname "$func_normal_abspath_result" func_normal_abspath_result=$func_dirname_result ;; *) # Actual path component, append it. func_normal_abspath_result=$func_normal_abspath_result/$func_normal_abspath_tcomponent ;; esac done # Restore leading double-slash if one was found on entry. func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result } # func_relative_path SRCDIR DSTDIR # generates a relative path from SRCDIR to DSTDIR, with a trailing # slash if non-empty, suitable for immediately appending a filename # without needing to append a separator. # value returned in "$func_relative_path_result" func_relative_path () { func_relative_path_result= func_normal_abspath "$1" func_relative_path_tlibdir=$func_normal_abspath_result func_normal_abspath "$2" func_relative_path_tbindir=$func_normal_abspath_result # Ascend the tree starting from libdir while :; do # check if we have found a prefix of bindir case $func_relative_path_tbindir in $func_relative_path_tlibdir) # found an exact match func_relative_path_tcancelled= break ;; $func_relative_path_tlibdir*) # found a matching prefix func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir" func_relative_path_tcancelled=$func_stripname_result if test -z "$func_relative_path_result"; then func_relative_path_result=. fi break ;; *) func_dirname $func_relative_path_tlibdir func_relative_path_tlibdir=${func_dirname_result} if test "x$func_relative_path_tlibdir" = x ; then # Have to descend all the way to the root! func_relative_path_result=../$func_relative_path_result func_relative_path_tcancelled=$func_relative_path_tbindir break fi func_relative_path_result=../$func_relative_path_result ;; esac done # Now calculate path; take care to avoid doubling-up slashes. func_stripname '' '/' "$func_relative_path_result" func_relative_path_result=$func_stripname_result func_stripname '/' '/' "$func_relative_path_tcancelled" if test "x$func_stripname_result" != x ; then func_relative_path_result=${func_relative_path_result}/${func_stripname_result} fi # Normalisation. If bindir is libdir, return empty string, # else relative path ending with a slash; either way, target # file name can be directly appended. if test ! -z "$func_relative_path_result"; then func_stripname './' '' "$func_relative_path_result/" func_relative_path_result=$func_stripname_result fi } # The name of this program: func_dirname_and_basename "$progpath" progname=$func_basename_result # Make sure we have an absolute path for reexecution: case $progpath in [\\/]*|[A-Za-z]:\\*) ;; *[\\/]*) progdir=$func_dirname_result progdir=`cd "$progdir" && pwd` progpath="$progdir/$progname" ;; *) save_IFS="$IFS" IFS=${PATH_SEPARATOR-:} for progdir in $PATH; do IFS="$save_IFS" test -x "$progdir/$progname" && break done IFS="$save_IFS" test -n "$progdir" || progdir=`pwd` progpath="$progdir/$progname" ;; esac # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed="${SED}"' -e 1s/^X//' sed_quote_subst='s/\([`"$\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\(["`\\]\)/\\\1/g' # Sed substitution that turns a string into a regex matching for the # string literally. sed_make_literal_regex='s,[].[^$\\*\/],\\&,g' # Sed substitution that converts a w32 file name or path # which contains forward slashes, into one that contains # (escaped) backslashes. A very naive implementation. lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' # Re-`\' parameter expansions in output of double_quote_subst that were # `\'-ed in input to the same. If an odd number of `\' preceded a '$' # in input to double_quote_subst, that '$' was protected from expansion. # Since each input `\' is now two `\'s, look for any number of runs of # four `\'s followed by two `\'s and then a '$'. `\' that '$'. bs='\\' bs2='\\\\' bs4='\\\\\\\\' dollar='\$' sed_double_backslash="\ s/$bs4/&\\ /g s/^$bs2$dollar/$bs&/ s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g s/\n//g" # Standard options: opt_dry_run=false opt_help=false opt_quiet=false opt_verbose=false opt_warning=: # func_echo arg... # Echo program name prefixed message, along with the current mode # name if it has been set yet. func_echo () { $ECHO "$progname: ${opt_mode+$opt_mode: }$*" } # func_verbose arg... # Echo program name prefixed message in verbose mode only. func_verbose () { $opt_verbose && func_echo ${1+"$@"} # A bug in bash halts the script if the last line of a function # fails when set -e is in force, so we need another command to # work around that: : } # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "$*" } # func_error arg... # Echo program name prefixed message to standard error. func_error () { $ECHO "$progname: ${opt_mode+$opt_mode: }"${1+"$@"} 1>&2 } # func_warning arg... # Echo program name prefixed warning message to standard error. func_warning () { $opt_warning && $ECHO "$progname: ${opt_mode+$opt_mode: }warning: "${1+"$@"} 1>&2 # bash bug again: : } # func_fatal_error arg... # Echo program name prefixed message to standard error, and exit. func_fatal_error () { func_error ${1+"$@"} exit $EXIT_FAILURE } # func_fatal_help arg... # Echo program name prefixed message to standard error, followed by # a help hint, and exit. func_fatal_help () { func_error ${1+"$@"} func_fatal_error "$help" } help="Try \`$progname --help' for more information." ## default # func_grep expression filename # Check whether EXPRESSION matches any line of FILENAME, without output. func_grep () { $GREP "$1" "$2" >/dev/null 2>&1 } # func_mkdir_p directory-path # Make sure the entire path to DIRECTORY-PATH is available. func_mkdir_p () { my_directory_path="$1" my_dir_list= if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then # Protect directory names starting with `-' case $my_directory_path in -*) my_directory_path="./$my_directory_path" ;; esac # While some portion of DIR does not yet exist... while test ! -d "$my_directory_path"; do # ...make a list in topmost first order. Use a colon delimited # list incase some portion of path contains whitespace. my_dir_list="$my_directory_path:$my_dir_list" # If the last portion added has no slash in it, the list is done case $my_directory_path in */*) ;; *) break ;; esac # ...otherwise throw away the child directory and loop my_directory_path=`$ECHO "$my_directory_path" | $SED -e "$dirname"` done my_dir_list=`$ECHO "$my_dir_list" | $SED 's,:*$,,'` save_mkdir_p_IFS="$IFS"; IFS=':' for my_dir in $my_dir_list; do IFS="$save_mkdir_p_IFS" # mkdir can fail with a `File exist' error if two processes # try to create one of the directories concurrently. Don't # stop in that case! $MKDIR "$my_dir" 2>/dev/null || : done IFS="$save_mkdir_p_IFS" # Bail out if we (or some other process) failed to create a directory. test -d "$my_directory_path" || \ func_fatal_error "Failed to create \`$1'" fi } # func_mktempdir [string] # Make a temporary directory that won't clash with other running # libtool processes, and avoids race conditions if possible. If # given, STRING is the basename for that directory. func_mktempdir () { my_template="${TMPDIR-/tmp}/${1-$progname}" if test "$opt_dry_run" = ":"; then # Return a directory name, but don't create it in dry-run mode my_tmpdir="${my_template}-$$" else # If mktemp works, use that first and foremost my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` if test ! -d "$my_tmpdir"; then # Failing that, at least try and use $RANDOM to avoid a race my_tmpdir="${my_template}-${RANDOM-0}$$" save_mktempdir_umask=`umask` umask 0077 $MKDIR "$my_tmpdir" umask $save_mktempdir_umask fi # If we're not in dry-run mode, bomb out on failure test -d "$my_tmpdir" || \ func_fatal_error "cannot create temporary directory \`$my_tmpdir'" fi $ECHO "$my_tmpdir" } # func_quote_for_eval arg # Aesthetically quote ARG to be evaled later. # This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT # is double-quoted, suitable for a subsequent eval, whereas # FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters # which are still active within double quotes backslashified. func_quote_for_eval () { case $1 in *[\\\`\"\$]*) func_quote_for_eval_unquoted_result=`$ECHO "$1" | $SED "$sed_quote_subst"` ;; *) func_quote_for_eval_unquoted_result="$1" ;; esac case $func_quote_for_eval_unquoted_result in # Double-quote args containing shell metacharacters to delay # word splitting, command substitution and and variable # expansion for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\"" ;; *) func_quote_for_eval_result="$func_quote_for_eval_unquoted_result" esac } # func_quote_for_expand arg # Aesthetically quote ARG to be evaled later; same as above, # but do not quote variable references. func_quote_for_expand () { case $1 in *[\\\`\"]*) my_arg=`$ECHO "$1" | $SED \ -e "$double_quote_subst" -e "$sed_double_backslash"` ;; *) my_arg="$1" ;; esac case $my_arg in # Double-quote args containing shell metacharacters to delay # word splitting and command substitution for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") my_arg="\"$my_arg\"" ;; esac func_quote_for_expand_result="$my_arg" } # func_show_eval cmd [fail_exp] # Unless opt_silent is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. func_show_eval () { my_cmd="$1" my_fail_exp="${2-:}" ${opt_silent-false} || { func_quote_for_expand "$my_cmd" eval "func_echo $func_quote_for_expand_result" } if ${opt_dry_run-false}; then :; else eval "$my_cmd" my_status=$? if test "$my_status" -eq 0; then :; else eval "(exit $my_status); $my_fail_exp" fi fi } # func_show_eval_locale cmd [fail_exp] # Unless opt_silent is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. Use the saved locale for evaluation. func_show_eval_locale () { my_cmd="$1" my_fail_exp="${2-:}" ${opt_silent-false} || { func_quote_for_expand "$my_cmd" eval "func_echo $func_quote_for_expand_result" } if ${opt_dry_run-false}; then :; else eval "$lt_user_locale $my_cmd" my_status=$? eval "$lt_safe_locale" if test "$my_status" -eq 0; then :; else eval "(exit $my_status); $my_fail_exp" fi fi } # func_tr_sh # Turn $1 into a string suitable for a shell variable name. # Result is stored in $func_tr_sh_result. All characters # not in the set a-zA-Z0-9_ are replaced with '_'. Further, # if $1 begins with a digit, a '_' is prepended as well. func_tr_sh () { case $1 in [0-9]* | *[!a-zA-Z0-9_]*) func_tr_sh_result=`$ECHO "$1" | $SED 's/^\([0-9]\)/_\1/; s/[^a-zA-Z0-9_]/_/g'` ;; * ) func_tr_sh_result=$1 ;; esac } # func_version # Echo version message to standard output and exit. func_version () { $opt_debug $SED -n '/(C)/!b go :more /\./!{ N s/\n# / / b more } :go /^# '$PROGRAM' (GNU /,/# warranty; / { s/^# // s/^# *$// s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/ p }' < "$progpath" exit $? } # func_usage # Echo short help message to standard output and exit. func_usage () { $opt_debug $SED -n '/^# Usage:/,/^# *.*--help/ { s/^# // s/^# *$// s/\$progname/'$progname'/ p }' < "$progpath" echo $ECHO "run \`$progname --help | more' for full usage" exit $? } # func_help [NOEXIT] # Echo long help message to standard output and exit, # unless 'noexit' is passed as argument. func_help () { $opt_debug $SED -n '/^# Usage:/,/# Report bugs to/ { :print s/^# // s/^# *$// s*\$progname*'$progname'* s*\$host*'"$host"'* s*\$SHELL*'"$SHELL"'* s*\$LTCC*'"$LTCC"'* s*\$LTCFLAGS*'"$LTCFLAGS"'* s*\$LD*'"$LD"'* s/\$with_gnu_ld/'"$with_gnu_ld"'/ s/\$automake_version/'"`(${AUTOMAKE-automake} --version) 2>/dev/null |$SED 1q`"'/ s/\$autoconf_version/'"`(${AUTOCONF-autoconf} --version) 2>/dev/null |$SED 1q`"'/ p d } /^# .* home page:/b print /^# General help using/b print ' < "$progpath" ret=$? if test -z "$1"; then exit $ret fi } # func_missing_arg argname # Echo program name prefixed message to standard error and set global # exit_cmd. func_missing_arg () { $opt_debug func_error "missing argument for $1." exit_cmd=exit } # func_split_short_opt shortopt # Set func_split_short_opt_name and func_split_short_opt_arg shell # variables after splitting SHORTOPT after the 2nd character. func_split_short_opt () { my_sed_short_opt='1s/^\(..\).*$/\1/;q' my_sed_short_rest='1s/^..\(.*\)$/\1/;q' func_split_short_opt_name=`$ECHO "$1" | $SED "$my_sed_short_opt"` func_split_short_opt_arg=`$ECHO "$1" | $SED "$my_sed_short_rest"` } # func_split_short_opt may be replaced by extended shell implementation # func_split_long_opt longopt # Set func_split_long_opt_name and func_split_long_opt_arg shell # variables after splitting LONGOPT at the `=' sign. func_split_long_opt () { my_sed_long_opt='1s/^\(--[^=]*\)=.*/\1/;q' my_sed_long_arg='1s/^--[^=]*=//' func_split_long_opt_name=`$ECHO "$1" | $SED "$my_sed_long_opt"` func_split_long_opt_arg=`$ECHO "$1" | $SED "$my_sed_long_arg"` } # func_split_long_opt may be replaced by extended shell implementation exit_cmd=: magic="%%%MAGIC variable%%%" magic_exe="%%%MAGIC EXE variable%%%" # Global variables. nonopt= preserve_args= lo2o="s/\\.lo\$/.${objext}/" o2lo="s/\\.${objext}\$/.lo/" extracted_archives= extracted_serial=0 # If this variable is set in any of the actions, the command in it # will be execed at the end. This prevents here-documents from being # left over by shells. exec_cmd= # func_append var value # Append VALUE to the end of shell variable VAR. func_append () { eval "${1}=\$${1}\${2}" } # func_append may be replaced by extended shell implementation # func_append_quoted var value # Quote VALUE and append to the end of shell variable VAR, separated # by a space. func_append_quoted () { func_quote_for_eval "${2}" eval "${1}=\$${1}\\ \$func_quote_for_eval_result" } # func_append_quoted may be replaced by extended shell implementation # func_arith arithmetic-term... func_arith () { func_arith_result=`expr "${@}"` } # func_arith may be replaced by extended shell implementation # func_len string # STRING may not start with a hyphen. func_len () { func_len_result=`expr "${1}" : ".*" 2>/dev/null || echo $max_cmd_len` } # func_len may be replaced by extended shell implementation # func_lo2o object func_lo2o () { func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` } # func_lo2o may be replaced by extended shell implementation # func_xform libobj-or-source func_xform () { func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'` } # func_xform may be replaced by extended shell implementation # func_fatal_configuration arg... # Echo program name prefixed message to standard error, followed by # a configuration failure hint, and exit. func_fatal_configuration () { func_error ${1+"$@"} func_error "See the $PACKAGE documentation for more information." func_fatal_error "Fatal configuration error." } # func_config # Display the configuration for all the tags in this script. func_config () { re_begincf='^# ### BEGIN LIBTOOL' re_endcf='^# ### END LIBTOOL' # Default configuration. $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath" # Now print the configurations for the tags. for tagname in $taglist; do $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath" done exit $? } # func_features # Display the features supported by this script. func_features () { echo "host: $host" if test "$build_libtool_libs" = yes; then echo "enable shared libraries" else echo "disable shared libraries" fi if test "$build_old_libs" = yes; then echo "enable static libraries" else echo "disable static libraries" fi exit $? } # func_enable_tag tagname # Verify that TAGNAME is valid, and either flag an error and exit, or # enable the TAGNAME tag. We also add TAGNAME to the global $taglist # variable here. func_enable_tag () { # Global variable: tagname="$1" re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$" re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$" sed_extractcf="/$re_begincf/,/$re_endcf/p" # Validate tagname. case $tagname in *[!-_A-Za-z0-9,/]*) func_fatal_error "invalid tag name: $tagname" ;; esac # Don't test for the "default" C tag, as we know it's # there but not specially marked. case $tagname in CC) ;; *) if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then taglist="$taglist $tagname" # Evaluate the configuration. Be careful to quote the path # and the sed script, to avoid splitting on whitespace, but # also don't use non-portable quotes within backquotes within # quotes we have to do it in 2 steps: extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` eval "$extractedcf" else func_error "ignoring unknown tag $tagname" fi ;; esac } # func_check_version_match # Ensure that we are using m4 macros, and libtool script from the same # release of libtool. func_check_version_match () { if test "$package_revision" != "$macro_revision"; then if test "$VERSION" != "$macro_version"; then if test -z "$macro_version"; then cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from an older release. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF else cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from $PACKAGE $macro_version. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF fi else cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, $progname: but the definition of this LT_INIT comes from revision $macro_revision. $progname: You should recreate aclocal.m4 with macros from revision $package_revision $progname: of $PACKAGE $VERSION and run autoconf again. _LT_EOF fi exit $EXIT_MISMATCH fi } # Shorthand for --mode=foo, only valid as the first argument case $1 in clean|clea|cle|cl) shift; set dummy --mode clean ${1+"$@"}; shift ;; compile|compil|compi|comp|com|co|c) shift; set dummy --mode compile ${1+"$@"}; shift ;; execute|execut|execu|exec|exe|ex|e) shift; set dummy --mode execute ${1+"$@"}; shift ;; finish|finis|fini|fin|fi|f) shift; set dummy --mode finish ${1+"$@"}; shift ;; install|instal|insta|inst|ins|in|i) shift; set dummy --mode install ${1+"$@"}; shift ;; link|lin|li|l) shift; set dummy --mode link ${1+"$@"}; shift ;; uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) shift; set dummy --mode uninstall ${1+"$@"}; shift ;; esac # Option defaults: opt_debug=: opt_dry_run=false opt_config=false opt_preserve_dup_deps=false opt_features=false opt_finish=false opt_help=false opt_help_all=false opt_silent=: opt_warning=: opt_verbose=: opt_silent=false opt_verbose=false # Parse options once, thoroughly. This comes as soon as possible in the # script to make things like `--version' happen as quickly as we can. { # this just eases exit handling while test $# -gt 0; do opt="$1" shift case $opt in --debug|-x) opt_debug='set -x' func_echo "enabling shell trace mode" $opt_debug ;; --dry-run|--dryrun|-n) opt_dry_run=: ;; --config) opt_config=: func_config ;; --dlopen|-dlopen) optarg="$1" opt_dlopen="${opt_dlopen+$opt_dlopen }$optarg" shift ;; --preserve-dup-deps) opt_preserve_dup_deps=: ;; --features) opt_features=: func_features ;; --finish) opt_finish=: set dummy --mode finish ${1+"$@"}; shift ;; --help) opt_help=: ;; --help-all) opt_help_all=: opt_help=': help-all' ;; --mode) test $# = 0 && func_missing_arg $opt && break optarg="$1" opt_mode="$optarg" case $optarg in # Valid mode arguments: clean|compile|execute|finish|install|link|relink|uninstall) ;; # Catch anything else as an error *) func_error "invalid argument for $opt" exit_cmd=exit break ;; esac shift ;; --no-silent|--no-quiet) opt_silent=false func_append preserve_args " $opt" ;; --no-warning|--no-warn) opt_warning=false func_append preserve_args " $opt" ;; --no-verbose) opt_verbose=false func_append preserve_args " $opt" ;; --silent|--quiet) opt_silent=: func_append preserve_args " $opt" opt_verbose=false ;; --verbose|-v) opt_verbose=: func_append preserve_args " $opt" opt_silent=false ;; --tag) test $# = 0 && func_missing_arg $opt && break optarg="$1" opt_tag="$optarg" func_append preserve_args " $opt $optarg" func_enable_tag "$optarg" shift ;; -\?|-h) func_usage ;; --help) func_help ;; --version) func_version ;; # Separate optargs to long options: --*=*) func_split_long_opt "$opt" set dummy "$func_split_long_opt_name" "$func_split_long_opt_arg" ${1+"$@"} shift ;; # Separate non-argument short options: -\?*|-h*|-n*|-v*) func_split_short_opt "$opt" set dummy "$func_split_short_opt_name" "-$func_split_short_opt_arg" ${1+"$@"} shift ;; --) break ;; -*) func_fatal_help "unrecognized option \`$opt'" ;; *) set dummy "$opt" ${1+"$@"}; shift; break ;; esac done # Validate options: # save first non-option argument if test "$#" -gt 0; then nonopt="$opt" shift fi # preserve --debug test "$opt_debug" = : || func_append preserve_args " --debug" case $host in *cygwin* | *mingw* | *pw32* | *cegcc*) # don't eliminate duplications in $postdeps and $predeps opt_duplicate_compiler_generated_deps=: ;; *) opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps ;; esac $opt_help || { # Sanity checks first: func_check_version_match if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then func_fatal_configuration "not configured to build any kind of library" fi # Darwin sucks eval std_shrext=\"$shrext_cmds\" # Only execute mode is allowed to have -dlopen flags. if test -n "$opt_dlopen" && test "$opt_mode" != execute; then func_error "unrecognized option \`-dlopen'" $ECHO "$help" 1>&2 exit $EXIT_FAILURE fi # Change the help message to a mode-specific one. generic_help="$help" help="Try \`$progname --help --mode=$opt_mode' for more information." } # Bail if the options were screwed $exit_cmd $EXIT_FAILURE } ## ----------- ## ## Main. ## ## ----------- ## # func_lalib_p file # True iff FILE is a libtool `.la' library or `.lo' object file. # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_lalib_p () { test -f "$1" && $SED -e 4q "$1" 2>/dev/null \ | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 } # func_lalib_unsafe_p file # True iff FILE is a libtool `.la' library or `.lo' object file. # This function implements the same check as func_lalib_p without # resorting to external programs. To this end, it redirects stdin and # closes it afterwards, without saving the original file descriptor. # As a safety measure, use it only where a negative result would be # fatal anyway. Works if `file' does not exist. func_lalib_unsafe_p () { lalib_p=no if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then for lalib_p_l in 1 2 3 4 do read lalib_p_line case "$lalib_p_line" in \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;; esac done exec 0<&5 5<&- fi test "$lalib_p" = yes } # func_ltwrapper_script_p file # True iff FILE is a libtool wrapper script # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_script_p () { func_lalib_p "$1" } # func_ltwrapper_executable_p file # True iff FILE is a libtool wrapper executable # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_executable_p () { func_ltwrapper_exec_suffix= case $1 in *.exe) ;; *) func_ltwrapper_exec_suffix=.exe ;; esac $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1 } # func_ltwrapper_scriptname file # Assumes file is an ltwrapper_executable # uses $file to determine the appropriate filename for a # temporary ltwrapper_script. func_ltwrapper_scriptname () { func_dirname_and_basename "$1" "" "." func_stripname '' '.exe' "$func_basename_result" func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper" } # func_ltwrapper_p file # True iff FILE is a libtool wrapper script or wrapper executable # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_p () { func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1" } # func_execute_cmds commands fail_cmd # Execute tilde-delimited COMMANDS. # If FAIL_CMD is given, eval that upon failure. # FAIL_CMD may read-access the current command in variable CMD! func_execute_cmds () { $opt_debug save_ifs=$IFS; IFS='~' for cmd in $1; do IFS=$save_ifs eval cmd=\"$cmd\" func_show_eval "$cmd" "${2-:}" done IFS=$save_ifs } # func_source file # Source FILE, adding directory component if necessary. # Note that it is not necessary on cygwin/mingw to append a dot to # FILE even if both FILE and FILE.exe exist: automatic-append-.exe # behavior happens only for exec(3), not for open(2)! Also, sourcing # `FILE.' does not work on cygwin managed mounts. func_source () { $opt_debug case $1 in */* | *\\*) . "$1" ;; *) . "./$1" ;; esac } # func_resolve_sysroot PATH # Replace a leading = in PATH with a sysroot. Store the result into # func_resolve_sysroot_result func_resolve_sysroot () { func_resolve_sysroot_result=$1 case $func_resolve_sysroot_result in =*) func_stripname '=' '' "$func_resolve_sysroot_result" func_resolve_sysroot_result=$lt_sysroot$func_stripname_result ;; esac } # func_replace_sysroot PATH # If PATH begins with the sysroot, replace it with = and # store the result into func_replace_sysroot_result. func_replace_sysroot () { case "$lt_sysroot:$1" in ?*:"$lt_sysroot"*) func_stripname "$lt_sysroot" '' "$1" func_replace_sysroot_result="=$func_stripname_result" ;; *) # Including no sysroot. func_replace_sysroot_result=$1 ;; esac } # func_infer_tag arg # Infer tagged configuration to use if any are available and # if one wasn't chosen via the "--tag" command line option. # Only attempt this if the compiler in the base compile # command doesn't match the default compiler. # arg is usually of the form 'gcc ...' func_infer_tag () { $opt_debug if test -n "$available_tags" && test -z "$tagname"; then CC_quoted= for arg in $CC; do func_append_quoted CC_quoted "$arg" done CC_expanded=`func_echo_all $CC` CC_quoted_expanded=`func_echo_all $CC_quoted` case $@ in # Blanks in the command may have been stripped by the calling shell, # but not from the CC environment variable when configure was run. " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;; # Blanks at the start of $base_compile will cause this to fail # if we don't check for them as well. *) for z in $available_tags; do if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then # Evaluate the configuration. eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" CC_quoted= for arg in $CC; do # Double-quote args containing other shell metacharacters. func_append_quoted CC_quoted "$arg" done CC_expanded=`func_echo_all $CC` CC_quoted_expanded=`func_echo_all $CC_quoted` case "$@ " in " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) # The compiler in the base compile command matches # the one in the tagged configuration. # Assume this is the tagged configuration we want. tagname=$z break ;; esac fi done # If $tagname still isn't set, then no tagged configuration # was found and let the user know that the "--tag" command # line option must be used. if test -z "$tagname"; then func_echo "unable to infer tagged configuration" func_fatal_error "specify a tag with \`--tag'" # else # func_verbose "using $tagname tagged configuration" fi ;; esac fi } # func_write_libtool_object output_name pic_name nonpic_name # Create a libtool object file (analogous to a ".la" file), # but don't create it if we're doing a dry run. func_write_libtool_object () { write_libobj=${1} if test "$build_libtool_libs" = yes; then write_lobj=\'${2}\' else write_lobj=none fi if test "$build_old_libs" = yes; then write_oldobj=\'${3}\' else write_oldobj=none fi $opt_dry_run || { cat >${write_libobj}T </dev/null` if test "$?" -eq 0 && test -n "${func_convert_core_file_wine_to_w32_tmp}"; then func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" | $SED -e "$lt_sed_naive_backslashify"` else func_convert_core_file_wine_to_w32_result= fi fi } # end: func_convert_core_file_wine_to_w32 # func_convert_core_path_wine_to_w32 ARG # Helper function used by path conversion functions when $build is *nix, and # $host is mingw, cygwin, or some other w32 environment. Relies on a correctly # configured wine environment available, with the winepath program in $build's # $PATH. Assumes ARG has no leading or trailing path separator characters. # # ARG is path to be converted from $build format to win32. # Result is available in $func_convert_core_path_wine_to_w32_result. # Unconvertible file (directory) names in ARG are skipped; if no directory names # are convertible, then the result may be empty. func_convert_core_path_wine_to_w32 () { $opt_debug # unfortunately, winepath doesn't convert paths, only file names func_convert_core_path_wine_to_w32_result="" if test -n "$1"; then oldIFS=$IFS IFS=: for func_convert_core_path_wine_to_w32_f in $1; do IFS=$oldIFS func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f" if test -n "$func_convert_core_file_wine_to_w32_result" ; then if test -z "$func_convert_core_path_wine_to_w32_result"; then func_convert_core_path_wine_to_w32_result="$func_convert_core_file_wine_to_w32_result" else func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result" fi fi done IFS=$oldIFS fi } # end: func_convert_core_path_wine_to_w32 # func_cygpath ARGS... # Wrapper around calling the cygpath program via LT_CYGPATH. This is used when # when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2) # $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or # (2), returns the Cygwin file name or path in func_cygpath_result (input # file name or path is assumed to be in w32 format, as previously converted # from $build's *nix or MSYS format). In case (3), returns the w32 file name # or path in func_cygpath_result (input file name or path is assumed to be in # Cygwin format). Returns an empty string on error. # # ARGS are passed to cygpath, with the last one being the file name or path to # be converted. # # Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH # environment variable; do not put it in $PATH. func_cygpath () { $opt_debug if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null` if test "$?" -ne 0; then # on failure, ensure result is empty func_cygpath_result= fi else func_cygpath_result= func_error "LT_CYGPATH is empty or specifies non-existent file: \`$LT_CYGPATH'" fi } #end: func_cygpath # func_convert_core_msys_to_w32 ARG # Convert file name or path ARG from MSYS format to w32 format. Return # result in func_convert_core_msys_to_w32_result. func_convert_core_msys_to_w32 () { $opt_debug # awkward: cmd appends spaces to result func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null | $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"` } #end: func_convert_core_msys_to_w32 # func_convert_file_check ARG1 ARG2 # Verify that ARG1 (a file name in $build format) was converted to $host # format in ARG2. Otherwise, emit an error message, but continue (resetting # func_to_host_file_result to ARG1). func_convert_file_check () { $opt_debug if test -z "$2" && test -n "$1" ; then func_error "Could not determine host file name corresponding to" func_error " \`$1'" func_error "Continuing, but uninstalled executables may not work." # Fallback: func_to_host_file_result="$1" fi } # end func_convert_file_check # func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH # Verify that FROM_PATH (a path in $build format) was converted to $host # format in TO_PATH. Otherwise, emit an error message, but continue, resetting # func_to_host_file_result to a simplistic fallback value (see below). func_convert_path_check () { $opt_debug if test -z "$4" && test -n "$3"; then func_error "Could not determine the host path corresponding to" func_error " \`$3'" func_error "Continuing, but uninstalled executables may not work." # Fallback. This is a deliberately simplistic "conversion" and # should not be "improved". See libtool.info. if test "x$1" != "x$2"; then lt_replace_pathsep_chars="s|$1|$2|g" func_to_host_path_result=`echo "$3" | $SED -e "$lt_replace_pathsep_chars"` else func_to_host_path_result="$3" fi fi } # end func_convert_path_check # func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG # Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT # and appending REPL if ORIG matches BACKPAT. func_convert_path_front_back_pathsep () { $opt_debug case $4 in $1 ) func_to_host_path_result="$3$func_to_host_path_result" ;; esac case $4 in $2 ) func_append func_to_host_path_result "$3" ;; esac } # end func_convert_path_front_back_pathsep ################################################## # $build to $host FILE NAME CONVERSION FUNCTIONS # ################################################## # invoked via `$to_host_file_cmd ARG' # # In each case, ARG is the path to be converted from $build to $host format. # Result will be available in $func_to_host_file_result. # func_to_host_file ARG # Converts the file name ARG from $build format to $host format. Return result # in func_to_host_file_result. func_to_host_file () { $opt_debug $to_host_file_cmd "$1" } # end func_to_host_file # func_to_tool_file ARG LAZY # converts the file name ARG from $build format to toolchain format. Return # result in func_to_tool_file_result. If the conversion in use is listed # in (the comma separated) LAZY, no conversion takes place. func_to_tool_file () { $opt_debug case ,$2, in *,"$to_tool_file_cmd",*) func_to_tool_file_result=$1 ;; *) $to_tool_file_cmd "$1" func_to_tool_file_result=$func_to_host_file_result ;; esac } # end func_to_tool_file # func_convert_file_noop ARG # Copy ARG to func_to_host_file_result. func_convert_file_noop () { func_to_host_file_result="$1" } # end func_convert_file_noop # func_convert_file_msys_to_w32 ARG # Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic # conversion to w32 is not available inside the cwrapper. Returns result in # func_to_host_file_result. func_convert_file_msys_to_w32 () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then func_convert_core_msys_to_w32 "$1" func_to_host_file_result="$func_convert_core_msys_to_w32_result" fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_msys_to_w32 # func_convert_file_cygwin_to_w32 ARG # Convert file name ARG from Cygwin to w32 format. Returns result in # func_to_host_file_result. func_convert_file_cygwin_to_w32 () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then # because $build is cygwin, we call "the" cygpath in $PATH; no need to use # LT_CYGPATH in this case. func_to_host_file_result=`cygpath -m "$1"` fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_cygwin_to_w32 # func_convert_file_nix_to_w32 ARG # Convert file name ARG from *nix to w32 format. Requires a wine environment # and a working winepath. Returns result in func_to_host_file_result. func_convert_file_nix_to_w32 () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then func_convert_core_file_wine_to_w32 "$1" func_to_host_file_result="$func_convert_core_file_wine_to_w32_result" fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_nix_to_w32 # func_convert_file_msys_to_cygwin ARG # Convert file name ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. # Returns result in func_to_host_file_result. func_convert_file_msys_to_cygwin () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then func_convert_core_msys_to_w32 "$1" func_cygpath -u "$func_convert_core_msys_to_w32_result" func_to_host_file_result="$func_cygpath_result" fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_msys_to_cygwin # func_convert_file_nix_to_cygwin ARG # Convert file name ARG from *nix to Cygwin format. Requires Cygwin installed # in a wine environment, working winepath, and LT_CYGPATH set. Returns result # in func_to_host_file_result. func_convert_file_nix_to_cygwin () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then # convert from *nix to w32, then use cygpath to convert from w32 to cygwin. func_convert_core_file_wine_to_w32 "$1" func_cygpath -u "$func_convert_core_file_wine_to_w32_result" func_to_host_file_result="$func_cygpath_result" fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_nix_to_cygwin ############################################# # $build to $host PATH CONVERSION FUNCTIONS # ############################################# # invoked via `$to_host_path_cmd ARG' # # In each case, ARG is the path to be converted from $build to $host format. # The result will be available in $func_to_host_path_result. # # Path separators are also converted from $build format to $host format. If # ARG begins or ends with a path separator character, it is preserved (but # converted to $host format) on output. # # All path conversion functions are named using the following convention: # file name conversion function : func_convert_file_X_to_Y () # path conversion function : func_convert_path_X_to_Y () # where, for any given $build/$host combination the 'X_to_Y' value is the # same. If conversion functions are added for new $build/$host combinations, # the two new functions must follow this pattern, or func_init_to_host_path_cmd # will break. # func_init_to_host_path_cmd # Ensures that function "pointer" variable $to_host_path_cmd is set to the # appropriate value, based on the value of $to_host_file_cmd. to_host_path_cmd= func_init_to_host_path_cmd () { $opt_debug if test -z "$to_host_path_cmd"; then func_stripname 'func_convert_file_' '' "$to_host_file_cmd" to_host_path_cmd="func_convert_path_${func_stripname_result}" fi } # func_to_host_path ARG # Converts the path ARG from $build format to $host format. Return result # in func_to_host_path_result. func_to_host_path () { $opt_debug func_init_to_host_path_cmd $to_host_path_cmd "$1" } # end func_to_host_path # func_convert_path_noop ARG # Copy ARG to func_to_host_path_result. func_convert_path_noop () { func_to_host_path_result="$1" } # end func_convert_path_noop # func_convert_path_msys_to_w32 ARG # Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic # conversion to w32 is not available inside the cwrapper. Returns result in # func_to_host_path_result. func_convert_path_msys_to_w32 () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # Remove leading and trailing path separator characters from ARG. MSYS # behavior is inconsistent here; cygpath turns them into '.;' and ';.'; # and winepath ignores them completely. func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" func_to_host_path_result="$func_convert_core_msys_to_w32_result" func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_msys_to_w32 # func_convert_path_cygwin_to_w32 ARG # Convert path ARG from Cygwin to w32 format. Returns result in # func_to_host_file_result. func_convert_path_cygwin_to_w32 () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"` func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_cygwin_to_w32 # func_convert_path_nix_to_w32 ARG # Convert path ARG from *nix to w32 format. Requires a wine environment and # a working winepath. Returns result in func_to_host_file_result. func_convert_path_nix_to_w32 () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" func_to_host_path_result="$func_convert_core_path_wine_to_w32_result" func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_nix_to_w32 # func_convert_path_msys_to_cygwin ARG # Convert path ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. # Returns result in func_to_host_file_result. func_convert_path_msys_to_cygwin () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" func_cygpath -u -p "$func_convert_core_msys_to_w32_result" func_to_host_path_result="$func_cygpath_result" func_convert_path_check : : \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" : "$1" fi } # end func_convert_path_msys_to_cygwin # func_convert_path_nix_to_cygwin ARG # Convert path ARG from *nix to Cygwin format. Requires Cygwin installed in a # a wine environment, working winepath, and LT_CYGPATH set. Returns result in # func_to_host_file_result. func_convert_path_nix_to_cygwin () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # Remove leading and trailing path separator characters from # ARG. msys behavior is inconsistent here, cygpath turns them # into '.;' and ';.', and winepath ignores them completely. func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result" func_to_host_path_result="$func_cygpath_result" func_convert_path_check : : \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" : "$1" fi } # end func_convert_path_nix_to_cygwin # func_mode_compile arg... func_mode_compile () { $opt_debug # Get the compilation command and the source file. base_compile= srcfile="$nonopt" # always keep a non-empty value in "srcfile" suppress_opt=yes suppress_output= arg_mode=normal libobj= later= pie_flag= for arg do case $arg_mode in arg ) # do not "continue". Instead, add this to base_compile lastarg="$arg" arg_mode=normal ;; target ) libobj="$arg" arg_mode=normal continue ;; normal ) # Accept any command-line options. case $arg in -o) test -n "$libobj" && \ func_fatal_error "you cannot specify \`-o' more than once" arg_mode=target continue ;; -pie | -fpie | -fPIE) func_append pie_flag " $arg" continue ;; -shared | -static | -prefer-pic | -prefer-non-pic) func_append later " $arg" continue ;; -no-suppress) suppress_opt=no continue ;; -Xcompiler) arg_mode=arg # the next one goes into the "base_compile" arg list continue # The current "srcfile" will either be retained or ;; # replaced later. I would guess that would be a bug. -Wc,*) func_stripname '-Wc,' '' "$arg" args=$func_stripname_result lastarg= save_ifs="$IFS"; IFS=',' for arg in $args; do IFS="$save_ifs" func_append_quoted lastarg "$arg" done IFS="$save_ifs" func_stripname ' ' '' "$lastarg" lastarg=$func_stripname_result # Add the arguments to base_compile. func_append base_compile " $lastarg" continue ;; *) # Accept the current argument as the source file. # The previous "srcfile" becomes the current argument. # lastarg="$srcfile" srcfile="$arg" ;; esac # case $arg ;; esac # case $arg_mode # Aesthetically quote the previous argument. func_append_quoted base_compile "$lastarg" done # for arg case $arg_mode in arg) func_fatal_error "you must specify an argument for -Xcompile" ;; target) func_fatal_error "you must specify a target with \`-o'" ;; *) # Get the name of the library object. test -z "$libobj" && { func_basename "$srcfile" libobj="$func_basename_result" } ;; esac # Recognize several different file suffixes. # If the user specifies -o file.o, it is replaced with file.lo case $libobj in *.[cCFSifmso] | \ *.ada | *.adb | *.ads | *.asm | \ *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \ *.[fF][09]? | *.for | *.java | *.go | *.obj | *.sx | *.cu | *.cup) func_xform "$libobj" libobj=$func_xform_result ;; esac case $libobj in *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;; *) func_fatal_error "cannot determine name of library object from \`$libobj'" ;; esac func_infer_tag $base_compile for arg in $later; do case $arg in -shared) test "$build_libtool_libs" != yes && \ func_fatal_configuration "can not build a shared library" build_old_libs=no continue ;; -static) build_libtool_libs=no build_old_libs=yes continue ;; -prefer-pic) pic_mode=yes continue ;; -prefer-non-pic) pic_mode=no continue ;; esac done func_quote_for_eval "$libobj" test "X$libobj" != "X$func_quote_for_eval_result" \ && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \ && func_warning "libobj name \`$libobj' may not contain shell special characters." func_dirname_and_basename "$obj" "/" "" objname="$func_basename_result" xdir="$func_dirname_result" lobj=${xdir}$objdir/$objname test -z "$base_compile" && \ func_fatal_help "you must specify a compilation command" # Delete any leftover library objects. if test "$build_old_libs" = yes; then removelist="$obj $lobj $libobj ${libobj}T" else removelist="$lobj $libobj ${libobj}T" fi # On Cygwin there's no "real" PIC flag so we must build both object types case $host_os in cygwin* | mingw* | pw32* | os2* | cegcc*) pic_mode=default ;; esac if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then # non-PIC code in shared libraries is not supported pic_mode=default fi # Calculate the filename of the output object if compiler does # not support -o with -c if test "$compiler_c_o" = no; then output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.${objext} lockfile="$output_obj.lock" else output_obj= need_locks=no lockfile= fi # Lock this critical section if it is needed # We use this script file to make the link, it avoids creating a new file if test "$need_locks" = yes; then until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" sleep 2 done elif test "$need_locks" = warn; then if test -f "$lockfile"; then $ECHO "\ *** ERROR, $lockfile exists and contains: `cat $lockfile 2>/dev/null` This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi func_append removelist " $output_obj" $ECHO "$srcfile" > "$lockfile" fi $opt_dry_run || $RM $removelist func_append removelist " $lockfile" trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 func_to_tool_file "$srcfile" func_convert_file_msys_to_w32 srcfile=$func_to_tool_file_result func_quote_for_eval "$srcfile" qsrcfile=$func_quote_for_eval_result # Only build a PIC object if we are building libtool libraries. if test "$build_libtool_libs" = yes; then # Without this assignment, base_compile gets emptied. fbsd_hideous_sh_bug=$base_compile if test "$pic_mode" != no; then command="$base_compile $qsrcfile $pic_flag" else # Don't build PIC code command="$base_compile $qsrcfile" fi func_mkdir_p "$xdir$objdir" if test -z "$output_obj"; then # Place PIC objects in $objdir func_append command " -o $lobj" fi func_show_eval_locale "$command" \ 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE' if test "$need_locks" = warn && test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then $ECHO "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi # Just move the object if needed, then go on to compile the next one if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then func_show_eval '$MV "$output_obj" "$lobj"' \ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi # Allow error messages only from the first compilation. if test "$suppress_opt" = yes; then suppress_output=' >/dev/null 2>&1' fi fi # Only build a position-dependent object if we build old libraries. if test "$build_old_libs" = yes; then if test "$pic_mode" != yes; then # Don't build PIC code command="$base_compile $qsrcfile$pie_flag" else command="$base_compile $qsrcfile $pic_flag" fi if test "$compiler_c_o" = yes; then func_append command " -o $obj" fi # Suppress compiler output if we already did a PIC compilation. func_append command "$suppress_output" func_show_eval_locale "$command" \ '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' if test "$need_locks" = warn && test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then $ECHO "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi # Just move the object if needed if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then func_show_eval '$MV "$output_obj" "$obj"' \ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi fi $opt_dry_run || { func_write_libtool_object "$libobj" "$objdir/$objname" "$objname" # Unlock the critical section if it was locked if test "$need_locks" != no; then removelist=$lockfile $RM "$lockfile" fi } exit $EXIT_SUCCESS } $opt_help || { test "$opt_mode" = compile && func_mode_compile ${1+"$@"} } func_mode_help () { # We need to display help for each of the modes. case $opt_mode in "") # Generic help is extracted from the usage comments # at the start of this file. func_help ;; clean) $ECHO \ "Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE... Remove files from the build directory. RM is the name of the program to use to delete files associated with each FILE (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed to RM. If FILE is a libtool library, object or program, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; compile) $ECHO \ "Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE Compile a source file into a libtool library object. This mode accepts the following additional options: -o OUTPUT-FILE set the output file name to OUTPUT-FILE -no-suppress do not suppress compiler output for multiple passes -prefer-pic try to build PIC objects only -prefer-non-pic try to build non-PIC objects only -shared do not build a \`.o' file suitable for static linking -static only build a \`.o' file suitable for static linking -Wc,FLAG pass FLAG directly to the compiler COMPILE-COMMAND is a command to be used in creating a \`standard' object file from the given SOURCEFILE. The output file name is determined by removing the directory component from SOURCEFILE, then substituting the C source code suffix \`.c' with the library object suffix, \`.lo'." ;; execute) $ECHO \ "Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]... Automatically set library path, then run a program. This mode accepts the following additional options: -dlopen FILE add the directory containing FILE to the library path This mode sets the library path environment variable according to \`-dlopen' flags. If any of the ARGS are libtool executable wrappers, then they are translated into their corresponding uninstalled binary, and any of their required library directories are added to the library path. Then, COMMAND is executed, with ARGS as arguments." ;; finish) $ECHO \ "Usage: $progname [OPTION]... --mode=finish [LIBDIR]... Complete the installation of libtool libraries. Each LIBDIR is a directory that contains libtool libraries. The commands that this mode executes may require superuser privileges. Use the \`--dry-run' option if you just want to see what would be executed." ;; install) $ECHO \ "Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND... Install executables or libraries. INSTALL-COMMAND is the installation command. The first component should be either the \`install' or \`cp' program. The following components of INSTALL-COMMAND are treated specially: -inst-prefix-dir PREFIX-DIR Use PREFIX-DIR as a staging area for installation The rest of the components are interpreted as arguments to that command (only BSD-compatible install options are recognized)." ;; link) $ECHO \ "Usage: $progname [OPTION]... --mode=link LINK-COMMAND... Link object files or libraries together to form another library, or to create an executable program. LINK-COMMAND is a command using the C compiler that you would use to create a program from several object files. The following components of LINK-COMMAND are treated specially: -all-static do not do any dynamic linking at all -avoid-version do not add a version suffix if possible -bindir BINDIR specify path to binaries directory (for systems where libraries must be found in the PATH setting at runtime) -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) -export-symbols SYMFILE try to export only the symbols listed in SYMFILE -export-symbols-regex REGEX try to export only the symbols matching REGEX -LLIBDIR search LIBDIR for required installed libraries -lNAME OUTPUT-FILE requires the installed library libNAME -module build a library that can dlopened -no-fast-install disable the fast-install mode -no-install link a not-installable executable -no-undefined declare that a library does not refer to external symbols -o OUTPUT-FILE create OUTPUT-FILE from the specified objects -objectlist FILE Use a list of object files found in FILE to specify objects -precious-files-regex REGEX don't remove output files matching REGEX -release RELEASE specify package release information -rpath LIBDIR the created library will eventually be installed in LIBDIR -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries -shared only do dynamic linking of libtool libraries -shrext SUFFIX override the standard shared library file extension -static do not do any dynamic linking of uninstalled libtool libraries -static-libtool-libs do not do any dynamic linking of libtool libraries -version-info CURRENT[:REVISION[:AGE]] specify library version info [each variable defaults to 0] -weak LIBNAME declare that the target provides the LIBNAME interface -Wc,FLAG -Xcompiler FLAG pass linker-specific FLAG directly to the compiler -Wl,FLAG -Xlinker FLAG pass linker-specific FLAG directly to the linker -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC) All other options (arguments beginning with \`-') are ignored. Every other argument is treated as a filename. Files ending in \`.la' are treated as uninstalled libtool libraries, other files are standard or library object files. If the OUTPUT-FILE ends in \`.la', then a libtool library is created, only library objects (\`.lo' files) may be specified, and \`-rpath' is required, except when creating a convenience library. If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created using \`ar' and \`ranlib', or on Windows using \`lib'. If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file is created, otherwise an executable program is created." ;; uninstall) $ECHO \ "Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... Remove libraries from an installation directory. RM is the name of the program to use to delete files associated with each FILE (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed to RM. If FILE is a libtool library, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; *) func_fatal_help "invalid operation mode \`$opt_mode'" ;; esac echo $ECHO "Try \`$progname --help' for more information about other modes." } # Now that we've collected a possible --mode arg, show help if necessary if $opt_help; then if test "$opt_help" = :; then func_mode_help else { func_help noexit for opt_mode in compile link execute install finish uninstall clean; do func_mode_help done } | sed -n '1p; 2,$s/^Usage:/ or: /p' { func_help noexit for opt_mode in compile link execute install finish uninstall clean; do echo func_mode_help done } | sed '1d /^When reporting/,/^Report/{ H d } $x /information about other modes/d /more detailed .*MODE/d s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/' fi exit $? fi # func_mode_execute arg... func_mode_execute () { $opt_debug # The first argument is the command name. cmd="$nonopt" test -z "$cmd" && \ func_fatal_help "you must specify a COMMAND" # Handle -dlopen flags immediately. for file in $opt_dlopen; do test -f "$file" \ || func_fatal_help "\`$file' is not a file" dir= case $file in *.la) func_resolve_sysroot "$file" file=$func_resolve_sysroot_result # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "\`$lib' is not a valid libtool archive" # Read the libtool library. dlname= library_names= func_source "$file" # Skip this library if it cannot be dlopened. if test -z "$dlname"; then # Warn if it was a shared library. test -n "$library_names" && \ func_warning "\`$file' was not linked with \`-export-dynamic'" continue fi func_dirname "$file" "" "." dir="$func_dirname_result" if test -f "$dir/$objdir/$dlname"; then func_append dir "/$objdir" else if test ! -f "$dir/$dlname"; then func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" fi fi ;; *.lo) # Just add the directory containing the .lo file. func_dirname "$file" "" "." dir="$func_dirname_result" ;; *) func_warning "\`-dlopen' is ignored for non-libtool libraries and objects" continue ;; esac # Get the absolute pathname. absdir=`cd "$dir" && pwd` test -n "$absdir" && dir="$absdir" # Now add the directory to shlibpath_var. if eval "test -z \"\$$shlibpath_var\""; then eval "$shlibpath_var=\"\$dir\"" else eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" fi done # This variable tells wrapper scripts just to set shlibpath_var # rather than running their programs. libtool_execute_magic="$magic" # Check if any of the arguments is a wrapper script. args= for file do case $file in -* | *.la | *.lo ) ;; *) # Do a test to see if this is really a libtool program. if func_ltwrapper_script_p "$file"; then func_source "$file" # Transform arg to wrapped name. file="$progdir/$program" elif func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" func_source "$func_ltwrapper_scriptname_result" # Transform arg to wrapped name. file="$progdir/$program" fi ;; esac # Quote arguments (to preserve shell metacharacters). func_append_quoted args "$file" done if test "X$opt_dry_run" = Xfalse; then if test -n "$shlibpath_var"; then # Export the shlibpath_var. eval "export $shlibpath_var" fi # Restore saved environment variables for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test \"\${save_$lt_var+set}\" = set; then $lt_var=\$save_$lt_var; export $lt_var else $lt_unset $lt_var fi" done # Now prepare to actually exec the command. exec_cmd="\$cmd$args" else # Display what would be done. if test -n "$shlibpath_var"; then eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\"" echo "export $shlibpath_var" fi $ECHO "$cmd$args" exit $EXIT_SUCCESS fi } test "$opt_mode" = execute && func_mode_execute ${1+"$@"} # func_mode_finish arg... func_mode_finish () { $opt_debug libs= libdirs= admincmds= for opt in "$nonopt" ${1+"$@"} do if test -d "$opt"; then func_append libdirs " $opt" elif test -f "$opt"; then if func_lalib_unsafe_p "$opt"; then func_append libs " $opt" else func_warning "\`$opt' is not a valid libtool archive" fi else func_fatal_error "invalid argument \`$opt'" fi done if test -n "$libs"; then if test -n "$lt_sysroot"; then sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"` sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;" else sysroot_cmd= fi # Remove sysroot references if $opt_dry_run; then for lib in $libs; do echo "removing references to $lt_sysroot and \`=' prefixes from $lib" done else tmpdir=`func_mktempdir` for lib in $libs; do sed -e "${sysroot_cmd} s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \ > $tmpdir/tmp-la mv -f $tmpdir/tmp-la $lib done ${RM}r "$tmpdir" fi fi if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then for libdir in $libdirs; do if test -n "$finish_cmds"; then # Do each command in the finish commands. func_execute_cmds "$finish_cmds" 'admincmds="$admincmds '"$cmd"'"' fi if test -n "$finish_eval"; then # Do the single finish_eval. eval cmds=\"$finish_eval\" $opt_dry_run || eval "$cmds" || func_append admincmds " $cmds" fi done fi # Exit here if they wanted silent mode. $opt_silent && exit $EXIT_SUCCESS if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then echo "----------------------------------------------------------------------" echo "Libraries have been installed in:" for libdir in $libdirs; do $ECHO " $libdir" done echo echo "If you ever happen to want to link against installed libraries" echo "in a given directory, LIBDIR, you must either use libtool, and" echo "specify the full pathname of the library, or use the \`-LLIBDIR'" echo "flag during linking and do at least one of the following:" if test -n "$shlibpath_var"; then echo " - add LIBDIR to the \`$shlibpath_var' environment variable" echo " during execution" fi if test -n "$runpath_var"; then echo " - add LIBDIR to the \`$runpath_var' environment variable" echo " during linking" fi if test -n "$hardcode_libdir_flag_spec"; then libdir=LIBDIR eval flag=\"$hardcode_libdir_flag_spec\" $ECHO " - use the \`$flag' linker flag" fi if test -n "$admincmds"; then $ECHO " - have your system administrator run these commands:$admincmds" fi if test -f /etc/ld.so.conf; then echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" fi echo echo "See any operating system documentation about shared libraries for" case $host in solaris2.[6789]|solaris2.1[0-9]) echo "more information, such as the ld(1), crle(1) and ld.so(8) manual" echo "pages." ;; *) echo "more information, such as the ld(1) and ld.so(8) manual pages." ;; esac echo "----------------------------------------------------------------------" fi exit $EXIT_SUCCESS } test "$opt_mode" = finish && func_mode_finish ${1+"$@"} # func_mode_install arg... func_mode_install () { $opt_debug # There may be an optional sh(1) argument at the beginning of # install_prog (especially on Windows NT). if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || # Allow the use of GNU shtool's install command. case $nonopt in *shtool*) :;; *) false;; esac; then # Aesthetically quote it. func_quote_for_eval "$nonopt" install_prog="$func_quote_for_eval_result " arg=$1 shift else install_prog= arg=$nonopt fi # The real first argument should be the name of the installation program. # Aesthetically quote it. func_quote_for_eval "$arg" func_append install_prog "$func_quote_for_eval_result" install_shared_prog=$install_prog case " $install_prog " in *[\\\ /]cp\ *) install_cp=: ;; *) install_cp=false ;; esac # We need to accept at least all the BSD install flags. dest= files= opts= prev= install_type= isdir=no stripme= no_mode=: for arg do arg2= if test -n "$dest"; then func_append files " $dest" dest=$arg continue fi case $arg in -d) isdir=yes ;; -f) if $install_cp; then :; else prev=$arg fi ;; -g | -m | -o) prev=$arg ;; -s) stripme=" -s" continue ;; -*) ;; *) # If the previous option needed an argument, then skip it. if test -n "$prev"; then if test "x$prev" = x-m && test -n "$install_override_mode"; then arg2=$install_override_mode no_mode=false fi prev= else dest=$arg continue fi ;; esac # Aesthetically quote the argument. func_quote_for_eval "$arg" func_append install_prog " $func_quote_for_eval_result" if test -n "$arg2"; then func_quote_for_eval "$arg2" fi func_append install_shared_prog " $func_quote_for_eval_result" done test -z "$install_prog" && \ func_fatal_help "you must specify an install program" test -n "$prev" && \ func_fatal_help "the \`$prev' option requires an argument" if test -n "$install_override_mode" && $no_mode; then if $install_cp; then :; else func_quote_for_eval "$install_override_mode" func_append install_shared_prog " -m $func_quote_for_eval_result" fi fi if test -z "$files"; then if test -z "$dest"; then func_fatal_help "no file or destination specified" else func_fatal_help "you must specify a destination" fi fi # Strip any trailing slash from the destination. func_stripname '' '/' "$dest" dest=$func_stripname_result # Check to see that the destination is a directory. test -d "$dest" && isdir=yes if test "$isdir" = yes; then destdir="$dest" destname= else func_dirname_and_basename "$dest" "" "." destdir="$func_dirname_result" destname="$func_basename_result" # Not a directory, so check to see that there is only one file specified. set dummy $files; shift test "$#" -gt 1 && \ func_fatal_help "\`$dest' is not a directory" fi case $destdir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) for file in $files; do case $file in *.lo) ;; *) func_fatal_help "\`$destdir' must be an absolute directory name" ;; esac done ;; esac # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic="$magic" staticlibs= future_libdirs= current_libdirs= for file in $files; do # Do each installation. case $file in *.$libext) # Do the static libraries later. func_append staticlibs " $file" ;; *.la) func_resolve_sysroot "$file" file=$func_resolve_sysroot_result # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "\`$file' is not a valid libtool archive" library_names= old_library= relink_command= func_source "$file" # Add the libdir to current_libdirs if it is the destination. if test "X$destdir" = "X$libdir"; then case "$current_libdirs " in *" $libdir "*) ;; *) func_append current_libdirs " $libdir" ;; esac else # Note the libdir as a future libdir. case "$future_libdirs " in *" $libdir "*) ;; *) func_append future_libdirs " $libdir" ;; esac fi func_dirname "$file" "/" "" dir="$func_dirname_result" func_append dir "$objdir" if test -n "$relink_command"; then # Determine the prefix the user has applied to our future dir. inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"` # Don't allow the user to place us outside of our expected # location b/c this prevents finding dependent libraries that # are installed to the same prefix. # At present, this check doesn't affect windows .dll's that # are installed into $libdir/../bin (currently, that works fine) # but it's something to keep an eye on. test "$inst_prefix_dir" = "$destdir" && \ func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir" if test -n "$inst_prefix_dir"; then # Stick the inst_prefix_dir data into the link command. relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` else relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"` fi func_warning "relinking \`$file'" func_show_eval "$relink_command" \ 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"' fi # See the names of the shared library. set dummy $library_names; shift if test -n "$1"; then realname="$1" shift srcname="$realname" test -n "$relink_command" && srcname="$realname"T # Install the shared library and build the symlinks. func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \ 'exit $?' tstripme="$stripme" case $host_os in cygwin* | mingw* | pw32* | cegcc*) case $realname in *.dll.a) tstripme="" ;; esac ;; esac if test -n "$tstripme" && test -n "$striplib"; then func_show_eval "$striplib $destdir/$realname" 'exit $?' fi if test "$#" -gt 0; then # Delete the old symlinks, and create new ones. # Try `ln -sf' first, because the `ln' binary might depend on # the symlink we replace! Solaris /bin/ln does not understand -f, # so we also need to try rm && ln -s. for linkname do test "$linkname" != "$realname" \ && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })" done fi # Do each command in the postinstall commands. lib="$destdir/$realname" func_execute_cmds "$postinstall_cmds" 'exit $?' fi # Install the pseudo-library for information purposes. func_basename "$file" name="$func_basename_result" instname="$dir/$name"i func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' # Maybe install the static library, too. test -n "$old_library" && func_append staticlibs " $dir/$old_library" ;; *.lo) # Install (i.e. copy) a libtool object. # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else func_basename "$file" destfile="$func_basename_result" destfile="$destdir/$destfile" fi # Deduce the name of the destination old-style object file. case $destfile in *.lo) func_lo2o "$destfile" staticdest=$func_lo2o_result ;; *.$objext) staticdest="$destfile" destfile= ;; *) func_fatal_help "cannot copy a libtool object to \`$destfile'" ;; esac # Install the libtool object if requested. test -n "$destfile" && \ func_show_eval "$install_prog $file $destfile" 'exit $?' # Install the old object if enabled. if test "$build_old_libs" = yes; then # Deduce the name of the old-style object file. func_lo2o "$file" staticobj=$func_lo2o_result func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?' fi exit $EXIT_SUCCESS ;; *) # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else func_basename "$file" destfile="$func_basename_result" destfile="$destdir/$destfile" fi # If the file is missing, and there is a .exe on the end, strip it # because it is most likely a libtool script we actually want to # install stripped_ext="" case $file in *.exe) if test ! -f "$file"; then func_stripname '' '.exe' "$file" file=$func_stripname_result stripped_ext=".exe" fi ;; esac # Do a test to see if this is really a libtool program. case $host in *cygwin* | *mingw*) if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" wrapper=$func_ltwrapper_scriptname_result else func_stripname '' '.exe' "$file" wrapper=$func_stripname_result fi ;; *) wrapper=$file ;; esac if func_ltwrapper_script_p "$wrapper"; then notinst_deplibs= relink_command= func_source "$wrapper" # Check the variables that should have been set. test -z "$generated_by_libtool_version" && \ func_fatal_error "invalid libtool wrapper script \`$wrapper'" finalize=yes for lib in $notinst_deplibs; do # Check to see that each library is installed. libdir= if test -f "$lib"; then func_source "$lib" fi libfile="$libdir/"`$ECHO "$lib" | $SED 's%^.*/%%g'` ### testsuite: skip nested quoting test if test -n "$libdir" && test ! -f "$libfile"; then func_warning "\`$lib' has not been installed in \`$libdir'" finalize=no fi done relink_command= func_source "$wrapper" outputname= if test "$fast_install" = no && test -n "$relink_command"; then $opt_dry_run || { if test "$finalize" = yes; then tmpdir=`func_mktempdir` func_basename "$file$stripped_ext" file="$func_basename_result" outputname="$tmpdir/$file" # Replace the output file specification. relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'` $opt_silent || { func_quote_for_expand "$relink_command" eval "func_echo $func_quote_for_expand_result" } if eval "$relink_command"; then : else func_error "error: relink \`$file' with the above command before installing it" $opt_dry_run || ${RM}r "$tmpdir" continue fi file="$outputname" else func_warning "cannot relink \`$file'" fi } else # Install the binary that we compiled earlier. file=`$ECHO "$file$stripped_ext" | $SED "s%\([^/]*\)$%$objdir/\1%"` fi fi # remove .exe since cygwin /usr/bin/install will append another # one anyway case $install_prog,$host in */usr/bin/install*,*cygwin*) case $file:$destfile in *.exe:*.exe) # this is ok ;; *.exe:*) destfile=$destfile.exe ;; *:*.exe) func_stripname '' '.exe' "$destfile" destfile=$func_stripname_result ;; esac ;; esac func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?' $opt_dry_run || if test -n "$outputname"; then ${RM}r "$tmpdir" fi ;; esac done for file in $staticlibs; do func_basename "$file" name="$func_basename_result" # Set up the ranlib parameters. oldlib="$destdir/$name" func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 tool_oldlib=$func_to_tool_file_result func_show_eval "$install_prog \$file \$oldlib" 'exit $?' if test -n "$stripme" && test -n "$old_striplib"; then func_show_eval "$old_striplib $tool_oldlib" 'exit $?' fi # Do each command in the postinstall commands. func_execute_cmds "$old_postinstall_cmds" 'exit $?' done test -n "$future_libdirs" && \ func_warning "remember to run \`$progname --finish$future_libdirs'" if test -n "$current_libdirs"; then # Maybe just do a dry run. $opt_dry_run && current_libdirs=" -n$current_libdirs" exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' else exit $EXIT_SUCCESS fi } test "$opt_mode" = install && func_mode_install ${1+"$@"} # func_generate_dlsyms outputname originator pic_p # Extract symbols from dlprefiles and create ${outputname}S.o with # a dlpreopen symbol table. func_generate_dlsyms () { $opt_debug my_outputname="$1" my_originator="$2" my_pic_p="${3-no}" my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'` my_dlsyms= if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then if test -n "$NM" && test -n "$global_symbol_pipe"; then my_dlsyms="${my_outputname}S.c" else func_error "not configured to extract global symbols from dlpreopened files" fi fi if test -n "$my_dlsyms"; then case $my_dlsyms in "") ;; *.c) # Discover the nlist of each of the dlfiles. nlist="$output_objdir/${my_outputname}.nm" func_show_eval "$RM $nlist ${nlist}S ${nlist}T" # Parse the name list into a source file. func_verbose "creating $output_objdir/$my_dlsyms" $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\ /* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */ /* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */ #ifdef __cplusplus extern \"C\" { #endif #if defined(__GNUC__) && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4)) #pragma GCC diagnostic ignored \"-Wstrict-prototypes\" #endif /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) /* DATA imports from DLLs on WIN32 con't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT_DLSYM_CONST #elif defined(__osf__) /* This system does not cope well with relocations in const data. */ # define LT_DLSYM_CONST #else # define LT_DLSYM_CONST const #endif /* External symbol declarations for the compiler. */\ " if test "$dlself" = yes; then func_verbose "generating symbol list for \`$output'" $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" # Add our own program objects to the symbol list. progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP` for progfile in $progfiles; do func_to_tool_file "$progfile" func_convert_file_msys_to_w32 func_verbose "extracting global C symbols from \`$func_to_tool_file_result'" $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'" done if test -n "$exclude_expsyms"; then $opt_dry_run || { eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' } fi if test -n "$export_symbols_regex"; then $opt_dry_run || { eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' } fi # Prepare the list of exported symbols if test -z "$export_symbols"; then export_symbols="$output_objdir/$outputname.exp" $opt_dry_run || { $RM $export_symbols eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' case $host in *cygwin* | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' ;; esac } else $opt_dry_run || { eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' case $host in *cygwin* | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' ;; esac } fi fi for dlprefile in $dlprefiles; do func_verbose "extracting global C symbols from \`$dlprefile'" func_basename "$dlprefile" name="$func_basename_result" case $host in *cygwin* | *mingw* | *cegcc* ) # if an import library, we need to obtain dlname if func_win32_import_lib_p "$dlprefile"; then func_tr_sh "$dlprefile" eval "curr_lafile=\$libfile_$func_tr_sh_result" dlprefile_dlbasename="" if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then # Use subshell, to avoid clobbering current variable values dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"` if test -n "$dlprefile_dlname" ; then func_basename "$dlprefile_dlname" dlprefile_dlbasename="$func_basename_result" else # no lafile. user explicitly requested -dlpreopen . $sharedlib_from_linklib_cmd "$dlprefile" dlprefile_dlbasename=$sharedlib_from_linklib_result fi fi $opt_dry_run || { if test -n "$dlprefile_dlbasename" ; then eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"' else func_warning "Could not compute DLL name from $name" eval '$ECHO ": $name " >> "$nlist"' fi func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe | $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'" } else # not an import lib $opt_dry_run || { eval '$ECHO ": $name " >> "$nlist"' func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" } fi ;; *) $opt_dry_run || { eval '$ECHO ": $name " >> "$nlist"' func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" } ;; esac done $opt_dry_run || { # Make sure we have at least an empty file. test -f "$nlist" || : > "$nlist" if test -n "$exclude_expsyms"; then $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T $MV "$nlist"T "$nlist" fi # Try sorting and uniquifying the output. if $GREP -v "^: " < "$nlist" | if sort -k 3 /dev/null 2>&1; then sort -k 3 else sort +2 fi | uniq > "$nlist"S; then : else $GREP -v "^: " < "$nlist" > "$nlist"S fi if test -f "$nlist"S; then eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"' else echo '/* NONE */' >> "$output_objdir/$my_dlsyms" fi echo >> "$output_objdir/$my_dlsyms" "\ /* The mapping between symbol names and symbols. */ typedef struct { const char *name; void *address; } lt_dlsymlist; extern LT_DLSYM_CONST lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[]; LT_DLSYM_CONST lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[] = {\ { \"$my_originator\", (void *) 0 }," case $need_lib_prefix in no) eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; *) eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; esac echo >> "$output_objdir/$my_dlsyms" "\ {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt_${my_prefix}_LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif\ " } # !$opt_dry_run pic_flag_for_symtable= case "$compile_command " in *" -static "*) ;; *) case $host in # compiling the symbol table file with pic_flag works around # a FreeBSD bug that causes programs to crash when -lm is # linked before any other PIC object. But we must not use # pic_flag when linking with -static. The problem exists in # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. *-*-freebsd2.*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; *-*-hpux*) pic_flag_for_symtable=" $pic_flag" ;; *) if test "X$my_pic_p" != Xno; then pic_flag_for_symtable=" $pic_flag" fi ;; esac ;; esac symtab_cflags= for arg in $LTCFLAGS; do case $arg in -pie | -fpie | -fPIE) ;; *) func_append symtab_cflags " $arg" ;; esac done # Now compile the dynamic symbol file. func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?' # Clean up the generated files. func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"' # Transform the symbol file into the correct name. symfileobj="$output_objdir/${my_outputname}S.$objext" case $host in *cygwin* | *mingw* | *cegcc* ) if test -f "$output_objdir/$my_outputname.def"; then compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` else compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` fi ;; *) compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` ;; esac ;; *) func_fatal_error "unknown suffix for \`$my_dlsyms'" ;; esac else # We keep going just in case the user didn't refer to # lt_preloaded_symbols. The linker will fail if global_symbol_pipe # really was required. # Nullify the symbol file. compile_command=`$ECHO "$compile_command" | $SED "s% @SYMFILE@%%"` finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"` fi } # func_win32_libid arg # return the library type of file 'arg' # # Need a lot of goo to handle *both* DLLs and import libs # Has to be a shell function in order to 'eat' the argument # that is supplied when $file_magic_command is called. # Despite the name, also deal with 64 bit binaries. func_win32_libid () { $opt_debug win32_libid_type="unknown" win32_fileres=`file -L $1 2>/dev/null` case $win32_fileres in *ar\ archive\ import\ library*) # definitely import win32_libid_type="x86 archive import" ;; *ar\ archive*) # could be an import, or static # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD. if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then func_to_tool_file "$1" func_convert_file_msys_to_w32 win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" | $SED -n -e ' 1,100{ / I /{ s,.*,import, p q } }'` case $win32_nmres in import*) win32_libid_type="x86 archive import";; *) win32_libid_type="x86 archive static";; esac fi ;; *DLL*) win32_libid_type="x86 DLL" ;; *executable*) # but shell scripts are "executable" too... case $win32_fileres in *MS\ Windows\ PE\ Intel*) win32_libid_type="x86 DLL" ;; esac ;; esac $ECHO "$win32_libid_type" } # func_cygming_dll_for_implib ARG # # Platform-specific function to extract the # name of the DLL associated with the specified # import library ARG. # Invoked by eval'ing the libtool variable # $sharedlib_from_linklib_cmd # Result is available in the variable # $sharedlib_from_linklib_result func_cygming_dll_for_implib () { $opt_debug sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"` } # func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs # # The is the core of a fallback implementation of a # platform-specific function to extract the name of the # DLL associated with the specified import library LIBNAME. # # SECTION_NAME is either .idata$6 or .idata$7, depending # on the platform and compiler that created the implib. # # Echos the name of the DLL associated with the # specified import library. func_cygming_dll_for_implib_fallback_core () { $opt_debug match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"` $OBJDUMP -s --section "$1" "$2" 2>/dev/null | $SED '/^Contents of section '"$match_literal"':/{ # Place marker at beginning of archive member dllname section s/.*/====MARK====/ p d } # These lines can sometimes be longer than 43 characters, but # are always uninteresting /:[ ]*file format pe[i]\{,1\}-/d /^In archive [^:]*:/d # Ensure marker is printed /^====MARK====/p # Remove all lines with less than 43 characters /^.\{43\}/!d # From remaining lines, remove first 43 characters s/^.\{43\}//' | $SED -n ' # Join marker and all lines until next marker into a single line /^====MARK====/ b para H $ b para b :para x s/\n//g # Remove the marker s/^====MARK====// # Remove trailing dots and whitespace s/[\. \t]*$// # Print /./p' | # we now have a list, one entry per line, of the stringified # contents of the appropriate section of all members of the # archive which possess that section. Heuristic: eliminate # all those which have a first or second character that is # a '.' (that is, objdump's representation of an unprintable # character.) This should work for all archives with less than # 0x302f exports -- but will fail for DLLs whose name actually # begins with a literal '.' or a single character followed by # a '.'. # # Of those that remain, print the first one. $SED -e '/^\./d;/^.\./d;q' } # func_cygming_gnu_implib_p ARG # This predicate returns with zero status (TRUE) if # ARG is a GNU/binutils-style import library. Returns # with nonzero status (FALSE) otherwise. func_cygming_gnu_implib_p () { $opt_debug func_to_tool_file "$1" func_convert_file_msys_to_w32 func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'` test -n "$func_cygming_gnu_implib_tmp" } # func_cygming_ms_implib_p ARG # This predicate returns with zero status (TRUE) if # ARG is an MS-style import library. Returns # with nonzero status (FALSE) otherwise. func_cygming_ms_implib_p () { $opt_debug func_to_tool_file "$1" func_convert_file_msys_to_w32 func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'` test -n "$func_cygming_ms_implib_tmp" } # func_cygming_dll_for_implib_fallback ARG # Platform-specific function to extract the # name of the DLL associated with the specified # import library ARG. # # This fallback implementation is for use when $DLLTOOL # does not support the --identify-strict option. # Invoked by eval'ing the libtool variable # $sharedlib_from_linklib_cmd # Result is available in the variable # $sharedlib_from_linklib_result func_cygming_dll_for_implib_fallback () { $opt_debug if func_cygming_gnu_implib_p "$1" ; then # binutils import library sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"` elif func_cygming_ms_implib_p "$1" ; then # ms-generated import library sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"` else # unknown sharedlib_from_linklib_result="" fi } # func_extract_an_archive dir oldlib func_extract_an_archive () { $opt_debug f_ex_an_ar_dir="$1"; shift f_ex_an_ar_oldlib="$1" if test "$lock_old_archive_extraction" = yes; then lockfile=$f_ex_an_ar_oldlib.lock until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" sleep 2 done fi func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \ 'stat=$?; rm -f "$lockfile"; exit $stat' if test "$lock_old_archive_extraction" = yes; then $opt_dry_run || rm -f "$lockfile" fi if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then : else func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" fi } # func_extract_archives gentop oldlib ... func_extract_archives () { $opt_debug my_gentop="$1"; shift my_oldlibs=${1+"$@"} my_oldobjs="" my_xlib="" my_xabs="" my_xdir="" for my_xlib in $my_oldlibs; do # Extract the objects. case $my_xlib in [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; *) my_xabs=`pwd`"/$my_xlib" ;; esac func_basename "$my_xlib" my_xlib="$func_basename_result" my_xlib_u=$my_xlib while :; do case " $extracted_archives " in *" $my_xlib_u "*) func_arith $extracted_serial + 1 extracted_serial=$func_arith_result my_xlib_u=lt$extracted_serial-$my_xlib ;; *) break ;; esac done extracted_archives="$extracted_archives $my_xlib_u" my_xdir="$my_gentop/$my_xlib_u" func_mkdir_p "$my_xdir" case $host in *-darwin*) func_verbose "Extracting $my_xabs" # Do not bother doing anything if just a dry run $opt_dry_run || { darwin_orig_dir=`pwd` cd $my_xdir || exit $? darwin_archive=$my_xabs darwin_curdir=`pwd` darwin_base_archive=`basename "$darwin_archive"` darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true` if test -n "$darwin_arches"; then darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'` darwin_arch= func_verbose "$darwin_base_archive has multiple architectures $darwin_arches" for darwin_arch in $darwin_arches ; do func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}" $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" func_extract_an_archive "`pwd`" "${darwin_base_archive}" cd "$darwin_curdir" $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" done # $darwin_arches ## Okay now we've a bunch of thin objects, gotta fatten them up :) darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u` darwin_file= darwin_files= for darwin_file in $darwin_filelist; do darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP` $LIPO -create -output "$darwin_file" $darwin_files done # $darwin_filelist $RM -rf unfat-$$ cd "$darwin_orig_dir" else cd $darwin_orig_dir func_extract_an_archive "$my_xdir" "$my_xabs" fi # $darwin_arches } # !$opt_dry_run ;; *) func_extract_an_archive "$my_xdir" "$my_xabs" ;; esac my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP` done func_extract_archives_result="$my_oldobjs" } # func_emit_wrapper [arg=no] # # Emit a libtool wrapper script on stdout. # Don't directly open a file because we may want to # incorporate the script contents within a cygwin/mingw # wrapper executable. Must ONLY be called from within # func_mode_link because it depends on a number of variables # set therein. # # ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR # variable will take. If 'yes', then the emitted script # will assume that the directory in which it is stored is # the $objdir directory. This is a cygwin/mingw-specific # behavior. func_emit_wrapper () { func_emit_wrapper_arg1=${1-no} $ECHO "\ #! $SHELL # $output - temporary wrapper script for $objdir/$outputname # Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION # # The $output program cannot be directly executed until all the libtool # libraries that it depends on are installed. # # This wrapper script should never be moved out of the build directory. # If it is, it will not operate correctly. # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. sed_quote_subst='$sed_quote_subst' # 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+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac fi BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH relink_command=\"$relink_command\" # This environment variable determines our operation mode. if test \"\$libtool_install_magic\" = \"$magic\"; then # install mode needs the following variables: generated_by_libtool_version='$macro_version' notinst_deplibs='$notinst_deplibs' else # When we are sourced in execute mode, \$file and \$ECHO are already set. if test \"\$libtool_execute_magic\" != \"$magic\"; then file=\"\$0\"" qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"` $ECHO "\ # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$1 _LTECHO_EOF' } ECHO=\"$qECHO\" fi # Very basic option parsing. These options are (a) specific to # the libtool wrapper, (b) are identical between the wrapper # /script/ and the wrapper /executable/ which is used only on # windows platforms, and (c) all begin with the string "--lt-" # (application programs are unlikely to have options which match # this pattern). # # There are only two supported options: --lt-debug and # --lt-dump-script. There is, deliberately, no --lt-help. # # The first argument to this parsing function should be the # script's $0 value, followed by "$@". lt_option_debug= func_parse_lt_options () { lt_script_arg0=\$0 shift for lt_opt do case \"\$lt_opt\" in --lt-debug) lt_option_debug=1 ;; --lt-dump-script) lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\` test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=. lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\` cat \"\$lt_dump_D/\$lt_dump_F\" exit 0 ;; --lt-*) \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2 exit 1 ;; esac done # Print the debug banner immediately: if test -n \"\$lt_option_debug\"; then echo \"${outputname}:${output}:\${LINENO}: libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\" 1>&2 fi } # Used when --lt-debug. Prints its arguments to stdout # (redirection is the responsibility of the caller) func_lt_dump_args () { lt_dump_args_N=1; for lt_arg do \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[\$lt_dump_args_N]: \$lt_arg\" lt_dump_args_N=\`expr \$lt_dump_args_N + 1\` done } # Core function for launching the target application func_exec_program_core () { " case $host in # Backslashes separate directories on plain windows *-*-mingw | *-*-os2* | *-cegcc*) $ECHO "\ if test -n \"\$lt_option_debug\"; then \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir\\\\\$program\" 1>&2 func_lt_dump_args \${1+\"\$@\"} 1>&2 fi exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} " ;; *) $ECHO "\ if test -n \"\$lt_option_debug\"; then \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir/\$program\" 1>&2 func_lt_dump_args \${1+\"\$@\"} 1>&2 fi exec \"\$progdir/\$program\" \${1+\"\$@\"} " ;; esac $ECHO "\ \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 exit 1 } # A function to encapsulate launching the target application # Strips options in the --lt-* namespace from \$@ and # launches target application with the remaining arguments. func_exec_program () { case \" \$* \" in *\\ --lt-*) for lt_wr_arg do case \$lt_wr_arg in --lt-*) ;; *) set x \"\$@\" \"\$lt_wr_arg\"; shift;; esac shift done ;; esac func_exec_program_core \${1+\"\$@\"} } # Parse options func_parse_lt_options \"\$0\" \${1+\"\$@\"} # Find the directory that this script lives in. thisdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*$%%'\` test \"x\$thisdir\" = \"x\$file\" && thisdir=. # Follow symbolic links until we get to the real thisdir. file=\`ls -ld \"\$file\" | $SED -n 's/.*-> //p'\` while test -n \"\$file\"; do destdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*\$%%'\` # If there was a directory component, then change thisdir. if test \"x\$destdir\" != \"x\$file\"; then case \"\$destdir\" in [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; *) thisdir=\"\$thisdir/\$destdir\" ;; esac fi file=\`\$ECHO \"\$file\" | $SED 's%^.*/%%'\` file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\` done # Usually 'no', except on cygwin/mingw when embedded into # the cwrapper. WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1 if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then # special case for '.' if test \"\$thisdir\" = \".\"; then thisdir=\`pwd\` fi # remove .libs from thisdir case \"\$thisdir\" in *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;; $objdir ) thisdir=. ;; esac fi # Try to get the absolute directory name. absdir=\`cd \"\$thisdir\" && pwd\` test -n \"\$absdir\" && thisdir=\"\$absdir\" " if test "$fast_install" = yes; then $ECHO "\ program=lt-'$outputname'$exeext progdir=\"\$thisdir/$objdir\" if test ! -f \"\$progdir/\$program\" || { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ test \"X\$file\" != \"X\$progdir/\$program\"; }; then file=\"\$\$-\$program\" if test ! -d \"\$progdir\"; then $MKDIR \"\$progdir\" else $RM \"\$progdir/\$file\" fi" $ECHO "\ # relink executable if necessary if test -n \"\$relink_command\"; then if relink_command_output=\`eval \$relink_command 2>&1\`; then : else $ECHO \"\$relink_command_output\" >&2 $RM \"\$progdir/\$file\" exit 1 fi fi $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || { $RM \"\$progdir/\$program\"; $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; } $RM \"\$progdir/\$file\" fi" else $ECHO "\ program='$outputname' progdir=\"\$thisdir/$objdir\" " fi $ECHO "\ if test -f \"\$progdir/\$program\"; then" # fixup the dll searchpath if we need to. # # Fix the DLL searchpath if we need to. Do this before prepending # to shlibpath, because on Windows, both are PATH and uninstalled # libraries must come first. if test -n "$dllsearchpath"; then $ECHO "\ # Add the dll search path components to the executable PATH PATH=$dllsearchpath:\$PATH " fi # Export our shlibpath_var if we have one. if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then $ECHO "\ # Add our own library path to $shlibpath_var $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" # Some systems cannot cope with colon-terminated $shlibpath_var # The second colon is a workaround for a bug in BeOS R4 sed $shlibpath_var=\`\$ECHO \"\$$shlibpath_var\" | $SED 's/::*\$//'\` export $shlibpath_var " fi $ECHO "\ if test \"\$libtool_execute_magic\" != \"$magic\"; then # Run the actual program with our arguments. func_exec_program \${1+\"\$@\"} fi else # The program doesn't exist. \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 \$ECHO \"This script is just a wrapper for \$program.\" 1>&2 \$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2 exit 1 fi fi\ " } # func_emit_cwrapperexe_src # emit the source code for a wrapper executable on stdout # Must ONLY be called from within func_mode_link because # it depends on a number of variable set therein. func_emit_cwrapperexe_src () { cat < #include #ifdef _MSC_VER # include # include # include #else # include # include # ifdef __CYGWIN__ # include # endif #endif #include #include #include #include #include #include #include #include /* declarations of non-ANSI functions */ #if defined(__MINGW32__) # ifdef __STRICT_ANSI__ int _putenv (const char *); # endif #elif defined(__CYGWIN__) # ifdef __STRICT_ANSI__ char *realpath (const char *, char *); int putenv (char *); int setenv (const char *, const char *, int); # endif /* #elif defined (other platforms) ... */ #endif /* portability defines, excluding path handling macros */ #if defined(_MSC_VER) # define setmode _setmode # define stat _stat # define chmod _chmod # define getcwd _getcwd # define putenv _putenv # define S_IXUSR _S_IEXEC # ifndef _INTPTR_T_DEFINED # define _INTPTR_T_DEFINED # define intptr_t int # endif #elif defined(__MINGW32__) # define setmode _setmode # define stat _stat # define chmod _chmod # define getcwd _getcwd # define putenv _putenv #elif defined(__CYGWIN__) # define HAVE_SETENV # define FOPEN_WB "wb" /* #elif defined (other platforms) ... */ #endif #if defined(PATH_MAX) # define LT_PATHMAX PATH_MAX #elif defined(MAXPATHLEN) # define LT_PATHMAX MAXPATHLEN #else # define LT_PATHMAX 1024 #endif #ifndef S_IXOTH # define S_IXOTH 0 #endif #ifndef S_IXGRP # define S_IXGRP 0 #endif /* path handling portability macros */ #ifndef DIR_SEPARATOR # define DIR_SEPARATOR '/' # define PATH_SEPARATOR ':' #endif #if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ defined (__OS2__) # define HAVE_DOS_BASED_FILE_SYSTEM # define FOPEN_WB "wb" # ifndef DIR_SEPARATOR_2 # define DIR_SEPARATOR_2 '\\' # endif # ifndef PATH_SEPARATOR_2 # define PATH_SEPARATOR_2 ';' # endif #endif #ifndef DIR_SEPARATOR_2 # define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) #else /* DIR_SEPARATOR_2 */ # define IS_DIR_SEPARATOR(ch) \ (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) #endif /* DIR_SEPARATOR_2 */ #ifndef PATH_SEPARATOR_2 # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) #else /* PATH_SEPARATOR_2 */ # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) #endif /* PATH_SEPARATOR_2 */ #ifndef FOPEN_WB # define FOPEN_WB "w" #endif #ifndef _O_BINARY # define _O_BINARY 0 #endif #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) #define XFREE(stale) do { \ if (stale) { free ((void *) stale); stale = 0; } \ } while (0) #if defined(LT_DEBUGWRAPPER) static int lt_debug = 1; #else static int lt_debug = 0; #endif const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */ void *xmalloc (size_t num); char *xstrdup (const char *string); const char *base_name (const char *name); char *find_executable (const char *wrapper); char *chase_symlinks (const char *pathspec); int make_executable (const char *path); int check_executable (const char *path); char *strendzap (char *str, const char *pat); void lt_debugprintf (const char *file, int line, const char *fmt, ...); void lt_fatal (const char *file, int line, const char *message, ...); static const char *nonnull (const char *s); static const char *nonempty (const char *s); void lt_setenv (const char *name, const char *value); char *lt_extend_str (const char *orig_value, const char *add, int to_end); void lt_update_exe_path (const char *name, const char *value); void lt_update_lib_path (const char *name, const char *value); char **prepare_spawn (char **argv); void lt_dump_script (FILE *f); EOF cat <= 0) && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) return 1; else return 0; } int make_executable (const char *path) { int rval = 0; struct stat st; lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n", nonempty (path)); if ((!path) || (!*path)) return 0; if (stat (path, &st) >= 0) { rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR); } return rval; } /* Searches for the full path of the wrapper. Returns newly allocated full path name if found, NULL otherwise Does not chase symlinks, even on platforms that support them. */ char * find_executable (const char *wrapper) { int has_slash = 0; const char *p; const char *p_next; /* static buffer for getcwd */ char tmp[LT_PATHMAX + 1]; int tmp_len; char *concat_name; lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n", nonempty (wrapper)); if ((wrapper == NULL) || (*wrapper == '\0')) return NULL; /* Absolute path? */ #if defined (HAVE_DOS_BASED_FILE_SYSTEM) if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':') { concat_name = xstrdup (wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } else { #endif if (IS_DIR_SEPARATOR (wrapper[0])) { concat_name = xstrdup (wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } #if defined (HAVE_DOS_BASED_FILE_SYSTEM) } #endif for (p = wrapper; *p; p++) if (*p == '/') { has_slash = 1; break; } if (!has_slash) { /* no slashes; search PATH */ const char *path = getenv ("PATH"); if (path != NULL) { for (p = path; *p; p = p_next) { const char *q; size_t p_len; for (q = p; *q; q++) if (IS_PATH_SEPARATOR (*q)) break; p_len = q - p; p_next = (*q == '\0' ? q : q + 1); if (p_len == 0) { /* empty path: current directory */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", nonnull (strerror (errno))); tmp_len = strlen (tmp); concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); } else { concat_name = XMALLOC (char, p_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, p, p_len); concat_name[p_len] = '/'; strcpy (concat_name + p_len + 1, wrapper); } if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } } /* not found in PATH; assume curdir */ } /* Relative path | not found in path: prepend cwd */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", nonnull (strerror (errno))); tmp_len = strlen (tmp); concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); return NULL; } char * chase_symlinks (const char *pathspec) { #ifndef S_ISLNK return xstrdup (pathspec); #else char buf[LT_PATHMAX]; struct stat s; char *tmp_pathspec = xstrdup (pathspec); char *p; int has_symlinks = 0; while (strlen (tmp_pathspec) && !has_symlinks) { lt_debugprintf (__FILE__, __LINE__, "checking path component for symlinks: %s\n", tmp_pathspec); if (lstat (tmp_pathspec, &s) == 0) { if (S_ISLNK (s.st_mode) != 0) { has_symlinks = 1; break; } /* search backwards for last DIR_SEPARATOR */ p = tmp_pathspec + strlen (tmp_pathspec) - 1; while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) p--; if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) { /* no more DIR_SEPARATORS left */ break; } *p = '\0'; } else { lt_fatal (__FILE__, __LINE__, "error accessing file \"%s\": %s", tmp_pathspec, nonnull (strerror (errno))); } } XFREE (tmp_pathspec); if (!has_symlinks) { return xstrdup (pathspec); } tmp_pathspec = realpath (pathspec, buf); if (tmp_pathspec == 0) { lt_fatal (__FILE__, __LINE__, "could not follow symlinks for %s", pathspec); } return xstrdup (tmp_pathspec); #endif } char * strendzap (char *str, const char *pat) { size_t len, patlen; assert (str != NULL); assert (pat != NULL); len = strlen (str); patlen = strlen (pat); if (patlen <= len) { str += len - patlen; if (strcmp (str, pat) == 0) *str = '\0'; } return str; } void lt_debugprintf (const char *file, int line, const char *fmt, ...) { va_list args; if (lt_debug) { (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line); va_start (args, fmt); (void) vfprintf (stderr, fmt, args); va_end (args); } } static void lt_error_core (int exit_status, const char *file, int line, const char *mode, const char *message, va_list ap) { fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode); vfprintf (stderr, message, ap); fprintf (stderr, ".\n"); if (exit_status >= 0) exit (exit_status); } void lt_fatal (const char *file, int line, const char *message, ...) { va_list ap; va_start (ap, message); lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap); va_end (ap); } static const char * nonnull (const char *s) { return s ? s : "(null)"; } static const char * nonempty (const char *s) { return (s && !*s) ? "(empty)" : nonnull (s); } void lt_setenv (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_setenv) setting '%s' to '%s'\n", nonnull (name), nonnull (value)); { #ifdef HAVE_SETENV /* always make a copy, for consistency with !HAVE_SETENV */ char *str = xstrdup (value); setenv (name, str, 1); #else int len = strlen (name) + 1 + strlen (value) + 1; char *str = XMALLOC (char, len); sprintf (str, "%s=%s", name, value); if (putenv (str) != EXIT_SUCCESS) { XFREE (str); } #endif } } char * lt_extend_str (const char *orig_value, const char *add, int to_end) { char *new_value; if (orig_value && *orig_value) { int orig_value_len = strlen (orig_value); int add_len = strlen (add); new_value = XMALLOC (char, add_len + orig_value_len + 1); if (to_end) { strcpy (new_value, orig_value); strcpy (new_value + orig_value_len, add); } else { strcpy (new_value, add); strcpy (new_value + add_len, orig_value); } } else { new_value = xstrdup (add); } return new_value; } void lt_update_exe_path (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_update_exe_path) modifying '%s' by prepending '%s'\n", nonnull (name), nonnull (value)); if (name && *name && value && *value) { char *new_value = lt_extend_str (getenv (name), value, 0); /* some systems can't cope with a ':'-terminated path #' */ int len = strlen (new_value); while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1])) { new_value[len-1] = '\0'; } lt_setenv (name, new_value); XFREE (new_value); } } void lt_update_lib_path (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_update_lib_path) modifying '%s' by prepending '%s'\n", nonnull (name), nonnull (value)); if (name && *name && value && *value) { char *new_value = lt_extend_str (getenv (name), value, 0); lt_setenv (name, new_value); XFREE (new_value); } } EOF case $host_os in mingw*) cat <<"EOF" /* Prepares an argument vector before calling spawn(). Note that spawn() does not by itself call the command interpreter (getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") : ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); GetVersionEx(&v); v.dwPlatformId == VER_PLATFORM_WIN32_NT; }) ? "cmd.exe" : "command.com"). Instead it simply concatenates the arguments, separated by ' ', and calls CreateProcess(). We must quote the arguments since Win32 CreateProcess() interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a special way: - Space and tab are interpreted as delimiters. They are not treated as delimiters if they are surrounded by double quotes: "...". - Unescaped double quotes are removed from the input. Their only effect is that within double quotes, space and tab are treated like normal characters. - Backslashes not followed by double quotes are not special. - But 2*n+1 backslashes followed by a double quote become n backslashes followed by a double quote (n >= 0): \" -> " \\\" -> \" \\\\\" -> \\" */ #define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" #define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" char ** prepare_spawn (char **argv) { size_t argc; char **new_argv; size_t i; /* Count number of arguments. */ for (argc = 0; argv[argc] != NULL; argc++) ; /* Allocate new argument vector. */ new_argv = XMALLOC (char *, argc + 1); /* Put quoted arguments into the new argument vector. */ for (i = 0; i < argc; i++) { const char *string = argv[i]; if (string[0] == '\0') new_argv[i] = xstrdup ("\"\""); else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL) { int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL); size_t length; unsigned int backslashes; const char *s; char *quoted_string; char *p; length = 0; backslashes = 0; if (quote_around) length++; for (s = string; *s != '\0'; s++) { char c = *s; if (c == '"') length += backslashes + 1; length++; if (c == '\\') backslashes++; else backslashes = 0; } if (quote_around) length += backslashes + 1; quoted_string = XMALLOC (char, length + 1); p = quoted_string; backslashes = 0; if (quote_around) *p++ = '"'; for (s = string; *s != '\0'; s++) { char c = *s; if (c == '"') { unsigned int j; for (j = backslashes + 1; j > 0; j--) *p++ = '\\'; } *p++ = c; if (c == '\\') backslashes++; else backslashes = 0; } if (quote_around) { unsigned int j; for (j = backslashes; j > 0; j--) *p++ = '\\'; *p++ = '"'; } *p = '\0'; new_argv[i] = quoted_string; } else new_argv[i] = (char *) string; } new_argv[argc] = NULL; return new_argv; } EOF ;; esac cat <<"EOF" void lt_dump_script (FILE* f) { EOF func_emit_wrapper yes | $SED -n -e ' s/^\(.\{79\}\)\(..*\)/\1\ \2/ h s/\([\\"]\)/\\\1/g s/$/\\n/ s/\([^\n]*\).*/ fputs ("\1", f);/p g D' cat <<"EOF" } EOF } # end: func_emit_cwrapperexe_src # func_win32_import_lib_p ARG # True if ARG is an import lib, as indicated by $file_magic_cmd func_win32_import_lib_p () { $opt_debug case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in *import*) : ;; *) false ;; esac } # func_mode_link arg... func_mode_link () { $opt_debug case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) # It is impossible to link a dll without this setting, and # we shouldn't force the makefile maintainer to figure out # which system we are compiling for in order to pass an extra # flag for every libtool invocation. # allow_undefined=no # FIXME: Unfortunately, there are problems with the above when trying # to make a dll which has undefined symbols, in which case not # even a static library is built. For now, we need to specify # -no-undefined on the libtool link line when we can be certain # that all symbols are satisfied, otherwise we get a static library. allow_undefined=yes ;; *) allow_undefined=yes ;; esac libtool_args=$nonopt base_compile="$nonopt $@" compile_command=$nonopt finalize_command=$nonopt compile_rpath= finalize_rpath= compile_shlibpath= finalize_shlibpath= convenience= old_convenience= deplibs= old_deplibs= compiler_flags= linker_flags= dllsearchpath= lib_search_path=`pwd` inst_prefix_dir= new_inherited_linker_flags= avoid_version=no bindir= dlfiles= dlprefiles= dlself=no export_dynamic=no export_symbols= export_symbols_regex= generated= libobjs= ltlibs= module=no no_install=no objs= non_pic_objects= precious_files_regex= prefer_static_libs=no preload=no prev= prevarg= release= rpath= xrpath= perm_rpath= temp_rpath= thread_safe=no vinfo= vinfo_number=no weak_libs= single_module="${wl}-single_module" func_infer_tag $base_compile # We need to know -static, to get the right output filenames. for arg do case $arg in -shared) test "$build_libtool_libs" != yes && \ func_fatal_configuration "can not build a shared library" build_old_libs=no break ;; -all-static | -static | -static-libtool-libs) case $arg in -all-static) if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then func_warning "complete static linking is impossible in this configuration" fi if test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; -static) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=built ;; -static-libtool-libs) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; esac build_libtool_libs=no build_old_libs=yes break ;; esac done # See if our shared archives depend on static archives. test -n "$old_archive_from_new_cmds" && build_old_libs=yes # Go through the arguments, transforming them on the way. while test "$#" -gt 0; do arg="$1" shift func_quote_for_eval "$arg" qarg=$func_quote_for_eval_unquoted_result func_append libtool_args " $func_quote_for_eval_result" # If the previous option needs an argument, assign it. if test -n "$prev"; then case $prev in output) func_append compile_command " @OUTPUT@" func_append finalize_command " @OUTPUT@" ;; esac case $prev in bindir) bindir="$arg" prev= continue ;; dlfiles|dlprefiles) if test "$preload" = no; then # Add the symbol object into the linking commands. func_append compile_command " @SYMFILE@" func_append finalize_command " @SYMFILE@" preload=yes fi case $arg in *.la | *.lo) ;; # We handle these cases below. force) if test "$dlself" = no; then dlself=needless export_dynamic=yes fi prev= continue ;; self) if test "$prev" = dlprefiles; then dlself=yes elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then dlself=yes else dlself=needless export_dynamic=yes fi prev= continue ;; *) if test "$prev" = dlfiles; then func_append dlfiles " $arg" else func_append dlprefiles " $arg" fi prev= continue ;; esac ;; expsyms) export_symbols="$arg" test -f "$arg" \ || func_fatal_error "symbol file \`$arg' does not exist" prev= continue ;; expsyms_regex) export_symbols_regex="$arg" prev= continue ;; framework) case $host in *-*-darwin*) case "$deplibs " in *" $qarg.ltframework "*) ;; *) func_append deplibs " $qarg.ltframework" # this is fixed later ;; esac ;; esac prev= continue ;; inst_prefix) inst_prefix_dir="$arg" prev= continue ;; objectlist) if test -f "$arg"; then save_arg=$arg moreargs= for fil in `cat "$save_arg"` do # func_append moreargs " $fil" arg=$fil # A libtool-controlled object. # Check to see that this really is a libtool object. if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file func_source "$arg" if test -z "$pic_object" || test -z "$non_pic_object" || test "$pic_object" = none && test "$non_pic_object" = none; then func_fatal_error "cannot find name of object for \`$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then func_append dlfiles " $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. func_append dlprefiles " $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" arg="$pic_object" fi # Non-PIC object. if test "$non_pic_object" != none; then # Prepend the subdirectory the object is found in. non_pic_object="$xdir$non_pic_object" # A standard non-PIC object func_append non_pic_objects " $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object="$pic_object" func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result non_pic_object=$xdir$func_lo2o_result func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else func_fatal_error "\`$arg' is not a valid libtool object" fi fi done else func_fatal_error "link input file \`$arg' does not exist" fi arg=$save_arg prev= continue ;; precious_regex) precious_files_regex="$arg" prev= continue ;; release) release="-$arg" prev= continue ;; rpath | xrpath) # We need an absolute path. case $arg in [\\/]* | [A-Za-z]:[\\/]*) ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac if test "$prev" = rpath; then case "$rpath " in *" $arg "*) ;; *) func_append rpath " $arg" ;; esac else case "$xrpath " in *" $arg "*) ;; *) func_append xrpath " $arg" ;; esac fi prev= continue ;; shrext) shrext_cmds="$arg" prev= continue ;; weak) func_append weak_libs " $arg" prev= continue ;; xcclinker) func_append linker_flags " $qarg" func_append compiler_flags " $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xcompiler) func_append compiler_flags " $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xlinker) func_append linker_flags " $qarg" func_append compiler_flags " $wl$qarg" prev= func_append compile_command " $wl$qarg" func_append finalize_command " $wl$qarg" continue ;; *) eval "$prev=\"\$arg\"" prev= continue ;; esac fi # test -n "$prev" prevarg="$arg" case $arg in -all-static) if test -n "$link_static_flag"; then # See comment for -static flag below, for more details. func_append compile_command " $link_static_flag" func_append finalize_command " $link_static_flag" fi continue ;; -allow-undefined) # FIXME: remove this flag sometime in the future. func_fatal_error "\`-allow-undefined' must not be used because it is the default" ;; -avoid-version) avoid_version=yes continue ;; -bindir) prev=bindir continue ;; -dlopen) prev=dlfiles continue ;; -dlpreopen) prev=dlprefiles continue ;; -export-dynamic) export_dynamic=yes continue ;; -export-symbols | -export-symbols-regex) if test -n "$export_symbols" || test -n "$export_symbols_regex"; then func_fatal_error "more than one -exported-symbols argument is not allowed" fi if test "X$arg" = "X-export-symbols"; then prev=expsyms else prev=expsyms_regex fi continue ;; -framework) prev=framework continue ;; -inst-prefix-dir) prev=inst_prefix continue ;; # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* # so, if we see these flags be careful not to treat them like -L -L[A-Z][A-Z]*:*) case $with_gcc/$host in no/*-*-irix* | /*-*-irix*) func_append compile_command " $arg" func_append finalize_command " $arg" ;; esac continue ;; -L*) func_stripname "-L" '' "$arg" if test -z "$func_stripname_result"; then if test "$#" -gt 0; then func_fatal_error "require no space between \`-L' and \`$1'" else func_fatal_error "need path for \`-L' option" fi fi func_resolve_sysroot "$func_stripname_result" dir=$func_resolve_sysroot_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) absdir=`cd "$dir" && pwd` test -z "$absdir" && \ func_fatal_error "cannot determine absolute directory name of \`$dir'" dir="$absdir" ;; esac case "$deplibs " in *" -L$dir "* | *" $arg "*) # Will only happen for absolute or sysroot arguments ;; *) # Preserve sysroot, but never include relative directories case $dir in [\\/]* | [A-Za-z]:[\\/]* | =*) func_append deplibs " $arg" ;; *) func_append deplibs " -L$dir" ;; esac func_append lib_search_path " $dir" ;; esac case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'` case :$dllsearchpath: in *":$dir:"*) ;; ::) dllsearchpath=$dir;; *) func_append dllsearchpath ":$dir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) func_append dllsearchpath ":$testbindir";; esac ;; esac continue ;; -l*) if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*) # These systems don't actually have a C or math library (as such) continue ;; *-*-os2*) # These systems don't actually have a C library (as such) test "X$arg" = "X-lc" && continue ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. test "X$arg" = "X-lc" && continue ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C and math libraries are in the System framework func_append deplibs " System.ltframework" continue ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype test "X$arg" = "X-lc" && continue ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work test "X$arg" = "X-lc" && continue ;; esac elif test "X$arg" = "X-lc_r"; then case $host in *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc_r directly, use -pthread flag. continue ;; esac fi func_append deplibs " $arg" continue ;; -module) module=yes continue ;; # Tru64 UNIX uses -model [arg] to determine the layout of C++ # classes, name mangling, and exception handling. # Darwin uses the -arch flag to determine output architecture. -model|-arch|-isysroot|--sysroot) func_append compiler_flags " $arg" func_append compile_command " $arg" func_append finalize_command " $arg" prev=xcompiler continue ;; -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) func_append compiler_flags " $arg" func_append compile_command " $arg" func_append finalize_command " $arg" case "$new_inherited_linker_flags " in *" $arg "*) ;; * ) func_append new_inherited_linker_flags " $arg" ;; esac continue ;; -multi_module) single_module="${wl}-multi_module" continue ;; -no-fast-install) fast_install=no continue ;; -no-install) case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) # The PATH hackery in wrapper scripts is required on Windows # and Darwin in order for the loader to find any dlls it needs. func_warning "\`-no-install' is ignored for $host" func_warning "assuming \`-no-fast-install' instead" fast_install=no ;; *) no_install=yes ;; esac continue ;; -no-undefined) allow_undefined=no continue ;; -objectlist) prev=objectlist continue ;; -o) prev=output ;; -precious-files-regex) prev=precious_regex continue ;; -release) prev=release continue ;; -rpath) prev=rpath continue ;; -R) prev=xrpath continue ;; -R*) func_stripname '-R' '' "$arg" dir=$func_stripname_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; =*) func_stripname '=' '' "$dir" dir=$lt_sysroot$func_stripname_result ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac case "$xrpath " in *" $dir "*) ;; *) func_append xrpath " $dir" ;; esac continue ;; -shared) # The effects of -shared are defined in a previous loop. continue ;; -shrext) prev=shrext continue ;; -static | -static-libtool-libs) # The effects of -static are defined in a previous loop. # We used to do the same as -all-static on platforms that # didn't have a PIC flag, but the assumption that the effects # would be equivalent was wrong. It would break on at least # Digital Unix and AIX. continue ;; -thread-safe) thread_safe=yes continue ;; -version-info) prev=vinfo continue ;; -version-number) prev=vinfo vinfo_number=yes continue ;; -weak) prev=weak continue ;; -Wc,*) func_stripname '-Wc,' '' "$arg" args=$func_stripname_result arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" func_quote_for_eval "$flag" func_append arg " $func_quote_for_eval_result" func_append compiler_flags " $func_quote_for_eval_result" done IFS="$save_ifs" func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Wl,*) func_stripname '-Wl,' '' "$arg" args=$func_stripname_result arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" func_quote_for_eval "$flag" func_append arg " $wl$func_quote_for_eval_result" func_append compiler_flags " $wl$func_quote_for_eval_result" func_append linker_flags " $func_quote_for_eval_result" done IFS="$save_ifs" func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Xcompiler) prev=xcompiler continue ;; -Xlinker) prev=xlinker continue ;; -XCClinker) prev=xcclinker continue ;; # -msg_* for osf cc -msg_*) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; # Flags to be passed through unchanged, with rationale: # -64, -mips[0-9] enable 64-bit mode for the SGI compiler # -r[0-9][0-9]* specify processor for the SGI compiler # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler # +DA*, +DD* enable 64-bit mode for the HP compiler # -q* compiler args for the IBM compiler # -m*, -t[45]*, -txscale* architecture-specific flags for GCC # -F/path path to uninstalled frameworks, gcc on darwin # -p, -pg, --coverage, -fprofile-* profiling flags for GCC # @file GCC response files # -tp=* Portland pgcc target processor selection # --sysroot=* for sysroot support # -O*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ -O*|-flto*|-fwhopr*|-fuse-linker-plugin) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" func_append compile_command " $arg" func_append finalize_command " $arg" func_append compiler_flags " $arg" continue ;; # Some other compiler flag. -* | +*) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; *.$objext) # A standard object. func_append objs " $arg" ;; *.lo) # A libtool-controlled object. # Check to see that this really is a libtool object. if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file func_source "$arg" if test -z "$pic_object" || test -z "$non_pic_object" || test "$pic_object" = none && test "$non_pic_object" = none; then func_fatal_error "cannot find name of object for \`$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then func_append dlfiles " $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. func_append dlprefiles " $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" arg="$pic_object" fi # Non-PIC object. if test "$non_pic_object" != none; then # Prepend the subdirectory the object is found in. non_pic_object="$xdir$non_pic_object" # A standard non-PIC object func_append non_pic_objects " $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object="$pic_object" func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result non_pic_object=$xdir$func_lo2o_result func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else func_fatal_error "\`$arg' is not a valid libtool object" fi fi ;; *.$libext) # An archive. func_append deplibs " $arg" func_append old_deplibs " $arg" continue ;; *.la) # A libtool-controlled library. func_resolve_sysroot "$arg" if test "$prev" = dlfiles; then # This library was specified with -dlopen. func_append dlfiles " $func_resolve_sysroot_result" prev= elif test "$prev" = dlprefiles; then # The library was specified with -dlpreopen. func_append dlprefiles " $func_resolve_sysroot_result" prev= else func_append deplibs " $func_resolve_sysroot_result" fi continue ;; # Some other compiler argument. *) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; esac # arg # Now actually substitute the argument into the commands. if test -n "$arg"; then func_append compile_command " $arg" func_append finalize_command " $arg" fi done # argument parsing loop test -n "$prev" && \ func_fatal_help "the \`$prevarg' option requires an argument" if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then eval arg=\"$export_dynamic_flag_spec\" func_append compile_command " $arg" func_append finalize_command " $arg" fi oldlibs= # calculate the name of the file, without its directory func_basename "$output" outputname="$func_basename_result" libobjs_save="$libobjs" if test -n "$shlibpath_var"; then # get the directories listed in $shlibpath_var eval shlib_search_path=\`\$ECHO \"\${$shlibpath_var}\" \| \$SED \'s/:/ /g\'\` else shlib_search_path= fi eval sys_lib_search_path=\"$sys_lib_search_path_spec\" eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" func_dirname "$output" "/" "" output_objdir="$func_dirname_result$objdir" func_to_tool_file "$output_objdir/" tool_output_objdir=$func_to_tool_file_result # Create the object directory. func_mkdir_p "$output_objdir" # Determine the type of output case $output in "") func_fatal_help "you must specify an output file" ;; *.$libext) linkmode=oldlib ;; *.lo | *.$objext) linkmode=obj ;; *.la) linkmode=lib ;; *) linkmode=prog ;; # Anything else should be a program. esac specialdeplibs= libs= # Find all interdependent deplibs by searching for libraries # that are linked more than once (e.g. -la -lb -la) for deplib in $deplibs; do if $opt_preserve_dup_deps ; then case "$libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append libs " $deplib" done if test "$linkmode" = lib; then libs="$predeps $libs $compiler_lib_search_path $postdeps" # Compute libraries that are listed more than once in $predeps # $postdeps and mark them as special (i.e., whose duplicates are # not to be eliminated). pre_post_deps= if $opt_duplicate_compiler_generated_deps; then for pre_post_dep in $predeps $postdeps; do case "$pre_post_deps " in *" $pre_post_dep "*) func_append specialdeplibs " $pre_post_deps" ;; esac func_append pre_post_deps " $pre_post_dep" done fi pre_post_deps= fi deplibs= newdependency_libs= newlib_search_path= need_relink=no # whether we're linking any uninstalled libtool libraries notinst_deplibs= # not-installed libtool libraries notinst_path= # paths that contain not-installed libtool libraries case $linkmode in lib) passes="conv dlpreopen link" for file in $dlfiles $dlprefiles; do case $file in *.la) ;; *) func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file" ;; esac done ;; prog) compile_deplibs= finalize_deplibs= alldeplibs=no newdlfiles= newdlprefiles= passes="conv scan dlopen dlpreopen link" ;; *) passes="conv" ;; esac for pass in $passes; do # The preopen pass in lib mode reverses $deplibs; put it back here # so that -L comes before libs that need it for instance... if test "$linkmode,$pass" = "lib,link"; then ## FIXME: Find the place where the list is rebuilt in the wrong ## order, and fix it there properly tmp_deplibs= for deplib in $deplibs; do tmp_deplibs="$deplib $tmp_deplibs" done deplibs="$tmp_deplibs" fi if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan"; then libs="$deplibs" deplibs= fi if test "$linkmode" = prog; then case $pass in dlopen) libs="$dlfiles" ;; dlpreopen) libs="$dlprefiles" ;; link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; esac fi if test "$linkmode,$pass" = "lib,dlpreopen"; then # Collect and forward deplibs of preopened libtool libs for lib in $dlprefiles; do # Ignore non-libtool-libs dependency_libs= func_resolve_sysroot "$lib" case $lib in *.la) func_source "$func_resolve_sysroot_result" ;; esac # Collect preopened libtool deplibs, except any this library # has declared as weak libs for deplib in $dependency_libs; do func_basename "$deplib" deplib_base=$func_basename_result case " $weak_libs " in *" $deplib_base "*) ;; *) func_append deplibs " $deplib" ;; esac done done libs="$dlprefiles" fi if test "$pass" = dlopen; then # Collect dlpreopened libraries save_deplibs="$deplibs" deplibs= fi for deplib in $libs; do lib= found=no case $deplib in -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else func_append compiler_flags " $deplib" if test "$linkmode" = lib ; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) func_append new_inherited_linker_flags " $deplib" ;; esac fi fi continue ;; -l*) if test "$linkmode" != lib && test "$linkmode" != prog; then func_warning "\`-l' is ignored for archives/objects" continue fi func_stripname '-l' '' "$deplib" name=$func_stripname_result if test "$linkmode" = lib; then searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" else searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" fi for searchdir in $searchdirs; do for search_ext in .la $std_shrext .so .a; do # Search the libtool library lib="$searchdir/lib${name}${search_ext}" if test -f "$lib"; then if test "$search_ext" = ".la"; then found=yes else found=no fi break 2 fi done done if test "$found" != yes; then # deplib doesn't seem to be a libtool library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue else # deplib is a libtool library # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, # We need to do some special things here, and not later. if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $deplib "*) if func_lalib_p "$lib"; then library_names= old_library= func_source "$lib" for l in $old_library $library_names; do ll="$l" done if test "X$ll" = "X$old_library" ; then # only static version available found=no func_dirname "$lib" "" "." ladir="$func_dirname_result" lib=$ladir/$old_library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue fi fi ;; *) ;; esac fi fi ;; # -l *.ltframework) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" if test "$linkmode" = lib ; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) func_append new_inherited_linker_flags " $deplib" ;; esac fi fi continue ;; -L*) case $linkmode in lib) deplibs="$deplib $deplibs" test "$pass" = conv && continue newdependency_libs="$deplib $newdependency_libs" func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; prog) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi if test "$pass" = scan; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; *) func_warning "\`-L' is ignored for archives/objects" ;; esac # linkmode continue ;; # -L -R*) if test "$pass" = link; then func_stripname '-R' '' "$deplib" func_resolve_sysroot "$func_stripname_result" dir=$func_resolve_sysroot_result # Make sure the xrpath contains only unique directories. case "$xrpath " in *" $dir "*) ;; *) func_append xrpath " $dir" ;; esac fi deplibs="$deplib $deplibs" continue ;; *.la) func_resolve_sysroot "$deplib" lib=$func_resolve_sysroot_result ;; *.$libext) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi case $linkmode in lib) # Linking convenience modules into shared libraries is allowed, # but linking other static libraries is non-portable. case " $dlpreconveniencelibs " in *" $deplib "*) ;; *) valid_a_lib=no case $deplibs_check_method in match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \ | $EGREP "$match_pattern_regex" > /dev/null; then valid_a_lib=yes fi ;; pass_all) valid_a_lib=yes ;; esac if test "$valid_a_lib" != yes; then echo $ECHO "*** Warning: Trying to link with static lib archive $deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because the file extensions .$libext of this argument makes me believe" echo "*** that it is just a static archive that I should not use here." else echo $ECHO "*** Warning: Linking the shared library $output against the" $ECHO "*** static library $deplib is not portable!" deplibs="$deplib $deplibs" fi ;; esac continue ;; prog) if test "$pass" != link; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi continue ;; esac # linkmode ;; # *.$libext *.lo | *.$objext) if test "$pass" = conv; then deplibs="$deplib $deplibs" elif test "$linkmode" = prog; then if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlopen support or we're linking statically, # we need to preload. func_append newdlprefiles " $deplib" compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else func_append newdlfiles " $deplib" fi fi continue ;; %DEPLIBS%) alldeplibs=yes continue ;; esac # case $deplib if test "$found" = yes || test -f "$lib"; then : else func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'" fi # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$lib" \ || func_fatal_error "\`$lib' is not a valid libtool archive" func_dirname "$lib" "" "." ladir="$func_dirname_result" dlname= dlopen= dlpreopen= libdir= library_names= old_library= inherited_linker_flags= # If the library was installed with an old release of libtool, # it will not redefine variables installed, or shouldnotlink installed=yes shouldnotlink=no avoidtemprpath= # Read the .la file func_source "$lib" # Convert "-framework foo" to "foo.ltframework" if test -n "$inherited_linker_flags"; then tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'` for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do case " $new_inherited_linker_flags " in *" $tmp_inherited_linker_flag "*) ;; *) func_append new_inherited_linker_flags " $tmp_inherited_linker_flag";; esac done fi dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan" || { test "$linkmode" != prog && test "$linkmode" != lib; }; then test -n "$dlopen" && func_append dlfiles " $dlopen" test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen" fi if test "$pass" = conv; then # Only check for convenience libraries deplibs="$lib $deplibs" if test -z "$libdir"; then if test -z "$old_library"; then func_fatal_error "cannot find name of link library for \`$lib'" fi # It is a libtool convenience library, so add in its objects. func_append convenience " $ladir/$objdir/$old_library" func_append old_convenience " $ladir/$objdir/$old_library" elif test "$linkmode" != prog && test "$linkmode" != lib; then func_fatal_error "\`$lib' is not a convenience library" fi tmp_libs= for deplib in $dependency_libs; do deplibs="$deplib $deplibs" if $opt_preserve_dup_deps ; then case "$tmp_libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append tmp_libs " $deplib" done continue fi # $pass = conv # Get the name of the library we link against. linklib= if test -n "$old_library" && { test "$prefer_static_libs" = yes || test "$prefer_static_libs,$installed" = "built,no"; }; then linklib=$old_library else for l in $old_library $library_names; do linklib="$l" done fi if test -z "$linklib"; then func_fatal_error "cannot find name of link library for \`$lib'" fi # This library was specified with -dlopen. if test "$pass" = dlopen; then if test -z "$libdir"; then func_fatal_error "cannot -dlopen a convenience library: \`$lib'" fi if test -z "$dlname" || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlname, no dlopen support or we're linking # statically, we need to preload. We also need to preload any # dependent libraries so libltdl's deplib preloader doesn't # bomb out in the load deplibs phase. func_append dlprefiles " $lib $dependency_libs" else func_append newdlfiles " $lib" fi continue fi # $pass = dlopen # We need an absolute path. case $ladir in [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; *) abs_ladir=`cd "$ladir" && pwd` if test -z "$abs_ladir"; then func_warning "cannot determine absolute directory name of \`$ladir'" func_warning "passing it literally to the linker, although it might fail" abs_ladir="$ladir" fi ;; esac func_basename "$lib" laname="$func_basename_result" # Find the relevant object directory and library name. if test "X$installed" = Xyes; then if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then func_warning "library \`$lib' was moved." dir="$ladir" absdir="$abs_ladir" libdir="$abs_ladir" else dir="$lt_sysroot$libdir" absdir="$lt_sysroot$libdir" fi test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes else if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then dir="$ladir" absdir="$abs_ladir" # Remove this search path later func_append notinst_path " $abs_ladir" else dir="$ladir/$objdir" absdir="$abs_ladir/$objdir" # Remove this search path later func_append notinst_path " $abs_ladir" fi fi # $installed = yes func_stripname 'lib' '.la' "$laname" name=$func_stripname_result # This library was specified with -dlpreopen. if test "$pass" = dlpreopen; then if test -z "$libdir" && test "$linkmode" = prog; then func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'" fi case "$host" in # special handling for platforms with PE-DLLs. *cygwin* | *mingw* | *cegcc* ) # Linker will automatically link against shared library if both # static and shared are present. Therefore, ensure we extract # symbols from the import library if a shared library is present # (otherwise, the dlopen module name will be incorrect). We do # this by putting the import library name into $newdlprefiles. # We recover the dlopen module name by 'saving' the la file # name in a special purpose variable, and (later) extracting the # dlname from the la file. if test -n "$dlname"; then func_tr_sh "$dir/$linklib" eval "libfile_$func_tr_sh_result=\$abs_ladir/\$laname" func_append newdlprefiles " $dir/$linklib" else func_append newdlprefiles " $dir/$old_library" # Keep a list of preopened convenience libraries to check # that they are being used correctly in the link pass. test -z "$libdir" && \ func_append dlpreconveniencelibs " $dir/$old_library" fi ;; * ) # Prefer using a static library (so that no silly _DYNAMIC symbols # are required to link). if test -n "$old_library"; then func_append newdlprefiles " $dir/$old_library" # Keep a list of preopened convenience libraries to check # that they are being used correctly in the link pass. test -z "$libdir" && \ func_append dlpreconveniencelibs " $dir/$old_library" # Otherwise, use the dlname, so that lt_dlopen finds it. elif test -n "$dlname"; then func_append newdlprefiles " $dir/$dlname" else func_append newdlprefiles " $dir/$linklib" fi ;; esac fi # $pass = dlpreopen if test -z "$libdir"; then # Link the convenience library if test "$linkmode" = lib; then deplibs="$dir/$old_library $deplibs" elif test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$dir/$old_library $compile_deplibs" finalize_deplibs="$dir/$old_library $finalize_deplibs" else deplibs="$lib $deplibs" # used for prog,scan pass fi continue fi if test "$linkmode" = prog && test "$pass" != link; then func_append newlib_search_path " $ladir" deplibs="$lib $deplibs" linkalldeplibs=no if test "$link_all_deplibs" != no || test -z "$library_names" || test "$build_libtool_libs" = no; then linkalldeplibs=yes fi tmp_libs= for deplib in $dependency_libs; do case $deplib in -L*) func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; esac # Need to link against all dependency_libs? if test "$linkalldeplibs" = yes; then deplibs="$deplib $deplibs" else # Need to hardcode shared library paths # or/and link against static libraries newdependency_libs="$deplib $newdependency_libs" fi if $opt_preserve_dup_deps ; then case "$tmp_libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append tmp_libs " $deplib" done # for deplib continue fi # $linkmode = prog... if test "$linkmode,$pass" = "prog,link"; then if test -n "$library_names" && { { test "$prefer_static_libs" = no || test "$prefer_static_libs,$installed" = "built,yes"; } || test -z "$old_library"; }; then # We need to hardcode the library path if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then # Make sure the rpath contains only unique directories. case "$temp_rpath:" in *"$absdir:"*) ;; *) func_append temp_rpath "$absdir:" ;; esac fi # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) func_append compile_rpath " $absdir" ;; esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac ;; esac fi # $linkmode,$pass = prog,link... if test "$alldeplibs" = yes && { test "$deplibs_check_method" = pass_all || { test "$build_libtool_libs" = yes && test -n "$library_names"; }; }; then # We only need to search for static libraries continue fi fi link_static=no # Whether the deplib will be linked statically use_static_libs=$prefer_static_libs if test "$use_static_libs" = built && test "$installed" = yes; then use_static_libs=no fi if test -n "$library_names" && { test "$use_static_libs" = no || test -z "$old_library"; }; then case $host in *cygwin* | *mingw* | *cegcc*) # No point in relinking DLLs because paths are not encoded func_append notinst_deplibs " $lib" need_relink=no ;; *) if test "$installed" = no; then func_append notinst_deplibs " $lib" need_relink=yes fi ;; esac # This is a shared library # Warn about portability, can't link against -module's on some # systems (darwin). Don't bleat about dlopened modules though! dlopenmodule="" for dlpremoduletest in $dlprefiles; do if test "X$dlpremoduletest" = "X$lib"; then dlopenmodule="$dlpremoduletest" break fi done if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then echo if test "$linkmode" = prog; then $ECHO "*** Warning: Linking the executable $output against the loadable module" else $ECHO "*** Warning: Linking the shared library $output against the loadable module" fi $ECHO "*** $linklib is not portable!" fi if test "$linkmode" = lib && test "$hardcode_into_libs" = yes; then # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) func_append compile_rpath " $absdir" ;; esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac ;; esac fi if test -n "$old_archive_from_expsyms_cmds"; then # figure out the soname set dummy $library_names shift realname="$1" shift libname=`eval "\\$ECHO \"$libname_spec\""` # use dlname if we got it. it's perfectly good, no? if test -n "$dlname"; then soname="$dlname" elif test -n "$soname_spec"; then # bleh windows case $host in *cygwin* | mingw* | *cegcc*) func_arith $current - $age major=$func_arith_result versuffix="-$major" ;; esac eval soname=\"$soname_spec\" else soname="$realname" fi # Make a new name for the extract_expsyms_cmds to use soroot="$soname" func_basename "$soroot" soname="$func_basename_result" func_stripname 'lib' '.dll' "$soname" newlib=libimp-$func_stripname_result.a # If the library has no export list, then create one now if test -f "$output_objdir/$soname-def"; then : else func_verbose "extracting exported symbol list from \`$soname'" func_execute_cmds "$extract_expsyms_cmds" 'exit $?' fi # Create $newlib if test -f "$output_objdir/$newlib"; then :; else func_verbose "generating import library for \`$soname'" func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?' fi # make sure the library variables are pointing to the new library dir=$output_objdir linklib=$newlib fi # test -n "$old_archive_from_expsyms_cmds" if test "$linkmode" = prog || test "$opt_mode" != relink; then add_shlibpath= add_dir= add= lib_linked=yes case $hardcode_action in immediate | unsupported) if test "$hardcode_direct" = no; then add="$dir/$linklib" case $host in *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; *-*-sysv4*uw2*) add_dir="-L$dir" ;; *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ *-*-unixware7*) add_dir="-L$dir" ;; *-*-darwin* ) # if the lib is a (non-dlopened) module then we can not # link against it, someone is ignoring the earlier warnings if /usr/bin/file -L $add 2> /dev/null | $GREP ": [^:]* bundle" >/dev/null ; then if test "X$dlopenmodule" != "X$lib"; then $ECHO "*** Warning: lib $linklib is a module, not a shared library" if test -z "$old_library" ; then echo echo "*** And there doesn't seem to be a static archive available" echo "*** The link will probably fail, sorry" else add="$dir/$old_library" fi elif test -n "$old_library"; then add="$dir/$old_library" fi fi esac elif test "$hardcode_minus_L" = no; then case $host in *-*-sunos*) add_shlibpath="$dir" ;; esac add_dir="-L$dir" add="-l$name" elif test "$hardcode_shlibpath_var" = no; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; relink) if test "$hardcode_direct" = yes && test "$hardcode_direct_absolute" = no; then add="$dir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$absdir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) func_append add_dir " -L$inst_prefix_dir$libdir" ;; esac fi add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; *) lib_linked=no ;; esac if test "$lib_linked" != yes; then func_fatal_configuration "unsupported hardcode properties" fi if test -n "$add_shlibpath"; then case :$compile_shlibpath: in *":$add_shlibpath:"*) ;; *) func_append compile_shlibpath "$add_shlibpath:" ;; esac fi if test "$linkmode" = prog; then test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" test -n "$add" && compile_deplibs="$add $compile_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" if test "$hardcode_direct" != yes && test "$hardcode_minus_L" != yes && test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) func_append finalize_shlibpath "$libdir:" ;; esac fi fi fi if test "$linkmode" = prog || test "$opt_mode" = relink; then add_shlibpath= add_dir= add= # Finalize command for both is simple: just hardcode it. if test "$hardcode_direct" = yes && test "$hardcode_direct_absolute" = no; then add="$libdir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$libdir" add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) func_append finalize_shlibpath "$libdir:" ;; esac add="-l$name" elif test "$hardcode_automatic" = yes; then if test -n "$inst_prefix_dir" && test -f "$inst_prefix_dir$libdir/$linklib" ; then add="$inst_prefix_dir$libdir/$linklib" else add="$libdir/$linklib" fi else # We cannot seem to hardcode it, guess we'll fake it. add_dir="-L$libdir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) func_append add_dir " -L$inst_prefix_dir$libdir" ;; esac fi add="-l$name" fi if test "$linkmode" = prog; then test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" test -n "$add" && finalize_deplibs="$add $finalize_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" fi fi elif test "$linkmode" = prog; then # Here we assume that one of hardcode_direct or hardcode_minus_L # is not unsupported. This is valid on all known static and # shared platforms. if test "$hardcode_direct" != unsupported; then test -n "$old_library" && linklib="$old_library" compile_deplibs="$dir/$linklib $compile_deplibs" finalize_deplibs="$dir/$linklib $finalize_deplibs" else compile_deplibs="-l$name -L$dir $compile_deplibs" finalize_deplibs="-l$name -L$dir $finalize_deplibs" fi elif test "$build_libtool_libs" = yes; then # Not a shared library if test "$deplibs_check_method" != pass_all; then # We're trying link a shared library against a static one # but the system doesn't support it. # Just print a warning and add the library to dependency_libs so # that the program can be linked against the static library. echo $ECHO "*** Warning: This system can not link to static lib archive $lib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have." if test "$module" = yes; then echo "*** But as you try to build a module library, libtool will still create " echo "*** a static module, that should work as long as the dlopening application" echo "*** is linked with the -dlopen flag to resolve symbols at runtime." if test -z "$global_symbol_pipe"; then echo echo "*** However, this would only work if libtool was able to extract symbol" echo "*** lists from a program, using \`nm' or equivalent, but libtool could" echo "*** not find such a program. So, this module is probably useless." echo "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi else deplibs="$dir/$old_library $deplibs" link_static=yes fi fi # link shared/static library? if test "$linkmode" = lib; then if test -n "$dependency_libs" && { test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes || test "$link_static" = yes; }; then # Extract -R from dependency_libs temp_deplibs= for libdir in $dependency_libs; do case $libdir in -R*) func_stripname '-R' '' "$libdir" temp_xrpath=$func_stripname_result case " $xrpath " in *" $temp_xrpath "*) ;; *) func_append xrpath " $temp_xrpath";; esac;; *) func_append temp_deplibs " $libdir";; esac done dependency_libs="$temp_deplibs" fi func_append newlib_search_path " $absdir" # Link against this library test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" # ... and its dependency_libs tmp_libs= for deplib in $dependency_libs; do newdependency_libs="$deplib $newdependency_libs" case $deplib in -L*) func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result";; *) func_resolve_sysroot "$deplib" ;; esac if $opt_preserve_dup_deps ; then case "$tmp_libs " in *" $func_resolve_sysroot_result "*) func_append specialdeplibs " $func_resolve_sysroot_result" ;; esac fi func_append tmp_libs " $func_resolve_sysroot_result" done if test "$link_all_deplibs" != no; then # Add the search paths of all dependency libraries for deplib in $dependency_libs; do path= case $deplib in -L*) path="$deplib" ;; *.la) func_resolve_sysroot "$deplib" deplib=$func_resolve_sysroot_result func_dirname "$deplib" "" "." dir=$func_dirname_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then func_warning "cannot determine absolute directory name of \`$dir'" absdir="$dir" fi ;; esac if $GREP "^installed=no" $deplib > /dev/null; then case $host in *-*-darwin*) depdepl= eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` if test -n "$deplibrary_names" ; then for tmp in $deplibrary_names ; do depdepl=$tmp done if test -f "$absdir/$objdir/$depdepl" ; then depdepl="$absdir/$objdir/$depdepl" darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` if test -z "$darwin_install_name"; then darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` fi func_append compiler_flags " ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}" func_append linker_flags " -dylib_file ${darwin_install_name}:${depdepl}" path= fi fi ;; *) path="-L$absdir/$objdir" ;; esac else eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` test -z "$libdir" && \ func_fatal_error "\`$deplib' is not a valid libtool archive" test "$absdir" != "$libdir" && \ func_warning "\`$deplib' seems to be moved" path="-L$absdir" fi ;; esac case " $deplibs " in *" $path "*) ;; *) deplibs="$path $deplibs" ;; esac done fi # link_all_deplibs != no fi # linkmode = lib done # for deplib in $libs if test "$pass" = link; then if test "$linkmode" = "prog"; then compile_deplibs="$new_inherited_linker_flags $compile_deplibs" finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" else compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` fi fi dependency_libs="$newdependency_libs" if test "$pass" = dlpreopen; then # Link the dlpreopened libraries before other libraries for deplib in $save_deplibs; do deplibs="$deplib $deplibs" done fi if test "$pass" != dlopen; then if test "$pass" != conv; then # Make sure lib_search_path contains only unique directories. lib_search_path= for dir in $newlib_search_path; do case "$lib_search_path " in *" $dir "*) ;; *) func_append lib_search_path " $dir" ;; esac done newlib_search_path= fi if test "$linkmode,$pass" != "prog,link"; then vars="deplibs" else vars="compile_deplibs finalize_deplibs" fi for var in $vars dependency_libs; do # Add libraries to $var in reverse order eval tmp_libs=\"\$$var\" new_libs= for deplib in $tmp_libs; do # FIXME: Pedantically, this is the right thing to do, so # that some nasty dependency loop isn't accidentally # broken: #new_libs="$deplib $new_libs" # Pragmatically, this seems to cause very few problems in # practice: case $deplib in -L*) new_libs="$deplib $new_libs" ;; -R*) ;; *) # And here is the reason: when a library appears more # than once as an explicit dependence of a library, or # is implicitly linked in more than once by the # compiler, it is considered special, and multiple # occurrences thereof are not removed. Compare this # with having the same library being listed as a # dependency of multiple other libraries: in this case, # we know (pedantically, we assume) the library does not # need to be listed more than once, so we keep only the # last copy. This is not always right, but it is rare # enough that we require users that really mean to play # such unportable linking tricks to link the library # using -Wl,-lname, so that libtool does not consider it # for duplicate removal. case " $specialdeplibs " in *" $deplib "*) new_libs="$deplib $new_libs" ;; *) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$deplib $new_libs" ;; esac ;; esac ;; esac done tmp_libs= for deplib in $new_libs; do case $deplib in -L*) case " $tmp_libs " in *" $deplib "*) ;; *) func_append tmp_libs " $deplib" ;; esac ;; *) func_append tmp_libs " $deplib" ;; esac done eval $var=\"$tmp_libs\" done # for var fi # Last step: remove runtime libs from dependency_libs # (they stay in deplibs) tmp_libs= for i in $dependency_libs ; do case " $predeps $postdeps $compiler_lib_search_path " in *" $i "*) i="" ;; esac if test -n "$i" ; then func_append tmp_libs " $i" fi done dependency_libs=$tmp_libs done # for pass if test "$linkmode" = prog; then dlfiles="$newdlfiles" fi if test "$linkmode" = prog || test "$linkmode" = lib; then dlprefiles="$newdlprefiles" fi case $linkmode in oldlib) if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then func_warning "\`-dlopen' is ignored for archives" fi case " $deplibs" in *\ -l* | *\ -L*) func_warning "\`-l' and \`-L' are ignored for archives" ;; esac test -n "$rpath" && \ func_warning "\`-rpath' is ignored for archives" test -n "$xrpath" && \ func_warning "\`-R' is ignored for archives" test -n "$vinfo" && \ func_warning "\`-version-info/-version-number' is ignored for archives" test -n "$release" && \ func_warning "\`-release' is ignored for archives" test -n "$export_symbols$export_symbols_regex" && \ func_warning "\`-export-symbols' is ignored for archives" # Now set the variables for building old libraries. build_libtool_libs=no oldlibs="$output" func_append objs "$old_deplibs" ;; lib) # Make sure we only generate libraries of the form `libNAME.la'. case $outputname in lib*) func_stripname 'lib' '.la' "$outputname" name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" ;; *) test "$module" = no && \ func_fatal_help "libtool library \`$output' must begin with \`lib'" if test "$need_lib_prefix" != no; then # Add the "lib" prefix for modules if required func_stripname '' '.la' "$outputname" name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" else func_stripname '' '.la' "$outputname" libname=$func_stripname_result fi ;; esac if test -n "$objs"; then if test "$deplibs_check_method" != pass_all; then func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs" else echo $ECHO "*** Warning: Linking the shared library $output against the non-libtool" $ECHO "*** objects $objs is not portable!" func_append libobjs " $objs" fi fi test "$dlself" != no && \ func_warning "\`-dlopen self' is ignored for libtool libraries" set dummy $rpath shift test "$#" -gt 1 && \ func_warning "ignoring multiple \`-rpath's for a libtool library" install_libdir="$1" oldlibs= if test -z "$rpath"; then if test "$build_libtool_libs" = yes; then # Building a libtool convenience library. # Some compilers have problems with a `.al' extension so # convenience libraries should have the same extension an # archive normally would. oldlibs="$output_objdir/$libname.$libext $oldlibs" build_libtool_libs=convenience build_old_libs=yes fi test -n "$vinfo" && \ func_warning "\`-version-info/-version-number' is ignored for convenience libraries" test -n "$release" && \ func_warning "\`-release' is ignored for convenience libraries" else # Parse the version information argument. save_ifs="$IFS"; IFS=':' set dummy $vinfo 0 0 0 shift IFS="$save_ifs" test -n "$7" && \ func_fatal_help "too many parameters to \`-version-info'" # convert absolute version numbers to libtool ages # this retains compatibility with .la files and attempts # to make the code below a bit more comprehensible case $vinfo_number in yes) number_major="$1" number_minor="$2" number_revision="$3" # # There are really only two kinds -- those that # use the current revision as the major version # and those that subtract age and use age as # a minor version. But, then there is irix # which has an extra 1 added just for fun # case $version_type in # correct linux to gnu/linux during the next big refactor darwin|linux|osf|windows|none) func_arith $number_major + $number_minor current=$func_arith_result age="$number_minor" revision="$number_revision" ;; freebsd-aout|freebsd-elf|qnx|sunos) current="$number_major" revision="$number_minor" age="0" ;; irix|nonstopux) func_arith $number_major + $number_minor current=$func_arith_result age="$number_minor" revision="$number_minor" lt_irix_increment=no ;; esac ;; no) current="$1" revision="$2" age="$3" ;; esac # Check that each of the things are valid numbers. case $current in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "CURRENT \`$current' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; esac case $revision in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "REVISION \`$revision' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; esac case $age in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "AGE \`$age' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; esac if test "$age" -gt "$current"; then func_error "AGE \`$age' is greater than the current interface number \`$current'" func_fatal_error "\`$vinfo' is not valid version information" fi # Calculate the version variables. major= versuffix= verstring= case $version_type in none) ;; darwin) # Like Linux, but with the current version available in # verstring for coding it into the library header func_arith $current - $age major=.$func_arith_result versuffix="$major.$age.$revision" # Darwin ld doesn't like 0 for these options... func_arith $current + 1 minor_current=$func_arith_result xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" ;; freebsd-aout) major=".$current" versuffix=".$current.$revision"; ;; freebsd-elf) major=".$current" versuffix=".$current" ;; irix | nonstopux) if test "X$lt_irix_increment" = "Xno"; then func_arith $current - $age else func_arith $current - $age + 1 fi major=$func_arith_result case $version_type in nonstopux) verstring_prefix=nonstopux ;; *) verstring_prefix=sgi ;; esac verstring="$verstring_prefix$major.$revision" # Add in all the interfaces that we are compatible with. loop=$revision while test "$loop" -ne 0; do func_arith $revision - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result verstring="$verstring_prefix$major.$iface:$verstring" done # Before this point, $major must not contain `.'. major=.$major versuffix="$major.$revision" ;; linux) # correct to gnu/linux during the next big refactor func_arith $current - $age major=.$func_arith_result versuffix="$major.$age.$revision" ;; osf) func_arith $current - $age major=.$func_arith_result versuffix=".$current.$age.$revision" verstring="$current.$age.$revision" # Add in all the interfaces that we are compatible with. loop=$age while test "$loop" -ne 0; do func_arith $current - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result verstring="$verstring:${iface}.0" done # Make executables depend on our current version. func_append verstring ":${current}.0" ;; qnx) major=".$current" versuffix=".$current" ;; sunos) major=".$current" versuffix=".$current.$revision" ;; windows) # Use '-' rather than '.', since we only want one # extension on DOS 8.3 filesystems. func_arith $current - $age major=$func_arith_result versuffix="-$major" ;; *) func_fatal_configuration "unknown library version type \`$version_type'" ;; esac # Clear the version info if we defaulted, and they specified a release. if test -z "$vinfo" && test -n "$release"; then major= case $version_type in darwin) # we can't check for "0.0" in archive_cmds due to quoting # problems, so we reset it completely verstring= ;; *) verstring="0.0" ;; esac if test "$need_version" = no; then versuffix= else versuffix=".0.0" fi fi # Remove version info from name if versioning should be avoided if test "$avoid_version" = yes && test "$need_version" = no; then major= versuffix= verstring="" fi # Check to see if the archive will have undefined symbols. if test "$allow_undefined" = yes; then if test "$allow_undefined_flag" = unsupported; then func_warning "undefined symbols not allowed in $host shared libraries" build_libtool_libs=no build_old_libs=yes fi else # Don't allow undefined symbols. allow_undefined_flag="$no_undefined_flag" fi fi func_generate_dlsyms "$libname" "$libname" "yes" func_append libobjs " $symfileobj" test "X$libobjs" = "X " && libobjs= if test "$opt_mode" != relink; then # Remove our outputs, but don't remove object files since they # may have been created when compiling PIC objects. removelist= tempremovelist=`$ECHO "$output_objdir/*"` for p in $tempremovelist; do case $p in *.$objext | *.gcno) ;; $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) if test "X$precious_files_regex" != "X"; then if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 then continue fi fi func_append removelist " $p" ;; *) ;; esac done test -n "$removelist" && \ func_show_eval "${RM}r \$removelist" fi # Now set the variables for building old libraries. if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then func_append oldlibs " $output_objdir/$libname.$libext" # Transform .lo files to .o files. oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; $lo2o" | $NL2SP` fi # Eliminate all temporary directories. #for path in $notinst_path; do # lib_search_path=`$ECHO "$lib_search_path " | $SED "s% $path % %g"` # deplibs=`$ECHO "$deplibs " | $SED "s% -L$path % %g"` # dependency_libs=`$ECHO "$dependency_libs " | $SED "s% -L$path % %g"` #done if test -n "$xrpath"; then # If the user specified any rpath flags, then add them. temp_xrpath= for libdir in $xrpath; do func_replace_sysroot "$libdir" func_append temp_xrpath " -R$func_replace_sysroot_result" case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac done if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then dependency_libs="$temp_xrpath $dependency_libs" fi fi # Make sure dlfiles contains only unique files that won't be dlpreopened old_dlfiles="$dlfiles" dlfiles= for lib in $old_dlfiles; do case " $dlprefiles $dlfiles " in *" $lib "*) ;; *) func_append dlfiles " $lib" ;; esac done # Make sure dlprefiles contains only unique files old_dlprefiles="$dlprefiles" dlprefiles= for lib in $old_dlprefiles; do case "$dlprefiles " in *" $lib "*) ;; *) func_append dlprefiles " $lib" ;; esac done if test "$build_libtool_libs" = yes; then if test -n "$rpath"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*) # these systems don't actually have a c library (as such)! ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C library is in the System framework func_append deplibs " System.ltframework" ;; *-*-netbsd*) # Don't link with libc until the a.out ld.so is fixed. ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work ;; *) # Add libc to deplibs on all other systems if necessary. if test "$build_libtool_need_lc" = "yes"; then func_append deplibs " -lc" fi ;; esac fi # Transform deplibs into only deplibs that can be linked in shared. name_save=$name libname_save=$libname release_save=$release versuffix_save=$versuffix major_save=$major # I'm not sure if I'm treating the release correctly. I think # release should show up in the -l (ie -lgmp5) so we don't want to # add it in twice. Is that correct? release="" versuffix="" major="" newdeplibs= droppeddeps=no case $deplibs_check_method in pass_all) # Don't check for shared/static. Everything works. # This might be a little naive. We might want to check # whether the library exists or not. But this is on # osf3 & osf4 and I'm not really sure... Just # implementing what was already the behavior. newdeplibs=$deplibs ;; test_compile) # This code stresses the "libraries are programs" paradigm to its # limits. Maybe even breaks it. We compile a program, linking it # against the deplibs as a proxy for the library. Then we can check # whether they linked in statically or dynamically with ldd. $opt_dry_run || $RM conftest.c cat > conftest.c </dev/null` $nocaseglob else potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null` fi for potent_lib in $potential_libs; do # Follow soft links. if ls -lLd "$potent_lib" 2>/dev/null | $GREP " -> " >/dev/null; then continue fi # The statement above tries to avoid entering an # endless loop below, in case of cyclic links. # We might still enter an endless loop, since a link # loop can be closed while we follow links, # but so what? potlib="$potent_lib" while test -h "$potlib" 2>/dev/null; do potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` case $potliblink in [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; *) potlib=`$ECHO "$potlib" | $SED 's,[^/]*$,,'`"$potliblink";; esac done if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | $SED -e 10q | $EGREP "$file_magic_regex" > /dev/null; then func_append newdeplibs " $a_deplib" a_deplib="" break 2 fi done done fi if test -n "$a_deplib" ; then droppeddeps=yes echo $ECHO "*** Warning: linker path does not have real file for library $a_deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $ECHO "*** with $libname but no candidates were found. (...for file magic test)" else $ECHO "*** with $libname and none of the candidates passed a file format test" $ECHO "*** using a file magic. Last file checked: $potlib" fi fi ;; *) # Add a -L argument. func_append newdeplibs " $a_deplib" ;; esac done # Gone through all deplibs. ;; match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` for a_deplib in $deplibs; do case $a_deplib in -l*) func_stripname -l '' "$a_deplib" name=$func_stripname_result if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $a_deplib "*) func_append newdeplibs " $a_deplib" a_deplib="" ;; esac fi if test -n "$a_deplib" ; then libname=`eval "\\$ECHO \"$libname_spec\""` for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do potential_libs=`ls $i/$libname[.-]* 2>/dev/null` for potent_lib in $potential_libs; do potlib="$potent_lib" # see symlink-check above in file_magic test if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \ $EGREP "$match_pattern_regex" > /dev/null; then func_append newdeplibs " $a_deplib" a_deplib="" break 2 fi done done fi if test -n "$a_deplib" ; then droppeddeps=yes echo $ECHO "*** Warning: linker path does not have real file for library $a_deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)" else $ECHO "*** with $libname and none of the candidates passed a file format test" $ECHO "*** using a regex pattern. Last file checked: $potlib" fi fi ;; *) # Add a -L argument. func_append newdeplibs " $a_deplib" ;; esac done # Gone through all deplibs. ;; none | unknown | *) newdeplibs="" tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'` if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then for i in $predeps $postdeps ; do # can't use Xsed below, because $i might contain '/' tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s,$i,,"` done fi case $tmp_deplibs in *[!\ \ ]*) echo if test "X$deplibs_check_method" = "Xnone"; then echo "*** Warning: inter-library dependencies are not supported in this platform." else echo "*** Warning: inter-library dependencies are not known to be supported." fi echo "*** All declared inter-library dependencies are being dropped." droppeddeps=yes ;; esac ;; esac versuffix=$versuffix_save major=$major_save release=$release_save libname=$libname_save name=$name_save case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library with the System framework newdeplibs=`$ECHO " $newdeplibs" | $SED 's/ -lc / System.ltframework /'` ;; esac if test "$droppeddeps" = yes; then if test "$module" = yes; then echo echo "*** Warning: libtool could not satisfy all declared inter-library" $ECHO "*** dependencies of module $libname. Therefore, libtool will create" echo "*** a static module, that should work as long as the dlopening" echo "*** application is linked with the -dlopen flag." if test -z "$global_symbol_pipe"; then echo echo "*** However, this would only work if libtool was able to extract symbol" echo "*** lists from a program, using \`nm' or equivalent, but libtool could" echo "*** not find such a program. So, this module is probably useless." echo "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi else echo "*** The inter-library dependencies that have been dropped here will be" echo "*** automatically added whenever a program is linked with this library" echo "*** or is declared to -dlopen it." if test "$allow_undefined" = no; then echo echo "*** Since this library must not contain undefined symbols," echo "*** because either the platform does not support them or" echo "*** it was explicitly requested with -no-undefined," echo "*** libtool will only create a static version of it." if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi fi fi # Done checking deplibs! deplibs=$newdeplibs fi # Time to change all our "foo.ltframework" stuff back to "-framework foo" case $host in *-*-darwin*) newdeplibs=`$ECHO " $newdeplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` deplibs=`$ECHO " $deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` ;; esac # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $deplibs " in *" -L$path/$objdir "*) func_append new_libs " -L$path/$objdir" ;; esac ;; esac done for deplib in $deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) func_append new_libs " $deplib" ;; esac ;; *) func_append new_libs " $deplib" ;; esac done deplibs="$new_libs" # All the library-specific variables (install_libdir is set above). library_names= old_library= dlname= # Test again, we may have decided not to build it any more if test "$build_libtool_libs" = yes; then # Remove ${wl} instances when linking with ld. # FIXME: should test the right _cmds variable. case $archive_cmds in *\$LD\ *) wl= ;; esac if test "$hardcode_into_libs" = yes; then # Hardcode the library paths hardcode_libdirs= dep_rpath= rpath="$finalize_rpath" test "$opt_mode" != relink && rpath="$compile_rpath$rpath" for libdir in $rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then func_replace_sysroot "$libdir" libdir=$func_replace_sysroot_result if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append dep_rpath " $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) func_append perm_rpath " $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval "dep_rpath=\"$hardcode_libdir_flag_spec\"" fi if test -n "$runpath_var" && test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do func_append rpath "$dir:" done eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" fi test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" fi shlibpath="$finalize_shlibpath" test "$opt_mode" != relink && shlibpath="$compile_shlibpath$shlibpath" if test -n "$shlibpath"; then eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" fi # Get the real and link names of the library. eval shared_ext=\"$shrext_cmds\" eval library_names=\"$library_names_spec\" set dummy $library_names shift realname="$1" shift if test -n "$soname_spec"; then eval soname=\"$soname_spec\" else soname="$realname" fi if test -z "$dlname"; then dlname=$soname fi lib="$output_objdir/$realname" linknames= for link do func_append linknames " $link" done # Use standard objects if they are pic test -z "$pic_flag" && libobjs=`$ECHO "$libobjs" | $SP2NL | $SED "$lo2o" | $NL2SP` test "X$libobjs" = "X " && libobjs= delfiles= if test -n "$export_symbols" && test -n "$include_expsyms"; then $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" export_symbols="$output_objdir/$libname.uexp" func_append delfiles " $export_symbols" fi orig_export_symbols= case $host_os in cygwin* | mingw* | cegcc*) if test -n "$export_symbols" && test -z "$export_symbols_regex"; then # exporting using user supplied symfile if test "x`$SED 1q $export_symbols`" != xEXPORTS; then # and it's NOT already a .def file. Must figure out # which of the given symbols are data symbols and tag # them as such. So, trigger use of export_symbols_cmds. # export_symbols gets reassigned inside the "prepare # the list of exported symbols" if statement, so the # include_expsyms logic still works. orig_export_symbols="$export_symbols" export_symbols= always_export_symbols=yes fi fi ;; esac # Prepare the list of exported symbols if test -z "$export_symbols"; then if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then func_verbose "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $opt_dry_run || $RM $export_symbols cmds=$export_symbols_cmds save_ifs="$IFS"; IFS='~' for cmd1 in $cmds; do IFS="$save_ifs" # Take the normal branch if the nm_file_list_spec branch # doesn't work or if tool conversion is not needed. case $nm_file_list_spec~$to_tool_file_cmd in *~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*) try_normal_branch=yes eval cmd=\"$cmd1\" func_len " $cmd" len=$func_len_result ;; *) try_normal_branch=no ;; esac if test "$try_normal_branch" = yes \ && { test "$len" -lt "$max_cmd_len" \ || test "$max_cmd_len" -le -1; } then func_show_eval "$cmd" 'exit $?' skipped_export=false elif test -n "$nm_file_list_spec"; then func_basename "$output" output_la=$func_basename_result save_libobjs=$libobjs save_output=$output output=${output_objdir}/${output_la}.nm func_to_tool_file "$output" libobjs=$nm_file_list_spec$func_to_tool_file_result func_append delfiles " $output" func_verbose "creating $NM input file list: $output" for obj in $save_libobjs; do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" done > "$output" eval cmd=\"$cmd1\" func_show_eval "$cmd" 'exit $?' output=$save_output libobjs=$save_libobjs skipped_export=false else # The command line is too long to execute in one step. func_verbose "using reloadable object file for export list..." skipped_export=: # Break out early, otherwise skipped_export may be # set to false by a later but shorter cmd. break fi done IFS="$save_ifs" if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi fi if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols="$export_symbols" test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of # 's' commands which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter func_append delfiles " $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi tmp_deplibs= for test_deplib in $deplibs; do case " $convenience " in *" $test_deplib "*) ;; *) func_append tmp_deplibs " $test_deplib" ;; esac done deplibs="$tmp_deplibs" if test -n "$convenience"; then if test -n "$whole_archive_flag_spec" && test "$compiler_needs_object" = yes && test -z "$libobjs"; then # extract the archives, so we have objects to list. # TODO: could optimize this to just extract one archive. whole_archive_flag_spec= fi if test -n "$whole_archive_flag_spec"; then save_libobjs=$libobjs eval libobjs=\"\$libobjs $whole_archive_flag_spec\" test "X$libobjs" = "X " && libobjs= else gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_extract_archives $gentop $convenience func_append libobjs " $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi fi if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then eval flag=\"$thread_safe_flag_spec\" func_append linker_flags " $flag" fi # Make a backup of the uninstalled library when relinking if test "$opt_mode" = relink; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? fi # Do each of the archive commands. if test "$module" = yes && test -n "$module_cmds" ; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then eval test_cmds=\"$module_expsym_cmds\" cmds=$module_expsym_cmds else eval test_cmds=\"$module_cmds\" cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then eval test_cmds=\"$archive_expsym_cmds\" cmds=$archive_expsym_cmds else eval test_cmds=\"$archive_cmds\" cmds=$archive_cmds fi fi if test "X$skipped_export" != "X:" && func_len " $test_cmds" && len=$func_len_result && test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then : else # The command line is too long to link in one step, link piecewise # or, if using GNU ld and skipped_export is not :, use a linker # script. # Save the value of $output and $libobjs because we want to # use them later. If we have whole_archive_flag_spec, we # want to use save_libobjs as it was before # whole_archive_flag_spec was expanded, because we can't # assume the linker understands whole_archive_flag_spec. # This may have to be revisited, in case too many # convenience libraries get linked in and end up exceeding # the spec. if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then save_libobjs=$libobjs fi save_output=$output func_basename "$output" output_la=$func_basename_result # Clear the reloadable object creation command queue and # initialize k to one. test_cmds= concat_cmds= objlist= last_robj= k=1 if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then output=${output_objdir}/${output_la}.lnkscript func_verbose "creating GNU ld script: $output" echo 'INPUT (' > $output for obj in $save_libobjs do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" >> $output done echo ')' >> $output func_append delfiles " $output" func_to_tool_file "$output" output=$func_to_tool_file_result elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then output=${output_objdir}/${output_la}.lnk func_verbose "creating linker input file list: $output" : > $output set x $save_libobjs shift firstobj= if test "$compiler_needs_object" = yes; then firstobj="$1 " shift fi for obj do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" >> $output done func_append delfiles " $output" func_to_tool_file "$output" output=$firstobj\"$file_list_spec$func_to_tool_file_result\" else if test -n "$save_libobjs"; then func_verbose "creating reloadable object files..." output=$output_objdir/$output_la-${k}.$objext eval test_cmds=\"$reload_cmds\" func_len " $test_cmds" len0=$func_len_result len=$len0 # Loop over the list of objects to be linked. for obj in $save_libobjs do func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result if test "X$objlist" = X || test "$len" -lt "$max_cmd_len"; then func_append objlist " $obj" else # The command $test_cmds is almost too long, add a # command to the queue. if test "$k" -eq 1 ; then # The first file doesn't have a previous command to add. reload_objs=$objlist eval concat_cmds=\"$reload_cmds\" else # All subsequent reloadable object files will link in # the last one created. reload_objs="$objlist $last_robj" eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\" fi last_robj=$output_objdir/$output_la-${k}.$objext func_arith $k + 1 k=$func_arith_result output=$output_objdir/$output_la-${k}.$objext objlist=" $obj" func_len " $last_robj" func_arith $len0 + $func_len_result len=$func_arith_result fi done # Handle the remaining objects by creating one last # reloadable object file. All subsequent reloadable object # files will link in the last one created. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ reload_objs="$objlist $last_robj" eval concat_cmds=\"\${concat_cmds}$reload_cmds\" if test -n "$last_robj"; then eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\" fi func_append delfiles " $output" else output= fi if ${skipped_export-false}; then func_verbose "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $opt_dry_run || $RM $export_symbols libobjs=$output # Append the command to create the export file. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\" if test -n "$last_robj"; then eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" fi fi test -n "$save_libobjs" && func_verbose "creating a temporary reloadable object file: $output" # Loop through the commands generated above and execute them. save_ifs="$IFS"; IFS='~' for cmd in $concat_cmds; do IFS="$save_ifs" $opt_silent || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test "$opt_mode" = relink; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) fi exit $lt_exit } done IFS="$save_ifs" if test -n "$export_symbols_regex" && ${skipped_export-false}; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi if ${skipped_export-false}; then if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols="$export_symbols" test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi if test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of # 's' commands which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter func_append delfiles " $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi fi libobjs=$output # Restore the value of output. output=$save_output if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then eval libobjs=\"\$libobjs $whole_archive_flag_spec\" test "X$libobjs" = "X " && libobjs= fi # Expand the library linking commands again to reset the # value of $libobjs for piecewise linking. # Do each of the archive commands. if test "$module" = yes && test -n "$module_cmds" ; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then cmds=$module_expsym_cmds else cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then cmds=$archive_expsym_cmds else cmds=$archive_cmds fi fi fi if test -n "$delfiles"; then # Append the command to remove temporary files to $cmds. eval cmds=\"\$cmds~\$RM $delfiles\" fi # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_extract_archives $gentop $dlprefiles func_append libobjs " $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $opt_silent || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test "$opt_mode" = relink; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) fi exit $lt_exit } done IFS="$save_ifs" # Restore the uninstalled library and exit if test "$opt_mode" = relink; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $? if test -n "$convenience"; then if test -z "$whole_archive_flag_spec"; then func_show_eval '${RM}r "$gentop"' fi fi exit $EXIT_SUCCESS fi # Create links to the real library. for linkname in $linknames; do if test "$realname" != "$linkname"; then func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?' fi done # If -module or -export-dynamic was specified, set the dlname. if test "$module" = yes || test "$export_dynamic" = yes; then # On all known operating systems, these are identical. dlname="$soname" fi fi ;; obj) if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then func_warning "\`-dlopen' is ignored for objects" fi case " $deplibs" in *\ -l* | *\ -L*) func_warning "\`-l' and \`-L' are ignored for objects" ;; esac test -n "$rpath" && \ func_warning "\`-rpath' is ignored for objects" test -n "$xrpath" && \ func_warning "\`-R' is ignored for objects" test -n "$vinfo" && \ func_warning "\`-version-info' is ignored for objects" test -n "$release" && \ func_warning "\`-release' is ignored for objects" case $output in *.lo) test -n "$objs$old_deplibs" && \ func_fatal_error "cannot build library object \`$output' from non-libtool objects" libobj=$output func_lo2o "$libobj" obj=$func_lo2o_result ;; *) libobj= obj="$output" ;; esac # Delete the old objects. $opt_dry_run || $RM $obj $libobj # Objects from convenience libraries. This assumes # single-version convenience libraries. Whenever we create # different ones for PIC/non-PIC, this we'll have to duplicate # the extraction. reload_conv_objs= gentop= # reload_cmds runs $LD directly, so let us get rid of # -Wl from whole_archive_flag_spec and hope we can get by with # turning comma into space.. wl= if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" reload_conv_objs=$reload_objs\ `$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'` else gentop="$output_objdir/${obj}x" func_append generated " $gentop" func_extract_archives $gentop $convenience reload_conv_objs="$reload_objs $func_extract_archives_result" fi fi # If we're not building shared, we need to use non_pic_objs test "$build_libtool_libs" != yes && libobjs="$non_pic_objects" # Create the old-style object. reload_objs="$objs$old_deplibs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; /\.lib$/d; $lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test output="$obj" func_execute_cmds "$reload_cmds" 'exit $?' # Exit if we aren't doing a library object file. if test -z "$libobj"; then if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS fi if test "$build_libtool_libs" != yes; then if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi # Create an invalid libtool object if no PIC, so that we don't # accidentally link it into a program. # $show "echo timestamp > $libobj" # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? exit $EXIT_SUCCESS fi if test -n "$pic_flag" || test "$pic_mode" != default; then # Only do commands if we really have different PIC objects. reload_objs="$libobjs $reload_conv_objs" output="$libobj" func_execute_cmds "$reload_cmds" 'exit $?' fi if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS ;; prog) case $host in *cygwin*) func_stripname '' '.exe' "$output" output=$func_stripname_result.exe;; esac test -n "$vinfo" && \ func_warning "\`-version-info' is ignored for programs" test -n "$release" && \ func_warning "\`-release' is ignored for programs" test "$preload" = yes \ && test "$dlopen_support" = unknown \ && test "$dlopen_self" = unknown \ && test "$dlopen_self_static" = unknown && \ func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support." case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library is the System framework compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's/ -lc / System.ltframework /'` finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's/ -lc / System.ltframework /'` ;; esac case $host in *-*-darwin*) # Don't allow lazy linking, it breaks C++ global constructors # But is supposedly fixed on 10.4 or later (yay!). if test "$tagname" = CXX ; then case ${MACOSX_DEPLOYMENT_TARGET-10.0} in 10.[0123]) func_append compile_command " ${wl}-bind_at_load" func_append finalize_command " ${wl}-bind_at_load" ;; esac fi # Time to change all our "foo.ltframework" stuff back to "-framework foo" compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` ;; esac # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $compile_deplibs " in *" -L$path/$objdir "*) func_append new_libs " -L$path/$objdir" ;; esac ;; esac done for deplib in $compile_deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) func_append new_libs " $deplib" ;; esac ;; *) func_append new_libs " $deplib" ;; esac done compile_deplibs="$new_libs" func_append compile_command " $compile_deplibs" func_append finalize_command " $finalize_deplibs" if test -n "$rpath$xrpath"; then # If the user specified any rpath flags, then add them. for libdir in $rpath $xrpath; do # This is the magic to use -rpath. case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac done fi # Now hardcode the library paths rpath= hardcode_libdirs= for libdir in $compile_rpath $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append rpath " $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) func_append perm_rpath " $libdir" ;; esac fi case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'` case :$dllsearchpath: in *":$libdir:"*) ;; ::) dllsearchpath=$libdir;; *) func_append dllsearchpath ":$libdir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) func_append dllsearchpath ":$testbindir";; esac ;; esac done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval rpath=\" $hardcode_libdir_flag_spec\" fi compile_rpath="$rpath" rpath= hardcode_libdirs= for libdir in $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append rpath " $flag" fi elif test -n "$runpath_var"; then case "$finalize_perm_rpath " in *" $libdir "*) ;; *) func_append finalize_perm_rpath " $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval rpath=\" $hardcode_libdir_flag_spec\" fi finalize_rpath="$rpath" if test -n "$libobjs" && test "$build_old_libs" = yes; then # Transform all the library objects into standard objects. compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP` finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP` fi func_generate_dlsyms "$outputname" "@PROGRAM@" "no" # template prelinking step if test -n "$prelink_cmds"; then func_execute_cmds "$prelink_cmds" 'exit $?' fi wrappers_required=yes case $host in *cegcc* | *mingw32ce*) # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway. wrappers_required=no ;; *cygwin* | *mingw* ) if test "$build_libtool_libs" != yes; then wrappers_required=no fi ;; *) if test "$need_relink" = no || test "$build_libtool_libs" != yes; then wrappers_required=no fi ;; esac if test "$wrappers_required" = no; then # Replace the output file specification. compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'` link_command="$compile_command$compile_rpath" # We have no uninstalled library dependencies, so finalize right now. exit_status=0 func_show_eval "$link_command" 'exit_status=$?' if test -n "$postlink_cmds"; then func_to_tool_file "$output" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi # Delete the generated files. if test -f "$output_objdir/${outputname}S.${objext}"; then func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"' fi exit $exit_status fi if test -n "$compile_shlibpath$finalize_shlibpath"; then compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" fi if test -n "$finalize_shlibpath"; then finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" fi compile_var= finalize_var= if test -n "$runpath_var"; then if test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do func_append rpath "$dir:" done compile_var="$runpath_var=\"$rpath\$$runpath_var\" " fi if test -n "$finalize_perm_rpath"; then # We should set the runpath_var. rpath= for dir in $finalize_perm_rpath; do func_append rpath "$dir:" done finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " fi fi if test "$no_install" = yes; then # We don't need to create a wrapper script. link_command="$compile_var$compile_command$compile_rpath" # Replace the output file specification. link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'` # Delete the old output file. $opt_dry_run || $RM $output # Link the executable and exit func_show_eval "$link_command" 'exit $?' if test -n "$postlink_cmds"; then func_to_tool_file "$output" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi exit $EXIT_SUCCESS fi if test "$hardcode_action" = relink; then # Fast installation is not supported link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" func_warning "this platform does not like uninstalled shared libraries" func_warning "\`$output' will be relinked during installation" else if test "$fast_install" != no; then link_command="$finalize_var$compile_command$finalize_rpath" if test "$fast_install" = yes; then relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'` else # fast_install is set to needless relink_command= fi else link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" fi fi # Replace the output file specification. link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` # Delete the old output files. $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname func_show_eval "$link_command" 'exit $?' if test -n "$postlink_cmds"; then func_to_tool_file "$output_objdir/$outputname" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi # Now create the wrapper script. func_verbose "creating $output" # Quote the relink command for shipping. if test -n "$relink_command"; then # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else func_quote_for_eval "$var_value" relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" fi done relink_command="(cd `pwd`; $relink_command)" relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` fi # Only actually do things if not in dry run mode. $opt_dry_run || { # win32 will think the script is a binary if it has # a .exe suffix, so we strip it off here. case $output in *.exe) func_stripname '' '.exe' "$output" output=$func_stripname_result ;; esac # test for cygwin because mv fails w/o .exe extensions case $host in *cygwin*) exeext=.exe func_stripname '' '.exe' "$outputname" outputname=$func_stripname_result ;; *) exeext= ;; esac case $host in *cygwin* | *mingw* ) func_dirname_and_basename "$output" "" "." output_name=$func_basename_result output_path=$func_dirname_result cwrappersource="$output_path/$objdir/lt-$output_name.c" cwrapper="$output_path/$output_name.exe" $RM $cwrappersource $cwrapper trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 func_emit_cwrapperexe_src > $cwrappersource # The wrapper executable is built using the $host compiler, # because it contains $host paths and files. If cross- # compiling, it, like the target executable, must be # executed on the $host or under an emulation environment. $opt_dry_run || { $LTCC $LTCFLAGS -o $cwrapper $cwrappersource $STRIP $cwrapper } # Now, create the wrapper script for func_source use: func_ltwrapper_scriptname $cwrapper $RM $func_ltwrapper_scriptname_result trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15 $opt_dry_run || { # note: this script will not be executed, so do not chmod. if test "x$build" = "x$host" ; then $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result else func_emit_wrapper no > $func_ltwrapper_scriptname_result fi } ;; * ) $RM $output trap "$RM $output; exit $EXIT_FAILURE" 1 2 15 func_emit_wrapper no > $output chmod +x $output ;; esac } exit $EXIT_SUCCESS ;; esac # See if we need to build an old-fashioned archive. for oldlib in $oldlibs; do if test "$build_libtool_libs" = convenience; then oldobjs="$libobjs_save $symfileobj" addlibs="$convenience" build_libtool_libs=no else if test "$build_libtool_libs" = module; then oldobjs="$libobjs_save" build_libtool_libs=no else oldobjs="$old_deplibs $non_pic_objects" if test "$preload" = yes && test -f "$symfileobj"; then func_append oldobjs " $symfileobj" fi fi addlibs="$old_convenience" fi if test -n "$addlibs"; then gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_extract_archives $gentop $addlibs func_append oldobjs " $func_extract_archives_result" fi # Do each command in the archive commands. if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then cmds=$old_archive_from_new_cmds else # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_extract_archives $gentop $dlprefiles func_append oldobjs " $func_extract_archives_result" fi # POSIX demands no paths to be encoded in archives. We have # to avoid creating archives with duplicate basenames if we # might have to extract them afterwards, e.g., when creating a # static archive out of a convenience library, or when linking # the entirety of a libtool archive into another (currently # not supported by libtool). if (for obj in $oldobjs do func_basename "$obj" $ECHO "$func_basename_result" done | sort | sort -uc >/dev/null 2>&1); then : else echo "copying selected object files to avoid basename conflicts..." gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_mkdir_p "$gentop" save_oldobjs=$oldobjs oldobjs= counter=1 for obj in $save_oldobjs do func_basename "$obj" objbase="$func_basename_result" case " $oldobjs " in " ") oldobjs=$obj ;; *[\ /]"$objbase "*) while :; do # Make sure we don't pick an alternate name that also # overlaps. newobj=lt$counter-$objbase func_arith $counter + 1 counter=$func_arith_result case " $oldobjs " in *[\ /]"$newobj "*) ;; *) if test ! -f "$gentop/$newobj"; then break; fi ;; esac done func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" func_append oldobjs " $gentop/$newobj" ;; *) func_append oldobjs " $obj" ;; esac done fi func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 tool_oldlib=$func_to_tool_file_result eval cmds=\"$old_archive_cmds\" func_len " $cmds" len=$func_len_result if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then cmds=$old_archive_cmds elif test -n "$archiver_list_spec"; then func_verbose "using command file archive linking..." for obj in $oldobjs do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" done > $output_objdir/$libname.libcmd func_to_tool_file "$output_objdir/$libname.libcmd" oldobjs=" $archiver_list_spec$func_to_tool_file_result" cmds=$old_archive_cmds else # the command line is too long to link in one step, link in parts func_verbose "using piecewise archive linking..." save_RANLIB=$RANLIB RANLIB=: objlist= concat_cmds= save_oldobjs=$oldobjs oldobjs= # Is there a better way of finding the last object in the list? for obj in $save_oldobjs do last_oldobj=$obj done eval test_cmds=\"$old_archive_cmds\" func_len " $test_cmds" len0=$func_len_result len=$len0 for obj in $save_oldobjs do func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result func_append objlist " $obj" if test "$len" -lt "$max_cmd_len"; then : else # the above command should be used before it gets too long oldobjs=$objlist if test "$obj" = "$last_oldobj" ; then RANLIB=$save_RANLIB fi test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" objlist= len=$len0 fi done RANLIB=$save_RANLIB oldobjs=$objlist if test "X$oldobjs" = "X" ; then eval cmds=\"\$concat_cmds\" else eval cmds=\"\$concat_cmds~\$old_archive_cmds\" fi fi fi func_execute_cmds "$cmds" 'exit $?' done test -n "$generated" && \ func_show_eval "${RM}r$generated" # Now create the libtool archive. case $output in *.la) old_library= test "$build_old_libs" = yes && old_library="$libname.$libext" func_verbose "creating $output" # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else func_quote_for_eval "$var_value" relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" fi done # Quote the link command for shipping. relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` if test "$hardcode_automatic" = yes ; then relink_command= fi # Only create the output if not a dry run. $opt_dry_run || { for installed in no yes; do if test "$installed" = yes; then if test -z "$install_libdir"; then break fi output="$output_objdir/$outputname"i # Replace all uninstalled libtool libraries with the installed ones newdependency_libs= for deplib in $dependency_libs; do case $deplib in *.la) func_basename "$deplib" name="$func_basename_result" func_resolve_sysroot "$deplib" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result` test -z "$libdir" && \ func_fatal_error "\`$deplib' is not a valid libtool archive" func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name" ;; -L*) func_stripname -L '' "$deplib" func_replace_sysroot "$func_stripname_result" func_append newdependency_libs " -L$func_replace_sysroot_result" ;; -R*) func_stripname -R '' "$deplib" func_replace_sysroot "$func_stripname_result" func_append newdependency_libs " -R$func_replace_sysroot_result" ;; *) func_append newdependency_libs " $deplib" ;; esac done dependency_libs="$newdependency_libs" newdlfiles= for lib in $dlfiles; do case $lib in *.la) func_basename "$lib" name="$func_basename_result" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "\`$lib' is not a valid libtool archive" func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name" ;; *) func_append newdlfiles " $lib" ;; esac done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do case $lib in *.la) # Only pass preopened files to the pseudo-archive (for # eventual linking with the app. that links it) if we # didn't already link the preopened objects directly into # the library: func_basename "$lib" name="$func_basename_result" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "\`$lib' is not a valid libtool archive" func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name" ;; esac done dlprefiles="$newdlprefiles" else newdlfiles= for lib in $dlfiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac func_append newdlfiles " $abs" done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac func_append newdlprefiles " $abs" done dlprefiles="$newdlprefiles" fi $RM $output # place dlname in correct position for cygwin # In fact, it would be nice if we could use this code for all target # systems that can't hard-code library paths into their executables # and that have no shared library path variable independent of PATH, # but it turns out we can't easily determine that from inspecting # libtool variables, so we have to hard-code the OSs to which it # applies here; at the moment, that means platforms that use the PE # object format with DLL files. See the long comment at the top of # tests/bindir.at for full details. tdlname=$dlname case $host,$output,$installed,$module,$dlname in *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) # If a -bindir argument was supplied, place the dll there. if test "x$bindir" != x ; then func_relative_path "$install_libdir" "$bindir" tdlname=$func_relative_path_result$dlname else # Otherwise fall back on heuristic. tdlname=../bin/$dlname fi ;; esac $ECHO > $output "\ # $outputname - a libtool library file # Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION # # Please DO NOT delete this file! # It is necessary for linking the library. # The name that we can dlopen(3). dlname='$tdlname' # Names of this library. library_names='$library_names' # The name of the static archive. old_library='$old_library' # Linker flags that can not go in dependency_libs. inherited_linker_flags='$new_inherited_linker_flags' # Libraries that this one depends upon. dependency_libs='$dependency_libs' # Names of additional weak libraries provided by this library weak_library_names='$weak_libs' # Version information for $libname. current=$current age=$age revision=$revision # Is this an already installed library? installed=$installed # Should we warn about portability when linking against -modules? shouldnotlink=$module # Files to dlopen/dlpreopen dlopen='$dlfiles' dlpreopen='$dlprefiles' # Directory that this library needs to be installed in: libdir='$install_libdir'" if test "$installed" = no && test "$need_relink" = yes; then $ECHO >> $output "\ relink_command=\"$relink_command\"" fi done } # Do a symbolic link so that the libtool archive can be found in # LD_LIBRARY_PATH before the program is installed. func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?' ;; esac exit $EXIT_SUCCESS } { test "$opt_mode" = link || test "$opt_mode" = relink; } && func_mode_link ${1+"$@"} # func_mode_uninstall arg... func_mode_uninstall () { $opt_debug RM="$nonopt" files= rmforce= exit_status=0 # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic="$magic" for arg do case $arg in -f) func_append RM " $arg"; rmforce=yes ;; -*) func_append RM " $arg" ;; *) func_append files " $arg" ;; esac done test -z "$RM" && \ func_fatal_help "you must specify an RM program" rmdirs= for file in $files; do func_dirname "$file" "" "." dir="$func_dirname_result" if test "X$dir" = X.; then odir="$objdir" else odir="$dir/$objdir" fi func_basename "$file" name="$func_basename_result" test "$opt_mode" = uninstall && odir="$dir" # Remember odir for removal later, being careful to avoid duplicates if test "$opt_mode" = clean; then case " $rmdirs " in *" $odir "*) ;; *) func_append rmdirs " $odir" ;; esac fi # Don't error if the file doesn't exist and rm -f was used. if { test -L "$file"; } >/dev/null 2>&1 || { test -h "$file"; } >/dev/null 2>&1 || test -f "$file"; then : elif test -d "$file"; then exit_status=1 continue elif test "$rmforce" = yes; then continue fi rmfiles="$file" case $name in *.la) # Possibly a libtool archive, so verify it. if func_lalib_p "$file"; then func_source $dir/$name # Delete the libtool libraries and symlinks. for n in $library_names; do func_append rmfiles " $odir/$n" done test -n "$old_library" && func_append rmfiles " $odir/$old_library" case "$opt_mode" in clean) case " $library_names " in *" $dlname "*) ;; *) test -n "$dlname" && func_append rmfiles " $odir/$dlname" ;; esac test -n "$libdir" && func_append rmfiles " $odir/$name $odir/${name}i" ;; uninstall) if test -n "$library_names"; then # Do each command in the postuninstall commands. func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' fi if test -n "$old_library"; then # Do each command in the old_postuninstall commands. func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' fi # FIXME: should reinstall the best remaining shared library. ;; esac fi ;; *.lo) # Possibly a libtool object, so verify it. if func_lalib_p "$file"; then # Read the .lo file func_source $dir/$name # Add PIC object to the list of files to remove. if test -n "$pic_object" && test "$pic_object" != none; then func_append rmfiles " $dir/$pic_object" fi # Add non-PIC object to the list of files to remove. if test -n "$non_pic_object" && test "$non_pic_object" != none; then func_append rmfiles " $dir/$non_pic_object" fi fi ;; *) if test "$opt_mode" = clean ; then noexename=$name case $file in *.exe) func_stripname '' '.exe' "$file" file=$func_stripname_result func_stripname '' '.exe' "$name" noexename=$func_stripname_result # $file with .exe has already been added to rmfiles, # add $file without .exe func_append rmfiles " $file" ;; esac # Do a test to see if this is a libtool program. if func_ltwrapper_p "$file"; then if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" relink_command= func_source $func_ltwrapper_scriptname_result func_append rmfiles " $func_ltwrapper_scriptname_result" else relink_command= func_source $dir/$noexename fi # note $name still contains .exe if it was in $file originally # as does the version of $file that was added into $rmfiles func_append rmfiles " $odir/$name $odir/${name}S.${objext}" if test "$fast_install" = yes && test -n "$relink_command"; then func_append rmfiles " $odir/lt-$name" fi if test "X$noexename" != "X$name" ; then func_append rmfiles " $odir/lt-${noexename}.c" fi fi fi ;; esac func_show_eval "$RM $rmfiles" 'exit_status=1' done # Try to remove the ${objdir}s in the directories where we deleted files for dir in $rmdirs; do if test -d "$dir"; then func_show_eval "rmdir $dir >/dev/null 2>&1" fi done exit $exit_status } { test "$opt_mode" = uninstall || test "$opt_mode" = clean; } && func_mode_uninstall ${1+"$@"} test -z "$opt_mode" && { help="$generic_help" func_fatal_help "you must specify a MODE" } test -z "$exec_cmd" && \ func_fatal_help "invalid operation mode \`$opt_mode'" if test -n "$exec_cmd"; then eval exec "$exec_cmd" exit $EXIT_FAILURE fi exit $exit_status # The TAGs below are defined such that we never get into a situation # in which we disable both kinds of libraries. Given conflicting # choices, we go for a static library, that is the most portable, # since we can't tell whether shared libraries were disabled because # the user asked for that or because the platform doesn't support # them. This is particularly important on AIX, because we don't # support having both static and shared libraries enabled at the same # time on that platform, so we default to a shared-only configuration. # If a disable-shared tag is given, we'll fallback to a static-only # configuration. But we'll never go from static-only to shared-only. # ### BEGIN LIBTOOL TAG CONFIG: disable-shared build_libtool_libs=no build_old_libs=yes # ### END LIBTOOL TAG CONFIG: disable-shared # ### BEGIN LIBTOOL TAG CONFIG: disable-static build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` # ### END LIBTOOL TAG CONFIG: disable-static # Local Variables: # mode:shell-script # sh-indentation:2 # End: # vi:sw=2 linbox-1.3.2/build-aux/missing000077500000000000000000000241521176453053400163150ustar00rootroot00000000000000#! /bin/sh # Common stub for a few missing GNU programs while installing. scriptversion=2012-01-06.13; # UTC # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006, # 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc. # Originally by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then echo 1>&2 "Try \`$0 --help' for more information" exit 1 fi run=: sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' sed_minuso='s/.* -o \([^ ]*\).*/\1/p' # In the cases where this matters, `missing' is being run in the # srcdir already. if test -f configure.ac; then configure_ac=configure.ac else configure_ac=configure.in fi msg="missing on your system" case $1 in --run) # Try to run requested program, and just exit if it succeeds. run= shift "$@" && exit 0 # Exit code 63 means version mismatch. This often happens # when the user try to use an ancient version of a tool on # a file that requires a minimum version. In this case we # we should proceed has if the program had been absent, or # if --run hadn't been passed. if test $? = 63; then run=: msg="probably too old" fi ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an error status if there is no known handling for PROGRAM. Options: -h, --help display this help and exit -v, --version output version information and exit --run try to run the given command, and emulate it if it fails Supported PROGRAM values: aclocal touch file \`aclocal.m4' autoconf touch file \`configure' autoheader touch file \`config.h.in' autom4te touch the output file, or create a stub one automake touch all \`Makefile.in' files bison create \`y.tab.[ch]', if possible, from existing .[ch] flex create \`lex.yy.c', if possible, from existing .c help2man touch the output file lex create \`lex.yy.c', if possible, from existing .c makeinfo touch the output file yacc create \`y.tab.[ch]', if possible, from existing .[ch] Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and \`g' are ignored when checking the name. Send bug reports to ." exit $? ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" exit $? ;; -*) echo 1>&2 "$0: Unknown \`$1' option" echo 1>&2 "Try \`$0 --help' for more information" exit 1 ;; esac # normalize program name to check for. program=`echo "$1" | sed ' s/^gnu-//; t s/^gnu//; t s/^g//; t'` # Now exit if we have it, but it failed. Also exit now if we # don't have it and --version was passed (most likely to detect # the program). This is about non-GNU programs, so use $1 not # $program. case $1 in lex*|yacc*) # Not GNU programs, they don't have --version. ;; *) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then # Could not run --version or --help. This is probably someone # running `$TOOL --version' or `$TOOL --help' to check whether # $TOOL exists and not knowing $TOOL uses missing. exit 1 fi ;; esac # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. case $program in aclocal*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." touch aclocal.m4 ;; autoconf*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." touch configure ;; autoheader*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acconfig.h' or \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` test -z "$files" && files="config.h" touch_files= for f in $files; do case $f in *:*) touch_files="$touch_files "`echo "$f" | sed -e 's/^[^:]*://' -e 's/:.*//'`;; *) touch_files="$touch_files $f.in";; esac done touch $touch_files ;; automake*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." find . -type f -name Makefile.am -print | sed 's/\.am$/.in/' | while read f; do touch "$f"; done ;; autom4te*) echo 1>&2 "\ WARNING: \`$1' is needed, but is $msg. You might have modified some files without having the proper tools for further handling them. You can get \`$1' as part of \`Autoconf' from any GNU archive site." file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo "#! /bin/sh" echo "# Created by GNU Automake missing as a replacement of" echo "# $ $@" echo "exit 0" chmod +x $file exit 1 fi ;; bison*|yacc*) echo 1>&2 "\ WARNING: \`$1' $msg. You should only need it if you modified a \`.y' file. You may need the \`Bison' package in order for those modifications to take effect. You can get \`Bison' from any GNU archive site." rm -f y.tab.c y.tab.h if test $# -ne 1; then eval LASTARG=\${$#} case $LASTARG in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.h fi ;; esac fi if test ! -f y.tab.h; then echo >y.tab.h fi if test ! -f y.tab.c; then echo 'main() { return 0; }' >y.tab.c fi ;; lex*|flex*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.l' file. You may need the \`Flex' package in order for those modifications to take effect. You can get \`Flex' from any GNU archive site." rm -f lex.yy.c if test $# -ne 1; then eval LASTARG=\${$#} case $LASTARG in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" lex.yy.c fi ;; esac fi if test ! -f lex.yy.c; then echo 'main() { return 0; }' >lex.yy.c fi ;; help2man*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a dependency of a manual page. You may need the \`Help2man' package in order for those modifications to take effect. You can get \`Help2man' from any GNU archive site." file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo ".ab help2man is required to generate this page" exit $? fi ;; makeinfo*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.texi' or \`.texinfo' file, or any other file indirectly affecting the aspect of the manual. The spurious call might also be the consequence of using a buggy \`make' (AIX, DU, IRIX). You might want to install the \`Texinfo' package or the \`GNU make' package. Grab either from any GNU archive site." # The file to touch is that specified with -o ... file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -z "$file"; then # ... or it is the one specified with @setfilename ... infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` file=`sed -n ' /^@setfilename/{ s/.* \([^ ]*\) *$/\1/ p q }' $infile` # ... or it is derived from the source name (dir/f.texi becomes f.info) test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info fi # If the file does not exist, the user really needs makeinfo; # let's fail without touching anything. test -f $file || exit 1 touch $file ;; *) echo 1>&2 "\ WARNING: \`$1' is needed, and is $msg. You might have modified some files without having the proper tools for further handling them. Check the \`README' file, it often tells you about the needed prerequisites for installing this package. You may also peek at any GNU archive site, in case some other package would contain this missing \`$1' program." exit 1 ;; esac exit 0 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: linbox-1.3.2/config.h.in000066400000000000000000000101041176453053400150370ustar00rootroot00000000000000/* config.h.in. Generated from configure.ac by autoheader. */ /* Define if building universal (internal helper macro) */ #undef AC_APPLE_UNIVERSAL_BUILD /* what version of FFLAS-FFPACK is installed */ #undef FFLAS_FFPACK_VERSION /* Define if GMP is version 3.xxx */ #undef GMP_VERSION_3 /* Define that architecture uses big endian storage */ #undef HAVE_BIG_ENDIAN /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H /* Define if FFLAS-FFPACK is installed */ #undef HAVE_FFLAS_FFPACK /* Define to 1 if you have the header file. */ #undef HAVE_FLOAT_H /* Define if FPLLL is installed */ #undef HAVE_FPLLL /* ps2pdf available as external program */ #undef HAVE_GHOSTSCRIPT /* Define if GIVARO is installed */ #undef HAVE_GIVARO /* Define if GMP is installed */ #undef HAVE_GMP /* gnuplot available as external program */ #undef HAVE_GNUPLOT /* Define if IML is installed */ #undef HAVE_IML /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define if LAPACK is available */ #undef HAVE_LAPACK /* Define if LIDIA is installed */ #undef HAVE_LIDIA /* Define to 1 if you have the header file. */ #undef HAVE_LIMITS_H /* Define that architecture uses little endian storage */ #undef HAVE_LITTLE_ENDIAN /* Define if M4RI is installed */ #undef HAVE_M4RI /* Define if M4RIE is installed */ #undef HAVE_M4RIE /* Define if MAPLE is installed */ #undef HAVE_MAPLE /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define if MPFR is installed */ #undef HAVE_MPFR /* Define if NTL is installed */ #undef HAVE_NTL /* Define if SACLIB is installed */ #undef HAVE_SACLIB /* Define to 1 if you have the header file. */ #undef HAVE_STDDEF_H /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TIME_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #undef LT_OBJDIR /* define is the version of Maple have access function to gmp data */ #undef MAPLE_GMP_ACCESS /* Name of package */ #undef PACKAGE /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the home page for this package. */ #undef PACKAGE_URL /* Define to the version of this package. */ #undef PACKAGE_VERSION /* The size of `char', as computed by sizeof. */ #undef SIZEOF_CHAR /* The size of `int', as computed by sizeof. */ #undef SIZEOF_INT /* The size of `long', as computed by sizeof. */ #undef SIZEOF_LONG /* The size of `long long', as computed by sizeof. */ #undef SIZEOF_LONG_LONG /* The size of `short', as computed by sizeof. */ #undef SIZEOF_SHORT /* The size of `__int64', as computed by sizeof. */ #undef SIZEOF___INT64 /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Version number of package */ #undef VERSION /* optimized threshold for switching to strassen matrix multiplication */ #undef WINOTHRESHOLD /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most significant byte first (like Motorola and SPARC, unlike Intel). */ #if defined AC_APPLE_UNIVERSAL_BUILD # if defined __BIG_ENDIAN__ # define WORDS_BIGENDIAN 1 # endif #else # ifndef WORDS_BIGENDIAN # undef WORDS_BIGENDIAN # endif #endif /* Define if Expat is installed */ #undef XMLENABLED linbox-1.3.2/configure000077500000000000000000023442341176453053400147430ustar00rootroot00000000000000#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.69 for LinBox 1.3.2. # # Report bugs to . # # # Copyright (C) 1992-1996, 1998-2012 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 more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= 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 IFS=$as_save_IFS ;; 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 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # Use a proper internal environment variable to ensure we don't fall # into an infinite loop, continuously re-executing ourselves. if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then _as_can_reexec=no; export _as_can_reexec; # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 as_fn_exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi " as_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1 test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 test \$(( 1 + 1 )) = 2 || exit 1 test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || ( ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO PATH=/empty FPATH=/empty; export PATH FPATH test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\ || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi done;; esac as_found=false done $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes fi; } IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : export CONFIG_SHELL # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi if test x$as_have_required = xno; then : $as_echo "$0: This script requires a shell more modern than all" $as_echo "$0: the shells that I found on your system." if test x${ZSH_VERSION+set} = xset ; then $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org and $0: linbox-use@googlegroups.com about your system, $0: including any error possibly output before this $0: message. Then install a modern shell, or manually run $0: the script under such a shell if you do have one." fi exit 1 fi fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; 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 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # 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 as_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # If we had to re-execute with $CONFIG_SHELL, we're ensured to have # already done that, so ensure we don't try to do so again and fall # in an infinite loop. This has already happened in practice. _as_can_reexec=no; export _as_can_reexec # 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 sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_test_x='test -x' as_executable_p=as_fn_executable_p # 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'" SHELL=${CONFIG_SHELL-/bin/sh} test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME='LinBox' PACKAGE_TARNAME='linbox' PACKAGE_VERSION='1.3.2' PACKAGE_STRING='LinBox 1.3.2' PACKAGE_BUGREPORT='linbox-use@googlegroups.com' PACKAGE_URL='http://www.linalg.org/' # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS LIBOBJS LINBOX_BUILD_DOC_FALSE LINBOX_BUILD_DOC_TRUE LINBOX_DOC_PATH LINBOX_BENCH_PATH LINBOX_HAVE_EXPAT_FALSE LINBOX_HAVE_EXPAT_TRUE EXPAT_LIBS EXPAT_CFLAGS LINBOX_HAVE_LAPACK_FALSE LINBOX_HAVE_LAPACK_TRUE LINBOX_HAVE_FFLAS_FFPACK_FALSE LINBOX_HAVE_FFLAS_FFPACK_TRUE BLAS_CFLAGS BLAS_LIBS FFLAS_FFPACK_LOC FFLAS_FFPACK_LIBS FFLAS_FFPACK_CFLAGS LINBOX_HAVE_SAGE_FALSE LINBOX_HAVE_SAGE_TRUE LINBOX_HAVE_MAPLE_FALSE LINBOX_HAVE_MAPLE_TRUE MAPLE_VERSION MAPLE_HOME MAPLE_CFLAGS MAPLE_LIBS LINBOX_HAVE_LIDIA_FALSE LINBOX_HAVE_LIDIA_TRUE LIDIA_LIBS LIDIA_CFLAGS LINBOX_HAVE_SACLIB_FALSE LINBOX_HAVE_SACLIB_TRUE SACLIB_LIBS SACLIB_CFLAGS LINBOX_HAVE_GIVARO_FALSE LINBOX_HAVE_GIVARO_TRUE GIVARO_LIBS GIVARO_CFLAGS LINBOX_HAVE_NTL_FALSE LINBOX_HAVE_NTL_TRUE NTL_LIBS NTL_CFLAGS LINBOX_HAVE_FPLLL_FALSE LINBOX_HAVE_FPLLL_TRUE FPLLL_LIBS FPLLL_CFLAGS LINBOX_HAVE_MPFR_FALSE LINBOX_HAVE_MPFR_TRUE MPFR_LIBS MPFR_CFLAGS LINBOX_HAVE_M4RIE_FALSE LINBOX_HAVE_M4RIE_TRUE M4RIE_LIBS M4RIE_CFLAGS LINBOX_HAVE_M4RI_FALSE LINBOX_HAVE_M4RI_TRUE M4RI_LIBS M4RI_CFLAGS LINBOX_HAVE_IML_FALSE LINBOX_HAVE_IML_TRUE IML_LIBS IML_CFLAGS GMP_VERSION GMP_LIBS GMP_CFLAGS LINBOX_COMPILE_DRIVERS_FALSE LINBOX_COMPILE_DRIVERS_TRUE OTOOL64 OTOOL LIPO NMEDIT DSYMUTIL MANIFEST_TOOL RANLIB ac_ct_AR AR DLLTOOL OBJDUMP LN_S NM ac_ct_DUMPBIN DUMPBIN LD FGREP SED ac_ct_CC CFLAGS CC host_os host_vendor host_cpu host build_os build_vendor build_cpu build LIBTOOL EGREP GREP CXXCPP TESTS_CFLAGS DEBUG_CFLAGS DEFAULT_CFLAGS CCNAM OBJEXT EXEEXT ac_ct_CXX CPPFLAGS LDFLAGS CXXFLAGS CXX WARN PROF PROFILE_FALSE PROFILE_TRUE DBG DEBUG_FALSE DEBUG_TRUE INSIDE_GNOME_COMMON_FALSE INSIDE_GNOME_COMMON_TRUE am__nodep AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE MAINT MAINTAINER_MODE_FALSE MAINTAINER_MODE_TRUE RM am__untar am__tar AMTAR am__leading_dot SET_MAKE AWK mkdir_p MKDIR_P INSTALL_STRIP_PROGRAM STRIP install_sh MAKEINFO AUTOHEADER AUTOMAKE AUTOCONF ACLOCAL VERSION PACKAGE CYGPATH_W am__isrc INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking enable_maintainer_mode enable_dependency_tracking enable_debug enable_profile enable_warnings enable_shared enable_static with_pic enable_fast_install with_gnu_ld with_sysroot enable_libtool_lock with_default with_all enable_drivers with_gmp with_iml with_m4ri with_m4rie with_mpfr with_fplll with_ntl with_givaro with_saclib with_lidia with_maple enable_sage with_fflas_ffpack with_expat with_benchdir with_gnuplot with_ghostscript enable_optimization with_docdir with_doxygen enable_doc ' ac_precious_vars='build_alias host_alias target_alias CXX CXXFLAGS LDFLAGS LIBS CPPFLAGS CCC CXXCPP CC CFLAGS' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # 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. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= 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 case $ac_option in *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *=) ac_optarg= ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -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) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$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 ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$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 ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) 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 ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$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_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=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 ;; -*) as_fn_error $? "unrecognized option: \`$ac_option' Try \`$0 --help' for more information" ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_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'` as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" 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 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 ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || as_fn_error $? "pwd does not report name of working directory" # 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 the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_myself" | 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 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # 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 LinBox 1.3.2 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 \`..'] 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] --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] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/linbox] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _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 LinBox 1.3.2:";; esac cat <<\_ACEOF Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-maintainer-mode enable make rules and dependencies not useful (and sometimes confusing) to the casual installer --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors --enable-debug enable debugging options in library --enable-profile enable profiling options in library --enable-warnings=yes|full|no enable warnings when compiling the library. If nothing or yes is given, more aggressive compiler warnings are passed to the compiler. If full is given, we become paranoïd about warnings and treat them as errors. --enable-shared[=PKGS] build shared libraries [default=yes] --enable-static[=PKGS] build static libraries [default=yes] --enable-fast-install[=PKGS] optimize for fast installation [default=yes] --disable-libtool-lock avoid locking (might break parallel builds) --enable-drivers Enable the compilation of the drivers --enable-shared Check for shared compilation (needed by --with-maple) --enable-sage Enable the compilation of the SAGE interface --enable-optimization Enable run time optimization in LinBox code (only Strassen matrix threshold for now) --enable-doc Enable building documentation Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use both] --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-sysroot=DIR Search for dependent libraries within DIR (or the compiler's sysroot if not specified). --with-default= Add to the default path for external package checking. Set as default with /usr and /usr/local. --with-all=|yes|no Use all external packages. If the argument is no, you not sure that all libraries are reachable with the default path. If the argument is yes or , that means that all libraries are reachable with the default path. Otherwise add to default path and enable all external packages. --with-gmp= |yes Use GMP library. This library is mandatory for LinBox compilation. If argument is yes or that means the library is reachable with the standard search path "/usr" or "/usr/local" (set as default). Otherwise you give the to the directory which contain the library. --with-iml=|yes Use IML library. This library is (not yet) mandatory for LinBox compilation. If argument is yes or or :) that means the library is reachable with the standard search path (/usr or /usr/local). Otherwise you give the to the directory which contains the library. --with-m4ri=|yes Use M4RI library. This library is (not yet) mandatory for LinBox compilation. If argument is yes or or that means the library is reachable with the standard search path (/usr or /usr/local). Otherwise you give the to the directory which contains the library. --with-m4rie=|yes Use M4RIE library. This library is (not yet) mandatory for LinBox compilation. If argument is yes or or that means the library is reachable with the standard search path (/usr or /usr/local). Otherwise you give the to the directory which contains the library. --with-mpfr=|yes Use MPFR library. This library is (not yet) mandatory for LinBox compilation. If argument is yes or or :) that means the library is reachable with the standard search path (/usr or /usr/local). Otherwise you give the to the directory which contains the library. --with-fplll=|yes Use FPLLL library. This library is (not yet) mandatory for LinBox compilation. If argument is yes or or :) that means the library is reachable with the standard search path (/usr or /usr/local). Otherwise you give the to the directory which contains the library. --with-ntl=|yes|no Use NTL library. If argument is no, you do not have the library installed on your machine (set as default). If argument is yes or that means the library is reachable with the standard search path (/usr or /usr/local). Otherwise you give the to the directory which contain the library. --with-givaro=|yes Use Givaro library. This library is mandatory for LinBox compilation. If argument is yes or that means the library is reachable with the standard search path (/usr or /usr/local). Otherwise you give the to the directory which contains the library. --with-saclib=|yes|no Use Saclib library. If argument is no, you do not have the library installed on your machine (set as default). If argument is yes or that means the library is reachable with the standard search path (/usr or /usr/local). Otherwise you give the to the directory which contain the library. --with-lidia=|yes|no Use Lidia library. If argument is no, you do not have the library installed on your machine (set as default). If argument is yes or that means the library is reachable with the standard search path (/usr or /usr/local). Otherwise you give the to the directory which contain the library. --with-maple=|yes|no Use Maple library. If argument is no, you do not have the library installed on your machine (set as default). If argument is yes or that means the library is well installed and so reachable. Otherwise you give the to the directory which contains the Software. --with-fflas-ffpack=|yes Use Fflas-Ffpack library. This library is mandatory for LinBox compilation. If argument is yes or or :) that means the library is reachable with the standard search path (/usr or /usr/local). Otherwise you give the to the directory which contains the library. Available at "http://linalg.org/projects/fflas-ffpack". --with-expat=|yes|no Use Expat library. If argument is no, you do not have the library installed on your machine (set as default). If argument is yes or that means the library is reachable with the standard search path (/usr or /usr/local). Otherwise you give the to the directory which contain the library. --with-benchdir= Where the LinBox benchmarks should be performed --with-gnuplot= Give the path to Gnuplot. --with-ghostscript= Give the path to ghostscript. --with-docdir= Where the LinBox documentation should be installed --with-doxygen= Give the path to Doxygen. Note: --enable-doc needed Some influential environment variables: CXX C++ compiler command CXXFLAGS C++ compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CXXCPP C++ preprocessor CC C compiler command CFLAGS 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. Report bugs to . LinBox home page: . _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested 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 else $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF LinBox configure 1.3.2 generated by GNU Autoconf 2.69 Copyright (C) 2012 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 fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## # ac_fn_cxx_try_compile LINENO # ---------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_compile # ac_fn_cxx_try_run LINENO # ------------------------ # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes # that executables *can* be run. ac_fn_cxx_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then : ac_retval=0 else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_run # ac_fn_cxx_try_cpp LINENO # ------------------------ # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_cpp # ac_fn_c_try_compile LINENO # -------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_compile # ac_fn_c_try_link LINENO # ----------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_link # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists and can be compiled using the include files in # INCLUDES, setting the cache variable VAR accordingly. ac_fn_c_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile # ac_fn_c_check_func LINENO FUNC VAR # ---------------------------------- # Tests whether FUNC exists, setting the cache variable VAR accordingly ac_fn_c_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. For example, HP-UX 11i declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $2 (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $2 /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $2 (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$2 || defined __stub___$2 choke me #endif int main () { return $2 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func # ac_fn_cxx_try_link LINENO # ------------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_link # ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES # ---------------------------------------------- # Tries to find the compile-time value of EXPR in a program that includes # INCLUDES, setting VAR accordingly. Returns whether the value could be # computed ac_fn_cxx_compute_int () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { static int test_array [1 - 2 * !(($2) >= 0)]; test_array [0] = 0; return test_array [0]; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_lo=0 ac_mid=0 while :; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { static int test_array [1 - 2 * !(($2) <= $ac_mid)]; test_array [0] = 0; return test_array [0]; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_hi=$ac_mid; break else as_fn_arith $ac_mid + 1 && ac_lo=$as_val if test $ac_lo -le $ac_mid; then ac_lo= ac_hi= break fi as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { static int test_array [1 - 2 * !(($2) < 0)]; test_array [0] = 0; return test_array [0]; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_hi=-1 ac_mid=-1 while :; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { static int test_array [1 - 2 * !(($2) >= $ac_mid)]; test_array [0] = 0; return test_array [0]; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_lo=$ac_mid; break else as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val if test $ac_mid -le $ac_hi; then ac_lo= ac_hi= break fi as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else ac_lo= ac_hi= fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { static int test_array [1 - 2 * !(($2) <= $ac_mid)]; test_array [0] = 0; return test_array [0]; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_hi=$ac_mid else as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in #(( ?*) eval "$3=\$ac_lo"; ac_retval=0 ;; '') ac_retval=1 ;; esac else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 static long int longval () { return $2; } static unsigned long int ulongval () { return $2; } #include #include int main () { FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; if (($2) < 0) { long int i = longval (); if (i != ($2)) return 1; fprintf (f, "%ld", i); } else { unsigned long int i = ulongval (); if (i != ($2)) return 1; fprintf (f, "%lu", i); } /* Do not output a trailing newline, as this causes \r\n confusion on some platforms. */ return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF if ac_fn_cxx_try_run "$LINENO"; then : echo >>conftest.val; read $3 &5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 $as_echo_n "checking $2 usability... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_header_compiler=yes else ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 $as_echo_n "checking $2 presence... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <$2> _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : ac_header_preproc=yes else ac_header_preproc=no fi rm -f conftest.err conftest.i conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #(( yes:no: ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; no:yes:* ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ( $as_echo "## ------------------------------------------ ## ## Report this to linbox-use@googlegroups.com ## ## ------------------------------------------ ##" ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_cxx_check_header_mongrel cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by LinBox $as_me 1.3.2, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { 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` /usr/bin/hostinfo = `(/usr/bin/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=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&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_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=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) as_fn_append 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 as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { ac_configure_args0=; unset ac_configure_args0;} { ac_configure_args1=; unset 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: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo $as_echo "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo $as_echo "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then $as_echo "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then $as_echo "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h $as_echo "/* confdefs.h */" > 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 cat >>confdefs.h <<_ACEOF #define PACKAGE_URL "$PACKAGE_URL" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then # We do not want a PATH search for config.site. case $CONFIG_SITE in #(( -*) ac_site_file1=./$CONFIG_SITE;; */*) ac_site_file1=$CONFIG_SITE;; *) ac_site_file1=./$CONFIG_SITE;; esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5; } 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. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 $as_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 $ac_precious_vars; 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,) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 $as_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 # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_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. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## 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_aux_dir= for ac_dir in build-aux "$srcdir"/build-aux; 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 as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5 fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. am__api_version='1.11' # 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. # Reject install programs that cannot install multiple files. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if ${ac_cv_path_install+:} false; then : $as_echo_n "(cached) " >&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_fn_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 rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir 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. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 $as_echo "$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' { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } # Just in case sleep 1 echo timestamp > conftest.file # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; esac # 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". as_fn_error $? "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi test "$2" = conftest.file ) then # Ok. : else as_fn_error $? "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "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 $. # By default was `s,x,x', remove it if useless. ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5 $as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} fi if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi # 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&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_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&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_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if ${ac_cv_path_mkdir+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi test -d ./--version && rmdir ./--version if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. MKDIR_P="$ac_install_sh -d" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } mkdir_p="$MKDIR_P" case $mkdir_p in [\\/$]* | ?:[\\/]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AWK+:} false; then : $as_echo_n "(cached) " >&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_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "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 if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi 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='linbox' VERSION='1.3.2' 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"} # We need awk for the "check" target. The system "awk" is bad on # some platforms. # Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AMTAR='$${TAR-tar}' am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' ac_config_headers="$ac_config_headers config.h" ac_config_commands="$ac_config_commands linbox/linbox-config.h" # Extract the first word of "rm", so it can be a program name with args. set dummy rm; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_RM+:} false; then : $as_echo_n "(cached) " >&6 else case $RM in [\\/]* | ?:[\\/]*) ac_cv_path_RM="$RM" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_RM" && ac_cv_path_RM="$FALSE" ;; esac fi RM=$ac_cv_path_RM if test -n "$RM"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5 $as_echo "$RM" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi RM="$RM -f" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } # Check whether --enable-maintainer-mode was given. if test "${enable_maintainer_mode+set}" = set; then : enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval else USE_MAINTAINER_MODE=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 $as_echo "$USE_MAINTAINER_MODE" >&6; } if test $USE_MAINTAINER_MODE = yes; then MAINTAINER_MODE_TRUE= MAINTAINER_MODE_FALSE='#' else MAINTAINER_MODE_TRUE='#' MAINTAINER_MODE_FALSE= fi MAINT=$MAINTAINER_MODE_TRUE # Check whether --enable-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='\' am__nodep='_no' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi ac_config_commands="$ac_config_commands depfiles" if test x = y; then INSIDE_GNOME_COMMON_TRUE= INSIDE_GNOME_COMMON_FALSE='#' else INSIDE_GNOME_COMMON_TRUE='#' INSIDE_GNOME_COMMON_FALSE= fi test -n "$ACLOCAL_FLAGS" && ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS" for k in macros ; do ACLOCAL="$ACLOCAL -I $k" ; done # work around to fix the backward compatibility issue of automake 1.10 with 1.9 (pb with MKDIR_P) ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu echo "-----------------------------------------------" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable debugging options in the library" >&5 $as_echo_n "checking whether to enable debugging options in the library... " >&6; } # Check whether --enable-debug was given. if test "${enable_debug+set}" = set; then : enableval=$enable_debug; USE_DEBUG=$enableval else USE_DEBUG=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_DEBUG" >&5 $as_echo "$USE_DEBUG" >&6; } if test $USE_DEBUG = yes; then DEBUG_TRUE= DEBUG_FALSE='#' else DEBUG_TRUE='#' DEBUG_FALSE= fi DBG=$USE_DEBUG { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable profiling everything in the library" >&5 $as_echo_n "checking whether to enable profiling everything in the library... " >&6; } # Check whether --enable-profile was given. if test "${enable_profile+set}" = set; then : enableval=$enable_profile; USE_PROFILE=$enableval else USE_PROFILE=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_PROFILE" >&5 $as_echo "$USE_PROFILE" >&6; } if test $USE_PROFILE = yes; then PROFILE_TRUE= PROFILE_FALSE='#' else PROFILE_TRUE='#' PROFILE_FALSE= fi PROF=$USE_PROFILE { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable warnings when compiling the library" >&5 $as_echo_n "checking whether to enable warnings when compiling the library... " >&6; } # Check whether --enable-warnings was given. if test "${enable_warnings+set}" = set; then : enableval=$enable_warnings; USE_WARNINGS=$enableval else USE_WARNINGS=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_WARNINGS" >&5 $as_echo "$USE_WARNINGS" >&6; } WARN=$USE_WARNINGS echo "-----------------------------------------------" # CFLAGS=${CFLAGS:-$DEFAULT_CFLAGS} # CXXFLAGS=${CXXFLAGS:-$DEFAULT_CXXFLAGS} ###################################################### # Try and pass different flags according to compiler # ###################################################### # disable default -g -O2 CXXFLAGS : ${CXXFLAGS=""} #set CXX ac_ext=cpp 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 -z "$CXX"; then if test -n "$CCC"; then CXX=$CCC else if test -n "$ac_tool_prefix"; then for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CXX+:} false; then : $as_echo_n "(cached) " >&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_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 $as_echo "$CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CXX" && break done fi if test -z "$CXX"; then ac_ct_CXX=$CXX for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CXX+:} false; then : $as_echo_n "(cached) " >&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_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CXX="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 $as_echo "$ac_ct_CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CXX" && break done if test "x$ac_ct_CXX" = x; then CXX="g++" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CXX=$ac_ct_CXX fi fi fi fi # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.out.dSYM 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. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C++ compiler works" >&5 $as_echo_n "checking whether the C++ compiler works... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi if test -z "$ac_file"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C++ compiler cannot create executables See \`config.log' for more details" "$LINENO" 5; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler default output file name" >&5 $as_echo_n "checking for C++ compiler default output file name... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 $as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; 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 | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 $as_echo_n "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run C++ compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details" "$LINENO" 5; } fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 $as_echo "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if ${ac_cv_objext+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } if ${ac_cv_cxx_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GXX=yes else GXX= fi ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 $as_echo_n "checking whether $CXX accepts -g... " >&6; } if ${ac_cv_prog_cxx_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_cxx_werror_flag=$ac_cxx_werror_flag ac_cxx_werror_flag=yes ac_cv_prog_cxx_g=no CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes else CXXFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : else ac_cxx_werror_flag=$ac_save_cxx_werror_flag CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cxx_werror_flag=$ac_save_cxx_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 $as_echo "$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 ac_ext=cpp 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for family name of compiler" >&5 $as_echo_n "checking for family name of compiler... " >&6; } if test "$cross_compiling" = yes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run test program while cross compiling See \`config.log' for more details" "$LINENO" 5; } else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __INTEL_COMPILER int main() { return 0 ; } #else pas intel #endif _ACEOF if ac_fn_cxx_try_run "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: icc" >&5 $as_echo "icc" >&6; } CCNAM=icc fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi if test -z "${CCNAM}"; then : if test "$cross_compiling" = yes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run test program while cross compiling See \`config.log' for more details" "$LINENO" 5; } else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __PATHSCALE__ int main() { return !(__PATHCC__ >= 4) ; } #else pas ekopath non plus. #endif _ACEOF if ac_fn_cxx_try_run "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: eko" >&5 $as_echo "eko" >&6; } CCNAM=eko fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi if test -z "${CCNAM}"; then : if test "$cross_compiling" = yes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run test program while cross compiling See \`config.log' for more details" "$LINENO" 5; } else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __clang__ int main() { return !(__clang_major >=3) ; } #else pas clang non plus. #endif _ACEOF if ac_fn_cxx_try_run "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: clang" >&5 $as_echo "clang" >&6; } CCNAM=clang fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi if test -z "${CCNAM}"; then : if test "$cross_compiling" = yes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run test program while cross compiling See \`config.log' for more details" "$LINENO" 5; } else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __GNUC__ int main() { return !(__GNUC__ >= 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 2)) ; } #else pas gcc non plus ??? #endif _ACEOF if ac_fn_cxx_try_run "$LINENO"; then : CCNOM=gcc if test -n "${CC}" ; then : CCNOM="`$CC --version 2>&1| awk 'NR<2{print }'`" fi CCNAM=gcc { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCNOM" >&5 $as_echo "$CCNOM" >&6; } fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi if test -z "${CCNAM}"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5 $as_echo "unknown" >&6; } CCNAM=unknown echo echo " *** unknow compiler. please file a bug " echo fi TESTS_CFLAGS="-O0" DEBUG_CFLAGS="-g" DEFAULT_CFLAGS="" # WARN_CFLAGS="-Wall" #TODO use -fast for icc, -ipa for eko... if test "x$DBG" = "xyes" ; then DEFAULT_CFLAGS="-O0 ${DEFAULT_CFLAGS} " #those are CXXFLAGS DEBUG_CFLAGS="${DEBUG_CFLAGS} -DDEBUG -D_LB_DEBUG" else DEFAULT_CFLAGS="-O2 ${DEFAULT_CFLAGS} " DEBUG_CFLAGS="${DEBUG_CFLAGS} -DNDEBUG -U_LB_DEBUG" fi if test "x$PROF" = "xyes" ; then DEFAULT_CFLAGS="${DEFAULT_CFLAGS} -pg" fi if test "x$WARN" = "xyes" -o "x$WARN" = "xfull" ; then case x${CCNAM} in xicc) WARN_CFLAGS="${WARN_CFLAGS} -Wcheck" # DEBUG_CFLAGS="-fast" ;; xeko) WARN_CFLAGS="${WARN_CFLAGS} -Wno-unused-parameter" ;; xgcc|xclang) WARN_CFLAGS="${WARN_CFLAGS} -Wextra -Wno-unused-parameter" if test "x${WARN}" = "xfull" ; then WARN_CFLAGS="${WARN_CFLAGS} -Wuninitialized -Wconversion -Wcast-qual -ansi -pedantic -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Wno-long-long" fi ;; *) echo echo "*******************************************************" echo "unsupported compiler ($CCNAM). Please file a bug." echo "*******************************************************" echo WARN_CFLAGS="${WARN_CFLAGS}" esac fi DEFAULT_CFLAGS="${DEFAULT_CFLAGS} ${WARN_CFLAGS} ${DEBUG_CFLAGS}" TESTS_CFLAGS="${TESTS_CFLAGS} ${WARN_CFLAGS} ${DEBUG_CFLAGS}" ac_ext=cpp 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5 $as_echo_n "checking how to run the C++ preprocessor... " >&6; } if test -z "$CXXCPP"; then if ${ac_cv_prog_CXXCPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CXXCPP needs to be expanded for CXXCPP in "$CXX -E" "/lib/cpp" do ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CXXCPP=$CXXCPP fi CXXCPP=$ac_cv_prog_CXXCPP else ac_cv_prog_CXXCPP=$CXXCPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5 $as_echo "$CXXCPP" >&6; } ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=cpp 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } if ${ac_cv_path_GREP+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_GREP" || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } if ${ac_cv_path_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core 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 confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #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)) return 2; return 0; } _ACEOF if ac_fn_cxx_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi case `pwd` in *\ * | *\ *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 $as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; esac macro_version='2.4.2' macro_revision='1.3337' ltmain="$ac_aux_dir/ltmain.sh" # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } if ${ac_cv_build+:} false; then : $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' set x $ac_cv_build shift build_cpu=$1 build_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: build_os=$* IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } if ${ac_cv_host+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' set x $ac_cv_host shift host_cpu=$1 host_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: host_os=$* IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac # Backslashify metacharacters that are still active within # double-quoted strings. sed_quote_subst='s/\(["`$\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\(["`\\]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to delay expansion of an escaped single quote. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 $as_echo_n "checking how to print strings... " >&6; } # Test print first, because it will be a builtin if present. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='print -r --' elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='printf %s\n' else # Use this function as a fallback that always works. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $1 _LTECHO_EOF' } ECHO='func_fallback_echo' fi # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "" } case "$ECHO" in printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5 $as_echo "printf" >&6; } ;; print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 $as_echo "print -r" >&6; } ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5 $as_echo "cat" >&6; } ;; esac ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&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_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&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_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&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_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&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_fn_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" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS 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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&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_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&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_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include struct stat; /* 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 -std 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 -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 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 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=cpp 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 $as_echo_n "checking for a sed that does not truncate output... " >&6; } if ${ac_cv_path_SED+:} false; then : $as_echo_n "(cached) " >&6 else ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ for ac_i in 1 2 3 4 5 6 7; do ac_script="$ac_script$as_nl$ac_script" done echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed { ac_script=; unset ac_script;} if test -z "$SED"; then ac_path_SED_found=false # Loop through the user's path and test for each of PROGNAME-LIST 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_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_SED" || continue # Check for GNU ac_path_SED and select it if it is found. # Check for GNU $ac_path_SED case `"$ac_path_SED" --version 2>&1` in *GNU*) ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo '' >> "conftest.nl" "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_SED_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_SED="$ac_path_SED" ac_path_SED_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_SED_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_SED"; then as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 fi else ac_cv_path_SED=$SED fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 $as_echo "$ac_cv_path_SED" >&6; } SED="$ac_cv_path_SED" rm -f conftest.sed test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 $as_echo_n "checking for fgrep... " >&6; } if ${ac_cv_path_FGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 then ac_cv_path_FGREP="$GREP -F" else if test -z "$FGREP"; then ac_path_FGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in fgrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_FGREP" || continue # Check for GNU ac_path_FGREP and select it if it is found. # Check for GNU $ac_path_FGREP case `"$ac_path_FGREP" --version 2>&1` in *GNU*) ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'FGREP' >> "conftest.nl" "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_FGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_FGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_FGREP"; then as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_FGREP=$FGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 $as_echo "$ac_cv_path_FGREP" >&6; } FGREP="$ac_cv_path_FGREP" test -z "$GREP" && GREP=grep # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then : withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi if ${lt_cv_path_LD+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 $as_echo "$LD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if ${lt_cv_prog_gnu_ld+:} false; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 $as_echo "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 $as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } if ${lt_cv_path_NM+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/$lt_tmp_nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS="$lt_save_ifs" done : ${lt_cv_path_NM=no} fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 $as_echo "$lt_cv_path_NM" >&6; } if test "$lt_cv_path_NM" != "no"; then NM="$lt_cv_path_NM" else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$DUMPBIN"; then : # Let the user override the test. else if test -n "$ac_tool_prefix"; then for ac_prog in dumpbin "link -dump" 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DUMPBIN"; then ac_cv_prog_DUMPBIN="$DUMPBIN" # 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_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DUMPBIN=$ac_cv_prog_DUMPBIN if test -n "$DUMPBIN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 $as_echo "$DUMPBIN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$DUMPBIN" && break done fi if test -z "$DUMPBIN"; then ac_ct_DUMPBIN=$DUMPBIN for ac_prog in dumpbin "link -dump" do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DUMPBIN"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # 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_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN if test -n "$ac_ct_DUMPBIN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 $as_echo "$ac_ct_DUMPBIN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_DUMPBIN" && break done if test "x$ac_ct_DUMPBIN" = x; then DUMPBIN=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DUMPBIN=$ac_ct_DUMPBIN fi fi case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols" ;; *) DUMPBIN=: ;; esac fi if test "$DUMPBIN" != ":"; then NM="$DUMPBIN" fi fi test -z "$NM" && NM=nm { $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 $as_echo_n "checking the name lister ($NM) interface... " >&6; } if ${lt_cv_nm_interface+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 (eval echo "\"\$as_me:$LINENO: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 $as_echo "$lt_cv_nm_interface" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 $as_echo_n "checking whether ln -s works... " >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 $as_echo "no, using $LN_S" >&6; } fi # find the maximum length of command line arguments { $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 $as_echo_n "checking the maximum length of command line arguments... " >&6; } if ${lt_cv_sys_max_cmd_len+:} false; then : $as_echo_n "(cached) " >&6 else i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; mint*) # On MiNT this can take a long time and run out of memory. lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; os2*) # The test takes a long time on OS/2. lt_cv_sys_max_cmd_len=8192 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. for i in 1 2 3 4 5 6 7 8 ; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` teststring= # Add a significant safety factor because C++ compilers can tack on # massive amounts of additional arguments before passing them to the # linker. It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac fi if test -n $lt_cv_sys_max_cmd_len ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 $as_echo "$lt_cv_sys_max_cmd_len" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 $as_echo "none" >&6; } fi max_cmd_len=$lt_cv_sys_max_cmd_len : ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5 $as_echo_n "checking whether the shell understands some XSI constructs... " >&6; } # Try some XSI features xsi_shell=no ( _lt_dummy="a/b/c" test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ = c,a/b,b/c, \ && eval 'test $(( 1 + 1 )) -eq 2 \ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ && xsi_shell=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5 $as_echo "$xsi_shell" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5 $as_echo_n "checking whether the shell understands \"+=\"... " >&6; } lt_shell_append=no ( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \ >/dev/null 2>&1 \ && lt_shell_append=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5 $as_echo "$lt_shell_append" >&6; } if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 $as_echo_n "checking how to convert $build file names to $host format... " >&6; } if ${lt_cv_to_host_file_cmd+:} false; then : $as_echo_n "(cached) " >&6 else case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 ;; esac ;; *-*-cygwin* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_noop ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin ;; esac ;; * ) # unhandled hosts (and "normal" native builds) lt_cv_to_host_file_cmd=func_convert_file_noop ;; esac fi to_host_file_cmd=$lt_cv_to_host_file_cmd { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 $as_echo "$lt_cv_to_host_file_cmd" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 $as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } if ${lt_cv_to_tool_file_cmd+:} false; then : $as_echo_n "(cached) " >&6 else #assume ordinary cross tools, or native build. lt_cv_to_tool_file_cmd=func_convert_file_noop case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 ;; esac ;; esac fi to_tool_file_cmd=$lt_cv_to_tool_file_cmd { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 $as_echo "$lt_cv_to_tool_file_cmd" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 $as_echo_n "checking for $LD option to reload object files... " >&6; } if ${lt_cv_ld_reload_flag+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_reload_flag='-r' fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 $as_echo "$lt_cv_ld_reload_flag" >&6; } reload_flag=$lt_cv_ld_reload_flag case $reload_flag in "" | " "*) ;; *) reload_flag=" $reload_flag" ;; esac reload_cmds='$LD$reload_flag -o $output$reload_objs' case $host_os in cygwin* | mingw* | pw32* | cegcc*) if test "$GCC" != yes; then reload_cmds=false fi ;; darwin*) if test "$GCC" = yes; then reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' else reload_cmds='$LD$reload_flag -o $output$reload_objs' fi ;; esac if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. set dummy ${ac_tool_prefix}objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OBJDUMP"; then ac_cv_prog_OBJDUMP="$OBJDUMP" # 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_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OBJDUMP=$ac_cv_prog_OBJDUMP if test -n "$OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 $as_echo "$OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OBJDUMP"; then ac_ct_OBJDUMP=$OBJDUMP # Extract the first word of "objdump", so it can be a program name with args. set dummy objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OBJDUMP"; then ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # 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_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OBJDUMP="objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP if test -n "$ac_ct_OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 $as_echo "$ac_ct_OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OBJDUMP" = x; then OBJDUMP="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OBJDUMP=$ac_ct_OBJDUMP fi else OBJDUMP="$ac_cv_prog_OBJDUMP" fi test -z "$OBJDUMP" && OBJDUMP=objdump { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 $as_echo_n "checking how to recognize dependent libraries... " >&6; } if ${lt_cv_deplibs_check_method+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= lt_cv_deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. # `unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path # which responds to the $file_magic_cmd with a given extended regex. # If you have `file' or equivalent on your system and you're not sure # whether `pass_all' will *always* work, you probably want this one. case $host_os in aix[4-9]*) lt_cv_deplibs_check_method=pass_all ;; beos*) lt_cv_deplibs_check_method=pass_all ;; bsdi[45]*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' lt_cv_file_magic_cmd='/usr/bin/file -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; cygwin*) # func_win32_libid is a shell function defined in ltmain.sh lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' ;; mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else # Keep this pattern in sync with the one in func_win32_libid. lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; cegcc*) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; gnu*) lt_cv_deplibs_check_method=pass_all ;; haiku*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]' lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[3-9]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) lt_cv_deplibs_check_method=pass_all ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; tpf*) lt_cv_deplibs_check_method=pass_all ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 $as_echo "$lt_cv_deplibs_check_method" >&6; } file_magic_glob= want_nocaseglob=no if test "$build" = "$host"; then case $host_os in mingw* | pw32*) if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then want_nocaseglob=yes else file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` fi ;; esac fi file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. set dummy ${ac_tool_prefix}dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DLLTOOL"; then ac_cv_prog_DLLTOOL="$DLLTOOL" # 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_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DLLTOOL=$ac_cv_prog_DLLTOOL if test -n "$DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 $as_echo "$DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DLLTOOL"; then ac_ct_DLLTOOL=$DLLTOOL # Extract the first word of "dlltool", so it can be a program name with args. set dummy dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DLLTOOL"; then ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # 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_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DLLTOOL="dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL if test -n "$ac_ct_DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 $as_echo "$ac_ct_DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DLLTOOL" = x; then DLLTOOL="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DLLTOOL=$ac_ct_DLLTOOL fi else DLLTOOL="$ac_cv_prog_DLLTOOL" fi test -z "$DLLTOOL" && DLLTOOL=dlltool { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 $as_echo_n "checking how to associate runtime and link libraries... " >&6; } if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_sharedlib_from_linklib_cmd='unknown' case $host_os in cygwin* | mingw* | pw32* | cegcc*) # two different shell functions defined in ltmain.sh # decide which to use based on capabilities of $DLLTOOL case `$DLLTOOL --help 2>&1` in *--identify-strict*) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib ;; *) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback ;; esac ;; *) # fallback: assume linklib IS sharedlib lt_cv_sharedlib_from_linklib_cmd="$ECHO" ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 $as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO if test -n "$ac_tool_prefix"; then for ac_prog in ar 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AR="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 $as_echo "$AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AR" && break done fi if test -z "$AR"; then ac_ct_AR=$AR for ac_prog in ar do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AR="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 $as_echo "$ac_ct_AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_AR" && break done if test "x$ac_ct_AR" = x; then AR="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AR=$ac_ct_AR fi fi : ${AR=ar} : ${AR_FLAGS=cru} { $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 $as_echo_n "checking for archiver @FILE support... " >&6; } if ${lt_cv_ar_at_file+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ar_at_file=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : echo conftest.$ac_objext > conftest.lst lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 (eval $lt_ar_try) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test "$ac_status" -eq 0; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 (eval $lt_ar_try) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test "$ac_status" -ne 0; then lt_cv_ar_at_file=@ fi fi rm -f conftest.* libconftest.a fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 $as_echo "$lt_cv_ar_at_file" >&6; } if test "x$lt_cv_ar_at_file" = xno; then archiver_list_spec= else archiver_list_spec=$lt_cv_ar_at_file fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&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_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&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_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi test -z "$STRIP" && STRIP=: if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 $as_echo "$RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 $as_echo "$ac_ct_RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then RANLIB=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB fi else RANLIB="$ac_cv_prog_RANLIB" fi test -z "$RANLIB" && RANLIB=: # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" fi case $host_os in darwin*) lock_old_archive_extraction=yes ;; *) lock_old_archive_extraction=no ;; esac # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Check for command to grab the raw symbol name followed by C symbol from nm. { $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } if ${lt_cv_sys_global_symbol_pipe+:} false; then : $as_echo_n "(cached) " >&6 else # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[BCDEGRST]' # Regexp to match symbols that can be accessed directly from C. sympat='\([_A-Za-z][_A-Za-z0-9]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[BCDT]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[ABCDGISTW]' ;; hpux*) if test "$host_cpu" = ia64; then symcode='[ABCDEGRST]' fi ;; irix* | nonstopux*) symcode='[BCDEGRST]' ;; osf*) symcode='[BCDEGQRST]' ;; solaris*) symcode='[BDRT]' ;; sco3.2v5*) symcode='[DT]' ;; sysv4.2uw2*) symcode='[DT]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[ABDT]' ;; sysv4) symcode='[DFNSTU]' ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[ABCDGIRSTW]' ;; esac # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function # and D for any global variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK '"\ " {last_section=section; section=\$ 3};"\ " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ " s[1]~/^[@?]/{print s[1], s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then # Now try to grab the symbols. nlist=conftest.nm if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5 (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) /* DATA imports from DLLs on WIN32 con't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT_DLSYM_CONST #elif defined(__osf__) /* This system does not cope well with relocations in const data. */ # define LT_DLSYM_CONST #else # define LT_DLSYM_CONST const #endif #ifdef __cplusplus extern "C" { #endif _LT_EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ LT_DLSYM_CONST struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_globsym_save_LIBS=$LIBS lt_globsym_save_CFLAGS=$CFLAGS LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS=$lt_globsym_save_LIBS CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&5 fi else echo "cannot find nm_test_var in $nlist" >&5 fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 fi else echo "$progname: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done fi if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 $as_echo "failed" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 $as_echo "ok" >&6; } fi # Response file support. if test "$lt_cv_nm_interface" = "MS dumpbin"; then nm_file_list_spec='@' elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then nm_file_list_spec='@' fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 $as_echo_n "checking for sysroot... " >&6; } # Check whether --with-sysroot was given. if test "${with_sysroot+set}" = set; then : withval=$with_sysroot; else with_sysroot=no fi lt_sysroot= case ${with_sysroot} in #( yes) if test "$GCC" = yes; then lt_sysroot=`$CC --print-sysroot 2>/dev/null` fi ;; #( /*) lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` ;; #( no|'') ;; #( *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_sysroot}" >&5 $as_echo "${with_sysroot}" >&6; } as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 $as_echo "${lt_sysroot:-no}" >&6; } # Check whether --enable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then : enableval=$enable_libtool_lock; fi test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '#line '$LINENO' "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 $as_echo_n "checking whether the C compiler needs -belf... " >&6; } if ${lt_cv_cc_needs_belf+:} false; then : $as_echo_n "(cached) " >&6 else ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_cc_needs_belf=yes else lt_cv_cc_needs_belf=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 $as_echo "$lt_cv_cc_needs_belf" >&6; } if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; *-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) case $host in i?86-*-solaris*) LD="${LD-ld} -m elf_x86_64" ;; sparc*-*-solaris*) LD="${LD-ld} -m elf64_sparc" ;; esac # GNU ld 2.21 introduced _sol2 emulations. Use them if available. if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then LD="${LD-ld}_sol2" fi ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks="$enable_libtool_lock" if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. set dummy ${ac_tool_prefix}mt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_MANIFEST_TOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$MANIFEST_TOOL"; then ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # 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_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL if test -n "$MANIFEST_TOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 $as_echo "$MANIFEST_TOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_MANIFEST_TOOL"; then ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL # Extract the first word of "mt", so it can be a program name with args. set dummy mt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_MANIFEST_TOOL"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # 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_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL if test -n "$ac_ct_MANIFEST_TOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 $as_echo "$ac_ct_MANIFEST_TOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_MANIFEST_TOOL" = x; then MANIFEST_TOOL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL fi else MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" fi test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 $as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } if ${lt_cv_path_mainfest_tool+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_path_mainfest_tool=no echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out cat conftest.err >&5 if $GREP 'Manifest Tool' conftest.out > /dev/null; then lt_cv_path_mainfest_tool=yes fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 $as_echo "$lt_cv_path_mainfest_tool" >&6; } if test "x$lt_cv_path_mainfest_tool" != xyes; then MANIFEST_TOOL=: fi case $host_os in rhapsody* | darwin*) if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DSYMUTIL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DSYMUTIL"; then ac_cv_prog_DSYMUTIL="$DSYMUTIL" # 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_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DSYMUTIL=$ac_cv_prog_DSYMUTIL if test -n "$DSYMUTIL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 $as_echo "$DSYMUTIL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DSYMUTIL"; then ac_ct_DSYMUTIL=$DSYMUTIL # Extract the first word of "dsymutil", so it can be a program name with args. set dummy dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DSYMUTIL"; then ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # 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_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL if test -n "$ac_ct_DSYMUTIL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 $as_echo "$ac_ct_DSYMUTIL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DSYMUTIL" = x; then DSYMUTIL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DSYMUTIL=$ac_ct_DSYMUTIL fi else DSYMUTIL="$ac_cv_prog_DSYMUTIL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. set dummy ${ac_tool_prefix}nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_NMEDIT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NMEDIT"; then ac_cv_prog_NMEDIT="$NMEDIT" # 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_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi NMEDIT=$ac_cv_prog_NMEDIT if test -n "$NMEDIT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 $as_echo "$NMEDIT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_NMEDIT"; then ac_ct_NMEDIT=$NMEDIT # Extract the first word of "nmedit", so it can be a program name with args. set dummy nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_NMEDIT"; then ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # 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_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_NMEDIT="nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT if test -n "$ac_ct_NMEDIT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 $as_echo "$ac_ct_NMEDIT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_NMEDIT" = x; then NMEDIT=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac NMEDIT=$ac_ct_NMEDIT fi else NMEDIT="$ac_cv_prog_NMEDIT" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. set dummy ${ac_tool_prefix}lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_LIPO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$LIPO"; then ac_cv_prog_LIPO="$LIPO" # 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_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_LIPO="${ac_tool_prefix}lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi LIPO=$ac_cv_prog_LIPO if test -n "$LIPO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 $as_echo "$LIPO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_LIPO"; then ac_ct_LIPO=$LIPO # Extract the first word of "lipo", so it can be a program name with args. set dummy lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_LIPO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_LIPO"; then ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # 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_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_LIPO="lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO if test -n "$ac_ct_LIPO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 $as_echo "$ac_ct_LIPO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_LIPO" = x; then LIPO=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac LIPO=$ac_ct_LIPO fi else LIPO="$ac_cv_prog_LIPO" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. set dummy ${ac_tool_prefix}otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL"; then ac_cv_prog_OTOOL="$OTOOL" # 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_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL="${ac_tool_prefix}otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OTOOL=$ac_cv_prog_OTOOL if test -n "$OTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 $as_echo "$OTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL"; then ac_ct_OTOOL=$OTOOL # Extract the first word of "otool", so it can be a program name with args. set dummy otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL"; then ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # 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_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL="otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL if test -n "$ac_ct_OTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 $as_echo "$ac_ct_OTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL" = x; then OTOOL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL=$ac_ct_OTOOL fi else OTOOL="$ac_cv_prog_OTOOL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. set dummy ${ac_tool_prefix}otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OTOOL64+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL64"; then ac_cv_prog_OTOOL64="$OTOOL64" # 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_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OTOOL64=$ac_cv_prog_OTOOL64 if test -n "$OTOOL64"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 $as_echo "$OTOOL64" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL64"; then ac_ct_OTOOL64=$OTOOL64 # Extract the first word of "otool64", so it can be a program name with args. set dummy otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL64"; then ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # 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_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL64="otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 if test -n "$ac_ct_OTOOL64"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 $as_echo "$ac_ct_OTOOL64" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL64" = x; then OTOOL64=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL64=$ac_ct_OTOOL64 fi else OTOOL64="$ac_cv_prog_OTOOL64" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 $as_echo_n "checking for -single_module linker flag... " >&6; } if ${lt_cv_apple_cc_single_mod+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_apple_cc_single_mod=no if test -z "${LT_MULTI_MODULE}"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&5 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? # If there is a non-empty error log, and "single_module" # appears in it, assume the flag caused a linker warning if test -s conftest.err && $GREP single_module conftest.err; then cat conftest.err >&5 # Otherwise, if the output was created with a 0 exit code from # the compiler, it worked. elif test -f libconftest.dylib && test $_lt_result -eq 0; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&5 fi rm -rf libconftest.dylib* rm -f conftest.* fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 $as_echo "$lt_cv_apple_cc_single_mod" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } if ${lt_cv_ld_exported_symbols_list+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_ld_exported_symbols_list=yes else lt_cv_ld_exported_symbols_list=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 $as_echo "$lt_cv_ld_exported_symbols_list" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 $as_echo_n "checking for -force_load linker flag... " >&6; } if ${lt_cv_ld_force_load+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_force_load=no cat > conftest.c << _LT_EOF int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 echo "$AR cru libconftest.a conftest.o" >&5 $AR cru libconftest.a conftest.o 2>&5 echo "$RANLIB libconftest.a" >&5 $RANLIB libconftest.a 2>&5 cat > conftest.c << _LT_EOF int main() { return 0;} _LT_EOF echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? if test -s conftest.err && $GREP force_load conftest.err; then cat conftest.err >&5 elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then lt_cv_ld_force_load=yes else cat conftest.err >&5 fi rm -f conftest.err libconftest.a conftest conftest.c rm -rf conftest.dSYM fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 $as_echo "$lt_cv_ld_force_load" >&6; } case $host_os in rhapsody* | darwin1.[012]) _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[91]*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 10.[012]*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test "$lt_cv_apple_cc_single_mod" = "yes"; then _lt_dar_single_mod='$single_module' fi if test "$lt_cv_ld_exported_symbols_list" = "yes"; then _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' fi if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac # 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=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in dlfcn.h do : ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default " if test "x$ac_cv_header_dlfcn_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_DLFCN_H 1 _ACEOF fi done func_stripname_cnf () { case ${2} in .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; esac } # func_stripname_cnf # Set options enable_dlopen=no enable_win32_dll=no # Check whether --enable-shared was given. if test "${enable_shared+set}" = set; then : enableval=$enable_shared; p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac else enable_shared=yes fi # Check whether --enable-static was given. if test "${enable_static+set}" = set; then : enableval=$enable_static; p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac else enable_static=yes fi # Check whether --with-pic was given. if test "${with_pic+set}" = set; then : withval=$with_pic; lt_p=${PACKAGE-default} case $withval in yes|no) pic_mode=$withval ;; *) pic_mode=default # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for lt_pkg in $withval; do IFS="$lt_save_ifs" if test "X$lt_pkg" = "X$lt_p"; then pic_mode=yes fi done IFS="$lt_save_ifs" ;; esac else pic_mode=default fi test -z "$pic_mode" && pic_mode=default # Check whether --enable-fast-install was given. if test "${enable_fast_install+set}" = set; then : enableval=$enable_fast_install; p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac else enable_fast_install=yes fi # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ltmain" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' test -z "$LN_S" && LN_S="ln -s" if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 $as_echo_n "checking for objdir... " >&6; } if ${lt_cv_objdir+:} false; then : $as_echo_n "(cached) " >&6 else rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 $as_echo "$lt_cv_objdir" >&6; } objdir=$lt_cv_objdir cat >>confdefs.h <<_ACEOF #define LT_OBJDIR "$lt_cv_objdir/" _ACEOF case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Global variables: ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a with_gnu_ld="$lt_cv_prog_gnu_ld" old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } if ${lt_cv_path_MAGIC_CMD+:} false; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/${ac_tool_prefix}file; then lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 $as_echo_n "checking for file... " >&6; } if ${lt_cv_path_MAGIC_CMD+:} false; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/file; then lt_cv_path_MAGIC_CMD="$ac_dir/file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi else MAGIC_CMD=: fi fi fi ;; esac # Use C for the default configuration in the libtool script lt_save_CC="$CC" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o objext=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then lt_prog_compiler_no_builtin_flag= if test "$GCC" = yes; then case $cc_basename in nvcc*) lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;; *) lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-fno-rtti -fno-exceptions" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_rtti_exceptions=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" else : fi fi lt_prog_compiler_wl= lt_prog_compiler_pic= lt_prog_compiler_static= if test "$GCC" = yes; then lt_prog_compiler_wl='-Wl,' lt_prog_compiler_static='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support lt_prog_compiler_pic='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic='-fno-common' ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. lt_prog_compiler_static= ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) lt_prog_compiler_pic='-fPIC' ;; esac ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic=-Kconform_pic fi ;; *) lt_prog_compiler_pic='-fPIC' ;; esac case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 lt_prog_compiler_wl='-Xlinker ' if test -n "$lt_prog_compiler_pic"; then lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic" fi ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' else lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' fi ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic='-DDLL_EXPORT' ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static='-non_shared' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in # old Intel for x86_64 which still supported -KPIC. ecc*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; # Lahey Fortran 8.1. lf95*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='--shared' lt_prog_compiler_static='--static' ;; nagfor*) # NAG Fortran compiler lt_prog_compiler_wl='-Wl,-Wl,,' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; ccc*) lt_prog_compiler_wl='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static='-non_shared' ;; xl* | bgxl* | bgf* | mpixl*) # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-qpic' lt_prog_compiler_static='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*) # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='' ;; *Sun\ F* | *Sun*Fortran*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Qoption ld ' ;; *Sun\ C*) # Sun C 5.9 lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Wl,' ;; *Intel*\ [CF]*Compiler*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; *Portland\ Group*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; esac ;; esac ;; newsos6) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static='-non_shared' ;; rdos*) lt_prog_compiler_static='-non_shared' ;; solaris*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' case $cc_basename in f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) lt_prog_compiler_wl='-Qoption ld ';; *) lt_prog_compiler_wl='-Wl,';; esac ;; sunos4*) lt_prog_compiler_wl='-Qoption ld ' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then lt_prog_compiler_pic='-Kconform_pic' lt_prog_compiler_static='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; unicos*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_can_build_shared=no ;; uts4*) lt_prog_compiler_pic='-pic' lt_prog_compiler_static='-Bstatic' ;; *) lt_prog_compiler_can_build_shared=no ;; esac fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic= ;; *) lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 $as_echo_n "checking for $compiler option to produce PIC... " >&6; } if ${lt_cv_prog_compiler_pic+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic=$lt_prog_compiler_pic fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 $as_echo "$lt_cv_prog_compiler_pic" >&6; } lt_prog_compiler_pic=$lt_cv_prog_compiler_pic # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } if ${lt_cv_prog_compiler_pic_works+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic -DPIC" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 $as_echo "$lt_cv_prog_compiler_pic_works" >&6; } if test x"$lt_cv_prog_compiler_pic_works" = xyes; then case $lt_prog_compiler_pic in "" | " "*) ;; *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; esac else lt_prog_compiler_pic= lt_prog_compiler_can_build_shared=no fi fi # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } if ${lt_cv_prog_compiler_static_works+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works=yes fi else lt_cv_prog_compiler_static_works=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 $as_echo "$lt_cv_prog_compiler_static_works" >&6; } if test x"$lt_cv_prog_compiler_static_works" = xyes; then : else lt_prog_compiler_static= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test "$hard_links" = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 $as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } runpath_var= allow_undefined_flag= always_export_symbols=no archive_cmds= archive_expsym_cmds= compiler_needs_object=no enable_shared_with_static_runtimes=no export_dynamic_flag_spec= export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' hardcode_automatic=no hardcode_direct=no hardcode_direct_absolute=no hardcode_libdir_flag_spec= hardcode_libdir_separator= hardcode_minus_L=no hardcode_shlibpath_var=unsupported inherit_rpath=no link_all_deplibs=unknown module_cmds= module_expsym_cmds= old_archive_from_new_cmds= old_archive_from_expsyms_cmds= thread_safe_flag_spec= whole_archive_flag_spec= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; esac ld_shlibs=yes # On some targets, GNU ld is compatible enough with the native linker # that we're better off using the native interface for both. lt_use_gnu_ld_interface=no if test "$with_gnu_ld" = yes; then case $host_os in aix*) # The AIX port of GNU ld has always aspired to compatibility # with the native linker. However, as the warning in the GNU ld # block says, versions before 2.19.5* couldn't really create working # shared libraries, regardless of the interface used. case `$LD -v 2>&1` in *\ \(GNU\ Binutils\)\ 2.19.5*) ;; *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;; *\ \(GNU\ Binutils\)\ [3-9]*) ;; *) lt_use_gnu_ld_interface=yes ;; esac ;; *) lt_use_gnu_ld_interface=yes ;; esac fi if test "$lt_use_gnu_ld_interface" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' export_dynamic_flag_spec='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec= fi supports_anon_versioning=no case `$LD -v 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[3-9]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.19, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to install binutils *** 2.20 or above, or modify your PATH so that a non-GNU linker is found. *** You will then need to restart the configuration process. _LT_EOF fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then allow_undefined_flag=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' export_dynamic_flag_spec='${wl}--export-all-symbols' allow_undefined_flag=unsupported always_export_symbols=no enable_shared_with_static_runtimes=yes export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs=no fi ;; haiku*) archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' link_all_deplibs=yes ;; interix[3-9]*) hardcode_direct=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test "$host_os" = linux-dietlibc; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test "$tmp_diet" = no then tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group f77 and f90 compilers whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 whole_archive_flag_spec= tmp_sharedflag='--shared' ;; xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; nvcc*) # Cuda Compiler Driver 2.2 whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' compiler_needs_object=yes ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' compiler_needs_object=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi case $cc_basename in xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else ld_shlibs=no fi ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac ;; sunos4*) archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct=yes hardcode_shlibpath_var=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac if test "$ld_shlibs" = no; then runpath_var= hardcode_libdir_flag_spec= export_dynamic_flag_spec= whole_archive_flag_spec= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag=unsupported always_export_symbols=yes archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported fi ;; aix[4-9]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm # Also, AIX nm treats weak defined symbols like other global # defined symbols, whereas GNU nm marks them as "W". if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds='' hardcode_direct=yes hardcode_direct_absolute=yes hardcode_libdir_separator=':' link_all_deplibs=yes file_list_spec='${wl}-f,' if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L=yes hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi export_dynamic_flag_spec='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag='-berok' # Determine the default libpath from the value encoded in an # empty executable. if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath_+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_="/usr/lib:/lib" fi fi aix_libpath=$lt_cv_aix_libpath_ fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag="-z nodefs" archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath_+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_="/usr/lib:/lib" fi fi aix_libpath=$lt_cv_aix_libpath_ fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag=' ${wl}-bernotok' allow_undefined_flag=' ${wl}-berok' if test "$with_gnu_ld" = yes; then # We only use this code for GNU lds that support --whole-archive. whole_archive_flag_spec='${wl}--whole-archive$convenience ${wl}--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec='$convenience' fi archive_cmds_need_lc=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; bsdi[45]*) export_dynamic_flag_spec=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. case $cc_basename in cl*) # Native MSVC hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported always_export_symbols=yes file_list_spec='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; else sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, )='true' enable_shared_with_static_runtimes=yes exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' # Don't use ranlib old_postinstall_cmds='chmod 644 $oldlib' postlink_cmds='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile="$lt_outputfile.exe" lt_tool_outputfile="$lt_tool_outputfile.exe" ;; esac~ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # Assume MSVC wrapper hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_from_new_cmds='true' # FIXME: Should let the user specify the lib program. old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' enable_shared_with_static_runtimes=yes ;; esac ;; darwin* | rhapsody*) archive_cmds_need_lc=no hardcode_direct=no hardcode_automatic=yes hardcode_shlibpath_var=unsupported if test "$lt_cv_ld_force_load" = "yes"; then whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' else whole_archive_flag_spec='' fi link_all_deplibs=yes allow_undefined_flag="$_lt_dar_allow_undefined" case $cc_basename in ifort*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then output_verbose_link_cmd=func_echo_all archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" else ld_shlibs=no fi ;; dgux*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2.*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; hpux9*) if test "$GCC" = yes; then archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes export_dynamic_flag_spec='${wl}-E' ;; hpux10*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes hardcode_direct_absolute=yes export_dynamic_flag_spec='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes fi ;; hpux11*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) # Older versions of the 11.00 compiler do not understand -b yet # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 $as_echo_n "checking if $CC understands -b... " >&6; } if ${lt_cv_prog_compiler__b+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler__b=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -b" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler__b=yes fi else lt_cv_prog_compiler__b=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 $as_echo "$lt_cv_prog_compiler__b" >&6; } if test x"$lt_cv_prog_compiler__b" = xyes; then archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi ;; esac fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: case $host_cpu in hppa*64*|ia64*) hardcode_direct=no hardcode_shlibpath_var=no ;; *) hardcode_direct=yes hardcode_direct_absolute=yes export_dynamic_flag_spec='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. # This should be the same for all languages, so no per-tag cache variable. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 $as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } if ${lt_cv_irix_exported_symbol+:} false; then : $as_echo_n "(cached) " >&6 else save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int foo (void) { return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_irix_exported_symbol=yes else lt_cv_irix_exported_symbol=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 $as_echo "$lt_cv_irix_exported_symbol" >&6; } if test "$lt_cv_irix_exported_symbol" = yes; then archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' fi else archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: inherit_rpath=yes link_all_deplibs=yes ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; newsos6) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: hardcode_shlibpath_var=no ;; *nto* | *qnx*) ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct=yes hardcode_shlibpath_var=no hardcode_direct_absolute=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' else case $host_os in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-R$libdir' ;; *) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; esac fi else ld_shlibs=no fi ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' fi archive_cmds_need_lc='no' hardcode_libdir_separator=: ;; solaris*) no_undefined_flag=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) wlarc='${wl}' archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi hardcode_libdir_flag_spec='-R$libdir' hardcode_shlibpath_var=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else whole_archive_flag_spec='-z allextract$convenience -z defaultextract' fi ;; esac link_all_deplibs=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; sysv4) case $host_vendor in sni) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds='$CC -r -o $output$reload_objs' hardcode_direct=no ;; motorola) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var=no ;; sysv4.3*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no export_dynamic_flag_spec='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag='${wl}-z,text' archive_cmds_need_lc=no hardcode_shlibpath_var=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag='${wl}-z,text' allow_undefined_flag='${wl}-z,nodefs' archive_cmds_need_lc=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='${wl}-R,$libdir' hardcode_libdir_separator=':' link_all_deplibs=yes export_dynamic_flag_spec='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; *) ld_shlibs=no ;; esac if test x$host_vendor = xsni; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) export_dynamic_flag_spec='${wl}-Blargedynsym' ;; esac fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 $as_echo "$ld_shlibs" >&6; } test "$ld_shlibs" = no && can_build_shared=no with_gnu_ld=$with_gnu_ld # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc" in x|xyes) # Assume -lc should be added archive_cmds_need_lc=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } if ${lt_cv_archive_cmds_need_lc+:} false; then : $as_echo_n "(cached) " >&6 else $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl pic_flag=$lt_prog_compiler_pic compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag allow_undefined_flag= if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then lt_cv_archive_cmds_need_lc=no else lt_cv_archive_cmds_need_lc=yes fi allow_undefined_flag=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 $as_echo "$lt_cv_archive_cmds_need_lc" >&6; } archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc ;; esac fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } if test "$GCC" = yes; then case $host_os in darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; *) lt_awk_arg="/^libraries:/" ;; esac case $host_os in mingw* | cegcc*) lt_sed_strip_eq="s,=\([A-Za-z]:\),\1,g" ;; *) lt_sed_strip_eq="s,=/,/,g" ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` case $lt_search_path_spec in *\;*) # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` ;; *) lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` ;; esac # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary. lt_tmp_lt_search_path_spec= lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path/$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" else test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' BEGIN {RS=" "; FS="/|\n";} { lt_foo=""; lt_count=0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo="/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[lt_foo]++; } if (lt_freq[lt_foo] == 1) { print lt_foo; } }'` # AWK program above erroneously prepends '/' to C:/dos/paths # for these hosts. case $host_os in mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ $SED 's,/\([A-Za-z]:\),\1,g'` ;; esac sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[4-9]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux # correct to gnu/linux during the next big refactor need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$cc_basename in yes,*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac dynamic_linker='Win32 ld.exe' ;; *,cl*) # Native MSVC libname_spec='$name' soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' library_names_spec='${libname}.dll.lib' case $build_os in mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' for lt_path in $LIB do IFS=$lt_save_ifs # Let DOS variable expansion print the short 8.3 style file name. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" done IFS=$lt_save_ifs # Convert to MSYS style. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form # but this time dos style (no spaces!) so that the unix form looks # like /cygdrive/c/PROGRA~1:/cygdr... sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) sys_lib_search_path_spec="$LIB" if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # FIXME: find the short name or the path components, as spaces are # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes dynamic_linker='Win32 link.exe' ;; *) # Assume MSVC wrapper library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[23].*) objformat=aout ;; *) objformat=elf ;; esac fi # Handle Gentoo/FreeBSD as it was Linux case $host_vendor in gentoo) version_type=linux ;; *) version_type=freebsd-$objformat ;; esac case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; linux) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' need_lib_prefix=no need_version=no ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; haiku*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=yes sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' # or fails outright, so override atomically: install_override_mode=555 ;; interix[3-9]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH if ${lt_cv_shlibpath_overrides_runpath+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : lt_cv_shlibpath_overrides_runpath=yes fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS libdir=$save_libdir fi shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action= if test -n "$hardcode_libdir_flag_spec" || test -n "$runpath_var" || test "X$hardcode_automatic" = "Xyes" ; then # We can hardcode non-existent directories. if test "$hardcode_direct" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no && test "$hardcode_minus_L" != no; then # Linking always hardcodes the temporary library directory. hardcode_action=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action=unsupported fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 $as_echo "$hardcode_action" >&6; } if test "$hardcode_action" = relink || test "$inherit_rpath" = yes; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes fi ;; *) ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" if test "x$ac_cv_func_shl_load" = xyes; then : lt_cv_dlopen="shl_load" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 $as_echo_n "checking for shl_load in -ldld... " >&6; } if ${ac_cv_lib_dld_shl_load+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char shl_load (); int main () { return shl_load (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_shl_load=yes else ac_cv_lib_dld_shl_load=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 $as_echo "$ac_cv_lib_dld_shl_load" >&6; } if test "x$ac_cv_lib_dld_shl_load" = xyes; then : lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" else ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" if test "x$ac_cv_func_dlopen" = xyes; then : lt_cv_dlopen="dlopen" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 $as_echo_n "checking for dlopen in -lsvld... " >&6; } if ${ac_cv_lib_svld_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_svld_dlopen=yes else ac_cv_lib_svld_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 $as_echo "$ac_cv_lib_svld_dlopen" >&6; } if test "x$ac_cv_lib_svld_dlopen" = xyes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 $as_echo_n "checking for dld_link in -ldld... " >&6; } if ${ac_cv_lib_dld_dld_link+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dld_link (); int main () { return dld_link (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_dld_link=yes else ac_cv_lib_dld_dld_link=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 $as_echo "$ac_cv_lib_dld_dld_link" >&6; } if test "x$ac_cv_lib_dld_dld_link" = xyes; then : lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" fi fi fi fi fi fi ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 $as_echo_n "checking whether a program can dlopen itself... " >&6; } if ${lt_cv_dlopen_self+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisbility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; esac else : # compilation failed lt_cv_dlopen_self=no fi fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 $as_echo "$lt_cv_dlopen_self" >&6; } if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } if ${lt_cv_dlopen_self_static+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self_static=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisbility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; esac else : # compilation failed lt_cv_dlopen_self_static=no fi fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 $as_echo "$lt_cv_dlopen_self_static" >&6; } fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi striplib= old_striplib= { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 $as_echo_n "checking whether stripping libraries is possible... " >&6; } if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" old_striplib="$STRIP -S" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ;; esac fi # Report which library types will actually be built { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 $as_echo_n "checking if libtool supports shared libraries... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 $as_echo "$can_build_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 $as_echo_n "checking whether to build shared libraries... " >&6; } test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[4-9]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 $as_echo "$enable_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 $as_echo_n "checking whether to build static libraries... " >&6; } # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 $as_echo "$enable_static" >&6; } fi ac_ext=cpp 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 CC="$lt_save_CC" if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then ac_ext=cpp 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5 $as_echo_n "checking how to run the C++ preprocessor... " >&6; } if test -z "$CXXCPP"; then if ${ac_cv_prog_CXXCPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CXXCPP needs to be expanded for CXXCPP in "$CXX -E" "/lib/cpp" do ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CXXCPP=$CXXCPP fi CXXCPP=$ac_cv_prog_CXXCPP else ac_cv_prog_CXXCPP=$CXXCPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5 $as_echo "$CXXCPP" >&6; } ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=cpp 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 else _lt_caught_CXX_error=yes fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu archive_cmds_need_lc_CXX=no allow_undefined_flag_CXX= always_export_symbols_CXX=no archive_expsym_cmds_CXX= compiler_needs_object_CXX=no export_dynamic_flag_spec_CXX= hardcode_direct_CXX=no hardcode_direct_absolute_CXX=no hardcode_libdir_flag_spec_CXX= hardcode_libdir_separator_CXX= hardcode_minus_L_CXX=no hardcode_shlibpath_var_CXX=unsupported hardcode_automatic_CXX=no inherit_rpath_CXX=no module_cmds_CXX= module_expsym_cmds_CXX= link_all_deplibs_CXX=unknown old_archive_cmds_CXX=$old_archive_cmds reload_flag_CXX=$reload_flag reload_cmds_CXX=$reload_cmds no_undefined_flag_CXX= whole_archive_flag_spec_CXX= enable_shared_with_static_runtimes_CXX=no # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o objext_CXX=$objext # No sense in running all these tests if we already determined that # the CXX compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_caught_CXX_error" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[]) { return(0); }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else $as_unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} CFLAGS=$CXXFLAGS compiler=$CC compiler_CXX=$CC for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` if test -n "$compiler"; then # We don't want -fno-exception when compiling C++ code, so set the # no_builtin_flag separately if test "$GXX" = yes; then lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin' else lt_prog_compiler_no_builtin_flag_CXX= fi if test "$GXX" = yes; then # Set up default GNU C++ configuration # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then : withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi if ${lt_cv_path_LD+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 $as_echo "$LD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if ${lt_cv_prog_gnu_ld+:} false; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 $as_echo "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test "$with_gnu_ld" = yes; then archive_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='${wl}' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | $GREP 'no-whole-archive' > /dev/null; then whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec_CXX= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } ld_shlibs_CXX=yes case $host_os in aix3*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aix[4-9]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds_CXX='' hardcode_direct_CXX=yes hardcode_direct_absolute_CXX=yes hardcode_libdir_separator_CXX=':' link_all_deplibs_CXX=yes file_list_spec_CXX='${wl}-f,' if test "$GXX" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct_CXX=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L_CXX=yes hardcode_libdir_flag_spec_CXX='-L$libdir' hardcode_libdir_separator_CXX= fi esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi export_dynamic_flag_spec_CXX='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to # export. always_export_symbols_CXX=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag_CXX='-berok' # Determine the default libpath from the value encoded in an empty # executable. if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath__CXX+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath__CXX"; then lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath__CXX"; then lt_cv_aix_libpath__CXX="/usr/lib:/lib" fi fi aix_libpath=$lt_cv_aix_libpath__CXX fi hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag_CXX="-z nodefs" archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath__CXX+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath__CXX"; then lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath__CXX"; then lt_cv_aix_libpath__CXX="/usr/lib:/lib" fi fi aix_libpath=$lt_cv_aix_libpath__CXX fi hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag_CXX=' ${wl}-bernotok' allow_undefined_flag_CXX=' ${wl}-berok' if test "$with_gnu_ld" = yes; then # We only use this code for GNU lds that support --whole-archive. whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec_CXX='$convenience' fi archive_cmds_need_lc_CXX=yes # This is similar to how AIX traditionally builds its shared # libraries. archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then allow_undefined_flag_CXX=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs_CXX=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; cygwin* | mingw* | pw32* | cegcc*) case $GXX,$cc_basename in ,cl* | no,cl*) # Native MSVC # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec_CXX=' ' allow_undefined_flag_CXX=unsupported always_export_symbols_CXX=yes file_list_spec_CXX='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; else $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, CXX)='true' enable_shared_with_static_runtimes_CXX=yes # Don't use ranlib old_postinstall_cmds_CXX='chmod 644 $oldlib' postlink_cmds_CXX='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile="$lt_outputfile.exe" lt_tool_outputfile="$lt_tool_outputfile.exe" ;; esac~ func_to_tool_file "$lt_outputfile"~ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # g++ # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec_CXX='-L$libdir' export_dynamic_flag_spec_CXX='${wl}--export-all-symbols' allow_undefined_flag_CXX=unsupported always_export_symbols_CXX=no enable_shared_with_static_runtimes_CXX=yes if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs_CXX=no fi ;; esac ;; darwin* | rhapsody*) archive_cmds_need_lc_CXX=no hardcode_direct_CXX=no hardcode_automatic_CXX=yes hardcode_shlibpath_var_CXX=unsupported if test "$lt_cv_ld_force_load" = "yes"; then whole_archive_flag_spec_CXX='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' else whole_archive_flag_spec_CXX='' fi link_all_deplibs_CXX=yes allow_undefined_flag_CXX="$_lt_dar_allow_undefined" case $cc_basename in ifort*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then output_verbose_link_cmd=func_echo_all archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" module_expsym_cmds_CXX="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" if test "$lt_cv_apple_cc_single_mod" != "yes"; then archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" fi else ld_shlibs_CXX=no fi ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; freebsd2.*) # C++ shared libraries reported to be fairly broken before # switch to ELF ld_shlibs_CXX=no ;; freebsd-elf*) archive_cmds_need_lc_CXX=no ;; freebsd* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions ld_shlibs_CXX=yes ;; gnu*) ;; haiku*) archive_cmds_CXX='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' link_all_deplibs_CXX=yes ;; hpux9*) hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' hardcode_libdir_separator_CXX=: export_dynamic_flag_spec_CXX='${wl}-E' hardcode_direct_CXX=yes hardcode_minus_L_CXX=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aCC*) archive_cmds_CXX='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes; then archive_cmds_CXX='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; hpux10*|hpux11*) if test $with_gnu_ld = no; then hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' hardcode_libdir_separator_CXX=: case $host_cpu in hppa*64*|ia64*) ;; *) export_dynamic_flag_spec_CXX='${wl}-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) hardcode_direct_CXX=no hardcode_shlibpath_var_CXX=no ;; *) hardcode_direct_CXX=yes hardcode_direct_absolute_CXX=yes hardcode_minus_L_CXX=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aCC*) case $host_cpu in hppa*64*) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then case $host_cpu in hppa*64*) archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) archive_cmds_CXX='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) archive_cmds_CXX='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; interix[3-9]*) hardcode_direct_CXX=no hardcode_shlibpath_var_CXX=no hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds_CXX='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib' fi fi link_all_deplibs_CXX=yes ;; esac hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: inherit_rpath_CXX=yes ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc* | ecpc* ) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; esac archive_cmds_need_lc_CXX=no hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; pgCC* | pgcpp*) # Portland Group C++ compiler case `$CC -V` in *pgCC\ [1-5].* | *pgcpp\ [1-5].*) prelink_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' old_archive_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ $RANLIB $oldlib' archive_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' archive_expsym_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; *) # Version 6 and above use weak symbols archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; esac hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' ;; cxx*) # Compaq C++ archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec_CXX='-rpath $libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' ;; xl* | mpixl* | bgxl*) # IBM XL 8.0 on PPC, with GNU ld hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' archive_cmds_CXX='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds_CXX='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 no_undefined_flag_CXX=' -zdefs' archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' archive_expsym_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' hardcode_libdir_flag_spec_CXX='-R$libdir' whole_archive_flag_spec_CXX='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' compiler_needs_object_CXX=yes # Not sure whether something based on # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 # would be better. output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' ;; esac ;; esac ;; lynxos*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; m88k*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= hardcode_libdir_flag_spec_CXX='-R$libdir' hardcode_direct_CXX=yes hardcode_shlibpath_var_CXX=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; *nto* | *qnx*) ld_shlibs_CXX=yes ;; openbsd2*) # C++ shared libraries are fairly broken ld_shlibs_CXX=no ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct_CXX=yes hardcode_shlibpath_var_CXX=no hardcode_direct_absolute_CXX=yes archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' export_dynamic_flag_spec_CXX='${wl}-E' whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' fi output_verbose_link_cmd=func_echo_all else ld_shlibs_CXX=no fi ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' hardcode_libdir_separator_CXX=: # Archives containing C++ object files must be created using # the KAI C++ compiler. case $host in osf3*) old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; *) old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;; esac ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; cxx*) case $host in osf3*) allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' ;; *) allow_undefined_flag_CXX=' -expect_unresolved \*' archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~ $RM $lib.exp' hardcode_libdir_flag_spec_CXX='-rpath $libdir' ;; esac hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' case $host in osf3*) archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; *) archive_cmds_CXX='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; esac hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ archive_cmds_need_lc_CXX=yes no_undefined_flag_CXX=' -zdefs' archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' hardcode_libdir_flag_spec_CXX='-R$libdir' hardcode_shlibpath_var_CXX=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract' ;; esac link_all_deplibs_CXX=yes output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test "$GXX" = yes && test "$with_gnu_ld" = no; then no_undefined_flag_CXX=' ${wl}-z ${wl}defs' if $CC --version | $GREP -v '^2\.7' > /dev/null; then archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # g++ 2.7 appears to require `-G' NOT `-shared' on this # platform. archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' fi hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir' case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;; esac fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag_CXX='${wl}-z,text' archive_cmds_need_lc_CXX=no hardcode_shlibpath_var_CXX=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag_CXX='${wl}-z,text' allow_undefined_flag_CXX='${wl}-z,nodefs' archive_cmds_need_lc_CXX=no hardcode_shlibpath_var_CXX=no hardcode_libdir_flag_spec_CXX='${wl}-R,$libdir' hardcode_libdir_separator_CXX=':' link_all_deplibs_CXX=yes export_dynamic_flag_spec_CXX='${wl}-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' old_archive_cmds_CXX='$CC -Tprelink_objects $oldobjs~ '"$old_archive_cmds_CXX" reload_cmds_CXX='$CC -Tprelink_objects $reload_objs~ '"$reload_cmds_CXX" ;; *) archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 $as_echo "$ld_shlibs_CXX" >&6; } test "$ld_shlibs_CXX" = no && can_build_shared=no GCC_CXX="$GXX" LD_CXX="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... # Dependencies to place before and after the object being linked: predep_objects_CXX= postdep_objects_CXX= predeps_CXX= postdeps_CXX= compiler_lib_search_path_CXX= cat > conftest.$ac_ext <<_LT_EOF class Foo { public: Foo (void) { a = 0; } private: int a; }; _LT_EOF _lt_libdeps_save_CFLAGS=$CFLAGS case "$CC $CFLAGS " in #( *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; esac if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then # Parse the compiler output and extract the necessary # objects, libraries and library flags. # Sentinel used to keep track of whether or not we are before # the conftest object file. pre_test_object_deps_done=no for p in `eval "$output_verbose_link_cmd"`; do case ${prev}${p} in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. # Remove the space. if test $p = "-L" || test $p = "-R"; then prev=$p continue fi # Expand the sysroot to ease extracting the directories later. if test -z "$prev"; then case $p in -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; esac fi case $p in =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; esac if test "$pre_test_object_deps_done" = no; then case ${prev} in -L | -R) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. if test -z "$compiler_lib_search_path_CXX"; then compiler_lib_search_path_CXX="${prev}${p}" else compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}" fi ;; # The "-l" case would never come before the object being # linked, so don't bother handling this case. esac else if test -z "$postdeps_CXX"; then postdeps_CXX="${prev}${p}" else postdeps_CXX="${postdeps_CXX} ${prev}${p}" fi fi prev= ;; *.lto.$objext) ;; # Ignore GCC LTO objects *.$objext) # This assumes that the test object file only shows up # once in the compiler output. if test "$p" = "conftest.$objext"; then pre_test_object_deps_done=yes continue fi if test "$pre_test_object_deps_done" = no; then if test -z "$predep_objects_CXX"; then predep_objects_CXX="$p" else predep_objects_CXX="$predep_objects_CXX $p" fi else if test -z "$postdep_objects_CXX"; then postdep_objects_CXX="$p" else postdep_objects_CXX="$postdep_objects_CXX $p" fi fi ;; *) ;; # Ignore the rest. esac done # Clean up. rm -f a.out a.exe else echo "libtool.m4: error: problem compiling CXX test program" fi $RM -f confest.$objext CFLAGS=$_lt_libdeps_save_CFLAGS # PORTME: override above test on systems where it is broken case $host_os in interix[3-9]*) # Interix 3.5 installs completely hosed .la files for C++, so rather than # hack all around it, let's just trust "g++" to DTRT. predep_objects_CXX= postdep_objects_CXX= postdeps_CXX= ;; linux*) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac if test "$solaris_use_stlport4" != yes; then postdeps_CXX='-library=Cstd -library=Crun' fi ;; esac ;; solaris*) case $cc_basename in CC* | sunCC*) # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac # Adding this requires a known-good setup of shared libraries for # Sun compiler versions before 5.6, else PIC objects from an old # archive will be linked into the output, leading to subtle bugs. if test "$solaris_use_stlport4" != yes; then postdeps_CXX='-library=Cstd -library=Crun' fi ;; esac ;; esac case " $postdeps_CXX " in *" -lc "*) archive_cmds_need_lc_CXX=no ;; esac compiler_lib_search_dirs_CXX= if test -n "${compiler_lib_search_path_CXX}"; then compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` fi lt_prog_compiler_wl_CXX= lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX= # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_CXX='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support lt_prog_compiler_pic_CXX='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic_CXX='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic_CXX='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all lt_prog_compiler_pic_CXX= ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. lt_prog_compiler_static_CXX= ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic_CXX=-Kconform_pic fi ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) ;; *) lt_prog_compiler_pic_CXX='-fPIC' ;; esac ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic_CXX='-fPIC -shared' ;; *) lt_prog_compiler_pic_CXX='-fPIC' ;; esac else case $host_os in aix[4-9]*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_CXX='-Bstatic' else lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic_CXX='-DDLL_EXPORT' ;; dgux*) case $cc_basename in ec++*) lt_prog_compiler_pic_CXX='-KPIC' ;; ghcx*) # Green Hills C++ Compiler lt_prog_compiler_pic_CXX='-pic' ;; *) ;; esac ;; freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' if test "$host_cpu" != ia64; then lt_prog_compiler_pic_CXX='+Z' fi ;; aCC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_CXX='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in KCC*) # KAI C++ Compiler lt_prog_compiler_wl_CXX='--backend -Wl,' lt_prog_compiler_pic_CXX='-fPIC' ;; ecpc* ) # old Intel C++ for x86_64 which still supported -KPIC. lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-static' ;; icpc* ) # Intel C++, used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-fPIC' lt_prog_compiler_static_CXX='-static' ;; pgCC* | pgcpp*) # Portland Group C++ compiler lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-fpic' lt_prog_compiler_static_CXX='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX='-non_shared' ;; xlc* | xlC* | bgxl[cC]* | mpixl[cC]*) # IBM XL 8.0, 9.0 on PPC and BlueGene lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-qpic' lt_prog_compiler_static_CXX='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' lt_prog_compiler_wl_CXX='-Qoption ld ' ;; esac ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) lt_prog_compiler_pic_CXX='-W c,exportall' ;; *) ;; esac ;; netbsd*) ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic_CXX='-fPIC -shared' ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) lt_prog_compiler_wl_CXX='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 lt_prog_compiler_pic_CXX='-pic' ;; cxx*) # Digital/Compaq C++ lt_prog_compiler_wl_CXX='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' lt_prog_compiler_wl_CXX='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler lt_prog_compiler_pic_CXX='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x lt_prog_compiler_pic_CXX='-pic' lt_prog_compiler_static_CXX='-Bstatic' ;; lcc*) # Lucid lt_prog_compiler_pic_CXX='-pic' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 lt_prog_compiler_pic_CXX='-KPIC' ;; *) ;; esac ;; vxworks*) ;; *) lt_prog_compiler_can_build_shared_CXX=no ;; esac fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic_CXX= ;; *) lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC" ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 $as_echo_n "checking for $compiler option to produce PIC... " >&6; } if ${lt_cv_prog_compiler_pic_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_CXX=$lt_prog_compiler_pic_CXX fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_CXX" >&5 $as_echo "$lt_cv_prog_compiler_pic_CXX" >&6; } lt_prog_compiler_pic_CXX=$lt_cv_prog_compiler_pic_CXX # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic_CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; } if ${lt_cv_prog_compiler_pic_works_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works_CXX=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works_CXX=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_CXX" >&5 $as_echo "$lt_cv_prog_compiler_pic_works_CXX" >&6; } if test x"$lt_cv_prog_compiler_pic_works_CXX" = xyes; then case $lt_prog_compiler_pic_CXX in "" | " "*) ;; *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;; esac else lt_prog_compiler_pic_CXX= lt_prog_compiler_can_build_shared_CXX=no fi fi # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } if ${lt_cv_prog_compiler_static_works_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works_CXX=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works_CXX=yes fi else lt_cv_prog_compiler_static_works_CXX=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_CXX" >&5 $as_echo "$lt_cv_prog_compiler_static_works_CXX" >&6; } if test x"$lt_cv_prog_compiler_static_works_CXX" = xyes; then : else lt_prog_compiler_static_CXX= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o_CXX=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_CXX=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5 $as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o_CXX=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_CXX=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5 $as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test "$hard_links" = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 $as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' case $host_os in aix[4-9]*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm # Also, AIX nm treats weak defined symbols like other global defined # symbols, whereas GNU nm marks them as "W". if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) export_symbols_cmds_CXX="$ltdll_cmds" ;; cygwin* | mingw* | cegcc*) case $cc_basename in cl*) exclude_expsyms_CXX='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' ;; *) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' exclude_expsyms_CXX='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' ;; esac ;; *) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 $as_echo "$ld_shlibs_CXX" >&6; } test "$ld_shlibs_CXX" = no && can_build_shared=no with_gnu_ld_CXX=$with_gnu_ld # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc_CXX" in x|xyes) # Assume -lc should be added archive_cmds_need_lc_CXX=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds_CXX in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } if ${lt_cv_archive_cmds_need_lc_CXX+:} false; then : $as_echo_n "(cached) " >&6 else $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl_CXX pic_flag=$lt_prog_compiler_pic_CXX compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag_CXX allow_undefined_flag_CXX= if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then lt_cv_archive_cmds_need_lc_CXX=no else lt_cv_archive_cmds_need_lc_CXX=yes fi allow_undefined_flag_CXX=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc_CXX" >&5 $as_echo "$lt_cv_archive_cmds_need_lc_CXX" >&6; } archive_cmds_need_lc_CXX=$lt_cv_archive_cmds_need_lc_CXX ;; esac fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[4-9]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux # correct to gnu/linux during the next big refactor need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$cc_basename in yes,*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac dynamic_linker='Win32 ld.exe' ;; *,cl*) # Native MSVC libname_spec='$name' soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' library_names_spec='${libname}.dll.lib' case $build_os in mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' for lt_path in $LIB do IFS=$lt_save_ifs # Let DOS variable expansion print the short 8.3 style file name. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" done IFS=$lt_save_ifs # Convert to MSYS style. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form # but this time dos style (no spaces!) so that the unix form looks # like /cygdrive/c/PROGRA~1:/cygdr... sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) sys_lib_search_path_spec="$LIB" if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # FIXME: find the short name or the path components, as spaces are # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes dynamic_linker='Win32 link.exe' ;; *) # Assume MSVC wrapper library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[23].*) objformat=aout ;; *) objformat=elf ;; esac fi # Handle Gentoo/FreeBSD as it was Linux case $host_vendor in gentoo) version_type=linux ;; *) version_type=freebsd-$objformat ;; esac case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; linux) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' need_lib_prefix=no need_version=no ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; haiku*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=yes sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' # or fails outright, so override atomically: install_override_mode=555 ;; interix[3-9]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH if ${lt_cv_shlibpath_overrides_runpath+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_CXX\"; \ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_CXX\"" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : lt_cv_shlibpath_overrides_runpath=yes fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS libdir=$save_libdir fi shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action_CXX= if test -n "$hardcode_libdir_flag_spec_CXX" || test -n "$runpath_var_CXX" || test "X$hardcode_automatic_CXX" = "Xyes" ; then # We can hardcode non-existent directories. if test "$hardcode_direct_CXX" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_TAGVAR(hardcode_shlibpath_var, CXX)" != no && test "$hardcode_minus_L_CXX" != no; then # Linking always hardcodes the temporary library directory. hardcode_action_CXX=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action_CXX=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action_CXX=unsupported fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_CXX" >&5 $as_echo "$hardcode_action_CXX" >&6; } if test "$hardcode_action_CXX" = relink || test "$inherit_rpath_CXX" = yes; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi fi # test -n "$compiler" CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld fi # test "$_lt_caught_CXX_error" != yes ac_ext=cpp 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 ac_config_commands="$ac_config_commands libtool" # Only expand once: # newer libtool... echo "-----------------------------------------------" # Machine characteristics # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of char" >&5 $as_echo_n "checking size of char... " >&6; } if ${ac_cv_sizeof_char+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (char))" "ac_cv_sizeof_char" "$ac_includes_default"; then : else if test "$ac_cv_type_char" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (char) See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_char=0 fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_char" >&5 $as_echo "$ac_cv_sizeof_char" >&6; } cat >>confdefs.h <<_ACEOF #define SIZEOF_CHAR $ac_cv_sizeof_char _ACEOF # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5 $as_echo_n "checking size of short... " >&6; } if ${ac_cv_sizeof_short+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short" "$ac_includes_default"; then : else if test "$ac_cv_type_short" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (short) See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_short=0 fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5 $as_echo "$ac_cv_sizeof_short" >&6; } cat >>confdefs.h <<_ACEOF #define SIZEOF_SHORT $ac_cv_sizeof_short _ACEOF # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5 $as_echo_n "checking size of int... " >&6; } if ${ac_cv_sizeof_int+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then : else if test "$ac_cv_type_int" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (int) See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_int=0 fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5 $as_echo "$ac_cv_sizeof_int" >&6; } cat >>confdefs.h <<_ACEOF #define SIZEOF_INT $ac_cv_sizeof_int _ACEOF # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5 $as_echo_n "checking size of long... " >&6; } if ${ac_cv_sizeof_long+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then : else if test "$ac_cv_type_long" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (long) See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_long=0 fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5 $as_echo "$ac_cv_sizeof_long" >&6; } cat >>confdefs.h <<_ACEOF #define SIZEOF_LONG $ac_cv_sizeof_long _ACEOF # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5 $as_echo_n "checking size of long long... " >&6; } if ${ac_cv_sizeof_long_long+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then : else if test "$ac_cv_type_long_long" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (long long) See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_long_long=0 fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5 $as_echo "$ac_cv_sizeof_long_long" >&6; } cat >>confdefs.h <<_ACEOF #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long _ACEOF # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of __int64" >&5 $as_echo_n "checking size of __int64... " >&6; } if ${ac_cv_sizeof___int64+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (__int64))" "ac_cv_sizeof___int64" "$ac_includes_default"; then : else if test "$ac_cv_type___int64" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (__int64) See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof___int64=0 fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof___int64" >&5 $as_echo "$ac_cv_sizeof___int64" >&6; } cat >>confdefs.h <<_ACEOF #define SIZEOF___INT64 $ac_cv_sizeof___int64 _ACEOF # Checks for header files. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core 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 confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #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)) return 2; return 0; } _ACEOF if ac_fn_cxx_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi for ac_header in float.h limits.h stddef.h stdlib.h string.h sys/time.h stdint.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done # check endianness of the architecture { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 $as_echo_n "checking whether byte ordering is bigendian... " >&6; } if ${ac_cv_c_bigendian+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_c_bigendian=unknown # See if we're dealing with a universal compiler. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __APPLE_CC__ not a universal capable compiler #endif typedef int dummy; _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : # Check for potential -arch flags. It is not universal unless # there are at least two -arch flags with different values. ac_arch= ac_prev= for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do if test -n "$ac_prev"; then case $ac_word in i?86 | x86_64 | ppc | ppc64) if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then ac_arch=$ac_word else ac_cv_c_bigendian=universal break fi ;; esac ac_prev= elif test "x$ac_word" = "x-arch"; then ac_prev=arch fi done fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_c_bigendian = unknown; then # See if sys/param.h defines the BYTE_ORDER macro. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ && LITTLE_ENDIAN) bogus endian macros #endif ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : # It does; now see whether it defined to BIG_ENDIAN or not. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { #if BYTE_ORDER != BIG_ENDIAN not big endian #endif ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_c_bigendian=yes else ac_cv_c_bigendian=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test $ac_cv_c_bigendian = unknown; then # See if defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) bogus endian macros #endif ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : # It does; now see whether it defined to _BIG_ENDIAN or not. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { #ifndef _BIG_ENDIAN not big endian #endif ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_c_bigendian=yes else ac_cv_c_bigendian=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test $ac_cv_c_bigendian = unknown; then # Compile a test program. if test "$cross_compiling" = yes; then : # Try to guess by grepping values from an object file. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; int use_ascii (int i) { return ascii_mm[i] + ascii_ii[i]; } short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; int use_ebcdic (int i) { return ebcdic_mm[i] + ebcdic_ii[i]; } extern int foo; int main () { return use_ascii (foo) == use_ebcdic (foo); ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then ac_cv_c_bigendian=yes fi if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then if test "$ac_cv_c_bigendian" = unknown; then ac_cv_c_bigendian=no else # finding both strings is unlikely to happen, but who knows? ac_cv_c_bigendian=unknown fi fi fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main () { /* Are we little or big endian? From Harbison&Steele. */ union { long int l; char c[sizeof (long int)]; } u; u.l = 1; return u.c[sizeof (long int) - 1] == 1; ; return 0; } _ACEOF if ac_fn_cxx_try_run "$LINENO"; then : ac_cv_c_bigendian=no else ac_cv_c_bigendian=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 $as_echo "$ac_cv_c_bigendian" >&6; } case $ac_cv_c_bigendian in #( yes) $as_echo "#define HAVE_BIG_ENDIAN 1" >>confdefs.h ;; #( no) $as_echo "#define HAVE_LITTLE_ENDIAN 1" >>confdefs.h ;; #( universal) $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h ;; #( *) as_fn_error $? "unknown endianness presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; esac # Create some useful data types of fixed, known lengths # We hereby assume that a character is always one byte # LINBOX_INT8="char"; # case $ac_cv_sizeof_char in # 1) # TWO_BYTES=2; # FOUR_BYTES=4; # EIGHT_BYTES=8; # ;; # 8) # TWO_BYTES=16; # FOUR_BYTES=32; # EIGHT_BYTES=64; # esac # case $TWO_BYTES in # $ac_cv_sizeof_short) # LINBOX_INT16="short"; # ;; # $ac_cv_sizeof_int) # LINBOX_INT16="int"; # ;; # esac # case $FOUR_BYTES in # $ac_cv_sizeof_short) # LINBOX_INT32="short"; # ;; # $ac_cv_sizeof_int) # LINBOX_INT32="int"; # ;; # $ac_cv_sizeof_long) # LINBOX_INT32="long"; # ;; # esac # case $EIGHT_BYTES in # $ac_cv_sizeof_short) # LINBOX_INT64="short"; # ;; # $ac_cv_sizeof_int) # LINBOX_INT64="int"; # ;; # $ac_cv_sizeof_long) # LINBOX_INT64="long"; # ;; # $ac_cv_sizeof_long_long) # LINBOX_INT64="long long"; # ;; # $ac_cv_sizeof___int64) # LINBOX_INT64="__int64"; # ;; # esac # AC_DEFINE_UNQUOTED(INT8, $LINBOX_INT8, Canonical 8-bit data type) # AC_DEFINE_UNQUOTED(INT16, $LINBOX_INT16, Canonical 16-bit data type) # AC_DEFINE_UNQUOTED(INT32, $LINBOX_INT32, Canonical 32-bit data type) # AC_DEFINE_UNQUOTED(INT64, $LINBOX_INT64, Canonical 64-bit data type) echo "-----------------------------------------------" # Feature checks # Check whether --with-default was given. if test "${with_default+set}" = set; then : withval=$with_default; if test "$withval" = yes ; then echo "Default path = /usr /usr/local " DEFAULT_CHECKING_PATH="/usr /usr/local " else echo "Default path = $withval /usr /usr/local " DEFAULT_CHECKING_PATH="$withval /usr /usr/local " fi else echo "Default path = /usr /usr/local " DEFAULT_CHECKING_PATH="/usr /usr/local " fi # Check whether --with-all was given. if test "${with_all+set}" = set; then : withval=$with_all; if test "$withval" = yes ; then check_all="yes" echo "Checking all external packages in ${DEFAULT_CHECKING_PATH}" elif test "$withval" != no ; then check_all="yes" DEFAULT_CHECKING_PATH="$withval ${DEFAULT_CHECKING_PATH}" echo "Checking all external packages in ${DEFAULT_CHECKING_PATH}" fi fi if test -n "$check_all"; then GMP_HOME_PATH="${DEFAULT_CHECKING_PATH}" GIVARO_HOME_PATH="${DEFAULT_CHECKING_PATH}" NTL_HOME_PATH="${DEFAULT_CHECKING_PATH}" IML_HOME_PATH="${DEFAULT_CHECKING_PATH}" FFLAS_FFPACK_HOME_PATH="${DEFAULT_CHECKING_PATH}" LIDIA_HOME_PATH="${DEFAULT_CHECKING_PATH}" SACLIB_HOME_PATH="${DEFAULT_CHECKING_PATH}" MAPLE_HOME_PATH="${DEFAULT_CHECKING_PATH} unknown" BLAS_HOME_PATH="${DEFAULT_CHECKING_PATH}" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to compile the drivers" >&5 $as_echo_n "checking whether to compile the drivers... " >&6; } # Check whether --enable-drivers was given. if test "${enable_drivers+set}" = set; then : enableval=$enable_drivers; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } compile_drivers="yes" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } compile_drivers="no" fi if test "x$compile_drivers" = "xyes"; then LINBOX_COMPILE_DRIVERS_TRUE= LINBOX_COMPILE_DRIVERS_FALSE='#' else LINBOX_COMPILE_DRIVERS_TRUE='#' LINBOX_COMPILE_DRIVERS_FALSE= fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu echo "-----------------------------------------------" # Check whether --with-gmp was given. if test "${with_gmp+set}" = set; then : withval=$with_gmp; if test "$withval" = yes ; then GMP_HOME_PATH="${DEFAULT_CHECKING_PATH}" elif test "$withval" != no ; then GMP_HOME_PATH="$withval ${DEFAULT_CHECKING_PATH}" fi else GMP_HOME_PATH="${DEFAULT_CHECKING_PATH}" fi min_gmp_version=3.1.1 BACKUP_CXXFLAGS=${CXXFLAGS} BACKUP_LIBS=${LIBS} { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GMP >= $min_gmp_version" >&5 $as_echo_n "checking for GMP >= $min_gmp_version... " >&6; } for GMP_HOME in ${GMP_HOME_PATH} do if test -r "$GMP_HOME/include/gmp.h"; then if test "x$GMP_HOME" != "x/usr" -a "x$GMP_HOME" != "x/usr/local"; then GMP_CFLAGS="-I${GMP_HOME}/include" GMP_LIBS="-L${GMP_HOME}/lib -lgmpxx -lgmp" else GMP_CFLAGS= GMP_LIBS="-lgmpxx -lgmp" fi CXXFLAGS="${CXXFLAGS} ${GMP_CFLAGS}" LIBS="${LIBS} ${GMP_LIBS}" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __PATHCC__ #include #include #endif #include "stddef.h" #include int main () { mpz_t a; mpz_init (a); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : if test "$cross_compiling" = yes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5 $as_echo "unknown" >&6; } echo "WARNING: You appear to be cross compiling, so there is no way to determine" echo "whether your GMP version is new enough. I am assuming it is." $as_echo "#define HAVE_GMP 1" >>confdefs.h : break else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __PATHCC__ #include #include #include "stddef.h" #endif #include int main () { if (__GNU_MP_VERSION < 3) return -1; else return 0; } _ACEOF if ac_fn_cxx_try_run "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5 $as_echo "found" >&6; } $as_echo "#define HAVE_GMP 1" >>confdefs.h # See if we are running GMP 4.0 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether GMP is 4.0 or greater" >&5 $as_echo_n "checking whether GMP is 4.0 or greater... " >&6; } if test "$cross_compiling" = yes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __PATHCC__ #include #include #include "stddef.h" #endif #include int main () { if (__GNU_MP_VERSION < 4) return -1; else return 0; } _ACEOF if ac_fn_cxx_try_run "$LINENO"; then : gmp_found="yes" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # See if GMP was compiled with --enable-cxx { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether GMP was compiled with --enable-cxx" >&5 $as_echo_n "checking whether GMP was compiled with --enable-cxx... " >&6; } if test "$cross_compiling" = yes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { mpz_class a(2),b(3),c(5); if ( a+b == c ) return 0; else return -1; } _ACEOF if ac_fn_cxx_try_run "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } GMP_VERSION="" else gmp_found="no" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } $as_echo "#define GMP_VERSION_3 1" >>confdefs.h GMP_VERSION="-DGMP_VERSION_3" fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi : break else gmp_problem="$gmp_problem $GMP_HOME" unset GMP_CFLAGS unset GMP_LIBS fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi else gmp_found="no" unset GMP_CFLAGS unset GMP_LIBS fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext else gmp_found="no" fi done if test "x$gmp_found" != "xyes"; then if test -n "$gmp_problem"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: problem" >&5 $as_echo "problem" >&6; } echo "Sorry, your GMP version is too old. Disabling." elif test "x$gmp_found" != "xno"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 $as_echo "not found" >&6; } fi echo '*******************************************************************************' echo ' ERROR: GMP not found!' echo echo ' GMP library compiled with --enable-cxx is required for this library to compile.' echo ' Please make sure GMP is installed and specify its location with the option' echo ' --with-gmp= when running configure.' echo '*******************************************************************************' exit 1 fi CXXFLAGS=${BACKUP_CXXFLAGS} LIBS=${BACKUP_LIBS} #unset LD_LIBRARY_PATH # Check whether --with-iml was given. if test "${with_iml+set}" = set; then : withval=$with_iml; if test "$withval" = yes ; then IML_HOME_PATH="${DEFAULT_CHECKING_PATH}" elif test "$withval" != no ; then IML_HOME_PATH="$withval ${DEFAULT_CHECKING_PATH}" fi else IML_HOME_PATH="${DEFAULT_CHECKING_PATH}" fi BACKUP_CXXFLAGS=${CXXFLAGS} BACKUP_LIBS=${LIBS} { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IML" >&5 $as_echo_n "checking for IML... " >&6; } for IML_HOME in ${IML_HOME_PATH} do if test -r "$IML_HOME/include/iml.h"; then if test "x$IML_HOME" != "x/usr" -a "x$IML_HOME" != "x/usr/local"; then IML_CFLAGS="-I${IML_HOME}/include" IML_LIBS="-L${IML_HOME}/lib -liml" else IML_CFLAGS= IML_LIBS="-liml" fi CXXFLAGS="${BACKUP_CXXFLAGS} ${IML_CFLAGS} ${GMP_CFLAGS}" LIBS="${BACKUP_LIBS} ${IML_LIBS} ${GMP_LIBS}" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include extern "C" { #include } int main () { Double a; ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : if test "$cross_compiling" = yes; then : iml_found="yes" iml_cross="yes" break else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { return 0; /* not possible to check version */ } _ACEOF if ac_fn_cxx_try_run "$LINENO"; then : iml_found="yes" break else iml_problem="$problem $IML_HOME" unset IML_CFLAGS unset IML_LIBS fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi else iml_found="no" iml_checked="$checked $IML_HOME" unset IML_CFLAGS unset IML_LIBS fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext else iml_found="no" fi done if test "x$iml_found" = "xyes" ; then $as_echo "#define HAVE_IML 1" >>confdefs.h HAVE_IML=yes if test "x$iml_cross" != "xyes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5 $as_echo "found" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5 $as_echo "unknown" >&6; } echo "WARNING: You appear to be cross compiling, so there is no way to determine" echo "whether your IML version is new enough. I am assuming it is." fi : elif test -n "$iml_problem"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: problem" >&5 $as_echo "problem" >&6; } echo "Sorry, your IML version is too old. Disabling." : elif test "x$iml_found" = "xno" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 $as_echo "not found" >&6; } : fi if test "x$HAVE_IML" = "xyes"; then LINBOX_HAVE_IML_TRUE= LINBOX_HAVE_IML_FALSE='#' else LINBOX_HAVE_IML_TRUE='#' LINBOX_HAVE_IML_FALSE= fi CXXFLAGS=${BACKUP_CXXFLAGS} LIBS=${BACKUP_LIBS} #unset LD_LIBRARY_PATH # Check whether --with-m4ri was given. if test "${with_m4ri+set}" = set; then : withval=$with_m4ri; fi if test "$withval" = yes ; then : M4RI_HOME_PATH="${DEFAULT_CHECKING_PATH}" elif test "$withval" != no ; then : M4RI_HOME_PATH="$withval ${DEFAULT_CHECKING_PATH}" else M4RI_HOME_PATH="${DEFAULT_CHECKING_PATH}" fi BACKUP_CXXFLAGS=${CXXFLAGS} BACKUP_LIBS=${LIBS} { $as_echo "$as_me:${as_lineno-$LINENO}: checking for M4RI" >&5 $as_echo_n "checking for M4RI... " >&6; } for M4RI_HOME in ${M4RI_HOME_PATH} do if test -r "$M4RI_HOME/include/m4ri/m4ri.h"; then : if test "x$M4RI_HOME" != "x/usr" -a "x$M4RI_HOME" != "x/usr/local"; then : M4RI_CFLAGS="-I${M4RI_HOME}/include" M4RI_LIBS="-L${M4RI_HOME}/lib -lm4ri" else M4RI_CFLAGS= M4RI_LIBS="-lm4ri" fi CXXFLAGS="${BACKUP_CXXFLAGS} ${M4RI_CFLAGS} ${GMP_CFLAGS}" LIBS="${BACKUP_LIBS} ${M4RI_LIBS} ${GMP_LIBS}" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { mzd_t a; ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : if test "$cross_compiling" = yes; then : m4ri_found="yes" m4ri_cross="yes" break else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { return 0; /* not possible to check version */ } _ACEOF if ac_fn_cxx_try_run "$LINENO"; then : m4ri_found="yes" break else m4ri_problem="$problem $M4RI_HOME" unset M4RI_CFLAGS unset M4RI_LIBS fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi else m4ri_found="no" m4ri_checked="$checked $M4RI_HOME" unset M4RI_CFLAGS unset M4RI_LIBS fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext else m4ri_found="no" fi done if test "x$m4ri_found" = "xyes"; then : $as_echo "#define HAVE_M4RI 1" >>confdefs.h HAVE_M4RI=yes if test "x$m4ri_cross" != "xyes"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5 $as_echo "found" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5 $as_echo "unknown" >&6; } echo "WARNING: You appear to be cross compiling, so there is no way to determine" echo "whether your M4RI version is new enough. I am assuming it is." fi : elif test -n "$m4ri_problem" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: problem" >&5 $as_echo "problem" >&6; } echo "Sorry, your M4RI version is too old. Disabling." : elif test "x$m4ri_found" = "xno" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 $as_echo "not found" >&6; } : fi if test "x$HAVE_M4RI" = "xyes"; then LINBOX_HAVE_M4RI_TRUE= LINBOX_HAVE_M4RI_FALSE='#' else LINBOX_HAVE_M4RI_TRUE='#' LINBOX_HAVE_M4RI_FALSE= fi CXXFLAGS=${BACKUP_CXXFLAGS} LIBS=${BACKUP_LIBS} #unset LD_LIBRARY_PATH # Check whether --with-m4rie was given. if test "${with_m4rie+set}" = set; then : withval=$with_m4rie; fi if test "$withval" = yes ; then : M4RIE_HOME_PATH="${DEFAULT_CHECKING_PATH}" elif test "$withval" != no ; then : M4RIE_HOME_PATH="$withval ${DEFAULT_CHECKING_PATH}" else M4RIE_HOME_PATH="${DEFAULT_CHECKING_PATH}" fi BACKUP_CXXFLAGS=${CXXFLAGS} BACKUP_LIBS=${LIBS} { $as_echo "$as_me:${as_lineno-$LINENO}: checking for M4RIE" >&5 $as_echo_n "checking for M4RIE... " >&6; } for M4RIE_HOME in ${M4RIE_HOME_PATH} do if test -r "$M4RIE_HOME/include/m4rie/m4rie.h"; then : if test "x$M4RIE_HOME" != "x/usr" -a "x$M4RIE_HOME" != "x/usr/local"; then : M4RIE_CFLAGS="-I${M4RIE_HOME}/include" M4RIE_LIBS="-L${M4RIE_HOME}/lib -lm4rie" else M4RIE_CFLAGS= M4RIE_LIBS="-lm4rie" fi CXXFLAGS="${BACKUP_CXXFLAGS} ${M4RIE_CFLAGS} ${GMP_CFLAGS}" LIBS="${BACKUP_LIBS} ${M4RIE_LIBS} ${GMP_LIBS}" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { gf2e a; ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : if test "$cross_compiling" = yes; then : m4rie_found="yes" m4rie_cross="yes" break else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { return 0; /* not possible to check version */ } _ACEOF if ac_fn_cxx_try_run "$LINENO"; then : m4rie_found="yes" break else m4rie_problem="$problem $M4RIE_HOME" unset M4RIE_CFLAGS unset M4RIE_LIBS fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi else m4rie_found="no" m4rie_checked="$checked $M4RIE_HOME" unset M4RIE_CFLAGS unset M4RIE_LIBS fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext else m4rie_found="no" fi done if test "x$m4rie_found" = "xyes"; then : $as_echo "#define HAVE_M4RIE 1" >>confdefs.h HAVE_M4RIE=yes if test "x$m4rie_cross" != "xyes"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5 $as_echo "found" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5 $as_echo "unknown" >&6; } echo "WARNING: You appear to be cross compiling, so there is no way to determine" echo "whether your M4RIE version is new enough. I am assuming it is." fi : elif test -n "$m4rie_problem" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: problem" >&5 $as_echo "problem" >&6; } echo "Sorry, your M4RIE version is too old. Disabling." : elif test "x$m4rie_found" = "xno" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 $as_echo "not found" >&6; } : fi if test "x$HAVE_M4RIE" = "xyes"; then LINBOX_HAVE_M4RIE_TRUE= LINBOX_HAVE_M4RIE_FALSE='#' else LINBOX_HAVE_M4RIE_TRUE='#' LINBOX_HAVE_M4RIE_FALSE= fi CXXFLAGS=${BACKUP_CXXFLAGS} LIBS=${BACKUP_LIBS} #unset LD_LIBRARY_PATH # Check whether --with-mpfr was given. if test "${with_mpfr+set}" = set; then : withval=$with_mpfr; if test "$withval" = yes ; then MPFR_HOME_PATH="${DEFAULT_CHECKING_PATH}" elif test "$withval" != no ; then MPFR_HOME_PATH="$withval ${DEFAULT_CHECKING_PATH}" fi else MPFR_HOME_PATH="${DEFAULT_CHECKING_PATH}" fi BACKUP_CXXFLAGS=${CXXFLAGS} BACKUP_LIBS=${LIBS} { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MPFR" >&5 $as_echo_n "checking for MPFR... " >&6; } for MPFR_HOME in ${MPFR_HOME_PATH} do if test -r "$MPFR_HOME/include/mpfr.h"; then if test "x$MPFR_HOME" != "x/usr" -a "x$MPFR_HOME" != "x/usr/local"; then : MPFR_CFLAGS="-I${MPFR_HOME}/include" MPFR_LIBS="-L${MPFR_HOME}/lib -lmpfr" else MPFR_CFLAGS= MPFR_LIBS="-lmpfr" fi CXXFLAGS="${BACKUP_CXXFLAGS} ${MPFR_CFLAGS} ${GMP_CFLAGS}" LIBS="${BACKUP_LIBS} ${GMP_LIBS} ${MPFR_LIBS} " cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { mpfr_t a ; ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : if test "$cross_compiling" = yes; then : mpfr_found="yes" mpfr_cross="yes" break else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { return 0; /* not important to check for version */ } _ACEOF if ac_fn_cxx_try_run "$LINENO"; then : mpfr_found="yes" break else mpfr_problem="$problem $MPFR_HOME" unset MPFR_CFLAGS unset MPFR_LIBS fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi else mpfr_found="no" mpfr_checked="$checked $MPFR_HOME" unset MPFR_CFLAGS unset MPFR_LIBS fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext else mpfr_found="no" fi done if test "x$mpfr_found" = "xyes" ; then $as_echo "#define HAVE_MPFR 1" >>confdefs.h HAVE_MPFR=yes if test "x$mpfr_cross" != "xyes" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5 $as_echo "found" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5 $as_echo "unknown" >&6; } echo "WARNING: You appear to be cross compiling, so there is no way to determine" echo "whether your MPFR version is new enough. I am assuming it is." fi : elif test -n "$mpfr_problem"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: problem" >&5 $as_echo "problem" >&6; } echo "Sorry, your MPFR version is too old. Disabling." : elif test "x$mpfr_found" = "xno" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 $as_echo "not found" >&6; } : fi if test "x$HAVE_MPFR" = "xyes"; then LINBOX_HAVE_MPFR_TRUE= LINBOX_HAVE_MPFR_FALSE='#' else LINBOX_HAVE_MPFR_TRUE='#' LINBOX_HAVE_MPFR_FALSE= fi CXXFLAGS=${BACKUP_CXXFLAGS} LIBS=${BACKUP_LIBS} #unset LD_LIBRARY_PATH # we nedd mpfr next : # Check whether --with-fplll was given. if test "${with_fplll+set}" = set; then : withval=$with_fplll; if test "$withval" = yes ; then FPLLL_HOME_PATH="${DEFAULT_CHECKING_PATH}" elif test "$withval" != no ; then FPLLL_HOME_PATH="$withval ${DEFAULT_CHECKING_PATH}" fi else FPLLL_HOME_PATH="${DEFAULT_CHECKING_PATH}" fi BACKUP_CXXFLAGS=${CXXFLAGS} BACKUP_LIBS=${LIBS} { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FPLLL" >&5 $as_echo_n "checking for FPLLL... " >&6; } for FPLLL_HOME in ${FPLLL_HOME_PATH} do if test -r "$FPLLL_HOME/include/fplll/fplll.h"; then if test "x$FPLLL_HOME" != "x/usr" -a "x$FPLLL_HOME" != "x/usr/local"; then : FPLLL_CFLAGS="-I${FPLLL_HOME}/include" FPLLL_LIBS="-L${FPLLL_HOME}/lib -lfplll" else FPLLL_CFLAGS= FPLLL_LIBS="-lfplll" fi CXXFLAGS="${BACKUP_CXXFLAGS} ${MPFR_CFLAGS} ${FPLLL_CFLAGS} ${GMP_CFLAGS}" LIBS="${BACKUP_LIBS} ${GMP_LIBS} ${MPFR_LIBS} ${FPLLL_LIBS} " cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { enum EvaluatorType a ; ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : if test "$cross_compiling" = yes; then : fplll_found="yes" fplll_cross="yes" break else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { return 0; /* not important to check for version */ } _ACEOF if ac_fn_cxx_try_run "$LINENO"; then : fplll_found="yes" break else fplll_problem="$problem $FPLLL_HOME" unset FPLLL_CFLAGS unset FPLLL_LIBS fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi else fplll_found="no" fplll_checked="$checked $FPLLL_HOME" unset FPLLL_CFLAGS unset FPLLL_LIBS fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext else fplll_found="no" fi done if test "x$fplll_found" = "xyes" ; then $as_echo "#define HAVE_FPLLL 1" >>confdefs.h HAVE_FPLLL=yes if test "x$fplll_cross" != "xyes" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5 $as_echo "found" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5 $as_echo "unknown" >&6; } echo "WARNING: You appear to be cross compiling, so there is no way to determine" echo "whether your FPLLL version is new enough. I am assuming it is." fi : elif test -n "$fplll_problem"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: problem" >&5 $as_echo "problem" >&6; } echo "Sorry, your FPLLL version is too old. Disabling." : elif test "x$fplll_found" = "xno" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 $as_echo "not found" >&6; } : fi if test "x$HAVE_FPLLL" = "xyes"; then LINBOX_HAVE_FPLLL_TRUE= LINBOX_HAVE_FPLLL_FALSE='#' else LINBOX_HAVE_FPLLL_TRUE='#' LINBOX_HAVE_FPLLL_FALSE= fi CXXFLAGS=${BACKUP_CXXFLAGS} LIBS=${BACKUP_LIBS} #unset LD_LIBRARY_PATH # Check whether --with-ntl was given. if test "${with_ntl+set}" = set; then : withval=$with_ntl; if test "$withval" = yes ; then NTL_HOME_PATH="${DEFAULT_CHECKING_PATH}" elif test "$withval" != no ; then NTL_HOME_PATH="$withval ${DEFAULT_CHECKING_PATH}" fi else NTL_HOME_PATH=${DEFAULT_CHECKING_PATH} fi min_ntl_version=5.0 BACKUP_CXXFLAGS=${CXXFLAGS} BACKUP_LIBS=${LIBS} if test -n "$NTL_HOME_PATH"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NTL >= $min_ntl_version" >&5 $as_echo_n "checking for NTL >= $min_ntl_version... " >&6; } fi for NTL_HOME in ${NTL_HOME_PATH} do if test -r "$NTL_HOME/include/NTL/ZZ.h"; then if test "x$NTL_HOME" != "x/usr" -a "x$NTL_HOME" != "x/usr/local"; then NTL_CFLAGS="-I${NTL_HOME}/include" NTL_LIBS="-L${NTL_HOME}/lib -lntl" else NTL_CFLAGS= NTL_LIBS="-lntl" fi CXXFLAGS="${BACKUP_CXXFLAGS} ${NTL_CFLAGS} ${GMP_CFLAGS}" LIBS="${BACKUP_LIBS} ${NTL_LIBS} ${GMP_LIBS}" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { NTL::ZZ a; ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : if test "$cross_compiling" = yes; then : ntl_found="yes" ntl_cross="yes" break else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { if (NTL_MAJOR_VERSION < 5) return -1; else return 0; } _ACEOF if ac_fn_cxx_try_run "$LINENO"; then : ntl_found="yes" break else ntl_problem="$problem $NTL_HOME" unset NTL_CFLAGS unset NTL_LIBS fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi else ntl_found="no" ntl_checked="$checked $NTL_HOME" unset NTL_CFLAGS unset NTL_LIBS fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext else ntl_found="no" fi done if test "x$ntl_found" = "xyes" ; then $as_echo "#define HAVE_NTL 1" >>confdefs.h HAVE_NTL=yes if test "x$ntl_cross" != "xyes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5 $as_echo "found" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5 $as_echo "unknown" >&6; } echo "WARNING: You appear to be cross compiling, so there is no way to determine" echo "whether your NTL version is new enough. I am assuming it is." fi : elif test -n "$ntl_problem"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: problem" >&5 $as_echo "problem" >&6; } echo "Sorry, your NTL version is too old. Disabling." : elif test "x$ntl_found" = "xno"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 $as_echo "not found" >&6; } if test "x$NTL_HOME" != "x/usr" -a "x$NTL_HOME" != "x/usr/local" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: NTL >= $min_ntl_version was not found. LinBox also requires the NTL namespace to be enabled. Please make sure NTL is compiled correctly." >&5 $as_echo "$as_me: WARNING: NTL >= $min_ntl_version was not found. LinBox also requires the NTL namespace to be enabled. Please make sure NTL is compiled correctly." >&2;} fi : fi if test "x$HAVE_NTL" = "xyes"; then LINBOX_HAVE_NTL_TRUE= LINBOX_HAVE_NTL_FALSE='#' else LINBOX_HAVE_NTL_TRUE='#' LINBOX_HAVE_NTL_FALSE= fi CXXFLAGS=${BACKUP_CXXFLAGS} LIBS=${BACKUP_LIBS} #unset LD_LIBRARY_PATH # Check whether --with-givaro was given. if test "${with_givaro+set}" = set; then : withval=$with_givaro; if test "$withval" = yes ; then GIVARO_HOME_PATH="${DEFAULT_CHECKING_PATH}" elif test "$withval" != no ; then GIVARO_HOME_PATH="$withval ${DEFAULT_CHECKING_PATH}" fi else GIVARO_HOME_PATH="${DEFAULT_CHECKING_PATH}" fi version_min=30700 version_max=30800 BACKUP_CXXFLAGS=${CXXFLAGS} BACKUP_LIBS=${LIBS} { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GIVARO >= $version_min and < $version_max" >&5 $as_echo_n "checking for GIVARO >= $version_min and < $version_max... " >&6; } for GIVARO_HOME in ${GIVARO_HOME_PATH} do if test -r "$GIVARO_HOME/include/givaro/givconfig.h"; then if test "x$GIVARO_HOME" != "x/usr" -a "x$GIVARO_HOME" != "x/usr/local"; then GIVARO_CFLAGS="-I${GIVARO_HOME}/include" GIVARO_LIBS="-L${GIVARO_HOME}/lib -lgivaro" else GIVARO_CFLAGS= GIVARO_LIBS="-lgivaro" fi CXXFLAGS="${BACKUP_CXXFLAGS} ${GIVARO_CFLAGS} ${GMP_CFLAGS}" LIBS="${BACKUP_LIBS} ${GIVARO_LIBS} ${GMP_LIBS}" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { Givaro::Integer a; ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : if test "$cross_compiling" = yes; then : givaro_found="yes" givaro_cross="yes" break else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { if (GIVARO_VERSION < $version_min || GIVARO_VERSION >= $version_max || GIVARO_VERSION>0x030000) return -1; else return 0; /* old version of Givaro are defined as hexa 0x03yyzz*/ } _ACEOF if ac_fn_cxx_try_run "$LINENO"; then : givaro_found="yes" break else givaro_problem="$problem $GIVARO_HOME" unset GIVARO_CFLAGS unset GIVARO_LIBS fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi else givaro_found="no" givaro_checked="$checked $GIVARO_HOME" unset GIVARO_CFLAGS unset GIVARO_LIBS fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext else givaro_found="no" fi done if test "x$givaro_found" = "xyes" ; then $as_echo "#define HAVE_GIVARO 1" >>confdefs.h HAVE_GIVARO=yes if test "x$givaro_cross" != "xyes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5 $as_echo "found" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5 $as_echo "unknown" >&6; } echo "WARNING: You appear to be cross compiling, so there is no way to determine" echo "whether your GIVARO version is new enough. I am assuming it is." fi : elif test -n "$givaro_problem"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: problem" >&5 $as_echo "problem" >&6; } echo "Sorry, your GIVARO version is too old. Disabling." echo '*******************************************************************************' echo ' ERROR: GIVARO not found!' echo echo ' GIVARO library is required for this library to compile.' echo ' Please make sure GIVARO is installed and specify its location with the' echo ' option --with-givaro= when running configure.' echo '*******************************************************************************' exit 1 elif test "x$givaro_found" = "xno" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 $as_echo "not found" >&6; } echo '*******************************************************************************' echo ' ERROR: GIVARO not found!' echo echo ' GIVARO library is required for this library to compile.' echo ' Please make sure GIVARO is installed and specify its location with the' echo ' option --with-givaro= when running configure.' echo '*******************************************************************************' exit 1 fi if test "x$HAVE_GIVARO" = "xyes"; then LINBOX_HAVE_GIVARO_TRUE= LINBOX_HAVE_GIVARO_FALSE='#' else LINBOX_HAVE_GIVARO_TRUE='#' LINBOX_HAVE_GIVARO_FALSE= fi CXXFLAGS=${BACKUP_CXXFLAGS} LIBS=${BACKUP_LIBS} #unset LD_LIBRARY_PATH # Check whether --with-saclib was given. if test "${with_saclib+set}" = set; then : withval=$with_saclib; if test "$withval" = yes ; then SACLIB_HOME_PATH="${DEFAULT_CHECKING_PATH}" elif test "$withval" != no ; then SACLIB_HOME_PATH="$withval" fi fi min_saclib_version=2.0 BACKUP_CXXFLAGS=${CXXFLAGS} BACKUP_LIBS=${LIBS} if test -n "$SACLIB_HOME_PATH"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SACLIB >= $min_saclib_version" >&5 $as_echo_n "checking for SACLIB >= $min_saclib_version... " >&6; } fi for SACLIB_HOME in ${SACLIB_HOME_PATH} do if test -r "$SACLIB_HOME/include/saclib.h"; then if test "x$SACLIB_HOME" != "x/usr" -a "x$SACLIB_HOME" != "x/usr/local"; then SACLIB_CFLAGS="-I${SACLIB_HOME}/include" SACLIB_LIBS="-L${SACLIB_HOME}/lib -lsaclib" else SACLIB_CFLAGS= SACLIB_LIBS="-lsaclib" fi CXXFLAGS="${BACKUP_CXXFLAGS} ${SACLIB_CFLAGS} ${GMP_CFLAGS}" LIBS="${BACKUP_LIBS} ${SACLIB_LIBS} ${GMP_LIBS}" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { BDigit a; ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : if test "$cross_compiling" = yes; then : saclib_found="yes" saclib_cross="yes" break else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { if ( __GNU_MP_VERSION < 3) return -1; else return 0; } _ACEOF if ac_fn_cxx_try_run "$LINENO"; then : saclib_found="yes" break else saclib_problem="$problem $SACLIB_HOME" unset SACLIB_CFLAGS unset SACLIB_LIBS fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi else saclib_found="no" saclib_checked="$saclib_checked $SACLIB_HOME" unset SACLIB_CFLAGS unset SACLIB_LIBS fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext else saclib_found="no" fi done if test "x$saclib_found" = "xyes" ; then $as_echo "#define HAVE_SACLIB 1" >>confdefs.h HAVE_SACLIB=yes if test "x$saclib_cross" != "xyes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5 $as_echo "found" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5 $as_echo "unknown" >&6; } echo "WARNING: You appear to be cross compiling, so there is no way to determine" echo "whether your SACLIB version is new enough. I am assuming it is." fi : elif test -n "$saclib_problem"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: problem" >&5 $as_echo "problem" >&6; } echo "Sorry, your SACLIB version is too old. Disabling." : elif test "x$saclib_found" = "xno" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 $as_echo "not found" >&6; } : fi if test "x$HAVE_SACLIB" = "xyes"; then LINBOX_HAVE_SACLIB_TRUE= LINBOX_HAVE_SACLIB_FALSE='#' else LINBOX_HAVE_SACLIB_TRUE='#' LINBOX_HAVE_SACLIB_FALSE= fi CXXFLAGS=${BACKUP_CXXFLAGS} LIBS=${BACKUP_LIBS} #unset LD_LIBRARY_PATH # Check whether --with-lidia was given. if test "${with_lidia+set}" = set; then : withval=$with_lidia; if test "$withval" = yes ; then LIDIA_HOME_PATH="${DEFAULT_CHECKING_PATH}" elif test "$withval" != no ; then LIDIA_HOME_PATH="$withval" fi fi min_lidia_version=2.1 BACKUP_CXXFLAGS=${CXXFLAGS} BACKUP_LIBS=${LIBS} if test -n "$LIDIA_HOME_PATH" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIDIA >= $min_lidia_version" >&5 $as_echo_n "checking for LIDIA >= $min_lidia_version... " >&6; } fi for LIDIA_HOME in ${LIDIA_HOME_PATH} do if test -r "$LIDIA_HOME/include/LiDIA/LiDIA.h"; then if test "x$LIDIA_HOME" != "x/usr" -a "x$LIDIA_HOME" != "x/usr/local"; then LIDIA_CFLAGS="-I${LIDIA_HOME}/include" LIDIA_LIBS="-L${LIDIA_HOME}/lib -lLiDIA" else LIDIA_CFLAGS= LIDIA_LIBS="-lLiDIA" fi CXXFLAGS="${BACKUP_CXXFLAGS} ${LIDIA_CFLAGS} ${GMP_CFLAGS}" LIBS="${BACKUP_LIBS} ${LIDIA_LIBS} ${GMP_LIBS}" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { LiDIA::bigint a; ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : if test "$cross_compiling" = yes; then : lidia_found="yes" lidia_cross="yes" break else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { if (LIDIA_MAJOR_VERSION < 2) return -1; else return 0; } _ACEOF if ac_fn_cxx_try_run "$LINENO"; then : lidia_found="yes" break else lidia_problem="$problem $LIDIA_HOME" unset LIDIA_CFLAGS unset LIDIA_LIBS fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi else lidia_found="no" lidia_checked="$checked $LIDIA_HOME" unset LIDIA_CFLAGS unset LIDIA_LIBS fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext else lidia_found="no" fi done if test "x$lidia_found" = "xyes" ; then $as_echo "#define HAVE_LIDIA 1" >>confdefs.h HAVE_LIDIA=yes if test "x$lidia_cross" != "xyes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5 $as_echo "found" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5 $as_echo "unknown" >&6; } echo "WARNING: You appear to be cross compiling, so there is no way to determine" echo "whether your LIDIA version is new enough. I am assuming it is." fi : elif test -n "$lidia_problem"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: problem" >&5 $as_echo "problem" >&6; } echo "Sorry, your LIDIA version is too old. Disabling." : elif test "x$lidia_found" = "xno" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 $as_echo "not found" >&6; } : fi if test "x$HAVE_LIDIA" = "xyes"; then LINBOX_HAVE_LIDIA_TRUE= LINBOX_HAVE_LIDIA_FALSE='#' else LINBOX_HAVE_LIDIA_TRUE='#' LINBOX_HAVE_LIDIA_FALSE= fi CXXFLAGS=${BACKUP_CXXFLAGS} LIBS=${BACKUP_LIBS} #unset LD_LIBRARY_PATH # Check whether --with-maple was given. if test "${with_maple+set}" = set; then : withval=$with_maple; if test "$withval" = yes ; then MAPLE_HOME_PATH="${DEFAULT_CHECKING_PATH} unknown" elif test "$withval" != no ; then MAPLE_HOME_PATH="$withval ${DEFAULT_CHECKING_PATH} unknown" fi fi # Check whether --enable-shared was given. if test "${enable_shared+set}" = set; then : enableval=$enable_shared; have_shared="$enableval" else have_shared="no" fi if test -n "$MAPLE_HOME_PATH" ; then min_maple_version=9.0 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAPLE >= $min_maple_version" >&5 $as_echo_n "checking for MAPLE >= $min_maple_version... " >&6; } fi eval LIB_DIR=${libdir} if test ${LIB_DIR} = "NONE/lib" ; then eval LIB_DIR="${prefix}/lib" fi for MAPLE_HOME in ${MAPLE_HOME_PATH} do if test "x$MAPLE_HOME" != "xunknown"; then if test -r "${MAPLE_HOME}/bin/maple.system.type" && test -r "${MAPLE_HOME}/extern/include/maplec.h" ; then MAPLE_BIN=${MAPLE_HOME}/`${MAPLE_HOME}/bin/maple.system.type` else MAPLE_BIN="" fi else if test -r "/usr/local/bin/xmaple" && test -r "/usr/local/bin/maple.system.type"; then MAPLE_HOME=`sed -ne "s/MAPLE='\(.*\)'/\\1/p" /usr/local/bin/xmaple` MAPLE_BIN="${MAPLE_HOME}/"`${MAPLE_HOME}/bin/maple.system.type` elif test -r "/usr/bin/xmaple" ; then MAPLE_HOME=`sed -ne "s/MAPLE='\(.*\)'/\\1/p" /usr/bin/xmaple` MAPLE_BIN="${MAPLE_HOME}/"`${MAPLE_HOME}/bin/maple.system.type` else MAPLE_BIN="" fi fi if test -z "${MAPLE_BIN}" ; then maple_found="no" else maple_found="yes" if test $have_shared = "yes"; then ${MAPLE_HOME}/bin/maple macros/maple-check-version.mpl > /dev/null MAPLE_VERSION=`cat maple_version.txt` if test ${MAPLE_VERSION} -lt 9; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: problem" >&5 $as_echo "problem" >&6; } echo " your version of Maple is too old, at least version 9 is recquired. Disabling." break else { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5 $as_echo "found" >&6; } LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${MAPLE_BIN}:${LIB_DIR}" LD_RUN_PATH="${LD_RUN_PATH}:${MAPLE_BIN}:${LIB_DIR}" export LD_LIBRARY_PATH export LD_RUN_PATH MAPLE_LIBS="-L${MAPLE_BIN} -lmaplec -lstdc++" MAPLE_CFLAGS="-I${MAPLE_HOME}/extern/include" if test ${MAPLE_VERSION} -ge 10 ; then cat >>confdefs.h <<_ACEOF #define MAPLE_GMP_ACCESS /**/ _ACEOF fi $as_echo "#define HAVE_MAPLE 1" >>confdefs.h HAVE_MAPLE=yes break fi else { $as_echo "$as_me:${as_lineno-$LINENO}: result: problem" >&5 $as_echo "problem" >&6; } echo " you need to give option --enable-shared to allow Maple interfacing. Disabling." break fi fi done if test "x$maple_found" = "xno" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 $as_echo "not found" >&6; } $as_echo "#define HAVE_MAPLE 0" >>confdefs.h fi if test "x$HAVE_MAPLE" = "xyes"; then LINBOX_HAVE_MAPLE_TRUE= LINBOX_HAVE_MAPLE_FALSE='#' else LINBOX_HAVE_MAPLE_TRUE='#' LINBOX_HAVE_MAPLE_FALSE= fi if test "x$compile_drivers" = "xyes" -o "x$HAVE_MAPLE" = "xyes" ; then LINBOX_COMPILE_DRIVERS_TRUE= LINBOX_COMPILE_DRIVERS_FALSE='#' else LINBOX_COMPILE_DRIVERS_TRUE='#' LINBOX_COMPILE_DRIVERS_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to compile the SAGE interface" >&5 $as_echo_n "checking whether to compile the SAGE interface... " >&6; } # Check whether --enable-sage was given. if test "${enable_sage+set}" = set; then : enableval=$enable_sage; fi if test "x$enable_sage" = "xyes"; then LINBOX_HAVE_SAGE_TRUE= LINBOX_HAVE_SAGE_FALSE='#' else LINBOX_HAVE_SAGE_TRUE='#' LINBOX_HAVE_SAGE_FALSE= fi if test "x$enable_sage" = "xyes"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi #LB_CHECK_ATLAS # LB_CHECK_BLAS(,,[ # echo '' # echo '*******************************************************************************' # echo ' ERROR: BLAS not found!' # echo # echo ' BLAS routines are required for this library to compile. Please' # echo ' make sure BLAS are installed and specify its location with the option' # echo ' --with-blas= when running configure.' # echo '*******************************************************************************' # exit 1 # ]) # Check whether --with-fflas-ffpack was given. if test "${with_fflas_ffpack+set}" = set; then : withval=$with_fflas_ffpack; if test "$withval" = yes ; then FFLAS_FFPACK_HOME_PATH="${DEFAULT_CHECKING_PATH}" elif test "$withval" != no ; then FFLAS_FFPACK_HOME_PATH="$withval ${DEFAULT_CHECKING_PATH}" fi else FFLAS_FFPACK_HOME_PATH="${DEFAULT_CHECKING_PATH}" fi version_min=10600 version_max=10700 BACKUP_CXXFLAGS=${CXXFLAGS} BACKUP_LIBS=${LIBS} { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FFLAS-FFPACK >= $version_min and < $version_max" >&5 $as_echo_n "checking for FFLAS-FFPACK >= $version_min and < $version_max... " >&6; } for FFLAS_FFPACK_HOME in ${FFLAS_FFPACK_HOME_PATH} do if test -r "$FFLAS_FFPACK_HOME/include/fflas-ffpack/fflas-ffpack.h" -a -x "$FFLAS_FFPACK_HOME/bin/fflas-ffpack-config"; then BLAS_LIBS=`$FFLAS_FFPACK_HOME/bin/fflas-ffpack-config --blas-libs` BLAS_CFLAGS=`$FFLAS_FFPACK_HOME/bin/fflas-ffpack-config --cflags` if test "x$FFLAS_FFPACK_HOME" != "x/usr" -a "x$FFLAS_FFPACK_HOME" != "x/usr/local"; then FFLAS_FFPACK_CFLAGS="-I${FFLAS_FFPACK_HOME}/include" else FFLAS_FFPACK_CFLAGS= fi CXXFLAGS="${BACKUP_CXXFLAGS} ${FFLAS_FFPACK_CFLAGS} ${BLAS_CFLAGS}" LIBS="${BACKUP_LIBS} ${BLAS_LIBS}" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include "fflas-ffpack/fflas-ffpack.h" int main () { FFLAS::FFLAS_TRANSPOSE a; ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : FF_VER=`$FFLAS_FFPACK_HOME/bin/fflas-ffpack-config --decimal-version` if test $FF_VER -ge $version_min -a $FF_VER -lt $version_max ; then : ffflasffpack_found="yes" FFLAS_FFPACK_LOC="$FFLAS_FFPACK_HOME" break else ffflasffpack_found="no" fi else ffflasffpack_found="no" ffflasffpack_checked="$checked $FFLAS_FFPACK_HOME" unset FFLAS_FFPACK_CFLAGS unset FFLAS_FFPACK_LOC unset BLAS_LIBS unset BLAS_CFLAGS fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext else fflasflas_found="no" fi done if test "x$ffflasffpack_found" = "xyes" ; then $as_echo "#define HAVE_FFLAS_FFPACK 1" >>confdefs.h FF_VER=`$FFLAS_FFPACK_LOC/bin/fflas-ffpack-config --decimal-version` cat >>confdefs.h <<_ACEOF #define FFLAS_FFPACK_VERSION $FF_VER _ACEOF HAVE_FFLAS_FFPACK=yes if test "x$fflasflas_cross" != "xyes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5 $as_echo "found" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5 $as_echo "unknown" >&6; } echo "WARNING: You appear to be cross compiling, so there is no way to determine" echo "whether your FFLAS-FFPACK version is new enough. I am assuming it is." fi : elif test -n "$fflasflas_problem"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: problem" >&5 $as_echo "problem" >&6; } echo "Sorry, your FFLAS-FFPACK version is too old. Disabling." echo '' echo '*******************************************************************************' echo ' ERROR: Fflas-Ffpack not found!' echo echo ' Fflas-Ffpack routines are required for this library to compile. Please' echo ' make sure they are installed and specify its location with the option' echo ' --with-fflas-ffpack= when running configure.' echo '*******************************************************************************' exit 1 elif test "x$fflasflas_found" = "xno" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 $as_echo "not found" >&6; } echo '' echo '*******************************************************************************' echo ' ERROR: Fflas-Ffpack not found!' echo echo ' Fflas-Ffpack routines are required for this library to compile. Please' echo ' make sure they are installed and specify its location with the option' echo ' --with-fflas-ffpack= when running configure.' echo '*******************************************************************************' exit 1 fi if test "x$HAVE_FFLAS_FFPACK" = "xyes"; then LINBOX_HAVE_FFLAS_FFPACK_TRUE= LINBOX_HAVE_FFLAS_FFPACK_FALSE='#' else LINBOX_HAVE_FFLAS_FFPACK_TRUE='#' LINBOX_HAVE_FFLAS_FFPACK_FALSE= fi CXXFLAGS=${BACKUP_CXXFLAGS} LIBS=${BACKUP_LIBS} #unset LD_LIBRARY_PATH { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LAPACK in fflas-ffpack" >&5 $as_echo_n "checking for LAPACK in fflas-ffpack... " >&6; } BACKUP_CXXFLAGS=${CXXFLAGS} BACKUP_LIBS=${LIBS} CXXFLAGS="${BACKUP_CXXFLAGS} ${FFLAS_FFPACK_CFLAGS} ${BLAS_CFLAGS}" LIBS="${BACKUP_LIBS} ${BLAS_LIBS}" if test "$cross_compiling" = yes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5 $as_echo "unknown" >&6; } if false; then LINBOX_HAVE_LAPACK_TRUE= LINBOX_HAVE_LAPACK_FALSE='#' else LINBOX_HAVE_LAPACK_TRUE='#' LINBOX_HAVE_LAPACK_FALSE= fi else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include "fflas-ffpack/fflas-ffpack-config.h" #ifdef __FFLAS_FFPACK_HAVE_LAPACK int main() { return 0 ; } #else a pas lapack #endif _ACEOF if ac_fn_cxx_try_run "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 $as_echo "ok" >&6; } $as_echo "#define HAVE_LAPACK 1" >>confdefs.h if true; then LINBOX_HAVE_LAPACK_TRUE= LINBOX_HAVE_LAPACK_FALSE='#' else LINBOX_HAVE_LAPACK_TRUE='#' LINBOX_HAVE_LAPACK_FALSE= fi else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if false; then LINBOX_HAVE_LAPACK_TRUE= LINBOX_HAVE_LAPACK_FALSE='#' else LINBOX_HAVE_LAPACK_TRUE='#' LINBOX_HAVE_LAPACK_FALSE= fi fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi CXXFLAGS=${BACKUP_CXXFLAGS} LIBS=${BACKUP_LIBS} # AC_MSG_RESULT($BLAS_LIBS) # AC_MSG_RESULT($BLAS_CFLAGS) # Check whether --with-expat was given. if test "${with_expat+set}" = set; then : withval=$with_expat; if test "$withval" = yes ; then EXPAT_HOME_PATH="${DEFAULT_CHECKING_PATH}" elif test "$withval" != no ; then EXPAT_HOME_PATH="$withval" fi fi min_expat_version=1.95 BACKUP_CXXFLAGS=${CXXFLAGS} BACKUP_LIBS=${LIBS} if test -n "$EXPAT_HOME_PATH"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPAT >= $min_expat_version" >&5 $as_echo_n "checking for EXPAT >= $min_expat_version... " >&6; } fi for EXPAT_HOME in ${EXPAT_HOME_PATH} do if test -r "$EXPAT_HOME/include/expat.h"; then if test "x$EXPAT_HOME" != "x/usr" -a "x$EXPAT_HOME" != "x/usr/local"; then EXPAT_CFLAGS="-I${EXPAT_HOME}/include" EXPAT_LIBS="-L${EXPAT_HOME}/lib -lexpat" else EXPAT_CFLAGS= EXPAT_LIBS="-lexpat" fi CXXFLAGS="${BACKUP_CXXFLAGS} ${EXPAT_CFLAGS} ${GMP_CFLAGS}" LIBS="${BACKUP_LIBS} ${EXPAT_LIBS} ${GMP_LIBS}" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { XML_Content_Type a; ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : if test "$cross_compiling" = yes; then : expat_found="yes" expat_cross="yes" break else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { if(XML_MAJOR_VERSION < 1 || (XML_MAJOR_VERSION == 1 && XML_MINOR_VERSION < 95)) return -1; else return 0; } _ACEOF if ac_fn_cxx_try_run "$LINENO"; then : expat_found="yes" break else expat_problem="$problem $EXPAT_HOME" unset EXPAT_CFLAGS unset EXPAT_LIBS fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi else expat_found="no" expat_checked="$checked $EXPAT_HOME" unset EXPAT_CFLAGS unset EXPAT_LIBS fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext else expat_found="no" fi done if test "x$expat_found" = "xyes" ; then $as_echo "#define XMLENABLED 1" >>confdefs.h HAVE_EXPAT=yes if test "x$expat_cross" != "xyes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5 $as_echo "found" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5 $as_echo "unknown" >&6; } echo "WARNING: You appear to be cross compiling, so there is no way to determine" echo "whether your EXPAT version is new enough. I am assuming it is." fi : elif test -n "$expat_problem"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: problem" >&5 $as_echo "problem" >&6; } echo "Sorry, your EXPAT version is too old. Disabling." : elif test "x$expat_found" = "xno" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 $as_echo "not found" >&6; } : fi if test "x$HAVE_EXPAT" = "xyes"; then LINBOX_HAVE_EXPAT_TRUE= LINBOX_HAVE_EXPAT_FALSE='#' else LINBOX_HAVE_EXPAT_TRUE='#' LINBOX_HAVE_EXPAT_FALSE= fi CXXFLAGS=${BACKUP_CXXFLAGS} LIBS=${BACKUP_LIBS} #unset LD_LIBRARY_PATH # Check whether --with-benchdir was given. if test "${with_benchdir+set}" = set; then : withval=$with_benchdir; LINBOX_BENCH_PATH="$withval" else eval LINBOX_BENCH_PATH="${prefix}/benchmarks" fi # Check whether --with-gnuplot was given. if test "${with_gnuplot+set}" = set; then : withval=$with_gnuplot; GNUPLOT_PATH="$PATH $withval" else GNUPLOT_PATH="$PATH" fi # Check whether --with-ghostscript was given. if test "${with_ghostscript+set}" = set; then : withval=$with_ghostscript; GHOSTSCRIPT_PATH="$PATH $withval" else GHOSTSCRIPT_PATH="$PATH" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gnuplot works" >&5 $as_echo_n "checking whether gnuplot works... " >&6; } res=yes; export PATH=$GNUPLOT_PATH (gnuplot --version) < /dev/null > /dev/null 2>&1 || res=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: $res" >&5 $as_echo "$res" >&6; } if test $res = no ; then echo echo "You must have gnuplot installed to create benchmark " echo "graphics for LinBox. Download the appropriate package" echo "for your distribution, or get the source tarball from" echo "http://www.gnuplot.info/download.html " else $as_echo "#define HAVE_GNUPLOT 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ps2pdf works" >&5 $as_echo_n "checking whether ps2pdf works... " >&6; } res=yes; export PATH=$GHOSTSCRIPT_PATH (ps2pdf --version -) < /dev/null > /dev/null 2>&1 || res=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: $res" >&5 $as_echo "$res" >&6; } if test $res = no ; then echo echo "You must have ps2pdf installed to create pdf benchmarks" echo "graphics for LinBox. Download the appropriate package " echo "for your distribution, or get the source tarball from " echo "http://pages.cs.wisc.edu/~ghost/ " else $as_echo "#define HAVE_GHOSTSCRIPT 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use run time optimization" >&5 $as_echo_n "checking whether to use run time optimization... " >&6; } # Check whether --enable-optimization was given. if test "${enable_optimization+set}" = set; then : enableval=$enable_optimization; WINO="`grep "define.*__FFLASFFPACK_WINOTHRESHOLD" ${FFLAS_FFPACK_LOC}/include/fflas-ffpack/fflas-ffpack-optimise.h | awk '{print $NF}'`" if test -z "{WINO}"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"fflas-ffpack was not optimised. Defaulting\"" >&5 $as_echo "\"fflas-ffpack was not optimised. Defaulting\"" >&6; } WINO="`grep "define.*__FFLASFFPACK_WINOTHRESHOLD" ${FFLAS_FFPACK_LOC}/include/fflas-ffpack/fflas-ffpack-config.h | awk '{print $NF}'`" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: OK" >&5 $as_echo "OK" >&6; } fi cat >>confdefs.h <<_ACEOF #define WINOTHRESHOLD $WINO _ACEOF else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build documentation" >&5 $as_echo_n "checking whether to build documentation... " >&6; } # Check whether --with-docdir was given. if test "${with_docdir+set}" = set; then : withval=$with_docdir; LINBOX_DOC_PATH="$withval" else eval LINBOX_DOC_PATH="${prefix}/doc" fi # Check whether --with-doxygen was given. if test "${with_doxygen+set}" = set; then : withval=$with_doxygen; DOXYGEN_PATH="$PATH $withval" else DOXYGEN_PATH="$PATH" fi # Check whether --enable-doc was given. if test "${enable_doc+set}" = set; then : enableval=$enable_doc; fi WANTDOC="no" if test "x$enable_doc" = "xyes"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether doxygen works" >&5 $as_echo_n "checking whether doxygen works... " >&6; } export PATH=$DOXYGEN_PATH (doxygen --version) < /dev/null > /dev/null 2>&1 || { { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } echo echo "You must have doxygen installed to create documentation for" echo "LinBox. This error only happens if you use --enable-doc." echo "Download the appropriate package for your distribution, or get" echo "the source tarball from http://www.stack.nl/~dimitri/doxygen/" exit -1 } { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } WANTDOC="yes" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$WANTDOC" != "xno" ; then LINBOX_BUILD_DOC_TRUE= LINBOX_BUILD_DOC_FALSE='#' else LINBOX_BUILD_DOC_TRUE='#' LINBOX_BUILD_DOC_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dot works" >&5 $as_echo_n "checking whether dot works... " >&6; } res=yes; (dot -V) < /dev/null > /dev/null 2>&1 || res=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: $res" >&5 $as_echo "$res" >&6; } if test $res = yes; then : sed 's/^HAVE_DOT.*/HAVE_DOT = YES/' doc/Doxyfile.mod > doc/Doxyfile sed 's/^HAVE_DOT.*/HAVE_DOT = YES/' doc/DoxyfileDev.mod > doc/DoxyfileDev else cp doc/Doxyfile.mod doc/Doxyfile ; cp doc/DoxyfileDev.mod doc/DoxyfileDev fi if test ! -d ./benchmarks/data ; then echo "Creating data dir in benchmark" ; mkdir ./benchmarks/data ; fi # this is bogus so far as I can tell. -bds #CXXFLAGS="${GMP_CFLAGS} ${NTL_CFLAGS} ${GIVARO_CFLAGS} ${SACLIB_CFLAGS} ${CXXFLAGS}" #AC_SUBST(CXXFLAGS) CXXFLAGS="${GMP_CFLAGS} ${CXXFLAGS}" echo "-----------------------------------------------" ac_config_files="$ac_config_files Makefile linbox-config examples/Makefile examples/fields/Makefile examples/Readme-make doc/Makefile linbox/Makefile linbox/algorithms/Makefile linbox/algorithms/gauss/Makefile linbox/algorithms/matrix-blas3/Makefile linbox/blackbox/Makefile linbox/element/Makefile linbox/field/Makefile linbox/field/NTL/Makefile linbox/field/Givaro/Makefile linbox/field/Modular/Makefile linbox/matrix/Makefile linbox/randiter/Makefile linbox/ring/Makefile linbox/solutions/Makefile linbox/switch/Makefile linbox/util/Makefile linbox/util/formats/Makefile linbox/vector/Makefile tests/Makefile tests/data/Makefile tests/matrix/Makefile interfaces/Makefile interfaces/driver/Makefile interfaces/maple/Makefile interfaces/kaapi/Makefile interfaces/sage/Makefile macros/Makefile benchmarks/Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # 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. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}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 "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else case $cache_file in #( */* | ?:*) mv -f confcache "$cache_file"$$ && mv -f "$cache_file"$$ "$cache_file" ;; #( *) mv -f confcache "$cache_file" ;; esac fi fi else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} 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}' DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' else am__EXEEXT_TRUE='#' am__EXEEXT_FALSE= fi if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then as_fn_error $? "conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${INSIDE_GNOME_COMMON_TRUE}" && test -z "${INSIDE_GNOME_COMMON_FALSE}"; then as_fn_error $? "conditional \"INSIDE_GNOME_COMMON\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${DEBUG_TRUE}" && test -z "${DEBUG_FALSE}"; then as_fn_error $? "conditional \"DEBUG\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${PROFILE_TRUE}" && test -z "${PROFILE_FALSE}"; then as_fn_error $? "conditional \"PROFILE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${LINBOX_COMPILE_DRIVERS_TRUE}" && test -z "${LINBOX_COMPILE_DRIVERS_FALSE}"; then as_fn_error $? "conditional \"LINBOX_COMPILE_DRIVERS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${LINBOX_HAVE_IML_TRUE}" && test -z "${LINBOX_HAVE_IML_FALSE}"; then as_fn_error $? "conditional \"LINBOX_HAVE_IML\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${LINBOX_HAVE_M4RI_TRUE}" && test -z "${LINBOX_HAVE_M4RI_FALSE}"; then as_fn_error $? "conditional \"LINBOX_HAVE_M4RI\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${LINBOX_HAVE_M4RIE_TRUE}" && test -z "${LINBOX_HAVE_M4RIE_FALSE}"; then as_fn_error $? "conditional \"LINBOX_HAVE_M4RIE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${LINBOX_HAVE_MPFR_TRUE}" && test -z "${LINBOX_HAVE_MPFR_FALSE}"; then as_fn_error $? "conditional \"LINBOX_HAVE_MPFR\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${LINBOX_HAVE_FPLLL_TRUE}" && test -z "${LINBOX_HAVE_FPLLL_FALSE}"; then as_fn_error $? "conditional \"LINBOX_HAVE_FPLLL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${LINBOX_HAVE_NTL_TRUE}" && test -z "${LINBOX_HAVE_NTL_FALSE}"; then as_fn_error $? "conditional \"LINBOX_HAVE_NTL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${LINBOX_HAVE_GIVARO_TRUE}" && test -z "${LINBOX_HAVE_GIVARO_FALSE}"; then as_fn_error $? "conditional \"LINBOX_HAVE_GIVARO\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${LINBOX_HAVE_SACLIB_TRUE}" && test -z "${LINBOX_HAVE_SACLIB_FALSE}"; then as_fn_error $? "conditional \"LINBOX_HAVE_SACLIB\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${LINBOX_HAVE_LIDIA_TRUE}" && test -z "${LINBOX_HAVE_LIDIA_FALSE}"; then as_fn_error $? "conditional \"LINBOX_HAVE_LIDIA\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${LINBOX_HAVE_MAPLE_TRUE}" && test -z "${LINBOX_HAVE_MAPLE_FALSE}"; then as_fn_error $? "conditional \"LINBOX_HAVE_MAPLE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${LINBOX_COMPILE_DRIVERS_TRUE}" && test -z "${LINBOX_COMPILE_DRIVERS_FALSE}"; then as_fn_error $? "conditional \"LINBOX_COMPILE_DRIVERS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${LINBOX_HAVE_SAGE_TRUE}" && test -z "${LINBOX_HAVE_SAGE_FALSE}"; then as_fn_error $? "conditional \"LINBOX_HAVE_SAGE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${LINBOX_HAVE_FFLAS_FFPACK_TRUE}" && test -z "${LINBOX_HAVE_FFLAS_FFPACK_FALSE}"; then as_fn_error $? "conditional \"LINBOX_HAVE_FFLAS_FFPACK\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${LINBOX_HAVE_LAPACK_TRUE}" && test -z "${LINBOX_HAVE_LAPACK_FALSE}"; then as_fn_error $? "conditional \"LINBOX_HAVE_LAPACK\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${LINBOX_HAVE_LAPACK_TRUE}" && test -z "${LINBOX_HAVE_LAPACK_FALSE}"; then as_fn_error $? "conditional \"LINBOX_HAVE_LAPACK\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${LINBOX_HAVE_LAPACK_TRUE}" && test -z "${LINBOX_HAVE_LAPACK_FALSE}"; then as_fn_error $? "conditional \"LINBOX_HAVE_LAPACK\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${LINBOX_HAVE_EXPAT_TRUE}" && test -z "${LINBOX_HAVE_EXPAT_FALSE}"; then as_fn_error $? "conditional \"LINBOX_HAVE_EXPAT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${LINBOX_BUILD_DOC_TRUE}" && test -z "${LINBOX_BUILD_DOC_FALSE}"; then as_fn_error $? "conditional \"LINBOX_BUILD_DOC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $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} export SHELL _ASEOF cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= 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 IFS=$as_save_IFS ;; 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 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; 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 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # 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 ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p as_test_x='test -x' as_executable_p=as_fn_executable_p # 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'" exec 6>&1 ## ----------------------------------- ## ## Main body of $CONFIG_STATUS script. ## ## ----------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by LinBox $as_me 1.3.2, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac case $ac_config_headers in *" "*) set x $ac_config_headers; shift; ac_config_headers=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" config_commands="$ac_config_commands" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit --config print configuration, then exit -q, --quiet, --silent 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 . LinBox home page: ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ LinBox config.status 1.3.2 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. 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=`expr "X$1" : 'X\([^=]*\)='` ac_optarg= ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; 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 || ac_write_fail=1 if \$ac_cs_recheck; then set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # PACKAGE="$PACKAGE" AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`' macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`' enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`' enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`' pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`' enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`' SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`' ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`' PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`' host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`' host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`' host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`' build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`' build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`' build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`' SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`' Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`' GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`' EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`' FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`' LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`' NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`' LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`' max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`' ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`' exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`' lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`' old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`' lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`' CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`' CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`' compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`' GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`' OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`' libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`' shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`' extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`' archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`' enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`' export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`' whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`' compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`' old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`' old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`' archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`' archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`' module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`' module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`' with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`' allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`' no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`' hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`' hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`' hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`' hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`' hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`' hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`' hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`' version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`' runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`' shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`' shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`' libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`' library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`' soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`' install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`' postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`' postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`' finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`' finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`' hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`' sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`' sys_lib_dlsearch_path_spec='`$ECHO "$sys_lib_dlsearch_path_spec" | $SED "$delay_single_quote_subst"`' hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`' enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`' enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`' enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`' old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`' striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`' compiler_lib_search_dirs='`$ECHO "$compiler_lib_search_dirs" | $SED "$delay_single_quote_subst"`' predep_objects='`$ECHO "$predep_objects" | $SED "$delay_single_quote_subst"`' postdep_objects='`$ECHO "$postdep_objects" | $SED "$delay_single_quote_subst"`' predeps='`$ECHO "$predeps" | $SED "$delay_single_quote_subst"`' postdeps='`$ECHO "$postdeps" | $SED "$delay_single_quote_subst"`' compiler_lib_search_path='`$ECHO "$compiler_lib_search_path" | $SED "$delay_single_quote_subst"`' LD_CXX='`$ECHO "$LD_CXX" | $SED "$delay_single_quote_subst"`' reload_flag_CXX='`$ECHO "$reload_flag_CXX" | $SED "$delay_single_quote_subst"`' reload_cmds_CXX='`$ECHO "$reload_cmds_CXX" | $SED "$delay_single_quote_subst"`' old_archive_cmds_CXX='`$ECHO "$old_archive_cmds_CXX" | $SED "$delay_single_quote_subst"`' compiler_CXX='`$ECHO "$compiler_CXX" | $SED "$delay_single_quote_subst"`' GCC_CXX='`$ECHO "$GCC_CXX" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag_CXX='`$ECHO "$lt_prog_compiler_no_builtin_flag_CXX" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_pic_CXX='`$ECHO "$lt_prog_compiler_pic_CXX" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_wl_CXX='`$ECHO "$lt_prog_compiler_wl_CXX" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_static_CXX='`$ECHO "$lt_prog_compiler_static_CXX" | $SED "$delay_single_quote_subst"`' lt_cv_prog_compiler_c_o_CXX='`$ECHO "$lt_cv_prog_compiler_c_o_CXX" | $SED "$delay_single_quote_subst"`' archive_cmds_need_lc_CXX='`$ECHO "$archive_cmds_need_lc_CXX" | $SED "$delay_single_quote_subst"`' enable_shared_with_static_runtimes_CXX='`$ECHO "$enable_shared_with_static_runtimes_CXX" | $SED "$delay_single_quote_subst"`' export_dynamic_flag_spec_CXX='`$ECHO "$export_dynamic_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' whole_archive_flag_spec_CXX='`$ECHO "$whole_archive_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' compiler_needs_object_CXX='`$ECHO "$compiler_needs_object_CXX" | $SED "$delay_single_quote_subst"`' old_archive_from_new_cmds_CXX='`$ECHO "$old_archive_from_new_cmds_CXX" | $SED "$delay_single_quote_subst"`' old_archive_from_expsyms_cmds_CXX='`$ECHO "$old_archive_from_expsyms_cmds_CXX" | $SED "$delay_single_quote_subst"`' archive_cmds_CXX='`$ECHO "$archive_cmds_CXX" | $SED "$delay_single_quote_subst"`' archive_expsym_cmds_CXX='`$ECHO "$archive_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`' module_cmds_CXX='`$ECHO "$module_cmds_CXX" | $SED "$delay_single_quote_subst"`' module_expsym_cmds_CXX='`$ECHO "$module_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`' with_gnu_ld_CXX='`$ECHO "$with_gnu_ld_CXX" | $SED "$delay_single_quote_subst"`' allow_undefined_flag_CXX='`$ECHO "$allow_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`' no_undefined_flag_CXX='`$ECHO "$no_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`' hardcode_libdir_flag_spec_CXX='`$ECHO "$hardcode_libdir_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' hardcode_libdir_separator_CXX='`$ECHO "$hardcode_libdir_separator_CXX" | $SED "$delay_single_quote_subst"`' hardcode_direct_CXX='`$ECHO "$hardcode_direct_CXX" | $SED "$delay_single_quote_subst"`' hardcode_direct_absolute_CXX='`$ECHO "$hardcode_direct_absolute_CXX" | $SED "$delay_single_quote_subst"`' hardcode_minus_L_CXX='`$ECHO "$hardcode_minus_L_CXX" | $SED "$delay_single_quote_subst"`' hardcode_shlibpath_var_CXX='`$ECHO "$hardcode_shlibpath_var_CXX" | $SED "$delay_single_quote_subst"`' hardcode_automatic_CXX='`$ECHO "$hardcode_automatic_CXX" | $SED "$delay_single_quote_subst"`' inherit_rpath_CXX='`$ECHO "$inherit_rpath_CXX" | $SED "$delay_single_quote_subst"`' link_all_deplibs_CXX='`$ECHO "$link_all_deplibs_CXX" | $SED "$delay_single_quote_subst"`' always_export_symbols_CXX='`$ECHO "$always_export_symbols_CXX" | $SED "$delay_single_quote_subst"`' export_symbols_cmds_CXX='`$ECHO "$export_symbols_cmds_CXX" | $SED "$delay_single_quote_subst"`' exclude_expsyms_CXX='`$ECHO "$exclude_expsyms_CXX" | $SED "$delay_single_quote_subst"`' include_expsyms_CXX='`$ECHO "$include_expsyms_CXX" | $SED "$delay_single_quote_subst"`' prelink_cmds_CXX='`$ECHO "$prelink_cmds_CXX" | $SED "$delay_single_quote_subst"`' postlink_cmds_CXX='`$ECHO "$postlink_cmds_CXX" | $SED "$delay_single_quote_subst"`' file_list_spec_CXX='`$ECHO "$file_list_spec_CXX" | $SED "$delay_single_quote_subst"`' hardcode_action_CXX='`$ECHO "$hardcode_action_CXX" | $SED "$delay_single_quote_subst"`' compiler_lib_search_dirs_CXX='`$ECHO "$compiler_lib_search_dirs_CXX" | $SED "$delay_single_quote_subst"`' predep_objects_CXX='`$ECHO "$predep_objects_CXX" | $SED "$delay_single_quote_subst"`' postdep_objects_CXX='`$ECHO "$postdep_objects_CXX" | $SED "$delay_single_quote_subst"`' predeps_CXX='`$ECHO "$predeps_CXX" | $SED "$delay_single_quote_subst"`' postdeps_CXX='`$ECHO "$postdeps_CXX" | $SED "$delay_single_quote_subst"`' compiler_lib_search_path_CXX='`$ECHO "$compiler_lib_search_path_CXX" | $SED "$delay_single_quote_subst"`' LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$1 _LTECHO_EOF' } # Quote evaled strings. for var in SHELL \ ECHO \ PATH_SEPARATOR \ SED \ GREP \ EGREP \ FGREP \ LD \ NM \ LN_S \ lt_SP2NL \ lt_NL2SP \ reload_flag \ OBJDUMP \ deplibs_check_method \ file_magic_cmd \ file_magic_glob \ want_nocaseglob \ DLLTOOL \ sharedlib_from_linklib_cmd \ AR \ AR_FLAGS \ archiver_list_spec \ STRIP \ RANLIB \ CC \ CFLAGS \ compiler \ lt_cv_sys_global_symbol_pipe \ lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ nm_file_list_spec \ lt_prog_compiler_no_builtin_flag \ lt_prog_compiler_pic \ lt_prog_compiler_wl \ lt_prog_compiler_static \ lt_cv_prog_compiler_c_o \ need_locks \ MANIFEST_TOOL \ DSYMUTIL \ NMEDIT \ LIPO \ OTOOL \ OTOOL64 \ shrext_cmds \ export_dynamic_flag_spec \ whole_archive_flag_spec \ compiler_needs_object \ with_gnu_ld \ allow_undefined_flag \ no_undefined_flag \ hardcode_libdir_flag_spec \ hardcode_libdir_separator \ exclude_expsyms \ include_expsyms \ file_list_spec \ variables_saved_for_relink \ libname_spec \ library_names_spec \ soname_spec \ install_override_mode \ finish_eval \ old_striplib \ striplib \ compiler_lib_search_dirs \ predep_objects \ postdep_objects \ predeps \ postdeps \ compiler_lib_search_path \ LD_CXX \ reload_flag_CXX \ compiler_CXX \ lt_prog_compiler_no_builtin_flag_CXX \ lt_prog_compiler_pic_CXX \ lt_prog_compiler_wl_CXX \ lt_prog_compiler_static_CXX \ lt_cv_prog_compiler_c_o_CXX \ export_dynamic_flag_spec_CXX \ whole_archive_flag_spec_CXX \ compiler_needs_object_CXX \ with_gnu_ld_CXX \ allow_undefined_flag_CXX \ no_undefined_flag_CXX \ hardcode_libdir_flag_spec_CXX \ hardcode_libdir_separator_CXX \ exclude_expsyms_CXX \ include_expsyms_CXX \ file_list_spec_CXX \ compiler_lib_search_dirs_CXX \ predep_objects_CXX \ postdep_objects_CXX \ predeps_CXX \ postdeps_CXX \ compiler_lib_search_path_CXX; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Double-quote double-evaled strings. for var in reload_cmds \ old_postinstall_cmds \ old_postuninstall_cmds \ old_archive_cmds \ extract_expsyms_cmds \ old_archive_from_new_cmds \ old_archive_from_expsyms_cmds \ archive_cmds \ archive_expsym_cmds \ module_cmds \ module_expsym_cmds \ export_symbols_cmds \ prelink_cmds \ postlink_cmds \ postinstall_cmds \ postuninstall_cmds \ finish_cmds \ sys_lib_search_path_spec \ sys_lib_dlsearch_path_spec \ reload_cmds_CXX \ old_archive_cmds_CXX \ old_archive_from_new_cmds_CXX \ old_archive_from_expsyms_cmds_CXX \ archive_cmds_CXX \ archive_expsym_cmds_CXX \ module_cmds_CXX \ module_expsym_cmds_CXX \ export_symbols_cmds_CXX \ prelink_cmds_CXX \ postlink_cmds_CXX; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done ac_aux_dir='$ac_aux_dir' xsi_shell='$xsi_shell' lt_shell_append='$lt_shell_append' # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi PACKAGE='$PACKAGE' VERSION='$VERSION' TIMESTAMP='$TIMESTAMP' RM='$RM' ofile='$ofile' _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; "linbox/linbox-config.h") CONFIG_COMMANDS="$CONFIG_COMMANDS linbox/linbox-config.h" ;; "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "linbox-config") CONFIG_FILES="$CONFIG_FILES linbox-config" ;; "examples/Makefile") CONFIG_FILES="$CONFIG_FILES examples/Makefile" ;; "examples/fields/Makefile") CONFIG_FILES="$CONFIG_FILES examples/fields/Makefile" ;; "examples/Readme-make") CONFIG_FILES="$CONFIG_FILES examples/Readme-make" ;; "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; "linbox/Makefile") CONFIG_FILES="$CONFIG_FILES linbox/Makefile" ;; "linbox/algorithms/Makefile") CONFIG_FILES="$CONFIG_FILES linbox/algorithms/Makefile" ;; "linbox/algorithms/gauss/Makefile") CONFIG_FILES="$CONFIG_FILES linbox/algorithms/gauss/Makefile" ;; "linbox/algorithms/matrix-blas3/Makefile") CONFIG_FILES="$CONFIG_FILES linbox/algorithms/matrix-blas3/Makefile" ;; "linbox/blackbox/Makefile") CONFIG_FILES="$CONFIG_FILES linbox/blackbox/Makefile" ;; "linbox/element/Makefile") CONFIG_FILES="$CONFIG_FILES linbox/element/Makefile" ;; "linbox/field/Makefile") CONFIG_FILES="$CONFIG_FILES linbox/field/Makefile" ;; "linbox/field/NTL/Makefile") CONFIG_FILES="$CONFIG_FILES linbox/field/NTL/Makefile" ;; "linbox/field/Givaro/Makefile") CONFIG_FILES="$CONFIG_FILES linbox/field/Givaro/Makefile" ;; "linbox/field/Modular/Makefile") CONFIG_FILES="$CONFIG_FILES linbox/field/Modular/Makefile" ;; "linbox/matrix/Makefile") CONFIG_FILES="$CONFIG_FILES linbox/matrix/Makefile" ;; "linbox/randiter/Makefile") CONFIG_FILES="$CONFIG_FILES linbox/randiter/Makefile" ;; "linbox/ring/Makefile") CONFIG_FILES="$CONFIG_FILES linbox/ring/Makefile" ;; "linbox/solutions/Makefile") CONFIG_FILES="$CONFIG_FILES linbox/solutions/Makefile" ;; "linbox/switch/Makefile") CONFIG_FILES="$CONFIG_FILES linbox/switch/Makefile" ;; "linbox/util/Makefile") CONFIG_FILES="$CONFIG_FILES linbox/util/Makefile" ;; "linbox/util/formats/Makefile") CONFIG_FILES="$CONFIG_FILES linbox/util/formats/Makefile" ;; "linbox/vector/Makefile") CONFIG_FILES="$CONFIG_FILES linbox/vector/Makefile" ;; "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;; "tests/data/Makefile") CONFIG_FILES="$CONFIG_FILES tests/data/Makefile" ;; "tests/matrix/Makefile") CONFIG_FILES="$CONFIG_FILES tests/matrix/Makefile" ;; "interfaces/Makefile") CONFIG_FILES="$CONFIG_FILES interfaces/Makefile" ;; "interfaces/driver/Makefile") CONFIG_FILES="$CONFIG_FILES interfaces/driver/Makefile" ;; "interfaces/maple/Makefile") CONFIG_FILES="$CONFIG_FILES interfaces/maple/Makefile" ;; "interfaces/kaapi/Makefile") CONFIG_FILES="$CONFIG_FILES interfaces/kaapi/Makefile" ;; "interfaces/sage/Makefile") CONFIG_FILES="$CONFIG_FILES interfaces/sage/Makefile" ;; "macros/Makefile") CONFIG_FILES="$CONFIG_FILES macros/Makefile" ;; "benchmarks/Makefile") CONFIG_FILES="$CONFIG_FILES benchmarks/Makefile" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; 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 against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= ac_tmp= trap 'exit_status=$? : "${ac_tmp:=$tmp}" { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF # VPATH may cause trouble with some makes, so we remove sole $(srcdir), # ${srcdir} and @srcdir@ entries 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[ ]*=[ ]*/{ h s/// s/^/:/ s/[ ]*$/:/ s/:\$(srcdir):/:/g s/:\${srcdir}:/:/g s/:@srcdir@:/:/g s/^:*// s/:*$// x s/\(=[ ]*\).*/\1/ G s/\n// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" # Set up the scripts for CONFIG_HEADERS section. # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then cat >"$ac_tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF # Transform confdefs.h into an awk script `defines.awk', embedded as # here-document in config.status, that substitutes the proper values into # config.h.in to produce config.h. # Create a delimiter string that does not exist in confdefs.h, to ease # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do ac_tt=`sed -n "/$ac_delim/p" confdefs.h` if test -z "$ac_tt"; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done # For the awk script, D is an array of macro values keyed by name, # likewise P contains macro parameters if any. Preserve backslash # newline sequences. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* sed -n ' s/.\{148\}/&'"$ac_delim"'/g t rset :rset s/^[ ]*#[ ]*define[ ][ ]*/ / t def d :def s/\\$// t bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3"/p s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p d :bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3\\\\\\n"\\/p t cont s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p t cont d :cont n s/.\{148\}/&'"$ac_delim"'/g t clear :clear s/\\$// t bsnlc s/["\\]/\\&/g; s/^/"/; s/$/"/p d :bsnlc s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p b cont ' >$CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 for (key in D) D_is_set[key] = 1 FS = "" } /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { line = \$ 0 split(line, arg, " ") if (arg[1] == "#") { defundef = arg[2] mac1 = arg[3] } else { defundef = substr(arg[1], 2) mac1 = arg[2] } split(mac1, mac2, "(") #) macro = mac2[1] prefix = substr(line, 1, index(line, defundef) - 1) if (D_is_set[macro]) { # Preserve the white space surrounding the "#". print prefix "define", macro P[macro] D[macro] next } else { # Replace #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. if (defundef == "undef") { print "/*", prefix defundef, macro, "*/" next } } } { print } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done # 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. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$ac_tmp/stdin" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [\\/$]* | ?:[\\/]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;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&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" case $ac_file in -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :H) # # CONFIG_HEADER # if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" } >"$ac_tmp/config.h" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$ac_tmp/config.h" "$ac_file" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi # Compute "$ac_file"'s index in $config_headers. _am_arg="$ac_file" _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$_am_arg" : 'X\(//\)[^/]' \| \ X"$_am_arg" : 'X\(//\)$' \| \ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$_am_arg" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'`/stamp-h$_am_stamp_count ;; :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 $as_echo "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "linbox/linbox-config.h":C) ac_prefix_conf_OUT=`echo linbox/linbox-config.h` ac_prefix_conf_DEF=`echo _$ac_prefix_conf_OUT | sed -e "y:abcdefghijklmnopqrstuvwxyz:ABCDEFGHIJKLMNOPQRSTUVWXYZ:" -e "s/[^abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ]/_/g"` ac_prefix_conf_PKG=`echo __LINBOX` ac_prefix_conf_LOW=`echo _$ac_prefix_conf_PKG | sed -e "y:ABCDEFGHIJKLMNOPQRSTUVWXYZ-:abcdefghijklmnopqrstuvwxyz_:"` ac_prefix_conf_UPP=`echo $ac_prefix_conf_PKG | sed -e "y:abcdefghijklmnopqrstuvwxyz-:ABCDEFGHIJKLMNOPQRSTUVWXYZ_:" -e "/^[0123456789]/s/^/_/"` ac_prefix_conf_INP=`echo "" | sed -e 's/ *//'` if test ".$ac_prefix_conf_INP" = "."; then for ac_file in : $CONFIG_HEADERS; do test "_$ac_file" = _: && continue case "$ac_file" in *.h) ac_prefix_conf_INP=$ac_file ;; *) esac test ".$ac_prefix_conf_INP" != "." && break done fi if test ".$ac_prefix_conf_INP" = "."; then case "$ac_prefix_conf_OUT" in */*) ac_prefix_conf_INP=`basename "$ac_prefix_conf_OUT"` ;; *-*) ac_prefix_conf_INP=`echo "$ac_prefix_conf_OUT" | sed -e "s/[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_]*-//"` ;; *) ac_prefix_conf_INP=config.h ;; esac fi if test -z "$ac_prefix_conf_PKG" ; then as_fn_error $? "no prefix for _PREFIX_PKG_CONFIG_H" "$LINENO" 5 else if test ! -f "$ac_prefix_conf_INP" ; then if test -f "$srcdir/$ac_prefix_conf_INP" ; then ac_prefix_conf_INP="$srcdir/$ac_prefix_conf_INP" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_prefix_conf_OUT - prefix $ac_prefix_conf_UPP for $ac_prefix_conf_INP defines" >&5 $as_echo "$as_me: creating $ac_prefix_conf_OUT - prefix $ac_prefix_conf_UPP for $ac_prefix_conf_INP defines" >&6;} if test -f $ac_prefix_conf_INP ; then echo "s/#undef *\\([ABCDEFGHIJKLMNOPQRSTUVWXYZ_]\\)/#undef $ac_prefix_conf_UPP""_\\1/" > conftest.prefix echo "s/#undef *\\([abcdefghijklmnopqrstuvwxyz]\\)/#undef $ac_prefix_conf_LOW""_\\1/" >> conftest.prefix echo "s/#define *\\([ABCDEFGHIJKLMNOPQRSTUVWXYZ_][abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_]*\\)\\(.*\\)/#ifndef $ac_prefix_conf_UPP""_\\1 \\" >> conftest.prefix echo "#define $ac_prefix_conf_UPP""_\\1 \\2 \\" >> conftest.prefix echo "#endif/" >>conftest.prefix echo "s/#define *\\([abcdefghijklmnopqrstuvwxyz][abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_]*\\)\\(.*\\)/#ifndef $ac_prefix_conf_LOW""_\\1 \\" >> conftest.prefix echo "#define $ac_prefix_conf_LOW""_\\1 \\2 \\" >> conftest.prefix echo "#endif/" >> conftest.prefix # now executing _script on _DEF input to create _OUT output file echo "#ifndef $ac_prefix_conf_DEF" >$tmp/pconfig.h echo "#define $ac_prefix_conf_DEF 1" >>$tmp/pconfig.h echo ' ' >>$tmp/pconfig.h echo /'*' $ac_prefix_conf_OUT. Generated automatically at end of configure. '*'/ >>$tmp/pconfig.h sed -f conftest.prefix $ac_prefix_conf_INP >>$tmp/pconfig.h echo ' ' >>$tmp/pconfig.h echo '/* once:' $ac_prefix_conf_DEF '*/' >>$tmp/pconfig.h echo "#endif" >>$tmp/pconfig.h if cmp -s $ac_prefix_conf_OUT $tmp/pconfig.h 2>/dev/null; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_prefix_conf_OUT is unchanged" >&5 $as_echo "$as_me: $ac_prefix_conf_OUT is unchanged" >&6;} else ac_dir=`$as_dirname -- "$ac_prefix_conf_OUT" || $as_expr X"$ac_prefix_conf_OUT" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_prefix_conf_OUT" : 'X\(//\)[^/]' \| \ X"$ac_prefix_conf_OUT" : 'X\(//\)$' \| \ X"$ac_prefix_conf_OUT" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_prefix_conf_OUT" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p rm -f "$ac_prefix_conf_OUT" mv $tmp/pconfig.h "$ac_prefix_conf_OUT" fi cp conftest.prefix _configs.sed else as_fn_error $? "input file $ac_prefix_conf_INP does not exist - skip generating $ac_prefix_conf_OUT" "$LINENO" 5 fi rm -f conftest.* fi ;; "depfiles":C) test x"$AMDEP_TRUE" != x"" || { # Autoconf 2.62 quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf 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. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`$as_dirname -- "$file" || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir=$dirpart/$fdir; as_fn_mkdir_p # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ;; "libtool":C) # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi cfgfile="${ofile}T" trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. # # GNU Libtool 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. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, or # obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # The names of the tagged configurations supported by this script. available_tags="CXX " # ### BEGIN LIBTOOL CONFIG # Which release of libtool.m4 was used? macro_version=$macro_version macro_revision=$macro_revision # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # What type of objects to build. pic_mode=$pic_mode # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # An echo program that protects backslashes. ECHO=$lt_ECHO # The PATH separator for the build system. PATH_SEPARATOR=$lt_PATH_SEPARATOR # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # A sed program that does not truncate output. SED=$lt_SED # Sed that helps us avoid accidentally triggering echo(1) options like -n. Xsed="\$SED -e 1s/^X//" # A grep program that handles long lines. GREP=$lt_GREP # An ERE matcher. EGREP=$lt_EGREP # A literal string matcher. FGREP=$lt_FGREP # A BSD- or MS-compatible name lister. NM=$lt_NM # Whether we need soft or hard links. LN_S=$lt_LN_S # What is the maximum length of a command? max_cmd_len=$max_cmd_len # Object file suffix (normally "o"). objext=$ac_objext # Executable file suffix (normally ""). exeext=$exeext # whether the shell understands "unset". lt_unset=$lt_unset # turn spaces into newlines. SP2NL=$lt_lt_SP2NL # turn newlines into spaces. NL2SP=$lt_lt_NL2SP # convert \$build file names to \$host format. to_host_file_cmd=$lt_cv_to_host_file_cmd # convert \$build files to toolchain format. to_tool_file_cmd=$lt_cv_to_tool_file_cmd # An object symbol dumper. OBJDUMP=$lt_OBJDUMP # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method = "file_magic". file_magic_cmd=$lt_file_magic_cmd # How to find potential files when deplibs_check_method = "file_magic". file_magic_glob=$lt_file_magic_glob # Find potential files using nocaseglob when deplibs_check_method = "file_magic". want_nocaseglob=$lt_want_nocaseglob # DLL creation program. DLLTOOL=$lt_DLLTOOL # Command to associate shared and link libraries. sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd # The archiver. AR=$lt_AR # Flags to create an archive. AR_FLAGS=$lt_AR_FLAGS # How to feed a file listing to the archiver. archiver_list_spec=$lt_archiver_list_spec # A symbol stripping program. STRIP=$lt_STRIP # Commands used to install an old-style archive. RANLIB=$lt_RANLIB old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Whether to use a lock for old archive extraction. lock_old_archive_extraction=$lock_old_archive_extraction # A C compiler. LTCC=$lt_CC # LTCC compiler flags. LTCFLAGS=$lt_CFLAGS # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration. global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair. global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # Transform the output of nm in a C name address pair when lib prefix is needed. global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix # Specify filename containing input files for \$NM. nm_file_list_spec=$lt_nm_file_list_spec # The root where to search for dependent libraries,and in which our libraries should be installed. lt_sysroot=$lt_sysroot # The name of the directory that contains temporary libtool files. objdir=$objdir # Used to examine libraries when file_magic_cmd begins with "file". MAGIC_CMD=$MAGIC_CMD # Must we lock files when doing compilation? need_locks=$lt_need_locks # Manifest tool. MANIFEST_TOOL=$lt_MANIFEST_TOOL # Tool to manipulate archived DWARF debug symbol files on Mac OS X. DSYMUTIL=$lt_DSYMUTIL # Tool to change global to local symbols on Mac OS X. NMEDIT=$lt_NMEDIT # Tool to manipulate fat objects and archives on Mac OS X. LIPO=$lt_LIPO # ldd/readelf like tool for Mach-O binaries on Mac OS X. OTOOL=$lt_OTOOL # ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. OTOOL64=$lt_OTOOL64 # Old archive suffix (normally "a"). libext=$libext # Shared library suffix (normally ".so"). shrext_cmds=$lt_shrext_cmds # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Variables whose values should be saved in libtool wrapper scripts and # restored at link time. variables_saved_for_relink=$lt_variables_saved_for_relink # Do we need the "lib" prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Library versioning type. version_type=$version_type # Shared library runtime path variable. runpath_var=$runpath_var # Shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Permission mode override for installation of shared libraries. install_override_mode=$lt_install_override_mode # Command to use after installation of a shared archive. postinstall_cmds=$lt_postinstall_cmds # Command to use after uninstallation of a shared archive. postuninstall_cmds=$lt_postuninstall_cmds # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # As "finish_cmds", except a single script fragment to be evaled but # not shown. finish_eval=$lt_finish_eval # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Compile-time system search path for libraries. sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries. sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # The linker used to build libraries. LD=$lt_LD # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # Commands used to build an old-style archive. old_archive_cmds=$lt_old_archive_cmds # A language specific compiler. CC=$lt_compiler # Is the compiler the GNU compiler? with_gcc=$GCC # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc # Whether or not to disallow shared libs when runtime libs are static. allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec # Whether the compiler copes with passing no objects directly. compiler_needs_object=$lt_compiler_needs_object # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds # Commands used to build a shared archive. archive_cmds=$lt_archive_cmds archive_expsym_cmds=$lt_archive_expsym_cmds # Commands used to build a loadable module if different from building # a shared archive. module_cmds=$lt_module_cmds module_expsym_cmds=$lt_module_expsym_cmds # Whether we are building with GNU ld or not. with_gnu_ld=$lt_with_gnu_ld # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag # Flag that enforces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec # Whether we need a single "-rpath" flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary. hardcode_direct=$hardcode_direct # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary and the resulting library dependency is # "absolute",i.e impossible to change by setting \${shlibpath_var} if the # library is relocated. hardcode_direct_absolute=$hardcode_direct_absolute # Set to "yes" if using the -LDIR flag during linking hardcodes DIR # into the resulting binary. hardcode_minus_L=$hardcode_minus_L # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR # into the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var # Set to "yes" if building a shared library automatically hardcodes DIR # into the library and all subsequent libraries and executables linked # against it. hardcode_automatic=$hardcode_automatic # Set to yes if linker adds runtime paths of dependent libraries # to runtime path list. inherit_rpath=$inherit_rpath # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms # Symbols that must always be exported. include_expsyms=$lt_include_expsyms # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds # Commands necessary for finishing linking programs. postlink_cmds=$lt_postlink_cmds # Specify filename containing input files. file_list_spec=$lt_file_list_spec # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action # The directories searched by this compiler when creating a shared library. compiler_lib_search_dirs=$lt_compiler_lib_search_dirs # Dependencies to place before and after the objects being linked to # create a shared library. predep_objects=$lt_predep_objects postdep_objects=$lt_postdep_objects predeps=$lt_predeps postdeps=$lt_postdeps # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path # ### END LIBTOOL CONFIG _LT_EOF case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi _LT_EOF ;; esac ltmain="$ac_aux_dir/ltmain.sh" # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) if test x"$xsi_shell" = xyes; then sed -e '/^func_dirname ()$/,/^} # func_dirname /c\ func_dirname ()\ {\ \ case ${1} in\ \ */*) func_dirname_result="${1%/*}${2}" ;;\ \ * ) func_dirname_result="${3}" ;;\ \ esac\ } # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_basename ()$/,/^} # func_basename /c\ func_basename ()\ {\ \ func_basename_result="${1##*/}"\ } # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\ func_dirname_and_basename ()\ {\ \ case ${1} in\ \ */*) func_dirname_result="${1%/*}${2}" ;;\ \ * ) func_dirname_result="${3}" ;;\ \ esac\ \ func_basename_result="${1##*/}"\ } # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_stripname ()$/,/^} # func_stripname /c\ func_stripname ()\ {\ \ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\ \ # positional parameters, so assign one to ordinary parameter first.\ \ func_stripname_result=${3}\ \ func_stripname_result=${func_stripname_result#"${1}"}\ \ func_stripname_result=${func_stripname_result%"${2}"}\ } # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\ func_split_long_opt ()\ {\ \ func_split_long_opt_name=${1%%=*}\ \ func_split_long_opt_arg=${1#*=}\ } # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\ func_split_short_opt ()\ {\ \ func_split_short_opt_arg=${1#??}\ \ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\ } # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\ func_lo2o ()\ {\ \ case ${1} in\ \ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\ \ *) func_lo2o_result=${1} ;;\ \ esac\ } # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_xform ()$/,/^} # func_xform /c\ func_xform ()\ {\ func_xform_result=${1%.*}.lo\ } # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_arith ()$/,/^} # func_arith /c\ func_arith ()\ {\ func_arith_result=$(( $* ))\ } # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_len ()$/,/^} # func_len /c\ func_len ()\ {\ func_len_result=${#1}\ } # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: fi if test x"$lt_shell_append" = xyes; then sed -e '/^func_append ()$/,/^} # func_append /c\ func_append ()\ {\ eval "${1}+=\\${2}"\ } # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\ func_append_quoted ()\ {\ \ func_quote_for_eval "${2}"\ \ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\ } # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: # Save a `func_append' function call where possible by direct use of '+=' sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: else # Save a `func_append' function call even when '+=' is not available sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: fi if test x"$_lt_function_replace_fail" = x":"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5 $as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;} fi mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" cat <<_LT_EOF >> "$ofile" # ### BEGIN LIBTOOL TAG CONFIG: CXX # The linker used to build libraries. LD=$lt_LD_CXX # How to create reloadable object files. reload_flag=$lt_reload_flag_CXX reload_cmds=$lt_reload_cmds_CXX # Commands used to build an old-style archive. old_archive_cmds=$lt_old_archive_cmds_CXX # A language specific compiler. CC=$lt_compiler_CXX # Is the compiler the GNU compiler? with_gcc=$GCC_CXX # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_CXX # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_CXX # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_CXX # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_CXX # Whether or not to disallow shared libs when runtime libs are static. allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX # Whether the compiler copes with passing no objects directly. compiler_needs_object=$lt_compiler_needs_object_CXX # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX # Commands used to build a shared archive. archive_cmds=$lt_archive_cmds_CXX archive_expsym_cmds=$lt_archive_expsym_cmds_CXX # Commands used to build a loadable module if different from building # a shared archive. module_cmds=$lt_module_cmds_CXX module_expsym_cmds=$lt_module_expsym_cmds_CXX # Whether we are building with GNU ld or not. with_gnu_ld=$lt_with_gnu_ld_CXX # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_CXX # Flag that enforces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_CXX # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX # Whether we need a single "-rpath" flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary. hardcode_direct=$hardcode_direct_CXX # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary and the resulting library dependency is # "absolute",i.e impossible to change by setting \${shlibpath_var} if the # library is relocated. hardcode_direct_absolute=$hardcode_direct_absolute_CXX # Set to "yes" if using the -LDIR flag during linking hardcodes DIR # into the resulting binary. hardcode_minus_L=$hardcode_minus_L_CXX # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR # into the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX # Set to "yes" if building a shared library automatically hardcodes DIR # into the library and all subsequent libraries and executables linked # against it. hardcode_automatic=$hardcode_automatic_CXX # Set to yes if linker adds runtime paths of dependent libraries # to runtime path list. inherit_rpath=$inherit_rpath_CXX # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_CXX # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols_CXX # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_CXX # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_CXX # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_CXX # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds_CXX # Commands necessary for finishing linking programs. postlink_cmds=$lt_postlink_cmds_CXX # Specify filename containing input files. file_list_spec=$lt_file_list_spec_CXX # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_CXX # The directories searched by this compiler when creating a shared library. compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_CXX # Dependencies to place before and after the objects being linked to # create a shared library. predep_objects=$lt_predep_objects_CXX postdep_objects=$lt_postdep_objects_CXX predeps=$lt_predeps_CXX postdeps=$lt_postdeps_CXX # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_CXX # ### END LIBTOOL TAG CONFIG: CXX _LT_EOF ;; esac done # for ac_tag as_fn_exit 0 _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # 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 || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi linbox-1.3.2/configure.ac000066400000000000000000000213711176453053400153120ustar00rootroot00000000000000# Copyright (c) 2010 the LinBox group # This file is part of LinBox (and probably stolen here and there) # ========LICENCE======== # This file is part of the library LinBox. # LinBox is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # # This library 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 # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # ========LICENCE======== AC_PREREQ(2.61) AC_INIT([LinBox], [1.3.2],[linbox-use@googlegroups.com],[linbox], [http://www.linalg.org/]) AC_CONFIG_MACRO_DIR([macros]) AC_CONFIG_AUX_DIR([build-aux]) AM_INIT_AUTOMAKE([1.8 gnu no-dependencies -Wall -Wno-portability]) AM_CONFIG_HEADER([config.h]) AX_PREFIX_CONFIG_H(linbox/linbox-config.h, __LINBOX) AC_PATH_PROG(RM, rm, $FALSE) RM="$RM -f" AM_MAINTAINER_MODE AM_DEP_TRACK AM_OUTPUT_DEPENDENCY_COMMANDS AM_ACLOCAL_INCLUDE(macros) # work around to fix the backward compatibility issue of automake 1.10 with 1.9 (pb with MKDIR_P) AC_SUBST([MKDIR_P]) AC_LANG([C++]) echo "-----------------------------------------------" AC_DEBUG AC_PROFILE AC_WARNINGS echo "-----------------------------------------------" # CFLAGS=${CFLAGS:-$DEFAULT_CFLAGS} # CXXFLAGS=${CXXFLAGS:-$DEFAULT_CXXFLAGS} ###################################################### # Try and pass different flags according to compiler # ###################################################### # disable default -g -O2 CXXFLAGS : ${CXXFLAGS=""} #set CXX AC_PROG_CXX AC_COMPILER_NAME AC_SUBST([DEFAULT_CFLAGS]) AC_SUBST([DEBUG_CFLAGS]) AC_SUBST([TESTS_CFLAGS]) TESTS_CFLAGS="-O0" DEBUG_CFLAGS="-g" DEFAULT_CFLAGS="" # WARN_CFLAGS="-Wall" #TODO use -fast for icc, -ipa for eko... if test "x$DBG" = "xyes" ; then DEFAULT_CFLAGS="-O0 ${DEFAULT_CFLAGS} " #those are CXXFLAGS DEBUG_CFLAGS="${DEBUG_CFLAGS} -DDEBUG -D_LB_DEBUG" else DEFAULT_CFLAGS="-O2 ${DEFAULT_CFLAGS} " DEBUG_CFLAGS="${DEBUG_CFLAGS} -DNDEBUG -U_LB_DEBUG" fi if test "x$PROF" = "xyes" ; then DEFAULT_CFLAGS="${DEFAULT_CFLAGS} -pg" fi if test "x$WARN" = "xyes" -o "x$WARN" = "xfull" ; then case x${CCNAM} in xicc) WARN_CFLAGS="${WARN_CFLAGS} -Wcheck" # DEBUG_CFLAGS="-fast" ;; xeko) WARN_CFLAGS="${WARN_CFLAGS} -Wno-unused-parameter" ;; xgcc|xclang) WARN_CFLAGS="${WARN_CFLAGS} -Wextra -Wno-unused-parameter" if test "x${WARN}" = "xfull" ; then WARN_CFLAGS="${WARN_CFLAGS} -Wuninitialized -Wconversion -Wcast-qual -ansi -pedantic -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Wno-long-long" fi ;; *) echo echo "*******************************************************" echo "unsupported compiler ($CCNAM). Please file a bug." echo "*******************************************************" echo WARN_CFLAGS="${WARN_CFLAGS}" esac fi DEFAULT_CFLAGS="${DEFAULT_CFLAGS} ${WARN_CFLAGS} ${DEBUG_CFLAGS}" TESTS_CFLAGS="${TESTS_CFLAGS} ${WARN_CFLAGS} ${DEBUG_CFLAGS}" AC_HEADER_STDC AC_PROG_LIBTOOL # newer libtool... LT_PREREQ([2.2]) LT_INIT echo "-----------------------------------------------" # Machine characteristics AC_CHECK_SIZEOF(char, 8) AC_CHECK_SIZEOF(short, 16) AC_CHECK_SIZEOF(int, 32) AC_CHECK_SIZEOF(long, 32) AC_CHECK_SIZEOF(long long, 64) AC_CHECK_SIZEOF(__int64, 64) # Checks for header files. AC_HEADER_STDC AC_CHECK_HEADERS([float.h limits.h stddef.h stdlib.h string.h sys/time.h stdint.h]) # check endianness of the architecture AC_C_BIGENDIAN( [AC_DEFINE(HAVE_BIG_ENDIAN, 1, [Define that architecture uses big endian storage])], [AC_DEFINE(HAVE_LITTLE_ENDIAN, 1, [Define that architecture uses little endian storage])], []) # Create some useful data types of fixed, known lengths # We hereby assume that a character is always one byte # LINBOX_INT8="char"; # case $ac_cv_sizeof_char in # 1) # TWO_BYTES=2; # FOUR_BYTES=4; # EIGHT_BYTES=8; # ;; # 8) # TWO_BYTES=16; # FOUR_BYTES=32; # EIGHT_BYTES=64; # esac # case $TWO_BYTES in # $ac_cv_sizeof_short) # LINBOX_INT16="short"; # ;; # $ac_cv_sizeof_int) # LINBOX_INT16="int"; # ;; # esac # case $FOUR_BYTES in # $ac_cv_sizeof_short) # LINBOX_INT32="short"; # ;; # $ac_cv_sizeof_int) # LINBOX_INT32="int"; # ;; # $ac_cv_sizeof_long) # LINBOX_INT32="long"; # ;; # esac # case $EIGHT_BYTES in # $ac_cv_sizeof_short) # LINBOX_INT64="short"; # ;; # $ac_cv_sizeof_int) # LINBOX_INT64="int"; # ;; # $ac_cv_sizeof_long) # LINBOX_INT64="long"; # ;; # $ac_cv_sizeof_long_long) # LINBOX_INT64="long long"; # ;; # $ac_cv_sizeof___int64) # LINBOX_INT64="__int64"; # ;; # esac # AC_DEFINE_UNQUOTED(INT8, $LINBOX_INT8, Canonical 8-bit data type) # AC_DEFINE_UNQUOTED(INT16, $LINBOX_INT16, Canonical 16-bit data type) # AC_DEFINE_UNQUOTED(INT32, $LINBOX_INT32, Canonical 32-bit data type) # AC_DEFINE_UNQUOTED(INT64, $LINBOX_INT64, Canonical 64-bit data type) echo "-----------------------------------------------" # Feature checks LB_MISC LB_DRIVER AC_LANG_CPLUSPLUS echo "-----------------------------------------------" LB_CHECK_GMP(,,[ echo '*******************************************************************************' echo ' ERROR: GMP not found!' echo echo ' GMP library compiled with --enable-cxx is required for this library to compile.' echo ' Please make sure GMP is installed and specify its location with the option' echo ' --with-gmp= when running configure.' echo '*******************************************************************************' exit 1 ]) LB_CHECK_IML LB_CHECK_M4RI LB_CHECK_M4RIE LB_CHECK_MPFR # we nedd mpfr next : LB_CHECK_FPLLL LB_CHECK_NTL LB_CHECK_GIVARO(,,[ echo '*******************************************************************************' echo ' ERROR: GIVARO not found!' echo echo ' GIVARO library is required for this library to compile.' echo ' Please make sure GIVARO is installed and specify its location with the' echo ' option --with-givaro= when running configure.' echo '*******************************************************************************' exit 1 ]) LB_CHECK_SACLIB LB_CHECK_LIDIA LB_CHECK_MAPLE LB_CHECK_SAGE #LB_CHECK_ATLAS # LB_CHECK_BLAS(,,[ # echo '' # echo '*******************************************************************************' # echo ' ERROR: BLAS not found!' # echo # echo ' BLAS routines are required for this library to compile. Please' # echo ' make sure BLAS are installed and specify its location with the option' # echo ' --with-blas= when running configure.' # echo '*******************************************************************************' # exit 1 # ]) LB_CHECK_FFLAS_FFPACK(,,[ echo '' echo '*******************************************************************************' echo ' ERROR: Fflas-Ffpack not found!' echo echo ' Fflas-Ffpack routines are required for this library to compile. Please' echo ' make sure they are installed and specify its location with the option' echo ' --with-fflas-ffpack= when running configure.' echo '*******************************************************************************' exit 1 ]) LB_CHECK_LAPACK # AC_MSG_RESULT($BLAS_LIBS) # AC_MSG_RESULT($BLAS_CFLAGS) LB_CHECK_EXPAT LB_BENCH LB_OPT LB_DOC if test ! -d ./benchmarks/data ; then echo "Creating data dir in benchmark" ; mkdir ./benchmarks/data ; fi # this is bogus so far as I can tell. -bds #CXXFLAGS="${GMP_CFLAGS} ${NTL_CFLAGS} ${GIVARO_CFLAGS} ${SACLIB_CFLAGS} ${CXXFLAGS}" #AC_SUBST(CXXFLAGS) CXXFLAGS="${GMP_CFLAGS} ${CXXFLAGS}" AC_SUBST(CXXFLAGS) echo "-----------------------------------------------" AC_CONFIG_FILES([ Makefile linbox-config examples/Makefile examples/fields/Makefile examples/Readme-make doc/Makefile linbox/Makefile linbox/algorithms/Makefile linbox/algorithms/gauss/Makefile linbox/algorithms/matrix-blas3/Makefile linbox/blackbox/Makefile linbox/element/Makefile linbox/field/Makefile linbox/field/NTL/Makefile linbox/field/Givaro/Makefile linbox/field/Modular/Makefile linbox/matrix/Makefile linbox/randiter/Makefile linbox/ring/Makefile linbox/solutions/Makefile linbox/switch/Makefile linbox/util/Makefile linbox/util/formats/Makefile linbox/vector/Makefile tests/Makefile tests/data/Makefile tests/matrix/Makefile interfaces/Makefile interfaces/driver/Makefile interfaces/maple/Makefile interfaces/kaapi/Makefile interfaces/sage/Makefile macros/Makefile benchmarks/Makefile ]) AC_OUTPUT linbox-1.3.2/doc/000077500000000000000000000000001176453053400135655ustar00rootroot00000000000000linbox-1.3.2/doc/Doxyfile.mod000066400000000000000000002275431176453053400160660ustar00rootroot00000000000000# Doxyfile 1.8.0 # This file describes the settings to be used by the documentation system # doxygen (www.doxygen.org) for a project. # # All text after a hash (#) is considered a comment and will be ignored. # The format is: # TAG = value [value, ...] # For lists items can also be appended using: # TAG += value [value, ...] # Values that contain spaces should be placed between quotes (" "). #--------------------------------------------------------------------------- # Project related configuration options #--------------------------------------------------------------------------- # This tag specifies the encoding used for all characters in the config file # that follow. The default is UTF-8 which is also the encoding used for all # text before the first occurrence of this tag. Doxygen uses libiconv (or the # iconv built into libc) for the transcoding. See # http://www.gnu.org/software/libiconv for the list of possible encodings. DOXYFILE_ENCODING = UTF-8 # The PROJECT_NAME tag is a single word (or sequence of words) that should # identify the project. Note that if you do not use Doxywizard you need # to put quotes around the project name if it contains spaces. PROJECT_NAME = linbox # The PROJECT_NUMBER tag can be used to enter a project or revision number. # This could be handy for archiving the generated documentation or # if some version control system is used. PROJECT_NUMBER = # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer # a quick idea about the purpose of the project. Keep the description short. PROJECT_BRIEF = # With the PROJECT_LOGO tag one can specify an logo or icon that is # included in the documentation. The maximum height of the logo should not # exceed 55 pixels and the maximum width should not exceed 200 pixels. # Doxygen will copy the logo to the output directory. PROJECT_LOGO = # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) # base path where the generated documentation will be put. # If a relative path is entered, it will be relative to the location # where doxygen was started. If left blank the current directory will be used. OUTPUT_DIRECTORY = . # If the CREATE_SUBDIRS tag is set to YES, then doxygen will create # 4096 sub-directories (in 2 levels) under the output directory of each output # format and will distribute the generated files over these directories. # Enabling this option can be useful when feeding doxygen a huge amount of # source files, where putting all generated files in the same directory would # otherwise cause performance problems for the file system. CREATE_SUBDIRS = NO # The OUTPUT_LANGUAGE tag is used to specify the language in which all # documentation generated by doxygen is written. Doxygen will use this # information to generate all constant output in the proper language. # The default language is English, other supported languages are: # Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, # Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German, # Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English # messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, # Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrillic, Slovak, # Slovene, Spanish, Swedish, Ukrainian, and Vietnamese. OUTPUT_LANGUAGE = English # If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will # include brief member descriptions after the members that are listed in # the file and class documentation (similar to JavaDoc). # Set to NO to disable this. BRIEF_MEMBER_DESC = YES # If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend # the brief description of a member or function before the detailed description. # Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the # brief descriptions will be completely suppressed. REPEAT_BRIEF = YES # This tag implements a quasi-intelligent brief description abbreviator # that is used to form the text in various listings. Each string # in this list, if found as the leading text of the brief description, will be # stripped from the text and the result after processing the whole list, is # used as the annotated text. Otherwise, the brief description is used as-is. # If left blank, the following values are used ("$name" is automatically # replaced with the name of the entity): "The $name class" "The $name widget" # "The $name file" "is" "provides" "specifies" "contains" # "represents" "a" "an" "the" ABBREVIATE_BRIEF = "The $name class" \ "The $name widget" \ "The $name file" \ is \ provides \ specifies \ contains \ represents \ a \ an \ the # If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then # Doxygen will generate a detailed section even if there is only a brief # description. ALWAYS_DETAILED_SEC = NO # If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all # inherited members of a class in the documentation of that class as if those # members were ordinary class members. Constructors, destructors and assignment # operators of the base classes will not be shown. INLINE_INHERITED_MEMB = YES # If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full # path before files name in the file list and in the header files. If set # to NO the shortest path that makes the file name unique will be used. FULL_PATH_NAMES = NO # If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag # can be used to strip a user-defined part of the path. Stripping is # only done if one of the specified strings matches the left-hand part of # the path. The tag can be used to show relative paths in the file list. # If left blank the directory from which doxygen is run is used as the # path to strip. STRIP_FROM_PATH = # The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of # the path mentioned in the documentation of a class, which tells # the reader which header file to include in order to use a class. # If left blank only the name of the header file containing the class # definition is used. Otherwise one should specify the include paths that # are normally passed to the compiler using the -I flag. STRIP_FROM_INC_PATH = # If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter # (but less readable) file names. This can be useful if your file system # doesn't support long names like on DOS, Mac, or CD-ROM. SHORT_NAMES = NO # If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen # will interpret the first line (until the first dot) of a JavaDoc-style # comment as the brief description. If set to NO, the JavaDoc # comments will behave just like regular Qt-style comments # (thus requiring an explicit @brief command for a brief description.) JAVADOC_AUTOBRIEF = YES # If the QT_AUTOBRIEF tag is set to YES then Doxygen will # interpret the first line (until the first dot) of a Qt-style # comment as the brief description. If set to NO, the comments # will behave just like regular Qt-style comments (thus requiring # an explicit \brief command for a brief description.) QT_AUTOBRIEF = YES # The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen # treat a multi-line C++ special comment block (i.e. a block of //! or /// # comments) as a brief description. This used to be the default behaviour. # The new default is to treat a multi-line C++ comment block as a detailed # description. Set this tag to YES if you prefer the old behaviour instead. MULTILINE_CPP_IS_BRIEF = NO # If the INHERIT_DOCS tag is set to YES (the default) then an undocumented # member inherits the documentation from any documented member that it # re-implements. INHERIT_DOCS = YES # If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce # a new page for each member. If set to NO, the documentation of a member will # be part of the file/class/namespace that contains it. SEPARATE_MEMBER_PAGES = NO # The TAB_SIZE tag can be used to set the number of spaces in a tab. # Doxygen uses this value to replace tabs by spaces in code fragments. TAB_SIZE = 4 # This tag can be used to specify a number of aliases that acts # as commands in the documentation. An alias has the form "name=value". # For example adding "sideeffect=\par Side Effects:\n" will allow you to # put the command \sideeffect (or @sideeffect) in the documentation, which # will result in a user-defined paragraph with heading "Side Effects:". # You can put \n's in the value part of an alias to insert newlines. ALIASES = "bib=\xrefitem bib \"Bibliography\" \"Bibliography\"" # This tag can be used to specify a number of word-keyword mappings (TCL only). # A mapping has the form "name=value". For example adding # "class=itcl::class" will allow you to use the command class in the # itcl::class meaning. TCL_SUBST = # Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C # sources only. Doxygen will then generate output that is more tailored for C. # For instance, some of the names that are used will be different. The list # of all members will be omitted, etc. OPTIMIZE_OUTPUT_FOR_C = YES # Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java # sources only. Doxygen will then generate output that is more tailored for # Java. For instance, namespaces will be presented as packages, qualified # scopes will look different, etc. OPTIMIZE_OUTPUT_JAVA = NO # Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran # sources only. Doxygen will then generate output that is more tailored for # Fortran. OPTIMIZE_FOR_FORTRAN = NO # Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL # sources. Doxygen will then generate output that is tailored for # VHDL. OPTIMIZE_OUTPUT_VHDL = NO # Doxygen selects the parser to use depending on the extension of the files it # parses. With this tag you can assign which parser to use for a given extension. # Doxygen has a built-in mapping, but you can override or extend it using this # tag. The format is ext=language, where ext is a file extension, and language # is one of the parsers supported by doxygen: IDL, Java, Javascript, CSharp, C, # C++, D, PHP, Objective-C, Python, Fortran, VHDL, C, C++. For instance to make # doxygen treat .inc files as Fortran files (default is PHP), and .f files as C # (default is Fortran), use: inc=Fortran f=C. Note that for custom extensions # you also need to set FILE_PATTERNS otherwise the files are not read by doxygen. EXTENSION_MAPPING = # If MARKDOWN_SUPPORT is enabled (the default) then doxygen pre-processes all # comments according to the Markdown format, which allows for more readable # documentation. See http://daringfireball.net/projects/markdown/ for details. # The output of markdown processing is further processed by doxygen, so you # can mix doxygen, HTML, and XML commands with Markdown formatting. # Disable only in case of backward compatibilities issues. MARKDOWN_SUPPORT = YES # If you use STL classes (i.e. std::string, std::vector, etc.) but do not want # to include (a tag file for) the STL sources as input, then you should # set this tag to YES in order to let doxygen match functions declarations and # definitions whose arguments contain STL classes (e.g. func(std::string); v.s. # func(std::string) {}). This also makes the inheritance and collaboration # diagrams that involve STL classes more complete and accurate. BUILTIN_STL_SUPPORT = YES # If you use Microsoft's C++/CLI language, you should set this option to YES to # enable parsing support. CPP_CLI_SUPPORT = NO # Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. # Doxygen will parse them like normal C++ but will assume all classes use public # instead of private inheritance when no explicit protection keyword is present. SIP_SUPPORT = NO # For Microsoft's IDL there are propget and propput attributes to indicate getter # and setter methods for a property. Setting this option to YES (the default) # will make doxygen replace the get and set methods by a property in the # documentation. This will only work if the methods are indeed getting or # setting a simple type. If this is not the case, or you want to show the # methods anyway, you should set this option to NO. IDL_PROPERTY_SUPPORT = YES # If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC # tag is set to YES, then doxygen will reuse the documentation of the first # member in the group (if any) for the other members of the group. By default # all members of a group must be documented explicitly. DISTRIBUTE_GROUP_DOC = YES # Set the SUBGROUPING tag to YES (the default) to allow class member groups of # the same type (for instance a group of public functions) to be put as a # subgroup of that type (e.g. under the Public Functions section). Set it to # NO to prevent subgrouping. Alternatively, this can be done per class using # the \nosubgrouping command. SUBGROUPING = YES # When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and # unions are shown inside the group in which they are included (e.g. using # @ingroup) instead of on a separate page (for HTML and Man pages) or # section (for LaTeX and RTF). INLINE_GROUPED_CLASSES = NO # When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and # unions with only public data fields will be shown inline in the documentation # of the scope in which they are defined (i.e. file, namespace, or group # documentation), provided this scope is documented. If set to NO (the default), # structs, classes, and unions are shown on a separate page (for HTML and Man # pages) or section (for LaTeX and RTF). INLINE_SIMPLE_STRUCTS = NO # When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum # is documented as struct, union, or enum with the name of the typedef. So # typedef struct TypeS {} TypeT, will appear in the documentation as a struct # with name TypeT. When disabled the typedef will appear as a member of a file, # namespace, or class. And the struct will be named TypeS. This can typically # be useful for C code in case the coding convention dictates that all compound # types are typedef'ed and only the typedef is referenced, never the tag name. TYPEDEF_HIDES_STRUCT = NO # The SYMBOL_CACHE_SIZE determines the size of the internal cache use to # determine which symbols to keep in memory and which to flush to disk. # When the cache is full, less often used symbols will be written to disk. # For small to medium size projects (<1000 input files) the default value is # probably good enough. For larger projects a too small cache size can cause # doxygen to be busy swapping symbols to and from disk most of the time # causing a significant performance penalty. # If the system has enough physical memory increasing the cache will improve the # performance by keeping more symbols in memory. Note that the value works on # a logarithmic scale so increasing the size by one will roughly double the # memory usage. The cache size is given by this formula: # 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0, # corresponding to a cache size of 2^16 = 65536 symbols. SYMBOL_CACHE_SIZE = 0 # Similar to the SYMBOL_CACHE_SIZE the size of the symbol lookup cache can be # set using LOOKUP_CACHE_SIZE. This cache is used to resolve symbols given # their name and scope. Since this can be an expensive process and often the # same symbol appear multiple times in the code, doxygen keeps a cache of # pre-resolved symbols. If the cache is too small doxygen will become slower. # If the cache is too large, memory is wasted. The cache size is given by this # formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range is 0..9, the default is 0, # corresponding to a cache size of 2^16 = 65536 symbols. LOOKUP_CACHE_SIZE = 0 #--------------------------------------------------------------------------- # Build related configuration options #--------------------------------------------------------------------------- # If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in # documentation are documented, even if no documentation was available. # Private class members and static file members will be hidden unless # the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES EXTRACT_ALL = NO # If the EXTRACT_PRIVATE tag is set to YES all private members of a class # will be included in the documentation. EXTRACT_PRIVATE = NO # If the EXTRACT_PACKAGE tag is set to YES all members with package or internal scope will be included in the documentation. EXTRACT_PACKAGE = NO # If the EXTRACT_STATIC tag is set to YES all static members of a file # will be included in the documentation. EXTRACT_STATIC = NO # If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) # defined locally in source files will be included in the documentation. # If set to NO only classes defined in header files are included. EXTRACT_LOCAL_CLASSES = YES # This flag is only useful for Objective-C code. When set to YES local # methods, which are defined in the implementation section but not in # the interface are included in the documentation. # If set to NO (the default) only methods in the interface are included. EXTRACT_LOCAL_METHODS = NO # If this flag is set to YES, the members of anonymous namespaces will be # extracted and appear in the documentation as a namespace called # 'anonymous_namespace{file}', where file will be replaced with the base # name of the file that contains the anonymous namespace. By default # anonymous namespaces are hidden. EXTRACT_ANON_NSPACES = NO # If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all # undocumented members of documented classes, files or namespaces. # If set to NO (the default) these members will be included in the # various overviews, but no documentation section is generated. # This option has no effect if EXTRACT_ALL is enabled. HIDE_UNDOC_MEMBERS = YES # If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all # undocumented classes that are normally visible in the class hierarchy. # If set to NO (the default) these classes will be included in the various # overviews. This option has no effect if EXTRACT_ALL is enabled. HIDE_UNDOC_CLASSES = YES # If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all # friend (class|struct|union) declarations. # If set to NO (the default) these declarations will be included in the # documentation. HIDE_FRIEND_COMPOUNDS = NO # If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any # documentation blocks found inside the body of a function. # If set to NO (the default) these blocks will be appended to the # function's detailed documentation block. HIDE_IN_BODY_DOCS = NO # The INTERNAL_DOCS tag determines if documentation # that is typed after a \internal command is included. If the tag is set # to NO (the default) then the documentation will be excluded. # Set it to YES to include the internal documentation. INTERNAL_DOCS = NO # If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate # file names in lower-case letters. If set to YES upper-case letters are also # allowed. This is useful if you have classes or files whose names only differ # in case and if your file system supports case sensitive file names. Windows # and Mac users are advised to set this option to NO. CASE_SENSE_NAMES = NO # If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen # will show members with their full class and namespace scopes in the # documentation. If set to YES the scope will be hidden. HIDE_SCOPE_NAMES = YES # If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen # will put a list of the files that are included by a file in the documentation # of that file. SHOW_INCLUDE_FILES = YES # If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen # will list include files with double quotes in the documentation # rather than with sharp brackets. FORCE_LOCAL_INCLUDES = NO # If the INLINE_INFO tag is set to YES (the default) then a tag [inline] # is inserted in the documentation for inline members. INLINE_INFO = YES # If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen # will sort the (detailed) documentation of file and class members # alphabetically by member name. If set to NO the members will appear in # declaration order. SORT_MEMBER_DOCS = NO # If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the # brief documentation of file, namespace and class members alphabetically # by member name. If set to NO (the default) the members will appear in # declaration order. SORT_BRIEF_DOCS = NO # If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen # will sort the (brief and detailed) documentation of class members so that # constructors and destructors are listed first. If set to NO (the default) # the constructors will appear in the respective orders defined by # SORT_MEMBER_DOCS and SORT_BRIEF_DOCS. # This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO # and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO. SORT_MEMBERS_CTORS_1ST = NO # If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the # hierarchy of group names into alphabetical order. If set to NO (the default) # the group names will appear in their defined order. SORT_GROUP_NAMES = NO # If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be # sorted by fully-qualified names, including namespaces. If set to # NO (the default), the class list will be sorted only by class name, # not including the namespace part. # Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. # Note: This option applies only to the class list, not to the # alphabetical list. SORT_BY_SCOPE_NAME = NO # If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to # do proper type resolution of all parameters of a function it will reject a # match between the prototype and the implementation of a member function even # if there is only one candidate or it is obvious which candidate to choose # by doing a simple string match. By disabling STRICT_PROTO_MATCHING doxygen # will still accept a match between prototype and implementation in such cases. STRICT_PROTO_MATCHING = NO # The GENERATE_TODOLIST tag can be used to enable (YES) or # disable (NO) the todo list. This list is created by putting \todo # commands in the documentation. GENERATE_TODOLIST = YES # The GENERATE_TESTLIST tag can be used to enable (YES) or # disable (NO) the test list. This list is created by putting \test # commands in the documentation. GENERATE_TESTLIST = YES # The GENERATE_BUGLIST tag can be used to enable (YES) or # disable (NO) the bug list. This list is created by putting \bug # commands in the documentation. GENERATE_BUGLIST = YES # The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or # disable (NO) the deprecated list. This list is created by putting # \deprecated commands in the documentation. GENERATE_DEPRECATEDLIST= YES # The ENABLED_SECTIONS tag can be used to enable conditional # documentation sections, marked by \if sectionname ... \endif. ENABLED_SECTIONS = # The MAX_INITIALIZER_LINES tag determines the maximum number of lines # the initial value of a variable or macro consists of for it to appear in # the documentation. If the initializer consists of more lines than specified # here it will be hidden. Use a value of 0 to hide initializers completely. # The appearance of the initializer of individual variables and macros in the # documentation can be controlled using \showinitializer or \hideinitializer # command in the documentation regardless of this setting. MAX_INITIALIZER_LINES = 30 # Set the SHOW_USED_FILES tag to NO to disable the list of files generated # at the bottom of the documentation of classes and structs. If set to YES the # list will mention the files that were used to generate the documentation. SHOW_USED_FILES = YES # If the sources in your project are distributed over multiple directories # then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy # in the documentation. The default is NO. SHOW_DIRECTORIES = YES # Set the SHOW_FILES tag to NO to disable the generation of the Files page. # This will remove the Files entry from the Quick Index and from the # Folder Tree View (if specified). The default is YES. SHOW_FILES = YES # Set the SHOW_NAMESPACES tag to NO to disable the generation of the # Namespaces page. # This will remove the Namespaces entry from the Quick Index # and from the Folder Tree View (if specified). The default is YES. SHOW_NAMESPACES = YES # The FILE_VERSION_FILTER tag can be used to specify a program or script that # doxygen should invoke to get the current version for each file (typically from # the version control system). Doxygen will invoke the program by executing (via # popen()) the command , where is the value of # the FILE_VERSION_FILTER tag, and is the name of an input file # provided by doxygen. Whatever the program writes to standard output # is used as the file version. See the manual for examples. FILE_VERSION_FILTER = # The LAYOUT_FILE tag can be used to specify a layout file which will be parsed # by doxygen. The layout file controls the global structure of the generated # output files in an output format independent way. The create the layout file # that represents doxygen's defaults, run doxygen with the -l option. # You can optionally specify a file name after the option, if omitted # DoxygenLayout.xml will be used as the name of the layout file. LAYOUT_FILE = # The CITE_BIB_FILES tag can be used to specify one or more bib files # containing the references data. This must be a list of .bib files. The # .bib extension is automatically appended if omitted. Using this command # requires the bibtex tool to be installed. See also # http://en.wikipedia.org/wiki/BibTeX for more info. For LaTeX the style # of the bibliography can be controlled using LATEX_BIB_STYLE. To use this # feature you need bibtex and perl available in the search path. CITE_BIB_FILES = #--------------------------------------------------------------------------- # configuration options related to warning and progress messages #--------------------------------------------------------------------------- # The QUIET tag can be used to turn on/off the messages that are generated # by doxygen. Possible values are YES and NO. If left blank NO is used. QUIET = NO # The WARNINGS tag can be used to turn on/off the warning messages that are # generated by doxygen. Possible values are YES and NO. If left blank # NO is used. WARNINGS = YES # If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings # for undocumented members. If EXTRACT_ALL is set to YES then this flag will # automatically be disabled. WARN_IF_UNDOCUMENTED = YES # If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for # potential errors in the documentation, such as not documenting some # parameters in a documented function, or documenting parameters that # don't exist or using markup commands wrongly. WARN_IF_DOC_ERROR = YES # The WARN_NO_PARAMDOC option can be enabled to get warnings for # functions that are documented, but have no documentation for their parameters # or return value. If set to NO (the default) doxygen will only warn about # wrong or incomplete parameter documentation, but not about the absence of # documentation. WARN_NO_PARAMDOC = NO # The WARN_FORMAT tag determines the format of the warning messages that # doxygen can produce. The string should contain the $file, $line, and $text # tags, which will be replaced by the file and line number from which the # warning originated and the warning text. Optionally the format may contain # $version, which will be replaced by the version of the file (if it could # be obtained via FILE_VERSION_FILTER) WARN_FORMAT = "$file:$line: $text" # The WARN_LOGFILE tag can be used to specify a file to which warning # and error messages should be written. If left blank the output is written # to stderr. WARN_LOGFILE = doxy.debug #--------------------------------------------------------------------------- # configuration options related to the input files #--------------------------------------------------------------------------- # The INPUT tag can be used to specify the files and/or directories that contain # documented source files. You may enter file names like "myfile.cpp" or # directories like "/usr/src/myproject". Separate the files or directories # with spaces. INPUT = ../linbox \ ../doc \ ../examples \ ../tests \ ../benchmarks # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is # also the default input encoding. Doxygen uses libiconv (or the iconv built # into libc) for the transcoding. See http://www.gnu.org/software/libiconv for # the list of possible encodings. INPUT_ENCODING = UTF-8 # If the value of the INPUT tag contains directories, you can use the # FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp # and *.h) to filter out the source-files in the directories. If left # blank the following patterns are tested: # *.c *.cc *.cxx *.cpp *.c++ *.d *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh # *.hxx *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.dox *.py # *.f90 *.f *.for *.vhd *.vhdl FILE_PATTERNS = *.cc \ *.cpp \ *.C \ *.h \ *.inl \ *.doxy # The RECURSIVE tag can be used to turn specify whether or not subdirectories # should be searched for input files as well. Possible values are YES and NO. # If left blank NO is used. RECURSIVE = YES # The EXCLUDE tag can be used to specify files and/or directories that should be # excluded from the INPUT source files. This way you can easily exclude a # subdirectory from a directory tree whose root is specified with the INPUT tag. # Note that relative paths are relative to the directory from which doxygen is # run. EXCLUDE = *_src.inl \ Attic # The EXCLUDE_SYMLINKS tag can be used to select whether or not files or # directories that are symbolic links (a Unix file system feature) are excluded # from the input. EXCLUDE_SYMLINKS = NO # If the value of the INPUT tag contains directories, you can use the # EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude # certain files from those directories. Note that the wildcards are matched # against the file with absolute path, so to exclude all test directories # for example use the pattern */test/* EXCLUDE_PATTERNS = *_src.inl \ */Attic/* # The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names # (namespaces, classes, functions, etc.) that should be excluded from the # output. The symbol name can be a fully qualified name, a word, or if the # wildcard * is used, a substring. Examples: ANamespace, AClass, # AClass::ANamespace, ANamespace::*Test EXCLUDE_SYMBOLS = # The EXAMPLE_PATH tag can be used to specify one or more files or # directories that contain example code fragments that are included (see # the \include command). EXAMPLE_PATH = .. # If the value of the EXAMPLE_PATH tag contains directories, you can use the # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp # and *.h) to filter out the source-files in the directories. If left # blank all files are included. EXAMPLE_PATTERNS = *.C \ *.inl \ *INSTALL \ *COPYING \ *HACKING \ *AUTHORS \ *.html # If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be # searched for input files to be used with the \include or \dontinclude # commands irrespective of the value of the RECURSIVE tag. # Possible values are YES and NO. If left blank NO is used. EXAMPLE_RECURSIVE = YES # The IMAGE_PATH tag can be used to specify one or more files or # directories that contain image that are included in the documentation (see # the \image command). IMAGE_PATH = # The INPUT_FILTER tag can be used to specify a program that doxygen should # invoke to filter for each input file. Doxygen will invoke the filter program # by executing (via popen()) the command , where # is the value of the INPUT_FILTER tag, and is the name of an # input file. Doxygen will then use the output that the filter program writes # to standard output. # If FILTER_PATTERNS is specified, this tag will be # ignored. INPUT_FILTER = # The FILTER_PATTERNS tag can be used to specify filters on a per file pattern # basis. # Doxygen will compare the file name with each pattern and apply the # filter if there is a match. # The filters are a list of the form: # pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further # info on how filters are used. If FILTER_PATTERNS is empty or if # non of the patterns match the file name, INPUT_FILTER is applied. FILTER_PATTERNS = # If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using # INPUT_FILTER) will be used to filter the input files when producing source # files to browse (i.e. when SOURCE_BROWSER is set to YES). FILTER_SOURCE_FILES = NO # The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file # pattern. A pattern will override the setting for FILTER_PATTERN (if any) # and it is also possible to disable source filtering for a specific pattern # using *.ext= (so without naming a filter). This option only has effect when # FILTER_SOURCE_FILES is enabled. FILTER_SOURCE_PATTERNS = #--------------------------------------------------------------------------- # configuration options related to source browsing #--------------------------------------------------------------------------- # If the SOURCE_BROWSER tag is set to YES then a list of source files will # be generated. Documented entities will be cross-referenced with these sources. # Note: To get rid of all source code in the generated output, make sure also # VERBATIM_HEADERS is set to NO. SOURCE_BROWSER = NO # Setting the INLINE_SOURCES tag to YES will include the body # of functions and classes directly in the documentation. INLINE_SOURCES = NO # Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct # doxygen to hide any special comment blocks from generated source code # fragments. Normal C and C++ comments will always remain visible. STRIP_CODE_COMMENTS = YES # If the REFERENCED_BY_RELATION tag is set to YES # then for each documented function all documented # functions referencing it will be listed. REFERENCED_BY_RELATION = NO # If the REFERENCES_RELATION tag is set to YES # then for each documented function all documented entities # called/used by that function will be listed. REFERENCES_RELATION = NO # If the REFERENCES_LINK_SOURCE tag is set to YES (the default) # and SOURCE_BROWSER tag is set to YES, then the hyperlinks from # functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will # link to the source code. # Otherwise they will link to the documentation. REFERENCES_LINK_SOURCE = YES # If the USE_HTAGS tag is set to YES then the references to source code # will point to the HTML generated by the htags(1) tool instead of doxygen # built-in source browser. The htags tool is part of GNU's global source # tagging system (see http://www.gnu.org/software/global/global.html). You # will need version 4.8.6 or higher. USE_HTAGS = NO # If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen # will generate a verbatim copy of the header file for each class for # which an include is specified. Set to NO to disable this. VERBATIM_HEADERS = NO #--------------------------------------------------------------------------- # configuration options related to the alphabetical class index #--------------------------------------------------------------------------- # If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index # of all compounds will be generated. Enable this if the project # contains a lot of classes, structs, unions or interfaces. ALPHABETICAL_INDEX = NO # If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then # the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns # in which this list will be split (can be a number in the range [1..20]) COLS_IN_ALPHA_INDEX = 5 # In case all classes in a project start with a common prefix, all # classes will be put under the same header in the alphabetical index. # The IGNORE_PREFIX tag can be used to specify one or more prefixes that # should be ignored while generating the index headers. IGNORE_PREFIX = #--------------------------------------------------------------------------- # configuration options related to the HTML output #--------------------------------------------------------------------------- # If the GENERATE_HTML tag is set to YES (the default) Doxygen will # generate HTML output. GENERATE_HTML = YES # The HTML_OUTPUT tag is used to specify where the HTML docs will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `html' will be used as the default path. HTML_OUTPUT = linbox-html # The HTML_FILE_EXTENSION tag can be used to specify the file extension for # each generated HTML page (for example: .htm,.php,.asp). If it is left blank # doxygen will generate files with .html extension. HTML_FILE_EXTENSION = .html # The HTML_HEADER tag can be used to specify a personal HTML header for # each generated HTML page. If it is left blank doxygen will generate a # standard header. Note that when using a custom header you are responsible # for the proper inclusion of any scripts and style sheets that doxygen # needs, which is dependent on the configuration options used. # It is advised to generate a default header using "doxygen -w html # header.html footer.html stylesheet.css YourConfigFile" and then modify # that header. Note that the header is subject to change so you typically # have to redo this when upgrading to a newer version of doxygen or when # changing the value of configuration settings such as GENERATE_TREEVIEW! HTML_HEADER = # The HTML_FOOTER tag can be used to specify a personal HTML footer for # each generated HTML page. If it is left blank doxygen will generate a # standard footer. HTML_FOOTER = # The HTML_STYLESHEET tag can be used to specify a user-defined cascading # style sheet that is used by each HTML page. It can be used to # fine-tune the look of the HTML output. If the tag is left blank doxygen # will generate a default style sheet. Note that doxygen will try to copy # the style sheet file to the HTML output directory, so don't put your own # style sheet in the HTML output directory as well, or it will be erased! HTML_STYLESHEET = # The HTML_EXTRA_FILES tag can be used to specify one or more extra images or # other source files which should be copied to the HTML output directory. Note # that these files will be copied to the base HTML output directory. Use the # $relpath$ marker in the HTML_HEADER and/or HTML_FOOTER files to load these # files. In the HTML_STYLESHEET file, use the file name only. Also note that # the files will be copied as-is; there are no commands or markers available. HTML_EXTRA_FILES = # The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. # Doxygen will adjust the colors in the style sheet and background images # according to this color. Hue is specified as an angle on a colorwheel, # see http://en.wikipedia.org/wiki/Hue for more information. # For instance the value 0 represents red, 60 is yellow, 120 is green, # 180 is cyan, 240 is blue, 300 purple, and 360 is red again. # The allowed range is 0 to 359. HTML_COLORSTYLE_HUE = 220 # The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of # the colors in the HTML output. For a value of 0 the output will use # grayscales only. A value of 255 will produce the most vivid colors. HTML_COLORSTYLE_SAT = 100 # The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to # the luminance component of the colors in the HTML output. Values below # 100 gradually make the output lighter, whereas values above 100 make # the output darker. The value divided by 100 is the actual gamma applied, # so 80 represents a gamma of 0.8, The value 220 represents a gamma of 2.2, # and 100 does not change the gamma. HTML_COLORSTYLE_GAMMA = 80 # If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML # page will contain the date and time when the page was generated. Setting # this to NO can help when comparing the output of multiple runs. HTML_TIMESTAMP = YES # If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, # files or namespaces will be aligned in HTML using tables. If set to # NO a bullet list will be used. HTML_ALIGN_MEMBERS = YES # If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML # documentation will contain sections that can be hidden and shown after the # page has loaded. For this to work a browser that supports # JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox # Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari). HTML_DYNAMIC_SECTIONS = YES # If the GENERATE_DOCSET tag is set to YES, additional index files # will be generated that can be used as input for Apple's Xcode 3 # integrated development environment, introduced with OSX 10.5 (Leopard). # To create a documentation set, doxygen will generate a Makefile in the # HTML output directory. Running make will produce the docset in that # directory and running "make install" will install the docset in # ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find # it at startup. # See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html # for more information. GENERATE_DOCSET = NO # When GENERATE_DOCSET tag is set to YES, this tag determines the name of the # feed. A documentation feed provides an umbrella under which multiple # documentation sets from a single provider (such as a company or product suite) # can be grouped. DOCSET_FEEDNAME = "Doxygen generated docs" # When GENERATE_DOCSET tag is set to YES, this tag specifies a string that # should uniquely identify the documentation set bundle. This should be a # reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen # will append .docset to the name. DOCSET_BUNDLE_ID = org.doxygen.Project # When GENERATE_PUBLISHER_ID tag specifies a string that should uniquely identify # the documentation publisher. This should be a reverse domain-name style # string, e.g. com.mycompany.MyDocSet.documentation. DOCSET_PUBLISHER_ID = org.doxygen.Publisher # The GENERATE_PUBLISHER_NAME tag identifies the documentation publisher. DOCSET_PUBLISHER_NAME = Publisher # If the GENERATE_HTMLHELP tag is set to YES, additional index files # will be generated that can be used as input for tools like the # Microsoft HTML help workshop to generate a compiled HTML help file (.chm) # of the generated HTML documentation. GENERATE_HTMLHELP = NO # If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can # be used to specify the file name of the resulting .chm file. You # can add a path in front of the file if the result should not be # written to the html output directory. CHM_FILE = # If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can # be used to specify the location (absolute path including file name) of # the HTML help compiler (hhc.exe). If non-empty doxygen will try to run # the HTML help compiler on the generated index.hhp. HHC_LOCATION = # If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag # controls if a separate .chi index file is generated (YES) or that # it should be included in the master .chm file (NO). GENERATE_CHI = NO # If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING # is used to encode HtmlHelp index (hhk), content (hhc) and project file # content. CHM_INDEX_ENCODING = # If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag # controls whether a binary table of contents is generated (YES) or a # normal table of contents (NO) in the .chm file. BINARY_TOC = NO # The TOC_EXPAND flag can be set to YES to add extra items for group members # to the contents of the HTML help documentation and to the tree view. TOC_EXPAND = NO # If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and # QHP_VIRTUAL_FOLDER are set, an additional index file will be generated # that can be used as input for Qt's qhelpgenerator to generate a # Qt Compressed Help (.qch) of the generated HTML documentation. GENERATE_QHP = NO # If the QHG_LOCATION tag is specified, the QCH_FILE tag can # be used to specify the file name of the resulting .qch file. # The path specified is relative to the HTML output folder. QCH_FILE = # The QHP_NAMESPACE tag specifies the namespace to use when generating # Qt Help Project output. For more information please see # http://doc.trolltech.com/qthelpproject.html#namespace QHP_NAMESPACE = org.doxygen.Project # The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating # Qt Help Project output. For more information please see # http://doc.trolltech.com/qthelpproject.html#virtual-folders QHP_VIRTUAL_FOLDER = doc # If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to # add. For more information please see # http://doc.trolltech.com/qthelpproject.html#custom-filters QHP_CUST_FILTER_NAME = # The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the # custom filter to add. For more information please see # # Qt Help Project / Custom Filters. QHP_CUST_FILTER_ATTRS = # The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this # project's # filter section matches. # # Qt Help Project / Filter Attributes. QHP_SECT_FILTER_ATTRS = # If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can # be used to specify the location of Qt's qhelpgenerator. # If non-empty doxygen will try to run qhelpgenerator on the generated # .qhp file. QHG_LOCATION = # If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files # will be generated, which together with the HTML files, form an Eclipse help # plugin. To install this plugin and make it available under the help contents # menu in Eclipse, the contents of the directory containing the HTML and XML # files needs to be copied into the plugins directory of eclipse. The name of # the directory within the plugins directory should be the same as # the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before # the help appears. GENERATE_ECLIPSEHELP = NO # A unique identifier for the eclipse help plugin. When installing the plugin # the directory name containing the HTML and XML files should also have # this name. ECLIPSE_DOC_ID = org.doxygen.Project # The DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) # at top of each HTML page. The value NO (the default) enables the index and # the value YES disables it. Since the tabs have the same information as the # navigation tree you can set this option to NO if you already set # GENERATE_TREEVIEW to YES. DISABLE_INDEX = NO # The GENERATE_TREEVIEW tag is used to specify whether a tree-like index # structure should be generated to display hierarchical information. # If the tag value is set to YES, a side panel will be generated # containing a tree-like index structure (just like the one that # is generated for HTML Help). For this to work a browser that supports # JavaScript, DHTML, CSS and frames is required (i.e. any modern browser). # Windows users are probably better off using the HTML help feature. # Since the tree basically has the same information as the tab index you # could consider to set DISABLE_INDEX to NO when enabling this option. GENERATE_TREEVIEW = NO # The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values # (range [0,1..20]) that doxygen will group on one line in the generated HTML # documentation. Note that a value of 0 will completely suppress the enum # values from appearing in the overview section. ENUM_VALUES_PER_LINE = 4 # By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories, # and Class Hierarchy pages using a tree view instead of an ordered list. USE_INLINE_TREES = NO # If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be # used to set the initial width (in pixels) of the frame in which the tree # is shown. TREEVIEW_WIDTH = 250 # When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open # links to external symbols imported via tag files in a separate window. EXT_LINKS_IN_WINDOW = NO # Use this tag to change the font size of Latex formulas included # as images in the HTML documentation. The default is 10. Note that # when you change the font size after a successful doxygen run you need # to manually remove any form_*.png images from the HTML output directory # to force them to be regenerated. FORMULA_FONTSIZE = 10 # Use the FORMULA_TRANPARENT tag to determine whether or not the images # generated for formulas are transparent PNGs. Transparent PNGs are # not supported properly for IE 6.0, but are supported on all modern browsers. # Note that when changing this option you need to delete any form_*.png files # in the HTML output before the changes have effect. FORMULA_TRANSPARENT = YES # Enable the USE_MATHJAX option to render LaTeX formulas using MathJax # (see http://www.mathjax.org) which uses client side Javascript for the # rendering instead of using prerendered bitmaps. Use this if you do not # have LaTeX installed or if you want to formulas look prettier in the HTML # output. When enabled you may also need to install MathJax separately and # configure the path to it using the MATHJAX_RELPATH option. USE_MATHJAX = NO # When MathJax is enabled you need to specify the location relative to the # HTML output directory using the MATHJAX_RELPATH option. The destination # directory should contain the MathJax.js script. For instance, if the mathjax # directory is located at the same level as the HTML output directory, then # MATHJAX_RELPATH should be ../mathjax. The default value points to # the MathJax Content Delivery Network so you can quickly see the result without # installing MathJax. # However, it is strongly recommended to install a local # copy of MathJax from http://www.mathjax.org before deployment. MATHJAX_RELPATH = http://www.mathjax.org/mathjax # The MATHJAX_EXTENSIONS tag can be used to specify one or MathJax extension # names that should be enabled during MathJax rendering. MATHJAX_EXTENSIONS = # When the SEARCHENGINE tag is enabled doxygen will generate a search box # for the HTML output. The underlying search engine uses javascript # and DHTML and should work on any modern browser. Note that when using # HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets # (GENERATE_DOCSET) there is already a search function so this one should # typically be disabled. For large projects the javascript based search engine # can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution. SEARCHENGINE = NO # When the SERVER_BASED_SEARCH tag is enabled the search engine will be # implemented using a PHP enabled web server instead of at the web client # using Javascript. Doxygen will generate the search PHP script and index # file to put on the web server. The advantage of the server # based approach is that it scales better to large projects and allows # full text search. The disadvantages are that it is more difficult to setup # and does not have live searching capabilities. SERVER_BASED_SEARCH = NO #--------------------------------------------------------------------------- # configuration options related to the LaTeX output #--------------------------------------------------------------------------- # If the GENERATE_LATEX tag is set to YES (the default) Doxygen will # generate Latex output. GENERATE_LATEX = NO # The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `latex' will be used as the default path. LATEX_OUTPUT = latex # The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be # invoked. If left blank `latex' will be used as the default command name. # Note that when enabling USE_PDFLATEX this option is only used for # generating bitmaps for formulas in the HTML output, but not in the # Makefile that is written to the output directory. LATEX_CMD_NAME = latex # The MAKEINDEX_CMD_NAME tag can be used to specify the command name to # generate index for LaTeX. If left blank `makeindex' will be used as the # default command name. MAKEINDEX_CMD_NAME = makeindex # If the COMPACT_LATEX tag is set to YES Doxygen generates more compact # LaTeX documents. This may be useful for small projects and may help to # save some trees in general. COMPACT_LATEX = NO # The PAPER_TYPE tag can be used to set the paper type that is used # by the printer. Possible values are: a4, letter, legal and # executive. If left blank a4wide will be used. PAPER_TYPE = a4wide # The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX # packages that should be included in the LaTeX output. EXTRA_PACKAGES = stmaryrd \ amsmath # The LATEX_HEADER tag can be used to specify a personal LaTeX header for # the generated latex document. The header should contain everything until # the first chapter. If it is left blank doxygen will generate a # standard header. Notice: only use this tag if you know what you are doing! LATEX_HEADER = # The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for # the generated latex document. The footer should contain everything after # the last chapter. If it is left blank doxygen will generate a # standard footer. Notice: only use this tag if you know what you are doing! LATEX_FOOTER = # If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated # is prepared for conversion to pdf (using ps2pdf). The pdf file will # contain links (just like the HTML output) instead of page references # This makes the output suitable for online browsing using a pdf viewer. PDF_HYPERLINKS = NO # If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of # plain latex in the generated Makefile. Set this option to YES to get a # higher quality PDF documentation. USE_PDFLATEX = NO # If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. # command to the generated LaTeX files. This will instruct LaTeX to keep # running if errors occur, instead of asking the user for help. # This option is also used when generating formulas in HTML. LATEX_BATCHMODE = NO # If LATEX_HIDE_INDICES is set to YES then doxygen will not # include the index chapters (such as File Index, Compound Index, etc.) # in the output. LATEX_HIDE_INDICES = NO # If LATEX_SOURCE_CODE is set to YES then doxygen will include # source code with syntax highlighting in the LaTeX output. # Note that which sources are shown also depends on other settings # such as SOURCE_BROWSER. LATEX_SOURCE_CODE = NO # The LATEX_BIB_STYLE tag can be used to specify the style to use for the # bibliography, e.g. plainnat, or ieeetr. The default style is "plain". See # http://en.wikipedia.org/wiki/BibTeX for more info. LATEX_BIB_STYLE = plain #--------------------------------------------------------------------------- # configuration options related to the RTF output #--------------------------------------------------------------------------- # If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output # The RTF output is optimized for Word 97 and may not look very pretty with # other RTF readers or editors. GENERATE_RTF = NO # The RTF_OUTPUT tag is used to specify where the RTF docs will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `rtf' will be used as the default path. RTF_OUTPUT = rtf # If the COMPACT_RTF tag is set to YES Doxygen generates more compact # RTF documents. This may be useful for small projects and may help to # save some trees in general. COMPACT_RTF = NO # If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated # will contain hyperlink fields. The RTF file will # contain links (just like the HTML output) instead of page references. # This makes the output suitable for online browsing using WORD or other # programs which support those fields. # Note: wordpad (write) and others do not support links. RTF_HYPERLINKS = NO # Load style sheet definitions from file. Syntax is similar to doxygen's # config file, i.e. a series of assignments. You only have to provide # replacements, missing definitions are set to their default value. RTF_STYLESHEET_FILE = # Set optional variables used in the generation of an rtf document. # Syntax is similar to doxygen's config file. RTF_EXTENSIONS_FILE = #--------------------------------------------------------------------------- # configuration options related to the man page output #--------------------------------------------------------------------------- # If the GENERATE_MAN tag is set to YES (the default) Doxygen will # generate man pages GENERATE_MAN = NO # The MAN_OUTPUT tag is used to specify where the man pages will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `man' will be used as the default path. MAN_OUTPUT = man # The MAN_EXTENSION tag determines the extension that is added to # the generated man pages (default is the subroutine's section .3) MAN_EXTENSION = .3 # If the MAN_LINKS tag is set to YES and Doxygen generates man output, # then it will generate one additional man file for each entity # documented in the real man page(s). These additional files # only source the real man page, but without them the man command # would be unable to find the correct page. The default is NO. MAN_LINKS = NO #--------------------------------------------------------------------------- # configuration options related to the XML output #--------------------------------------------------------------------------- # If the GENERATE_XML tag is set to YES Doxygen will # generate an XML file that captures the structure of # the code including all documentation. GENERATE_XML = NO # The XML_OUTPUT tag is used to specify where the XML pages will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `xml' will be used as the default path. XML_OUTPUT = xml # The XML_SCHEMA tag can be used to specify an XML schema, # which can be used by a validating XML parser to check the # syntax of the XML files. XML_SCHEMA = # The XML_DTD tag can be used to specify an XML DTD, # which can be used by a validating XML parser to check the # syntax of the XML files. XML_DTD = # If the XML_PROGRAMLISTING tag is set to YES Doxygen will # dump the program listings (including syntax highlighting # and cross-referencing information) to the XML output. Note that # enabling this will significantly increase the size of the XML output. XML_PROGRAMLISTING = YES #--------------------------------------------------------------------------- # configuration options for the AutoGen Definitions output #--------------------------------------------------------------------------- # If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will # generate an AutoGen Definitions (see autogen.sf.net) file # that captures the structure of the code including all # documentation. Note that this feature is still experimental # and incomplete at the moment. GENERATE_AUTOGEN_DEF = NO #--------------------------------------------------------------------------- # configuration options related to the Perl module output #--------------------------------------------------------------------------- # If the GENERATE_PERLMOD tag is set to YES Doxygen will # generate a Perl module file that captures the structure of # the code including all documentation. Note that this # feature is still experimental and incomplete at the # moment. GENERATE_PERLMOD = NO # If the PERLMOD_LATEX tag is set to YES Doxygen will generate # the necessary Makefile rules, Perl scripts and LaTeX code to be able # to generate PDF and DVI output from the Perl module output. PERLMOD_LATEX = NO # If the PERLMOD_PRETTY tag is set to YES the Perl module output will be # nicely formatted so it can be parsed by a human reader. # This is useful # if you want to understand what is going on. # On the other hand, if this # tag is set to NO the size of the Perl module output will be much smaller # and Perl will parse it just the same. PERLMOD_PRETTY = YES # The names of the make variables in the generated doxyrules.make file # are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. # This is useful so different doxyrules.make files included by the same # Makefile don't overwrite each other's variables. PERLMOD_MAKEVAR_PREFIX = #--------------------------------------------------------------------------- # Configuration options related to the preprocessor #--------------------------------------------------------------------------- # If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will # evaluate all C-preprocessor directives found in the sources and include # files. ENABLE_PREPROCESSING = YES # If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro # names in the source code. If set to NO (the default) only conditional # compilation will be performed. Macro expansion can be done in a controlled # way by setting EXPAND_ONLY_PREDEF to YES. MACRO_EXPANSION = YES # If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES # then the macro expansion is limited to the macros specified with the # PREDEFINED and EXPAND_AS_DEFINED tags. EXPAND_ONLY_PREDEF = NO # If the SEARCH_INCLUDES tag is set to YES (the default) the includes files # pointed to by INCLUDE_PATH will be searched when a #include is found. SEARCH_INCLUDES = YES # The INCLUDE_PATH tag can be used to specify one or more directories that # contain include files that are not input files but should be processed by # the preprocessor. INCLUDE_PATH = # You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard # patterns (like *.h and *.hpp) to filter out the header-files in the # directories. If left blank, the patterns specified with FILE_PATTERNS will # be used. INCLUDE_FILE_PATTERNS = # The PREDEFINED tag can be used to specify one or more macro names that # are defined before the preprocessor is started (similar to the -D option of # gcc). The argument of the tag is a list of macros of the form: name # or name=definition (no spaces). If the definition and the = are # omitted =1 is assumed. To prevent a macro definition from being # undefined via #undef or recursively expanded use the := operator # instead of the = operator. PREDEFINED = DOXYGEN_SHOULD_SKIP_THIS # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then # this tag can be used to specify a list of macro names that should be expanded. # The macro definition that is found in the sources will be used. # Use the PREDEFINED tag if you want to use a different macro definition that # overrules the definition found in the source code. EXPAND_AS_DEFINED = # If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then # doxygen's preprocessor will remove all references to function-like macros # that are alone on a line, have an all uppercase name, and do not end with a # semicolon, because these will confuse the parser if not removed. SKIP_FUNCTION_MACROS = YES #--------------------------------------------------------------------------- # Configuration::additions related to external references #--------------------------------------------------------------------------- # The TAGFILES option can be used to specify one or more tagfiles. For each # tag file the location of the external documentation should be added. The # format of a tag file without this location is as follows: # # TAGFILES = file1 file2 ... # Adding location for the tag files is done as follows: # # TAGFILES = file1=loc1 "file2 = loc2" ... # where "loc1" and "loc2" can be relative or absolute paths # or URLs. Note that each tag file must have a unique name (where the name does # NOT include the path). If a tag file is not located in the directory in which # doxygen is run, you must also specify the path to the tagfile here. TAGFILES = # When a file name is specified after GENERATE_TAGFILE, doxygen will create # a tag file that is based on the input files it reads. GENERATE_TAGFILE = # If the ALLEXTERNALS tag is set to YES all external classes will be listed # in the class index. If set to NO only the inherited external classes # will be listed. ALLEXTERNALS = NO # If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed # in the modules index. If set to NO, only the current project's groups will # be listed. EXTERNAL_GROUPS = YES # The PERL_PATH should be the absolute path and name of the perl script # interpreter (i.e. the result of `which perl'). PERL_PATH = /usr/bin/perl #--------------------------------------------------------------------------- # Configuration options related to the dot tool #--------------------------------------------------------------------------- # If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will # generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base # or super classes. Setting the tag to NO turns the diagrams off. Note that # this option also works with HAVE_DOT disabled, but it is recommended to # install and use dot, since it yields more powerful graphs. CLASS_DIAGRAMS = YES # You can define message sequence charts within doxygen comments using the \msc # command. Doxygen will then run the mscgen tool (see # http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the # documentation. The MSCGEN_PATH tag allows you to specify the directory where # the mscgen tool resides. If left empty the tool is assumed to be found in the # default search path. MSCGEN_PATH = # If set to YES, the inheritance and collaboration graphs will hide # inheritance and usage relations if the target is undocumented # or is not a class. HIDE_UNDOC_RELATIONS = YES # If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is # available from the path. This tool is part of Graphviz, a graph visualization # toolkit from AT&T and Lucent Bell Labs. The other options in this section # have no effect if this option is set to NO (the default) HAVE_DOT = NO # The DOT_NUM_THREADS specifies the number of dot invocations doxygen is # allowed to run in parallel. When set to 0 (the default) doxygen will # base this on the number of processors available in the system. You can set it # explicitly to a value larger than 0 to get control over the balance # between CPU load and processing speed. DOT_NUM_THREADS = 0 # By default doxygen will use the Helvetica font for all dot files that # doxygen generates. When you want a differently looking font you can specify # the font name using DOT_FONTNAME. You need to make sure dot is able to find # the font, which can be done by putting it in a standard location or by setting # the DOTFONTPATH environment variable or by setting DOT_FONTPATH to the # directory containing the font. DOT_FONTNAME = FreeSans.ttf # The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs. # The default size is 10pt. DOT_FONTSIZE = 10 # By default doxygen will tell dot to use the Helvetica font. # If you specify a different font using DOT_FONTNAME you can use DOT_FONTPATH to # set the path where dot can find it. DOT_FONTPATH = # If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen # will generate a graph for each documented class showing the direct and # indirect inheritance relations. Setting this tag to YES will force the # CLASS_DIAGRAMS tag to NO. CLASS_GRAPH = YES # If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen # will generate a graph for each documented class showing the direct and # indirect implementation dependencies (inheritance, containment, and # class references variables) of the class with other documented classes. COLLABORATION_GRAPH = YES # If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen # will generate a graph for groups, showing the direct groups dependencies GROUP_GRAPHS = YES # If the UML_LOOK tag is set to YES doxygen will generate inheritance and # collaboration diagrams in a style similar to the OMG's Unified Modeling # Language. UML_LOOK = NO # If the UML_LOOK tag is enabled, the fields and methods are shown inside # the class node. If there are many fields or methods and many nodes the # graph may become too big to be useful. The UML_LIMIT_NUM_FIELDS # threshold limits the number of items for each type to make the size more # managable. Set this to 0 for no limit. Note that the threshold may be # exceeded by 50% before the limit is enforced. UML_LIMIT_NUM_FIELDS = 10 # If set to YES, the inheritance and collaboration graphs will show the # relations between templates and their instances. TEMPLATE_RELATIONS = NO # If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT # tags are set to YES then doxygen will generate a graph for each documented # file showing the direct and indirect include dependencies of the file with # other documented files. INCLUDE_GRAPH = YES # If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and # HAVE_DOT tags are set to YES then doxygen will generate a graph for each # documented header file showing the documented files that directly or # indirectly include this file. INCLUDED_BY_GRAPH = YES # If the CALL_GRAPH and HAVE_DOT options are set to YES then # doxygen will generate a call dependency graph for every global function # or class method. Note that enabling this option will significantly increase # the time of a run. So in most cases it will be better to enable call graphs # for selected functions only using the \callgraph command. CALL_GRAPH = NO # If the CALLER_GRAPH and HAVE_DOT tags are set to YES then # doxygen will generate a caller dependency graph for every global function # or class method. Note that enabling this option will significantly increase # the time of a run. So in most cases it will be better to enable caller # graphs for selected functions only using the \callergraph command. CALLER_GRAPH = NO # If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen # will generate a graphical hierarchy of all classes instead of a textual one. GRAPHICAL_HIERARCHY = YES # If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES # then doxygen will show the dependencies a directory has on other directories # in a graphical way. The dependency relations are determined by the #include # relations between the files in the directories. DIRECTORY_GRAPH = YES # The DOT_IMAGE_FORMAT tag can be used to set the image format of the images # generated by dot. Possible values are svg, png, jpg, or gif. # If left blank png will be used. If you choose svg you need to set # HTML_FILE_EXTENSION to xhtml in order to make the SVG files # visible in IE 9+ (other browsers do not have this requirement). DOT_IMAGE_FORMAT = png # If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to # enable generation of interactive SVG images that allow zooming and panning. # Note that this requires a modern browser other than Internet Explorer. # Tested and working are Firefox, Chrome, Safari, and Opera. For IE 9+ you # need to set HTML_FILE_EXTENSION to xhtml in order to make the SVG files # visible. Older versions of IE do not have SVG support. INTERACTIVE_SVG = NO # The tag DOT_PATH can be used to specify the path where the dot tool can be # found. If left blank, it is assumed the dot tool can be found in the path. DOT_PATH = # The DOTFILE_DIRS tag can be used to specify one or more directories that # contain dot files that are included in the documentation (see the # \dotfile command). DOTFILE_DIRS = # The MSCFILE_DIRS tag can be used to specify one or more directories that # contain msc files that are included in the documentation (see the # \mscfile command). MSCFILE_DIRS = # The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of # nodes that will be shown in the graph. If the number of nodes in a graph # becomes larger than this value, doxygen will truncate the graph, which is # visualized by representing a node as a red box. Note that doxygen if the # number of direct children of the root node in a graph is already larger than # DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note # that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH. DOT_GRAPH_MAX_NODES = 50 # The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the # graphs generated by dot. A depth value of 3 means that only nodes reachable # from the root by following a path via at most 3 edges will be shown. Nodes # that lay further from the root node will be omitted. Note that setting this # option to 1 or 2 may greatly reduce the computation time needed for large # code bases. Also note that the size of a graph can be further restricted by # DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction. MAX_DOT_GRAPH_DEPTH = 1000 # Set the DOT_TRANSPARENT tag to YES to generate images with a transparent # background. This is disabled by default, because dot on Windows does not # seem to support this out of the box. Warning: Depending on the platform used, # enabling this option may lead to badly anti-aliased labels on the edges of # a graph (i.e. they become hard to read). DOT_TRANSPARENT = NO # Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output # files in one run (i.e. multiple -o and -T options on the command line). This # makes dot run faster, but since only newer versions of dot (>1.8.10) # support this, this feature is disabled by default. DOT_MULTI_TARGETS = NO # If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will # generate a legend page explaining the meaning of the various boxes and # arrows in the dot generated graphs. GENERATE_LEGEND = YES # If the DOT_CLEANUP tag is set to YES (the default) Doxygen will # remove the intermediate dot files that are used to generate # the various graphs. DOT_CLEANUP = YES linbox-1.3.2/doc/DoxyfileDev.mod000066400000000000000000002275771176453053400165340ustar00rootroot00000000000000# Doxyfile 1.8.0 # This file describes the settings to be used by the documentation system # doxygen (www.doxygen.org) for a project. # # All text after a hash (#) is considered a comment and will be ignored. # The format is: # TAG = value [value, ...] # For lists items can also be appended using: # TAG += value [value, ...] # Values that contain spaces should be placed between quotes (" "). #--------------------------------------------------------------------------- # Project related configuration options #--------------------------------------------------------------------------- # This tag specifies the encoding used for all characters in the config file # that follow. The default is UTF-8 which is also the encoding used for all # text before the first occurrence of this tag. Doxygen uses libiconv (or the # iconv built into libc) for the transcoding. See # http://www.gnu.org/software/libiconv for the list of possible encodings. DOXYFILE_ENCODING = UTF-8 # The PROJECT_NAME tag is a single word (or sequence of words) that should # identify the project. Note that if you do not use Doxywizard you need # to put quotes around the project name if it contains spaces. PROJECT_NAME = linbox # The PROJECT_NUMBER tag can be used to enter a project or revision number. # This could be handy for archiving the generated documentation or # if some version control system is used. PROJECT_NUMBER = # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer # a quick idea about the purpose of the project. Keep the description short. PROJECT_BRIEF = # With the PROJECT_LOGO tag one can specify an logo or icon that is # included in the documentation. The maximum height of the logo should not # exceed 55 pixels and the maximum width should not exceed 200 pixels. # Doxygen will copy the logo to the output directory. PROJECT_LOGO = # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) # base path where the generated documentation will be put. # If a relative path is entered, it will be relative to the location # where doxygen was started. If left blank the current directory will be used. OUTPUT_DIRECTORY = . # If the CREATE_SUBDIRS tag is set to YES, then doxygen will create # 4096 sub-directories (in 2 levels) under the output directory of each output # format and will distribute the generated files over these directories. # Enabling this option can be useful when feeding doxygen a huge amount of # source files, where putting all generated files in the same directory would # otherwise cause performance problems for the file system. CREATE_SUBDIRS = NO # The OUTPUT_LANGUAGE tag is used to specify the language in which all # documentation generated by doxygen is written. Doxygen will use this # information to generate all constant output in the proper language. # The default language is English, other supported languages are: # Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, # Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German, # Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English # messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, # Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrillic, Slovak, # Slovene, Spanish, Swedish, Ukrainian, and Vietnamese. OUTPUT_LANGUAGE = English # If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will # include brief member descriptions after the members that are listed in # the file and class documentation (similar to JavaDoc). # Set to NO to disable this. BRIEF_MEMBER_DESC = YES # If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend # the brief description of a member or function before the detailed description. # Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the # brief descriptions will be completely suppressed. REPEAT_BRIEF = YES # This tag implements a quasi-intelligent brief description abbreviator # that is used to form the text in various listings. Each string # in this list, if found as the leading text of the brief description, will be # stripped from the text and the result after processing the whole list, is # used as the annotated text. Otherwise, the brief description is used as-is. # If left blank, the following values are used ("$name" is automatically # replaced with the name of the entity): "The $name class" "The $name widget" # "The $name file" "is" "provides" "specifies" "contains" # "represents" "a" "an" "the" ABBREVIATE_BRIEF = "The $name class" \ "The $name widget" \ "The $name file" \ is \ provides \ specifies \ contains \ represents \ a \ an \ the # If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then # Doxygen will generate a detailed section even if there is only a brief # description. ALWAYS_DETAILED_SEC = NO # If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all # inherited members of a class in the documentation of that class as if those # members were ordinary class members. Constructors, destructors and assignment # operators of the base classes will not be shown. INLINE_INHERITED_MEMB = YES # If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full # path before files name in the file list and in the header files. If set # to NO the shortest path that makes the file name unique will be used. FULL_PATH_NAMES = NO # If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag # can be used to strip a user-defined part of the path. Stripping is # only done if one of the specified strings matches the left-hand part of # the path. The tag can be used to show relative paths in the file list. # If left blank the directory from which doxygen is run is used as the # path to strip. STRIP_FROM_PATH = # The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of # the path mentioned in the documentation of a class, which tells # the reader which header file to include in order to use a class. # If left blank only the name of the header file containing the class # definition is used. Otherwise one should specify the include paths that # are normally passed to the compiler using the -I flag. STRIP_FROM_INC_PATH = # If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter # (but less readable) file names. This can be useful if your file system # doesn't support long names like on DOS, Mac, or CD-ROM. SHORT_NAMES = NO # If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen # will interpret the first line (until the first dot) of a JavaDoc-style # comment as the brief description. If set to NO, the JavaDoc # comments will behave just like regular Qt-style comments # (thus requiring an explicit @brief command for a brief description.) JAVADOC_AUTOBRIEF = YES # If the QT_AUTOBRIEF tag is set to YES then Doxygen will # interpret the first line (until the first dot) of a Qt-style # comment as the brief description. If set to NO, the comments # will behave just like regular Qt-style comments (thus requiring # an explicit \brief command for a brief description.) QT_AUTOBRIEF = YES # The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen # treat a multi-line C++ special comment block (i.e. a block of //! or /// # comments) as a brief description. This used to be the default behaviour. # The new default is to treat a multi-line C++ comment block as a detailed # description. Set this tag to YES if you prefer the old behaviour instead. MULTILINE_CPP_IS_BRIEF = NO # If the INHERIT_DOCS tag is set to YES (the default) then an undocumented # member inherits the documentation from any documented member that it # re-implements. INHERIT_DOCS = YES # If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce # a new page for each member. If set to NO, the documentation of a member will # be part of the file/class/namespace that contains it. SEPARATE_MEMBER_PAGES = NO # The TAB_SIZE tag can be used to set the number of spaces in a tab. # Doxygen uses this value to replace tabs by spaces in code fragments. TAB_SIZE = 4 # This tag can be used to specify a number of aliases that acts # as commands in the documentation. An alias has the form "name=value". # For example adding "sideeffect=\par Side Effects:\n" will allow you to # put the command \sideeffect (or @sideeffect) in the documentation, which # will result in a user-defined paragraph with heading "Side Effects:". # You can put \n's in the value part of an alias to insert newlines. ALIASES = "bib=\xrefitem bib \"Bibliography\" \"Bibliography\"" # This tag can be used to specify a number of word-keyword mappings (TCL only). # A mapping has the form "name=value". For example adding # "class=itcl::class" will allow you to use the command class in the # itcl::class meaning. TCL_SUBST = # Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C # sources only. Doxygen will then generate output that is more tailored for C. # For instance, some of the names that are used will be different. The list # of all members will be omitted, etc. OPTIMIZE_OUTPUT_FOR_C = YES # Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java # sources only. Doxygen will then generate output that is more tailored for # Java. For instance, namespaces will be presented as packages, qualified # scopes will look different, etc. OPTIMIZE_OUTPUT_JAVA = NO # Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran # sources only. Doxygen will then generate output that is more tailored for # Fortran. OPTIMIZE_FOR_FORTRAN = NO # Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL # sources. Doxygen will then generate output that is tailored for # VHDL. OPTIMIZE_OUTPUT_VHDL = NO # Doxygen selects the parser to use depending on the extension of the files it # parses. With this tag you can assign which parser to use for a given extension. # Doxygen has a built-in mapping, but you can override or extend it using this # tag. The format is ext=language, where ext is a file extension, and language # is one of the parsers supported by doxygen: IDL, Java, Javascript, CSharp, C, # C++, D, PHP, Objective-C, Python, Fortran, VHDL, C, C++. For instance to make # doxygen treat .inc files as Fortran files (default is PHP), and .f files as C # (default is Fortran), use: inc=Fortran f=C. Note that for custom extensions # you also need to set FILE_PATTERNS otherwise the files are not read by doxygen. EXTENSION_MAPPING = # If MARKDOWN_SUPPORT is enabled (the default) then doxygen pre-processes all # comments according to the Markdown format, which allows for more readable # documentation. See http://daringfireball.net/projects/markdown/ for details. # The output of markdown processing is further processed by doxygen, so you # can mix doxygen, HTML, and XML commands with Markdown formatting. # Disable only in case of backward compatibilities issues. MARKDOWN_SUPPORT = YES # If you use STL classes (i.e. std::string, std::vector, etc.) but do not want # to include (a tag file for) the STL sources as input, then you should # set this tag to YES in order to let doxygen match functions declarations and # definitions whose arguments contain STL classes (e.g. func(std::string); v.s. # func(std::string) {}). This also makes the inheritance and collaboration # diagrams that involve STL classes more complete and accurate. BUILTIN_STL_SUPPORT = YES # If you use Microsoft's C++/CLI language, you should set this option to YES to # enable parsing support. CPP_CLI_SUPPORT = NO # Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. # Doxygen will parse them like normal C++ but will assume all classes use public # instead of private inheritance when no explicit protection keyword is present. SIP_SUPPORT = NO # For Microsoft's IDL there are propget and propput attributes to indicate getter # and setter methods for a property. Setting this option to YES (the default) # will make doxygen replace the get and set methods by a property in the # documentation. This will only work if the methods are indeed getting or # setting a simple type. If this is not the case, or you want to show the # methods anyway, you should set this option to NO. IDL_PROPERTY_SUPPORT = YES # If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC # tag is set to YES, then doxygen will reuse the documentation of the first # member in the group (if any) for the other members of the group. By default # all members of a group must be documented explicitly. DISTRIBUTE_GROUP_DOC = YES # Set the SUBGROUPING tag to YES (the default) to allow class member groups of # the same type (for instance a group of public functions) to be put as a # subgroup of that type (e.g. under the Public Functions section). Set it to # NO to prevent subgrouping. Alternatively, this can be done per class using # the \nosubgrouping command. SUBGROUPING = YES # When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and # unions are shown inside the group in which they are included (e.g. using # @ingroup) instead of on a separate page (for HTML and Man pages) or # section (for LaTeX and RTF). INLINE_GROUPED_CLASSES = NO # When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and # unions with only public data fields will be shown inline in the documentation # of the scope in which they are defined (i.e. file, namespace, or group # documentation), provided this scope is documented. If set to NO (the default), # structs, classes, and unions are shown on a separate page (for HTML and Man # pages) or section (for LaTeX and RTF). INLINE_SIMPLE_STRUCTS = NO # When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum # is documented as struct, union, or enum with the name of the typedef. So # typedef struct TypeS {} TypeT, will appear in the documentation as a struct # with name TypeT. When disabled the typedef will appear as a member of a file, # namespace, or class. And the struct will be named TypeS. This can typically # be useful for C code in case the coding convention dictates that all compound # types are typedef'ed and only the typedef is referenced, never the tag name. TYPEDEF_HIDES_STRUCT = NO # The SYMBOL_CACHE_SIZE determines the size of the internal cache use to # determine which symbols to keep in memory and which to flush to disk. # When the cache is full, less often used symbols will be written to disk. # For small to medium size projects (<1000 input files) the default value is # probably good enough. For larger projects a too small cache size can cause # doxygen to be busy swapping symbols to and from disk most of the time # causing a significant performance penalty. # If the system has enough physical memory increasing the cache will improve the # performance by keeping more symbols in memory. Note that the value works on # a logarithmic scale so increasing the size by one will roughly double the # memory usage. The cache size is given by this formula: # 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0, # corresponding to a cache size of 2^16 = 65536 symbols. SYMBOL_CACHE_SIZE = 0 # Similar to the SYMBOL_CACHE_SIZE the size of the symbol lookup cache can be # set using LOOKUP_CACHE_SIZE. This cache is used to resolve symbols given # their name and scope. Since this can be an expensive process and often the # same symbol appear multiple times in the code, doxygen keeps a cache of # pre-resolved symbols. If the cache is too small doxygen will become slower. # If the cache is too large, memory is wasted. The cache size is given by this # formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range is 0..9, the default is 0, # corresponding to a cache size of 2^16 = 65536 symbols. LOOKUP_CACHE_SIZE = 0 #--------------------------------------------------------------------------- # Build related configuration options #--------------------------------------------------------------------------- # If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in # documentation are documented, even if no documentation was available. # Private class members and static file members will be hidden unless # the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES EXTRACT_ALL = YES # If the EXTRACT_PRIVATE tag is set to YES all private members of a class # will be included in the documentation. EXTRACT_PRIVATE = NO # If the EXTRACT_PACKAGE tag is set to YES all members with package or internal scope will be included in the documentation. EXTRACT_PACKAGE = NO # If the EXTRACT_STATIC tag is set to YES all static members of a file # will be included in the documentation. EXTRACT_STATIC = NO # If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) # defined locally in source files will be included in the documentation. # If set to NO only classes defined in header files are included. EXTRACT_LOCAL_CLASSES = YES # This flag is only useful for Objective-C code. When set to YES local # methods, which are defined in the implementation section but not in # the interface are included in the documentation. # If set to NO (the default) only methods in the interface are included. EXTRACT_LOCAL_METHODS = NO # If this flag is set to YES, the members of anonymous namespaces will be # extracted and appear in the documentation as a namespace called # 'anonymous_namespace{file}', where file will be replaced with the base # name of the file that contains the anonymous namespace. By default # anonymous namespaces are hidden. EXTRACT_ANON_NSPACES = NO # If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all # undocumented members of documented classes, files or namespaces. # If set to NO (the default) these members will be included in the # various overviews, but no documentation section is generated. # This option has no effect if EXTRACT_ALL is enabled. HIDE_UNDOC_MEMBERS = YES # If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all # undocumented classes that are normally visible in the class hierarchy. # If set to NO (the default) these classes will be included in the various # overviews. This option has no effect if EXTRACT_ALL is enabled. HIDE_UNDOC_CLASSES = YES # If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all # friend (class|struct|union) declarations. # If set to NO (the default) these declarations will be included in the # documentation. HIDE_FRIEND_COMPOUNDS = NO # If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any # documentation blocks found inside the body of a function. # If set to NO (the default) these blocks will be appended to the # function's detailed documentation block. HIDE_IN_BODY_DOCS = NO # The INTERNAL_DOCS tag determines if documentation # that is typed after a \internal command is included. If the tag is set # to NO (the default) then the documentation will be excluded. # Set it to YES to include the internal documentation. INTERNAL_DOCS = YES # If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate # file names in lower-case letters. If set to YES upper-case letters are also # allowed. This is useful if you have classes or files whose names only differ # in case and if your file system supports case sensitive file names. Windows # and Mac users are advised to set this option to NO. CASE_SENSE_NAMES = NO # If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen # will show members with their full class and namespace scopes in the # documentation. If set to YES the scope will be hidden. HIDE_SCOPE_NAMES = YES # If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen # will put a list of the files that are included by a file in the documentation # of that file. SHOW_INCLUDE_FILES = YES # If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen # will list include files with double quotes in the documentation # rather than with sharp brackets. FORCE_LOCAL_INCLUDES = NO # If the INLINE_INFO tag is set to YES (the default) then a tag [inline] # is inserted in the documentation for inline members. INLINE_INFO = YES # If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen # will sort the (detailed) documentation of file and class members # alphabetically by member name. If set to NO the members will appear in # declaration order. SORT_MEMBER_DOCS = NO # If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the # brief documentation of file, namespace and class members alphabetically # by member name. If set to NO (the default) the members will appear in # declaration order. SORT_BRIEF_DOCS = NO # If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen # will sort the (brief and detailed) documentation of class members so that # constructors and destructors are listed first. If set to NO (the default) # the constructors will appear in the respective orders defined by # SORT_MEMBER_DOCS and SORT_BRIEF_DOCS. # This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO # and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO. SORT_MEMBERS_CTORS_1ST = NO # If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the # hierarchy of group names into alphabetical order. If set to NO (the default) # the group names will appear in their defined order. SORT_GROUP_NAMES = NO # If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be # sorted by fully-qualified names, including namespaces. If set to # NO (the default), the class list will be sorted only by class name, # not including the namespace part. # Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. # Note: This option applies only to the class list, not to the # alphabetical list. SORT_BY_SCOPE_NAME = NO # If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to # do proper type resolution of all parameters of a function it will reject a # match between the prototype and the implementation of a member function even # if there is only one candidate or it is obvious which candidate to choose # by doing a simple string match. By disabling STRICT_PROTO_MATCHING doxygen # will still accept a match between prototype and implementation in such cases. STRICT_PROTO_MATCHING = NO # The GENERATE_TODOLIST tag can be used to enable (YES) or # disable (NO) the todo list. This list is created by putting \todo # commands in the documentation. GENERATE_TODOLIST = YES # The GENERATE_TESTLIST tag can be used to enable (YES) or # disable (NO) the test list. This list is created by putting \test # commands in the documentation. GENERATE_TESTLIST = YES # The GENERATE_BUGLIST tag can be used to enable (YES) or # disable (NO) the bug list. This list is created by putting \bug # commands in the documentation. GENERATE_BUGLIST = YES # The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or # disable (NO) the deprecated list. This list is created by putting # \deprecated commands in the documentation. GENERATE_DEPRECATEDLIST= YES # The ENABLED_SECTIONS tag can be used to enable conditional # documentation sections, marked by \if sectionname ... \endif. ENABLED_SECTIONS = # The MAX_INITIALIZER_LINES tag determines the maximum number of lines # the initial value of a variable or macro consists of for it to appear in # the documentation. If the initializer consists of more lines than specified # here it will be hidden. Use a value of 0 to hide initializers completely. # The appearance of the initializer of individual variables and macros in the # documentation can be controlled using \showinitializer or \hideinitializer # command in the documentation regardless of this setting. MAX_INITIALIZER_LINES = 30 # Set the SHOW_USED_FILES tag to NO to disable the list of files generated # at the bottom of the documentation of classes and structs. If set to YES the # list will mention the files that were used to generate the documentation. SHOW_USED_FILES = YES # If the sources in your project are distributed over multiple directories # then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy # in the documentation. The default is NO. SHOW_DIRECTORIES = YES # Set the SHOW_FILES tag to NO to disable the generation of the Files page. # This will remove the Files entry from the Quick Index and from the # Folder Tree View (if specified). The default is YES. SHOW_FILES = YES # Set the SHOW_NAMESPACES tag to NO to disable the generation of the # Namespaces page. # This will remove the Namespaces entry from the Quick Index # and from the Folder Tree View (if specified). The default is YES. SHOW_NAMESPACES = YES # The FILE_VERSION_FILTER tag can be used to specify a program or script that # doxygen should invoke to get the current version for each file (typically from # the version control system). Doxygen will invoke the program by executing (via # popen()) the command , where is the value of # the FILE_VERSION_FILTER tag, and is the name of an input file # provided by doxygen. Whatever the program writes to standard output # is used as the file version. See the manual for examples. FILE_VERSION_FILTER = # The LAYOUT_FILE tag can be used to specify a layout file which will be parsed # by doxygen. The layout file controls the global structure of the generated # output files in an output format independent way. The create the layout file # that represents doxygen's defaults, run doxygen with the -l option. # You can optionally specify a file name after the option, if omitted # DoxygenLayout.xml will be used as the name of the layout file. LAYOUT_FILE = # The CITE_BIB_FILES tag can be used to specify one or more bib files # containing the references data. This must be a list of .bib files. The # .bib extension is automatically appended if omitted. Using this command # requires the bibtex tool to be installed. See also # http://en.wikipedia.org/wiki/BibTeX for more info. For LaTeX the style # of the bibliography can be controlled using LATEX_BIB_STYLE. To use this # feature you need bibtex and perl available in the search path. CITE_BIB_FILES = #--------------------------------------------------------------------------- # configuration options related to warning and progress messages #--------------------------------------------------------------------------- # The QUIET tag can be used to turn on/off the messages that are generated # by doxygen. Possible values are YES and NO. If left blank NO is used. QUIET = NO # The WARNINGS tag can be used to turn on/off the warning messages that are # generated by doxygen. Possible values are YES and NO. If left blank # NO is used. WARNINGS = YES # If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings # for undocumented members. If EXTRACT_ALL is set to YES then this flag will # automatically be disabled. WARN_IF_UNDOCUMENTED = YES # If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for # potential errors in the documentation, such as not documenting some # parameters in a documented function, or documenting parameters that # don't exist or using markup commands wrongly. WARN_IF_DOC_ERROR = YES # The WARN_NO_PARAMDOC option can be enabled to get warnings for # functions that are documented, but have no documentation for their parameters # or return value. If set to NO (the default) doxygen will only warn about # wrong or incomplete parameter documentation, but not about the absence of # documentation. WARN_NO_PARAMDOC = NO # The WARN_FORMAT tag determines the format of the warning messages that # doxygen can produce. The string should contain the $file, $line, and $text # tags, which will be replaced by the file and line number from which the # warning originated and the warning text. Optionally the format may contain # $version, which will be replaced by the version of the file (if it could # be obtained via FILE_VERSION_FILTER) WARN_FORMAT = "$file:$line: $text" # The WARN_LOGFILE tag can be used to specify a file to which warning # and error messages should be written. If left blank the output is written # to stderr. WARN_LOGFILE = doxydev.debug #--------------------------------------------------------------------------- # configuration options related to the input files #--------------------------------------------------------------------------- # The INPUT tag can be used to specify the files and/or directories that contain # documented source files. You may enter file names like "myfile.cpp" or # directories like "/usr/src/myproject". Separate the files or directories # with spaces. INPUT = ../linbox \ ../doc \ ../examples \ ../tests \ ../benchmarks # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is # also the default input encoding. Doxygen uses libiconv (or the iconv built # into libc) for the transcoding. See http://www.gnu.org/software/libiconv for # the list of possible encodings. INPUT_ENCODING = UTF-8 # If the value of the INPUT tag contains directories, you can use the # FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp # and *.h) to filter out the source-files in the directories. If left # blank the following patterns are tested: # *.c *.cc *.cxx *.cpp *.c++ *.d *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh # *.hxx *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.dox *.py # *.f90 *.f *.for *.vhd *.vhdl FILE_PATTERNS = *.cc \ *.cpp \ *.C \ *.h \ *.inl \ *.doxy # The RECURSIVE tag can be used to turn specify whether or not subdirectories # should be searched for input files as well. Possible values are YES and NO. # If left blank NO is used. RECURSIVE = YES # The EXCLUDE tag can be used to specify files and/or directories that should be # excluded from the INPUT source files. This way you can easily exclude a # subdirectory from a directory tree whose root is specified with the INPUT tag. # Note that relative paths are relative to the directory from which doxygen is # run. EXCLUDE = *_src.inl \ Attic # The EXCLUDE_SYMLINKS tag can be used to select whether or not files or # directories that are symbolic links (a Unix file system feature) are excluded # from the input. EXCLUDE_SYMLINKS = NO # If the value of the INPUT tag contains directories, you can use the # EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude # certain files from those directories. Note that the wildcards are matched # against the file with absolute path, so to exclude all test directories # for example use the pattern */test/* EXCLUDE_PATTERNS = *_src.inl \ */Attic/* # The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names # (namespaces, classes, functions, etc.) that should be excluded from the # output. The symbol name can be a fully qualified name, a word, or if the # wildcard * is used, a substring. Examples: ANamespace, AClass, # AClass::ANamespace, ANamespace::*Test EXCLUDE_SYMBOLS = *__LINBOX_* # The EXAMPLE_PATH tag can be used to specify one or more files or # directories that contain example code fragments that are included (see # the \include command). EXAMPLE_PATH = .. # If the value of the EXAMPLE_PATH tag contains directories, you can use the # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp # and *.h) to filter out the source-files in the directories. If left # blank all files are included. EXAMPLE_PATTERNS = *.C \ *.inl \ *INSTALL \ *COPYING \ *HACKING \ *AUTHORS \ *.html # If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be # searched for input files to be used with the \include or \dontinclude # commands irrespective of the value of the RECURSIVE tag. # Possible values are YES and NO. If left blank NO is used. EXAMPLE_RECURSIVE = YES # The IMAGE_PATH tag can be used to specify one or more files or # directories that contain image that are included in the documentation (see # the \image command). IMAGE_PATH = # The INPUT_FILTER tag can be used to specify a program that doxygen should # invoke to filter for each input file. Doxygen will invoke the filter program # by executing (via popen()) the command , where # is the value of the INPUT_FILTER tag, and is the name of an # input file. Doxygen will then use the output that the filter program writes # to standard output. # If FILTER_PATTERNS is specified, this tag will be # ignored. INPUT_FILTER = # The FILTER_PATTERNS tag can be used to specify filters on a per file pattern # basis. # Doxygen will compare the file name with each pattern and apply the # filter if there is a match. # The filters are a list of the form: # pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further # info on how filters are used. If FILTER_PATTERNS is empty or if # non of the patterns match the file name, INPUT_FILTER is applied. FILTER_PATTERNS = # If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using # INPUT_FILTER) will be used to filter the input files when producing source # files to browse (i.e. when SOURCE_BROWSER is set to YES). FILTER_SOURCE_FILES = NO # The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file # pattern. A pattern will override the setting for FILTER_PATTERN (if any) # and it is also possible to disable source filtering for a specific pattern # using *.ext= (so without naming a filter). This option only has effect when # FILTER_SOURCE_FILES is enabled. FILTER_SOURCE_PATTERNS = #--------------------------------------------------------------------------- # configuration options related to source browsing #--------------------------------------------------------------------------- # If the SOURCE_BROWSER tag is set to YES then a list of source files will # be generated. Documented entities will be cross-referenced with these sources. # Note: To get rid of all source code in the generated output, make sure also # VERBATIM_HEADERS is set to NO. SOURCE_BROWSER = NO # Setting the INLINE_SOURCES tag to YES will include the body # of functions and classes directly in the documentation. INLINE_SOURCES = NO # Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct # doxygen to hide any special comment blocks from generated source code # fragments. Normal C and C++ comments will always remain visible. STRIP_CODE_COMMENTS = YES # If the REFERENCED_BY_RELATION tag is set to YES # then for each documented function all documented # functions referencing it will be listed. REFERENCED_BY_RELATION = NO # If the REFERENCES_RELATION tag is set to YES # then for each documented function all documented entities # called/used by that function will be listed. REFERENCES_RELATION = NO # If the REFERENCES_LINK_SOURCE tag is set to YES (the default) # and SOURCE_BROWSER tag is set to YES, then the hyperlinks from # functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will # link to the source code. # Otherwise they will link to the documentation. REFERENCES_LINK_SOURCE = YES # If the USE_HTAGS tag is set to YES then the references to source code # will point to the HTML generated by the htags(1) tool instead of doxygen # built-in source browser. The htags tool is part of GNU's global source # tagging system (see http://www.gnu.org/software/global/global.html). You # will need version 4.8.6 or higher. USE_HTAGS = NO # If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen # will generate a verbatim copy of the header file for each class for # which an include is specified. Set to NO to disable this. VERBATIM_HEADERS = NO #--------------------------------------------------------------------------- # configuration options related to the alphabetical class index #--------------------------------------------------------------------------- # If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index # of all compounds will be generated. Enable this if the project # contains a lot of classes, structs, unions or interfaces. ALPHABETICAL_INDEX = NO # If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then # the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns # in which this list will be split (can be a number in the range [1..20]) COLS_IN_ALPHA_INDEX = 5 # In case all classes in a project start with a common prefix, all # classes will be put under the same header in the alphabetical index. # The IGNORE_PREFIX tag can be used to specify one or more prefixes that # should be ignored while generating the index headers. IGNORE_PREFIX = #--------------------------------------------------------------------------- # configuration options related to the HTML output #--------------------------------------------------------------------------- # If the GENERATE_HTML tag is set to YES (the default) Doxygen will # generate HTML output. GENERATE_HTML = YES # The HTML_OUTPUT tag is used to specify where the HTML docs will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `html' will be used as the default path. HTML_OUTPUT = linbox-dev-html # The HTML_FILE_EXTENSION tag can be used to specify the file extension for # each generated HTML page (for example: .htm,.php,.asp). If it is left blank # doxygen will generate files with .html extension. HTML_FILE_EXTENSION = .html # The HTML_HEADER tag can be used to specify a personal HTML header for # each generated HTML page. If it is left blank doxygen will generate a # standard header. Note that when using a custom header you are responsible # for the proper inclusion of any scripts and style sheets that doxygen # needs, which is dependent on the configuration options used. # It is advised to generate a default header using "doxygen -w html # header.html footer.html stylesheet.css YourConfigFile" and then modify # that header. Note that the header is subject to change so you typically # have to redo this when upgrading to a newer version of doxygen or when # changing the value of configuration settings such as GENERATE_TREEVIEW! HTML_HEADER = # The HTML_FOOTER tag can be used to specify a personal HTML footer for # each generated HTML page. If it is left blank doxygen will generate a # standard footer. HTML_FOOTER = # The HTML_STYLESHEET tag can be used to specify a user-defined cascading # style sheet that is used by each HTML page. It can be used to # fine-tune the look of the HTML output. If the tag is left blank doxygen # will generate a default style sheet. Note that doxygen will try to copy # the style sheet file to the HTML output directory, so don't put your own # style sheet in the HTML output directory as well, or it will be erased! HTML_STYLESHEET = # The HTML_EXTRA_FILES tag can be used to specify one or more extra images or # other source files which should be copied to the HTML output directory. Note # that these files will be copied to the base HTML output directory. Use the # $relpath$ marker in the HTML_HEADER and/or HTML_FOOTER files to load these # files. In the HTML_STYLESHEET file, use the file name only. Also note that # the files will be copied as-is; there are no commands or markers available. HTML_EXTRA_FILES = # The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. # Doxygen will adjust the colors in the style sheet and background images # according to this color. Hue is specified as an angle on a colorwheel, # see http://en.wikipedia.org/wiki/Hue for more information. # For instance the value 0 represents red, 60 is yellow, 120 is green, # 180 is cyan, 240 is blue, 300 purple, and 360 is red again. # The allowed range is 0 to 359. HTML_COLORSTYLE_HUE = 110 # The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of # the colors in the HTML output. For a value of 0 the output will use # grayscales only. A value of 255 will produce the most vivid colors. HTML_COLORSTYLE_SAT = 100 # The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to # the luminance component of the colors in the HTML output. Values below # 100 gradually make the output lighter, whereas values above 100 make # the output darker. The value divided by 100 is the actual gamma applied, # so 80 represents a gamma of 0.8, The value 220 represents a gamma of 2.2, # and 100 does not change the gamma. HTML_COLORSTYLE_GAMMA = 80 # If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML # page will contain the date and time when the page was generated. Setting # this to NO can help when comparing the output of multiple runs. HTML_TIMESTAMP = YES # If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, # files or namespaces will be aligned in HTML using tables. If set to # NO a bullet list will be used. HTML_ALIGN_MEMBERS = YES # If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML # documentation will contain sections that can be hidden and shown after the # page has loaded. For this to work a browser that supports # JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox # Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari). HTML_DYNAMIC_SECTIONS = YES # If the GENERATE_DOCSET tag is set to YES, additional index files # will be generated that can be used as input for Apple's Xcode 3 # integrated development environment, introduced with OSX 10.5 (Leopard). # To create a documentation set, doxygen will generate a Makefile in the # HTML output directory. Running make will produce the docset in that # directory and running "make install" will install the docset in # ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find # it at startup. # See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html # for more information. GENERATE_DOCSET = NO # When GENERATE_DOCSET tag is set to YES, this tag determines the name of the # feed. A documentation feed provides an umbrella under which multiple # documentation sets from a single provider (such as a company or product suite) # can be grouped. DOCSET_FEEDNAME = "Doxygen generated docs" # When GENERATE_DOCSET tag is set to YES, this tag specifies a string that # should uniquely identify the documentation set bundle. This should be a # reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen # will append .docset to the name. DOCSET_BUNDLE_ID = org.doxygen.Project # When GENERATE_PUBLISHER_ID tag specifies a string that should uniquely identify # the documentation publisher. This should be a reverse domain-name style # string, e.g. com.mycompany.MyDocSet.documentation. DOCSET_PUBLISHER_ID = org.doxygen.Publisher # The GENERATE_PUBLISHER_NAME tag identifies the documentation publisher. DOCSET_PUBLISHER_NAME = Publisher # If the GENERATE_HTMLHELP tag is set to YES, additional index files # will be generated that can be used as input for tools like the # Microsoft HTML help workshop to generate a compiled HTML help file (.chm) # of the generated HTML documentation. GENERATE_HTMLHELP = NO # If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can # be used to specify the file name of the resulting .chm file. You # can add a path in front of the file if the result should not be # written to the html output directory. CHM_FILE = # If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can # be used to specify the location (absolute path including file name) of # the HTML help compiler (hhc.exe). If non-empty doxygen will try to run # the HTML help compiler on the generated index.hhp. HHC_LOCATION = # If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag # controls if a separate .chi index file is generated (YES) or that # it should be included in the master .chm file (NO). GENERATE_CHI = NO # If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING # is used to encode HtmlHelp index (hhk), content (hhc) and project file # content. CHM_INDEX_ENCODING = # If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag # controls whether a binary table of contents is generated (YES) or a # normal table of contents (NO) in the .chm file. BINARY_TOC = NO # The TOC_EXPAND flag can be set to YES to add extra items for group members # to the contents of the HTML help documentation and to the tree view. TOC_EXPAND = NO # If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and # QHP_VIRTUAL_FOLDER are set, an additional index file will be generated # that can be used as input for Qt's qhelpgenerator to generate a # Qt Compressed Help (.qch) of the generated HTML documentation. GENERATE_QHP = NO # If the QHG_LOCATION tag is specified, the QCH_FILE tag can # be used to specify the file name of the resulting .qch file. # The path specified is relative to the HTML output folder. QCH_FILE = # The QHP_NAMESPACE tag specifies the namespace to use when generating # Qt Help Project output. For more information please see # http://doc.trolltech.com/qthelpproject.html#namespace QHP_NAMESPACE = org.doxygen.Project # The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating # Qt Help Project output. For more information please see # http://doc.trolltech.com/qthelpproject.html#virtual-folders QHP_VIRTUAL_FOLDER = doc # If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to # add. For more information please see # http://doc.trolltech.com/qthelpproject.html#custom-filters QHP_CUST_FILTER_NAME = # The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the # custom filter to add. For more information please see # # Qt Help Project / Custom Filters. QHP_CUST_FILTER_ATTRS = # The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this # project's # filter section matches. # # Qt Help Project / Filter Attributes. QHP_SECT_FILTER_ATTRS = # If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can # be used to specify the location of Qt's qhelpgenerator. # If non-empty doxygen will try to run qhelpgenerator on the generated # .qhp file. QHG_LOCATION = # If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files # will be generated, which together with the HTML files, form an Eclipse help # plugin. To install this plugin and make it available under the help contents # menu in Eclipse, the contents of the directory containing the HTML and XML # files needs to be copied into the plugins directory of eclipse. The name of # the directory within the plugins directory should be the same as # the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before # the help appears. GENERATE_ECLIPSEHELP = NO # A unique identifier for the eclipse help plugin. When installing the plugin # the directory name containing the HTML and XML files should also have # this name. ECLIPSE_DOC_ID = org.doxygen.Project # The DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) # at top of each HTML page. The value NO (the default) enables the index and # the value YES disables it. Since the tabs have the same information as the # navigation tree you can set this option to NO if you already set # GENERATE_TREEVIEW to YES. DISABLE_INDEX = NO # The GENERATE_TREEVIEW tag is used to specify whether a tree-like index # structure should be generated to display hierarchical information. # If the tag value is set to YES, a side panel will be generated # containing a tree-like index structure (just like the one that # is generated for HTML Help). For this to work a browser that supports # JavaScript, DHTML, CSS and frames is required (i.e. any modern browser). # Windows users are probably better off using the HTML help feature. # Since the tree basically has the same information as the tab index you # could consider to set DISABLE_INDEX to NO when enabling this option. GENERATE_TREEVIEW = NO # The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values # (range [0,1..20]) that doxygen will group on one line in the generated HTML # documentation. Note that a value of 0 will completely suppress the enum # values from appearing in the overview section. ENUM_VALUES_PER_LINE = 4 # By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories, # and Class Hierarchy pages using a tree view instead of an ordered list. USE_INLINE_TREES = NO # If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be # used to set the initial width (in pixels) of the frame in which the tree # is shown. TREEVIEW_WIDTH = 250 # When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open # links to external symbols imported via tag files in a separate window. EXT_LINKS_IN_WINDOW = NO # Use this tag to change the font size of Latex formulas included # as images in the HTML documentation. The default is 10. Note that # when you change the font size after a successful doxygen run you need # to manually remove any form_*.png images from the HTML output directory # to force them to be regenerated. FORMULA_FONTSIZE = 10 # Use the FORMULA_TRANPARENT tag to determine whether or not the images # generated for formulas are transparent PNGs. Transparent PNGs are # not supported properly for IE 6.0, but are supported on all modern browsers. # Note that when changing this option you need to delete any form_*.png files # in the HTML output before the changes have effect. FORMULA_TRANSPARENT = YES # Enable the USE_MATHJAX option to render LaTeX formulas using MathJax # (see http://www.mathjax.org) which uses client side Javascript for the # rendering instead of using prerendered bitmaps. Use this if you do not # have LaTeX installed or if you want to formulas look prettier in the HTML # output. When enabled you may also need to install MathJax separately and # configure the path to it using the MATHJAX_RELPATH option. USE_MATHJAX = NO # When MathJax is enabled you need to specify the location relative to the # HTML output directory using the MATHJAX_RELPATH option. The destination # directory should contain the MathJax.js script. For instance, if the mathjax # directory is located at the same level as the HTML output directory, then # MATHJAX_RELPATH should be ../mathjax. The default value points to # the MathJax Content Delivery Network so you can quickly see the result without # installing MathJax. # However, it is strongly recommended to install a local # copy of MathJax from http://www.mathjax.org before deployment. MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest # The MATHJAX_EXTENSIONS tag can be used to specify one or MathJax extension # names that should be enabled during MathJax rendering. MATHJAX_EXTENSIONS = # When the SEARCHENGINE tag is enabled doxygen will generate a search box # for the HTML output. The underlying search engine uses javascript # and DHTML and should work on any modern browser. Note that when using # HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets # (GENERATE_DOCSET) there is already a search function so this one should # typically be disabled. For large projects the javascript based search engine # can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution. SEARCHENGINE = NO # When the SERVER_BASED_SEARCH tag is enabled the search engine will be # implemented using a PHP enabled web server instead of at the web client # using Javascript. Doxygen will generate the search PHP script and index # file to put on the web server. The advantage of the server # based approach is that it scales better to large projects and allows # full text search. The disadvantages are that it is more difficult to setup # and does not have live searching capabilities. SERVER_BASED_SEARCH = NO #--------------------------------------------------------------------------- # configuration options related to the LaTeX output #--------------------------------------------------------------------------- # If the GENERATE_LATEX tag is set to YES (the default) Doxygen will # generate Latex output. GENERATE_LATEX = NO # The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `latex' will be used as the default path. LATEX_OUTPUT = latex # The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be # invoked. If left blank `latex' will be used as the default command name. # Note that when enabling USE_PDFLATEX this option is only used for # generating bitmaps for formulas in the HTML output, but not in the # Makefile that is written to the output directory. LATEX_CMD_NAME = latex # The MAKEINDEX_CMD_NAME tag can be used to specify the command name to # generate index for LaTeX. If left blank `makeindex' will be used as the # default command name. MAKEINDEX_CMD_NAME = makeindex # If the COMPACT_LATEX tag is set to YES Doxygen generates more compact # LaTeX documents. This may be useful for small projects and may help to # save some trees in general. COMPACT_LATEX = NO # The PAPER_TYPE tag can be used to set the paper type that is used # by the printer. Possible values are: a4, letter, legal and # executive. If left blank a4wide will be used. PAPER_TYPE = a4wide # The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX # packages that should be included in the LaTeX output. EXTRA_PACKAGES = stmaryrd \ amsmath # The LATEX_HEADER tag can be used to specify a personal LaTeX header for # the generated latex document. The header should contain everything until # the first chapter. If it is left blank doxygen will generate a # standard header. Notice: only use this tag if you know what you are doing! LATEX_HEADER = # The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for # the generated latex document. The footer should contain everything after # the last chapter. If it is left blank doxygen will generate a # standard footer. Notice: only use this tag if you know what you are doing! LATEX_FOOTER = # If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated # is prepared for conversion to pdf (using ps2pdf). The pdf file will # contain links (just like the HTML output) instead of page references # This makes the output suitable for online browsing using a pdf viewer. PDF_HYPERLINKS = NO # If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of # plain latex in the generated Makefile. Set this option to YES to get a # higher quality PDF documentation. USE_PDFLATEX = NO # If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. # command to the generated LaTeX files. This will instruct LaTeX to keep # running if errors occur, instead of asking the user for help. # This option is also used when generating formulas in HTML. LATEX_BATCHMODE = NO # If LATEX_HIDE_INDICES is set to YES then doxygen will not # include the index chapters (such as File Index, Compound Index, etc.) # in the output. LATEX_HIDE_INDICES = NO # If LATEX_SOURCE_CODE is set to YES then doxygen will include # source code with syntax highlighting in the LaTeX output. # Note that which sources are shown also depends on other settings # such as SOURCE_BROWSER. LATEX_SOURCE_CODE = NO # The LATEX_BIB_STYLE tag can be used to specify the style to use for the # bibliography, e.g. plainnat, or ieeetr. The default style is "plain". See # http://en.wikipedia.org/wiki/BibTeX for more info. LATEX_BIB_STYLE = plain #--------------------------------------------------------------------------- # configuration options related to the RTF output #--------------------------------------------------------------------------- # If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output # The RTF output is optimized for Word 97 and may not look very pretty with # other RTF readers or editors. GENERATE_RTF = NO # The RTF_OUTPUT tag is used to specify where the RTF docs will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `rtf' will be used as the default path. RTF_OUTPUT = rtf # If the COMPACT_RTF tag is set to YES Doxygen generates more compact # RTF documents. This may be useful for small projects and may help to # save some trees in general. COMPACT_RTF = NO # If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated # will contain hyperlink fields. The RTF file will # contain links (just like the HTML output) instead of page references. # This makes the output suitable for online browsing using WORD or other # programs which support those fields. # Note: wordpad (write) and others do not support links. RTF_HYPERLINKS = NO # Load style sheet definitions from file. Syntax is similar to doxygen's # config file, i.e. a series of assignments. You only have to provide # replacements, missing definitions are set to their default value. RTF_STYLESHEET_FILE = # Set optional variables used in the generation of an rtf document. # Syntax is similar to doxygen's config file. RTF_EXTENSIONS_FILE = #--------------------------------------------------------------------------- # configuration options related to the man page output #--------------------------------------------------------------------------- # If the GENERATE_MAN tag is set to YES (the default) Doxygen will # generate man pages GENERATE_MAN = NO # The MAN_OUTPUT tag is used to specify where the man pages will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `man' will be used as the default path. MAN_OUTPUT = man # The MAN_EXTENSION tag determines the extension that is added to # the generated man pages (default is the subroutine's section .3) MAN_EXTENSION = .3 # If the MAN_LINKS tag is set to YES and Doxygen generates man output, # then it will generate one additional man file for each entity # documented in the real man page(s). These additional files # only source the real man page, but without them the man command # would be unable to find the correct page. The default is NO. MAN_LINKS = NO #--------------------------------------------------------------------------- # configuration options related to the XML output #--------------------------------------------------------------------------- # If the GENERATE_XML tag is set to YES Doxygen will # generate an XML file that captures the structure of # the code including all documentation. GENERATE_XML = NO # The XML_OUTPUT tag is used to specify where the XML pages will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `xml' will be used as the default path. XML_OUTPUT = xml # The XML_SCHEMA tag can be used to specify an XML schema, # which can be used by a validating XML parser to check the # syntax of the XML files. XML_SCHEMA = # The XML_DTD tag can be used to specify an XML DTD, # which can be used by a validating XML parser to check the # syntax of the XML files. XML_DTD = # If the XML_PROGRAMLISTING tag is set to YES Doxygen will # dump the program listings (including syntax highlighting # and cross-referencing information) to the XML output. Note that # enabling this will significantly increase the size of the XML output. XML_PROGRAMLISTING = YES #--------------------------------------------------------------------------- # configuration options for the AutoGen Definitions output #--------------------------------------------------------------------------- # If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will # generate an AutoGen Definitions (see autogen.sf.net) file # that captures the structure of the code including all # documentation. Note that this feature is still experimental # and incomplete at the moment. GENERATE_AUTOGEN_DEF = NO #--------------------------------------------------------------------------- # configuration options related to the Perl module output #--------------------------------------------------------------------------- # If the GENERATE_PERLMOD tag is set to YES Doxygen will # generate a Perl module file that captures the structure of # the code including all documentation. Note that this # feature is still experimental and incomplete at the # moment. GENERATE_PERLMOD = NO # If the PERLMOD_LATEX tag is set to YES Doxygen will generate # the necessary Makefile rules, Perl scripts and LaTeX code to be able # to generate PDF and DVI output from the Perl module output. PERLMOD_LATEX = NO # If the PERLMOD_PRETTY tag is set to YES the Perl module output will be # nicely formatted so it can be parsed by a human reader. # This is useful # if you want to understand what is going on. # On the other hand, if this # tag is set to NO the size of the Perl module output will be much smaller # and Perl will parse it just the same. PERLMOD_PRETTY = YES # The names of the make variables in the generated doxyrules.make file # are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. # This is useful so different doxyrules.make files included by the same # Makefile don't overwrite each other's variables. PERLMOD_MAKEVAR_PREFIX = #--------------------------------------------------------------------------- # Configuration options related to the preprocessor #--------------------------------------------------------------------------- # If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will # evaluate all C-preprocessor directives found in the sources and include # files. ENABLE_PREPROCESSING = YES # If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro # names in the source code. If set to NO (the default) only conditional # compilation will be performed. Macro expansion can be done in a controlled # way by setting EXPAND_ONLY_PREDEF to YES. MACRO_EXPANSION = YES # If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES # then the macro expansion is limited to the macros specified with the # PREDEFINED and EXPAND_AS_DEFINED tags. EXPAND_ONLY_PREDEF = NO # If the SEARCH_INCLUDES tag is set to YES (the default) the includes files # pointed to by INCLUDE_PATH will be searched when a #include is found. SEARCH_INCLUDES = YES # The INCLUDE_PATH tag can be used to specify one or more directories that # contain include files that are not input files but should be processed by # the preprocessor. INCLUDE_PATH = # You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard # patterns (like *.h and *.hpp) to filter out the header-files in the # directories. If left blank, the patterns specified with FILE_PATTERNS will # be used. INCLUDE_FILE_PATTERNS = # The PREDEFINED tag can be used to specify one or more macro names that # are defined before the preprocessor is started (similar to the -D option of # gcc). The argument of the tag is a list of macros of the form: name # or name=definition (no spaces). If the definition and the = are # omitted =1 is assumed. To prevent a macro definition from being # undefined via #undef or recursively expanded use the := operator # instead of the = operator. PREDEFINED = DOXYGEN_SHOULD_SKIP_THIS # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then # this tag can be used to specify a list of macro names that should be expanded. # The macro definition that is found in the sources will be used. # Use the PREDEFINED tag if you want to use a different macro definition that # overrules the definition found in the source code. EXPAND_AS_DEFINED = # If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then # doxygen's preprocessor will remove all references to function-like macros # that are alone on a line, have an all uppercase name, and do not end with a # semicolon, because these will confuse the parser if not removed. SKIP_FUNCTION_MACROS = YES #--------------------------------------------------------------------------- # Configuration::additions related to external references #--------------------------------------------------------------------------- # The TAGFILES option can be used to specify one or more tagfiles. For each # tag file the location of the external documentation should be added. The # format of a tag file without this location is as follows: # # TAGFILES = file1 file2 ... # Adding location for the tag files is done as follows: # # TAGFILES = file1=loc1 "file2 = loc2" ... # where "loc1" and "loc2" can be relative or absolute paths # or URLs. Note that each tag file must have a unique name (where the name does # NOT include the path). If a tag file is not located in the directory in which # doxygen is run, you must also specify the path to the tagfile here. TAGFILES = # When a file name is specified after GENERATE_TAGFILE, doxygen will create # a tag file that is based on the input files it reads. GENERATE_TAGFILE = # If the ALLEXTERNALS tag is set to YES all external classes will be listed # in the class index. If set to NO only the inherited external classes # will be listed. ALLEXTERNALS = NO # If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed # in the modules index. If set to NO, only the current project's groups will # be listed. EXTERNAL_GROUPS = YES # The PERL_PATH should be the absolute path and name of the perl script # interpreter (i.e. the result of `which perl'). PERL_PATH = /usr/bin/perl #--------------------------------------------------------------------------- # Configuration options related to the dot tool #--------------------------------------------------------------------------- # If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will # generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base # or super classes. Setting the tag to NO turns the diagrams off. Note that # this option also works with HAVE_DOT disabled, but it is recommended to # install and use dot, since it yields more powerful graphs. CLASS_DIAGRAMS = YES # You can define message sequence charts within doxygen comments using the \msc # command. Doxygen will then run the mscgen tool (see # http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the # documentation. The MSCGEN_PATH tag allows you to specify the directory where # the mscgen tool resides. If left empty the tool is assumed to be found in the # default search path. MSCGEN_PATH = # If set to YES, the inheritance and collaboration graphs will hide # inheritance and usage relations if the target is undocumented # or is not a class. HIDE_UNDOC_RELATIONS = YES # If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is # available from the path. This tool is part of Graphviz, a graph visualization # toolkit from AT&T and Lucent Bell Labs. The other options in this section # have no effect if this option is set to NO (the default) HAVE_DOT = NO # The DOT_NUM_THREADS specifies the number of dot invocations doxygen is # allowed to run in parallel. When set to 0 (the default) doxygen will # base this on the number of processors available in the system. You can set it # explicitly to a value larger than 0 to get control over the balance # between CPU load and processing speed. DOT_NUM_THREADS = 0 # By default doxygen will use the Helvetica font for all dot files that # doxygen generates. When you want a differently looking font you can specify # the font name using DOT_FONTNAME. You need to make sure dot is able to find # the font, which can be done by putting it in a standard location or by setting # the DOTFONTPATH environment variable or by setting DOT_FONTPATH to the # directory containing the font. DOT_FONTNAME = FreeSans.ttf # The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs. # The default size is 10pt. DOT_FONTSIZE = 10 # By default doxygen will tell dot to use the Helvetica font. # If you specify a different font using DOT_FONTNAME you can use DOT_FONTPATH to # set the path where dot can find it. DOT_FONTPATH = # If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen # will generate a graph for each documented class showing the direct and # indirect inheritance relations. Setting this tag to YES will force the # CLASS_DIAGRAMS tag to NO. CLASS_GRAPH = YES # If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen # will generate a graph for each documented class showing the direct and # indirect implementation dependencies (inheritance, containment, and # class references variables) of the class with other documented classes. COLLABORATION_GRAPH = YES # If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen # will generate a graph for groups, showing the direct groups dependencies GROUP_GRAPHS = YES # If the UML_LOOK tag is set to YES doxygen will generate inheritance and # collaboration diagrams in a style similar to the OMG's Unified Modeling # Language. UML_LOOK = NO # If the UML_LOOK tag is enabled, the fields and methods are shown inside # the class node. If there are many fields or methods and many nodes the # graph may become too big to be useful. The UML_LIMIT_NUM_FIELDS # threshold limits the number of items for each type to make the size more # managable. Set this to 0 for no limit. Note that the threshold may be # exceeded by 50% before the limit is enforced. UML_LIMIT_NUM_FIELDS = 10 # If set to YES, the inheritance and collaboration graphs will show the # relations between templates and their instances. TEMPLATE_RELATIONS = NO # If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT # tags are set to YES then doxygen will generate a graph for each documented # file showing the direct and indirect include dependencies of the file with # other documented files. INCLUDE_GRAPH = YES # If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and # HAVE_DOT tags are set to YES then doxygen will generate a graph for each # documented header file showing the documented files that directly or # indirectly include this file. INCLUDED_BY_GRAPH = YES # If the CALL_GRAPH and HAVE_DOT options are set to YES then # doxygen will generate a call dependency graph for every global function # or class method. Note that enabling this option will significantly increase # the time of a run. So in most cases it will be better to enable call graphs # for selected functions only using the \callgraph command. CALL_GRAPH = NO # If the CALLER_GRAPH and HAVE_DOT tags are set to YES then # doxygen will generate a caller dependency graph for every global function # or class method. Note that enabling this option will significantly increase # the time of a run. So in most cases it will be better to enable caller # graphs for selected functions only using the \callergraph command. CALLER_GRAPH = NO # If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen # will generate a graphical hierarchy of all classes instead of a textual one. GRAPHICAL_HIERARCHY = YES # If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES # then doxygen will show the dependencies a directory has on other directories # in a graphical way. The dependency relations are determined by the #include # relations between the files in the directories. DIRECTORY_GRAPH = YES # The DOT_IMAGE_FORMAT tag can be used to set the image format of the images # generated by dot. Possible values are svg, png, jpg, or gif. # If left blank png will be used. If you choose svg you need to set # HTML_FILE_EXTENSION to xhtml in order to make the SVG files # visible in IE 9+ (other browsers do not have this requirement). DOT_IMAGE_FORMAT = png # If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to # enable generation of interactive SVG images that allow zooming and panning. # Note that this requires a modern browser other than Internet Explorer. # Tested and working are Firefox, Chrome, Safari, and Opera. For IE 9+ you # need to set HTML_FILE_EXTENSION to xhtml in order to make the SVG files # visible. Older versions of IE do not have SVG support. INTERACTIVE_SVG = NO # The tag DOT_PATH can be used to specify the path where the dot tool can be # found. If left blank, it is assumed the dot tool can be found in the path. DOT_PATH = # The DOTFILE_DIRS tag can be used to specify one or more directories that # contain dot files that are included in the documentation (see the # \dotfile command). DOTFILE_DIRS = # The MSCFILE_DIRS tag can be used to specify one or more directories that # contain msc files that are included in the documentation (see the # \mscfile command). MSCFILE_DIRS = # The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of # nodes that will be shown in the graph. If the number of nodes in a graph # becomes larger than this value, doxygen will truncate the graph, which is # visualized by representing a node as a red box. Note that doxygen if the # number of direct children of the root node in a graph is already larger than # DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note # that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH. DOT_GRAPH_MAX_NODES = 50 # The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the # graphs generated by dot. A depth value of 3 means that only nodes reachable # from the root by following a path via at most 3 edges will be shown. Nodes # that lay further from the root node will be omitted. Note that setting this # option to 1 or 2 may greatly reduce the computation time needed for large # code bases. Also note that the size of a graph can be further restricted by # DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction. MAX_DOT_GRAPH_DEPTH = 1000 # Set the DOT_TRANSPARENT tag to YES to generate images with a transparent # background. This is disabled by default, because dot on Windows does not # seem to support this out of the box. Warning: Depending on the platform used, # enabling this option may lead to badly anti-aliased labels on the edges of # a graph (i.e. they become hard to read). DOT_TRANSPARENT = NO # Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output # files in one run (i.e. multiple -o and -T options on the command line). This # makes dot run faster, but since only newer versions of dot (>1.8.10) # support this, this feature is disabled by default. DOT_MULTI_TARGETS = NO # If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will # generate a legend page explaining the meaning of the various boxes and # arrows in the dot generated graphs. GENERATE_LEGEND = YES # If the DOT_CLEANUP tag is set to YES (the default) Doxygen will # remove the intermediate dot files that are used to generate # the various graphs. DOT_CLEANUP = YES linbox-1.3.2/doc/Makefile.am000066400000000000000000000045171176453053400156300ustar00rootroot00000000000000# Copyright (c) 2010 the LinBox group # # ========LICENCE======== # This file is part of the library LinBox. # # LinBox is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # # This library 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 # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # ========LICENCE======== #/ if LINBOX_BUILD_DOC USE_TARGETS = docs INSTALL_TARGETS = install-doc endif docdir=$(LINBOX_DOC_PATH) man1_MANS = linbox-config.1 all all-local: $(USE_TARGETS) install install-data-local: $(INSTALL_TARGETS) docs : sed -i 's/\\version\s1.*/\\version\ $(VERSION)/' mainpage.doxy if test -d linbox-html ; then echo exists; else mkdir linbox-html ; fi if test -d linbox-dev-html ; then echo exists; else mkdir linbox-dev-html ; fi cp index-dev.html linbox-dev-html/index.html cp tutorial.html linbox-html/ cp install-dist.html linbox-html/ cp install-dev.html linbox-html/ cp ../INSTALL linbox-html/ cp ../COPYING linbox-html/ cp ../AUTHORS linbox-html/ doxygen Doxyfile docs_dev : make docs cp tutorial.html linbox-dev-html/ cp install-dist.html linbox-dev-html/ cp install-dev.html linbox-dev-html/ cp ../INSTALL linbox-dev-html/ cp ../COPYING linbox-dev-html/ cp ../AUTHORS linbox-dev-html/ doxygen DoxyfileDev install-doc : mkdir -p $(DESTDIR)/$(docdir) cp -rp linbox-html $(DESTDIR)/$(docdir)/linbox-html cp -rp linbox-dev-html $(DESTDIR)/$(docdir)/linbox-dev-html cp -p linbox.html $(DESTDIR)/$(docdir)/linbox.html EXTRA_DIST= \ linbox.html \ tutorial.html \ install-dev.html \ index-dev.html \ install-dist.html \ Doxyfile.mod \ DoxyfileDev.mod \ doc.doxy \ mainpage.doxy \ tutorial.doxy \ linbox-config.1 clean-local : rm -rf linbox-html rm -rf linbox-dev-html linbox-1.3.2/doc/Makefile.in000066400000000000000000000441521176453053400156400ustar00rootroot00000000000000# Makefile.in generated by automake 1.11.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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@ # Copyright (c) 2010 the LinBox group # # ========LICENCE======== # This file is part of the library LinBox. # # LinBox is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # # This library 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 # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # ========LICENCE======== #/ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd 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 = : build_triplet = @build@ host_triplet = @host@ subdir = doc DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/macros/aclocal-include.m4 \ $(top_srcdir)/macros/config-header.m4 \ $(top_srcdir)/macros/debug.m4 \ $(top_srcdir)/macros/expat-check.m4 \ $(top_srcdir)/macros/fflas-ffpack-check.m4 \ $(top_srcdir)/macros/fplll-check.m4 \ $(top_srcdir)/macros/givaro-check.m4 \ $(top_srcdir)/macros/gmp-check.m4 \ $(top_srcdir)/macros/iml-check.m4 \ $(top_srcdir)/macros/lapack-check.m4 \ $(top_srcdir)/macros/libtool.m4 \ $(top_srcdir)/macros/lidia-check.m4 \ $(top_srcdir)/macros/linbox-benchmark.m4 \ $(top_srcdir)/macros/linbox-doc.m4 \ $(top_srcdir)/macros/linbox-misc.m4 \ $(top_srcdir)/macros/linbox-opt.m4 \ $(top_srcdir)/macros/ltoptions.m4 \ $(top_srcdir)/macros/ltsugar.m4 \ $(top_srcdir)/macros/ltversion.m4 \ $(top_srcdir)/macros/lt~obsolete.m4 \ $(top_srcdir)/macros/m4ri-check.m4 \ $(top_srcdir)/macros/m4rie-check.m4 \ $(top_srcdir)/macros/maple-check.m4 \ $(top_srcdir)/macros/mpfr-check.m4 \ $(top_srcdir)/macros/ntl-check.m4 \ $(top_srcdir)/macros/saclib-check.m4 \ $(top_srcdir)/macros/sage-check.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = depcomp = am__depfiles_maybe = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } man1dir = $(mandir)/man1 am__installdirs = "$(DESTDIR)$(man1dir)" NROFF = nroff MANS = $(man1_MANS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BLAS_CFLAGS = @BLAS_CFLAGS@ BLAS_LIBS = @BLAS_LIBS@ CC = @CC@ CCNAM = @CCNAM@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DBG = @DBG@ DEBUG_CFLAGS = @DEBUG_CFLAGS@ DEFAULT_CFLAGS = @DEFAULT_CFLAGS@ DEFS = @DEFS@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXPAT_CFLAGS = @EXPAT_CFLAGS@ EXPAT_LIBS = @EXPAT_LIBS@ FFLAS_FFPACK_CFLAGS = @FFLAS_FFPACK_CFLAGS@ FFLAS_FFPACK_LIBS = @FFLAS_FFPACK_LIBS@ FFLAS_FFPACK_LOC = @FFLAS_FFPACK_LOC@ FGREP = @FGREP@ FPLLL_CFLAGS = @FPLLL_CFLAGS@ FPLLL_LIBS = @FPLLL_LIBS@ GIVARO_CFLAGS = @GIVARO_CFLAGS@ GIVARO_LIBS = @GIVARO_LIBS@ GMP_CFLAGS = @GMP_CFLAGS@ GMP_LIBS = @GMP_LIBS@ GMP_VERSION = @GMP_VERSION@ GREP = @GREP@ IML_CFLAGS = @IML_CFLAGS@ IML_LIBS = @IML_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIDIA_CFLAGS = @LIDIA_CFLAGS@ LIDIA_LIBS = @LIDIA_LIBS@ LINBOX_BENCH_PATH = @LINBOX_BENCH_PATH@ LINBOX_DOC_PATH = @LINBOX_DOC_PATH@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ M4RIE_CFLAGS = @M4RIE_CFLAGS@ M4RIE_LIBS = @M4RIE_LIBS@ M4RI_CFLAGS = @M4RI_CFLAGS@ M4RI_LIBS = @M4RI_LIBS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAPLE_CFLAGS = @MAPLE_CFLAGS@ MAPLE_HOME = @MAPLE_HOME@ MAPLE_LIBS = @MAPLE_LIBS@ MAPLE_VERSION = @MAPLE_VERSION@ MKDIR_P = @MKDIR_P@ MPFR_CFLAGS = @MPFR_CFLAGS@ MPFR_LIBS = @MPFR_LIBS@ NM = @NM@ NMEDIT = @NMEDIT@ NTL_CFLAGS = @NTL_CFLAGS@ NTL_LIBS = @NTL_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PROF = @PROF@ RANLIB = @RANLIB@ RM = @RM@ SACLIB_CFLAGS = @SACLIB_CFLAGS@ SACLIB_LIBS = @SACLIB_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TESTS_CFLAGS = @TESTS_CFLAGS@ VERSION = @VERSION@ WARN = @WARN@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__leading_dot = @am__leading_dot@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = $(LINBOX_DOC_PATH) dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ @LINBOX_BUILD_DOC_TRUE@USE_TARGETS = docs @LINBOX_BUILD_DOC_TRUE@INSTALL_TARGETS = install-doc man1_MANS = linbox-config.1 EXTRA_DIST = \ linbox.html \ tutorial.html \ install-dev.html \ index-dev.html \ install-dist.html \ Doxyfile.mod \ DoxyfileDev.mod \ doc.doxy \ mainpage.doxy \ tutorial.doxy \ linbox-config.1 all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu --ignore-deps doc/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu --ignore-deps doc/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-man1: $(man1_MANS) @$(NORMAL_INSTALL) @list1='$(man1_MANS)'; \ list2=''; \ test -n "$(man1dir)" \ && test -n "`echo $$list1$$list2`" \ || exit 0; \ echo " $(MKDIR_P) '$(DESTDIR)$(man1dir)'"; \ $(MKDIR_P) "$(DESTDIR)$(man1dir)" || exit 1; \ { for i in $$list1; do echo "$$i"; done; \ if test -n "$$list2"; then \ for i in $$list2; do echo "$$i"; done \ | sed -n '/\.1[a-z]*$$/p'; \ fi; \ } | while read p; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; echo "$$p"; \ done | \ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ sed 'N;N;s,\n, ,g' | { \ list=; while read file base inst; do \ if test "$$base" = "$$inst"; then list="$$list $$file"; else \ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \ fi; \ done; \ for i in $$list; do echo "$$i"; done | $(am__base_list) | \ while read files; do \ test -z "$$files" || { \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \ done; } uninstall-man1: @$(NORMAL_UNINSTALL) @list='$(man1_MANS)'; test -n "$(man1dir)" || exit 0; \ files=`{ for i in $$list; do echo "$$i"; done; \ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ dir='$(DESTDIR)$(man1dir)'; $(am__uninstall_files_from_dir) tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @list='$(MANS)'; if test -n "$$list"; then \ list=`for p in $$list; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \ if test -n "$$list" && \ grep 'ab help2man is required to generate this page' $$list >/dev/null; then \ echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \ grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \ echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \ echo " typically \`make maintainer-clean' will remove them" >&2; \ exit 1; \ else :; fi; \ else :; fi @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(MANS) installdirs: for dir in "$(DESTDIR)$(man1dir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-local mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-man install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-man1 install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-man uninstall-man: uninstall-man1 .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ clean-local distclean distclean-generic distclean-libtool \ distdir dvi dvi-am html html-am info info-am install \ install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-man1 install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ ps ps-am uninstall uninstall-am uninstall-man uninstall-man1 all all-local: $(USE_TARGETS) install install-data-local: $(INSTALL_TARGETS) docs : sed -i 's/\\version\s1.*/\\version\ $(VERSION)/' mainpage.doxy if test -d linbox-html ; then echo exists; else mkdir linbox-html ; fi if test -d linbox-dev-html ; then echo exists; else mkdir linbox-dev-html ; fi cp index-dev.html linbox-dev-html/index.html cp tutorial.html linbox-html/ cp install-dist.html linbox-html/ cp install-dev.html linbox-html/ cp ../INSTALL linbox-html/ cp ../COPYING linbox-html/ cp ../AUTHORS linbox-html/ doxygen Doxyfile docs_dev : make docs cp tutorial.html linbox-dev-html/ cp install-dist.html linbox-dev-html/ cp install-dev.html linbox-dev-html/ cp ../INSTALL linbox-dev-html/ cp ../COPYING linbox-dev-html/ cp ../AUTHORS linbox-dev-html/ doxygen DoxyfileDev install-doc : mkdir -p $(DESTDIR)/$(docdir) cp -rp linbox-html $(DESTDIR)/$(docdir)/linbox-html cp -rp linbox-dev-html $(DESTDIR)/$(docdir)/linbox-dev-html cp -p linbox.html $(DESTDIR)/$(docdir)/linbox.html clean-local : rm -rf linbox-html rm -rf linbox-dev-html # 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: linbox-1.3.2/doc/doc.doxy000066400000000000000000000140021176453053400152340ustar00rootroot00000000000000// Copyright (C) 2005 David Saunders, part of LinBox, GNU LGPL, see COPYING /* * Coypright (c) LinBox * ========LICENCE======== * This file is part of the library LinBox. * * LinBox is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ========LICENCE======== * */ /** \ingroup linbox \defgroup doc doc \brief This is a discussion of the form and organization of %LinBox documentation. The doc directory contains - in subdirectory linbox-html/ the html documentation, it has been built using Doxygen. Start at linbox-html/index.html. - Doxyfile, which specifies parameters for Doxygen to use when building the docs. - %doc.doxy, which is the source of this page. - %mainpage.doxy, which is the source of linbox-html/index.html. - install-dist.html and install-dev.html, some basic installation information. - linbox.html, which can be a handy way to get to linbox-html/index.html. There is a documentation page for each directory (see Modules) and each class of the %LinBox distribution. A directory (Module) page discusses the primary concepts supported by codes in the directory and lists the classes declared in the directory's files. A class page discusses properties of the class beyond the primary concept(s) that it implements and lists it's documented members. Files containing a \\file my_dir/my_file.h documentation show up in the files list. Each documented object (directory, class, member function, ...) has a one line memo that appears with it's name or signature in a parent object listing and at the top of it's own page if it has one (directory, class, top-level function). The memo also reappears as the first line of the fuller documentation. Some attempt is made to indicate which parts are most relevant to the user. HOW??

Developers:

Here are some rules of thumb about the documentation. Each directory dir/ has a dir/dir.doxy file listing its most user oriented contents and explaining the general nature of them. All other documentation is in the header files, a doc comment for each class and for each documented member function. In tests/ and examples/ there is also some documentation in .C files. Each documentation comment begins with a \\brief memo. Keep in mind that the \\brief text appears with the name/signature line of the object right above it. Thus there is no need to restate information that is plain from the signature such as the C++ type of a parameter. Try to make the brief memo succinctly state what the object is for. The user, looking at the signature and brief memo, will be trying to decide whether, at this moment in her study of things, she needs to click on this item for the fuller documentation of it. Try to help. The brief memo should not contain links to other pages. Put desired links in the fuller documentation. Most particularly the brief memo should not contain links to the object of which this item is a member. Such links become links to the current page and are a distraction and annoyance to the reader. Use documented parameter listings, with \\param arg - ..., when you have something significant to say about all or most of the parameters. When you use \\param for one parameter of a function, use it for all of them. However, it is sometimes better to skip the \\param listing format and just discuss in sentences the parameters, their requirements on input, relation to each other, and properties on output. Use your judgement about this on a case by case basis. Members of archetypes should be thoroughly documented in the archetype and then not documented at all in classes adhering to the archetype. Just a reference to the archetype documentation suffices. See ??? for an example of this. However, if the archetype function has a particular property concerning it's performance or use in this particular class, then document that special property. See Butterfly for an example of this. In many functions the return value is a reference to the first parameter, the primary output paramater. parameter and is rarely used in practice. In this case, don't use both the \\param and the \\return. Earlier I proposed not to use \\return at all in these situations. Perhaps we should use \\return arg1 - ... in place of \\param arg1 - ... . See ??? for an example of this.

References

References to papers/book can be documented for classes, functions, groups,... and referenced in a Bibliography page using : \n \\ref - [Authors] [Title] [journal,conference,book,...] [doi]. */ // vim:syn=doxygen linbox-1.3.2/doc/index-dev.html000066400000000000000000000031701176453053400163370ustar00rootroot00000000000000 LinBox documentation for Developers

Dead link

If you reached and see this page, then you need to compile the documentation first with

			> make docs_dev.
		

You may also want to return to users documentation or wait till the docs are built (auto refreshing page).

linbox-1.3.2/doc/install-dev.html000066400000000000000000000042331176453053400166770ustar00rootroot00000000000000 linbox: Installation (for developers)  

How to install LinBox (for developers using svn)

When you have retrieved your local svn snapshot, you can configure LinBox with the autogen.sh script. You can use it exactly the same way ./configure works (execpt for the --help part... :() See here for additional information on configure script.

If you are not sure, run autogen.sh with the minimal options so LinBox can be well configured and then you will get more information with configure --help.


See also HACKING.


Copyright 1999-2011 The Linbox Group.
linbox-1.3.2/doc/install-dist.html000066400000000000000000000200021176453053400170540ustar00rootroot00000000000000 linbox: Installation  

How to install LinBox (from a distribution)


See also INSTALL.  Once the LinBox distribution has been downloaded from the LinBox download section,

1. Unpack the distribution using tar command:

tar -xvzf linbox-X.X.X.tar.gz
2. Go to the newly-created linbox directory and run the script configure.
> cd linbox
There are many options for configuring LinBox. If you are not sure, just run
> ./configure --help
You will find a very comprehensible list of all possible features you may enable/disable.

Required packages are the following:

Givaro --with-givaro= <givaro_directory> used for finite fields, integer, rational and polynomial arithmetic.
Fflas-Ffpack --with-fflas-ffpack= <fflasffpack_directory> used for small field dense linear algebra.
Basically, minimal LinBox only requires a working Givaro and Fflas-Ffpack installation. If they are not under the standard /usr or /usr/local paths, you may enable them with --with-givaro=<path/to/givaro> and --with-fflas-ffpack=<path/to/fflas-ffpack> options.

NOTE : other requirements
Givaro requires GMP for big integer operations, see Givaro page for more information.
Fflas-Ffpack requires some BLAS for floating point dense matrix multiplication, see Fflas-Ffpack page for more information.

For Givaro install GMP
For Fflas-Ffpack install Goto BLAS 2 ATLAS or ...

NOTE : There is a script in alpha version that tries to automate the installation of required packages:

> sh auto-install.sh
this will download the appropriate dependencies, compile and install them. Use --help for help on how to use this script.

3. Optional configurations
Available packages are the following:

NTL --with-ntl= <ntl_directory> used for finite field, polynomial arithmetic.
Lidia --with-lidia= <lidia_directory> used for finite field arithmetic.
Saclib --with-saclib= <saclib_directory> not yet used
Maple (> v9) --enable-shared --with-maple= <maple-directory>  used to create an interface with Maple.
Doxygen --enable-doc used to create the html reference manual (nothing will be created otherwise).
IML --with-iml= <IML-path>  used for fast integer/rational linear algebra.
gnuplot -enable-benchmark used for creating plots in benchmarks.

Note:

the use of --with-default= <default_directory> can add a special directory to the default location of library

the use of --with-all specifies that all packages will be used

4.  Install the library:
>  make
>  make install
5.  Optional make targets:
>  make examples
will compile the examples.
>  make check
will check LinBox is up and running.
>  make fullcheck
will perform additionnal checks to ensure LinBox is completely sane.
>  make benchmarks
will benchmarks some LinBox functionnalities.

6.  Enjoy ! (and report bugs, supply patches, ask for more functionnalities,... on the linbox mailing lists)

Copyright 1999-2011 The Linbox Group.
linbox-1.3.2/doc/linbox-config.1000066400000000000000000000014601176453053400164060ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.36. .TH LINBOX-CONFIG "1" "June 2008" "linbox-config 1.1.6rc0" "User Commands" .SH NAME linbox-config \- tool for linking against LinBox .SH SYNOPSIS .B linbox-config [\fIOPTION\fR] .SH DESCRIPTION Known values for OPTION are: .TP \fB\-\-prefix\fR show Linbox installation prefix .TP \fB\-\-libs\fR print library linking information .TP \fB\-\-cflags\fR print pre\-processor and compiler flags .TP \fB\-\-help\fR display this help and exit .TP \fB\-\-version\fR output version information .SH "SEE ALSO" The full documentation for .B linbox-config is maintained as a Texinfo manual. If the .B info and .B linbox-config programs are properly installed at your site, the command .IP .B info linbox-config .PP should give you access to the complete manual. linbox-1.3.2/doc/linbox.html000066400000000000000000000027761176453053400157620ustar00rootroot00000000000000 Starter to LinBox documentation LinBox documentation main page: linbox-html/index.html (going there in 5 seconds). If it is a dead link, you have to build the documentation first with make docs. linbox-1.3.2/doc/mainpage.doxy000066400000000000000000000230371176453053400162600ustar00rootroot00000000000000// Copyright (C) 2005 David Saunders, 2010 LinBox. This file is part of LinBox, // GNU LGPL, see COPYING for lincene information. /* * Coypright (c) LinBox * ========LICENCE======== * This file is part of the library LinBox. * * LinBox is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ========LICENCE======== * */ /** \mainpage LinBox Symbolic Linear Algebra Software Library. * * \section intro Introduction * * %LinBox is a C++ template library of routines for solution of linear algebra * problems including linear system solution, rank, determinant, minimal * polynomial, characteristic polynomial, and Smith normal form. * * Algorithms are provided for matrices with integer entries or entries in a * finite field. In support of the algorithms, a good collection of finite * field and ring implementations is available. Also there is provided a * number of matrix storage types, especially for blackbox representation of * sparse or structured matrix classes. A few algorithms for rational matrices * are available. More for integer and rational matrices is planned for future * releases. * * \section goals Goals * * Project %LinBox (http://linalg.org) is a collaborative effort among * researchers at a number of locations around the world. Some of the most * active participants are listed \subpage AUTHORS "here". The goals are to * produce algorithms and software for symbolic linear algebra, particularly * using \ref blackbox matrix methods, i.e. iterative methods requiring only * the linear transform property of the matrix (that, given A and x, one can * compute \f$y \gets Ax\f$). Such methods are especially effective with * sparse or structured matrices for which the matrix-vector product can be * computed cheaply. Increasingly, %LinBox also provides elimination based * methods for dense matrices exploiting the numeric BLAS routines. * * A good collection of finite field implementations is available. Some * algorithms are probabilistic, but their results are extremely reliable * except over very small fields (less than 1000 elements, say). * * \section desig Design * * %LinBox depends on other packages for some of its functionality. It is a * design goal of %LinBox to be a kind of \e middleware, providing a common * interface for use in projects needing linear algebra and providing access to * other systems and programs through wrappers whenever their capabilities may * contribute to the linear algebra. Thus, to gain full advangage of %LinBox * it will be desirable to have certain other packages installed. In * particular GMP and a BLAS implementation are required. GMP provides the * basic large integer system used throughout. We have been using ATLAS for * the BLAS implementation. The remaining dependencies are optional, but two * packages stand out as contributing substantially to %LinBox. They are %NTL * and Givaro. %NTL is used for some finite field and ring representations, * particularly in the case of \c GF(q), where \c q is a prime power or a prime * greater than word size. %NTL is also used by algorithms that need * polynomial operations such as factorization. Givaro is another source of * field representations and polynomial operations. Importantly, Givaro * provides our best representation of small non-prime fields, say q = * pe < 106. Functionality from some other * systems has been wrapped also but is currently less widely used in %LinBox. * * \e Genericity and \e high \e performance are the twin goals of %LinBox. The * genericity is achieved by use of a small set of interfaces. Algorithms are * implemented with C++ template parameters which may be instantiated with any * class adhering to the specified interface. High performance is achieved by * judicious specializations of the generic algorithms. It is entirely within * the spirit of the project to introduce new implementations. Thus a user of * the library may invoke a %LinBox algorithm, say for determinant or rank of a * matrix, but providing a blackbox class of her own design and perhaps even * providing the underlying field (or commutative ring) representation. * Conversely, the %LinBox field and ring interfaces and the many specific * representations can be used for purposes other than linear algebra * computation or with algorithms not provided by %LinBox. * * \section using Using LinBox * * - \subpage copy. * - \subpage tuto. This is a brief introduction to %LinBox capabilities. * - \subpage inst. Explains how to install from sources or from the latest svn * version. * - \subpage arch. Describes how %LinBox is organized * - Documentation for Users. If everything around is blue, then you * are reading the lighter, user-oriented, documentation. * - Documentation for Developers. If everything around is green, then * you can get to everything (not necessarily yet) documented. * . * * \section contrib Contributing to LinBox, getting assistance. * We warmly welcome contributors ! Contributing can rhyme with providing * documentation, pointing out bugs, requesting more features, giving * test-cases, making comments about the code,...
* You can contact the LinBox team at \f$\mathtt{linbox}\!-\!\mathtt{use} * \mathtt{@} \mathtt{googlegroups}\!\cdot\!\mathtt{com}\f$ (user oriented * discussions) or \f$\mathtt{linbox}\!-\!\mathtt{use} \mathtt{@} * \mathtt{googlegroups}\!\cdot\!\mathtt{com}\f$ (development oriented * discussions). * * \authors Members of the \link AUTHORS %LinBox group\endlink. The most * prolific documenters have been first William J Turner, then Bradford * Hovinen, and David Saunders. * * \version 1.3.0 * * \par Support. * The project is supported by the National Science Foundation * (http://www.nsf.gov/) in the USA and by CNRS in France. */ /*! \page copy Copyright and Licencing * The copyright and licensing (GNU LGPL) info of %LinBox is in \c COPYING * \verbinclude "COPYING". */ /*! \page inst Installing LinBox * To install from a distribution, the usual configure, make sequence * applies. See \subpage dist "configuring and installing" for more details. * To install a development version from the SVN repository see the \subpage dev * "developer info". The generic Free Software Foundation \subpage INSTALL * "INSTALL" may also be of use. */ /*! \page arch Architecture of the library * * The distribution contains subdirectories (documented as `modules' here) * * - linbox. This contains the library * sources. The defined objects are in the namespace LinBox. * - linbox/field, linbox/ring, field and ring representations. * - linbox/randiter, random element * generation for fields and rings. * - linbox/blackbox, generally * immutable matrix representations for blackbox methods (based on * matrix-vector products). * - linbox/matrix, mutable sparse and * dense matrices. * - linbox/algorithms, the core * algorithms of %LinBox * - linbox/solutions, convenience * wrappers of algorithms * - linbox/element, details of field * and ring element representation. * - linbox/fflas, wrapper of BLAS for * exact finite prime field linear algebra. * - linbox/ffpack, . * - linbox/util, basic integers, timing * clocks, commentator. * . * - examples, programs meant to be * directly useful or be guides * for the progammer using %LinBox. * - doc, the browsable \c html documentation is * generated with Doxygen, * - interfaces, interfaces to other * systems, such as Maple, gap, web servers, * - tests, primarily correctness tests to aid * development. * - benchmarks, where you can benchmark * and compare your LinBox installation. * . */ /*! \page AUTHORS LinBox Authors * \verbinclude "AUTHORS" */ /*! \page INSTALL The INSTALL in LinBox * \verbinclude "INSTALL" */ /*! \page dist Configuring and Installing LinBox * \htmlinclude "doc/install-dist.html" */ /*! \page dev Developer info for LinBox * \htmlinclude "doc/install-dev.html" * * \par HACKING LinBox. * \verbinclude "HACKING" */ // vim:syn=doxygen linbox-1.3.2/doc/tutorial.doxy000066400000000000000000000222351176453053400163410ustar00rootroot00000000000000// Copyright (C) 2005 David Saunders, 2010 LinBox. // This file is part of LinBox, see COPYING for licence information. /* * Coypright (c) LinBox * ========LICENCE======== * This file is part of the library LinBox. * * LinBox is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ========LICENCE======== * */ /*! \page tuto LinBox tutorial The person requiring some exact linear algebra computation may exploit LinBox at any of four general levels. In order from least involved with the details to most involved, they are:
  1. Access using a LinBox web server.
  2. The user at this level must attend to preparation of a matrix in a suitable file format and invoking the webservice. The server itself should provide adequate documentation for this. Servers are generally available at linalg.org.
  3. Access using compiled codes. Full programs exist in the examples directory and can be used through an interface to LinBox in a general purposes system such as Maple or SAGE.
  4. The user at this level must see to installation, and then attend to preparation of her matrix in a suitable file format and to the form of the program or procedure invocation. A number of programs are available in the examples directory distributed with LinBox providing for rank, determinant, linear system solution, etc. The documentation of the examples module should serve for this level of access.
  5. Use of LinBox as a programmers library for exact linear algebra functions.
  6. At this level a user must do at least the following:
    1. Choose a field or ring representation and construct a specific field or ring object \c R.
    2. Choose a blackbox or matrix representation suitable to your data and construct specific matrix \c A over \c R.
    3. Call needed algorithm. The solutions directory is designed to support this by providing functions with simple problem oriented interfaces (\c rank(), \c det(), \c solve()), yet allowing some user control of algorithm details. The programmer may be providing some of the parts such as an application specific blackbox matrix class.
  7. Power development.
  8. Again, this is use of LinBox as a library, but with hands fully on the details. The programmer at this level apparently needs the best opportunities for high performance and is willing to use the more complicated internal interfaces to get it. Direct calls to functions in the algorithms directory and perhaps to related packages such as \c FFLAS, \c FFPACK, or other components are being used. The programmer working at this level of intimacy with LinBox is likely to develop some components that ought to be included in future releases of LinBox. Such contributions are warmly welcomed. The online documentation system is intended primarily for the programmer at level 3. Thus documentation is not generated to the last internal detail. It is supposed that the level 4 (and 3) programmer, when studying internal details, will be best served by reading the code. It is possible, if you wish, to set doxygen parameters so as to have a documentation listing for every class and function. Good luck separating wheat from chaff in that case.
In this tutorial we will discuss a simple application at level 3, the design of a program to compute the determinant of a sparse matrix over \f$\mathbf{GF}(101)\f$. The programmer has 3 major issues: field, matrix, algorithm. The basic algorithm choice is between blackbox and elimination algorithms. If our matrix is \c A, then the algorithm call may look like \code det(d, A, Method::Blackbox()); //or det(d, A, Method::Elimination()); \endcode To have access to this determinant function just \#include . The larger and sparser the matrix the more likely that the blackbox algorithm is fastest. Hybrids are under development to help make this choice, and even to make it at run time adaptively. The last argument to the solutions functions is a method object which specifies the algorithm to be used. In each case there is a default, so this argument is optional. Also, some method objects may be constructed so as to convey more detail about the algorithm to use. For example it may help to promise that the matrix is nonsingular or symmetric or to request a particular algorithm variant. The blackbox algorithm based fundamentally on Wiedemann's approach is specified by \c Method::Wiedemann, see \c solutions/methods.h for more details. Specification of a blocked blackbox algorithm may be advantageous (in the future). Elimination is likely fastest if the matrix is not extremely sparse or not large or not subject to rapid fill-in. Of course, first we must construct the matrix and field. For the field, you must first choose the class (representation type) of field and then instantiate your specific field. \code #include typedef Modular Field; Field F(101); \endcode It is a good idea to use a \p typedef, making it easy to change representations later. The \ref modular field representations are LinBox's own and contain some useful optimizations. Another possibility is use of NTL's \c NTL::ZZ_p class. The LinBox wrapper of that, called \p LinBox::NTL_ZZ_p is found in \c field/ntl-ZZ_p.h. Or use a Givaro table based representation, \c LinBox::GivaroGfq in \c field/givaro-gfq.h ...and there are many other options. The program \c tests/test-fields.C will provide some timing data on the basic functions of each representation. In %LinBox, a \p Field class and the class representing the field entries are distinct types. The field object owns the arithmetic operations, whereas the entry objects may be of a primitive type such as \c short, \c int, \c double. Each field class \p Fld has the embedded class \c Fld::Element for it's elements. \code Field::Element a, b, c; F.init(a, 2); F.init(b, 3); F.mul(c, a, b); // c <- a*b F.write(cout, c); \endcode You have seen that the field representations are in subdirectory \c linbox/field. Similarly the matrix representations are in \c linbox/blackbox. All of these are are suitable for blackbox algorithms. Only those deriving from representations in \c linbox/matrix are suitable for elimination. For a sparse matrix, \c LinBox::TriplesBB is a good representation choice if a blackbox algorithm is to be used. For a \f$\{0,1\}-\f$incidence matrix, the class \c LinBox::ZeroOne will be more economical of space and time. On the other hand, if elimination is to be used, those will not serve at all, but \c LinBox::SparseMatrix, which allows internal modification, will do the trick. The ordinary matrix representation is \c LinBox::DenseMatrix. If your matrix structure allows you to compute matrix-vector products in a way faster than these classes provide, you can gain by defining your own matrix class adhering to the \ref blackbox interface. The main components of the blackbox interface are member functions \c apply() and \c applyTranspose() functions. \c A.apply(y, x) performs \f$y \gets Ax\f$. Then there is the question of initializing matrix entries. Two basic approaches are illustrated here. \code TriplesBB A; A.read("triples-file"); // initialize A from data in file (including shape). \endcode Or a program can add entries to a sparse or dense matrix one by one using the \c setEntry function. \code SparseMatrix B(100, 200); // 100 by 200 zero matrix (so far). for ( ... ) { Field::Element v; F.init(v, ...); B.setEntry(i, j, v); // put nonzero v in i,j position. } \endcode Putting it all together, we may have a program looking like this. \code #include #include #include using namespace LinBox; main() { typedef Modular Field; typedef DenseMatrix Matrix; Field F(65521); Matrix A; A.read("datafile"); Field::Element d; det(d, A, blasElimination); F.write(cout << "the determinant is ", d) << endl; } \endcode This tutorial should continue with a discussion of compilation issues, but it doesn't. Something useful may be learned from examining the Makefile.am in the examples directory. */ // vim:syntax=doxygen linbox-1.3.2/doc/tutorial.html000066400000000000000000000221711176453053400163210ustar00rootroot00000000000000 linbox: LinBox Tutorial

LinBox Tutorial

The person requiring some exact linear algebra computation may exploit linbox at any of four general levels. In order from least involved with the details to most involved, they are:
  1. Access using a linbox web server.

    The user at this level must attend to preparation of a matrix in a suitable file format and invoking the webservice. The server itself should provide adequate documentation for this. Servers are generally available at linalg.org.

  2. Access using compiled codes. Full programs exist in the examples directory and can be used through an interface to linbox in a general purposes system such as Maple or SAGE.

    The user at this level must see to installation, and then attend to preparation of her matrix in a suitable file format and to the form of the program or procedure invocation. A number of programs are available in the examples directory distributed with LinBox providing for rank, determinant, linear system solution, etc. The documentation of the examples module should serve for this level of access.

  3. Use of LinBox as a programmers library for exact linear algebra functions.

    At this level a user must do at least the following:

    1. Choose a field or ring representation and construct a specific field or ring object R.
    2. Choose a blackbox or matrix representation suitable to your data and construct specific matrix A over R.
    3. Call needed algorithm. The solutions directory is designed to support this by providing functions with simple problem oriented interfaces (rank(), det(), solve()), yet allowing some user control of algorithm details. The programmer may be providing some of the parts such as an application specific blackbox matrix class.

  4. Power development.

    Again, this is use of LinBox as a library, but with hands fully on the details. The programmer at this level apparently needs the best opportunities for high performance and is willing to use the more complicated internal interfaces to get it. Direct calls to functions in the algorithms directory and perhaps to related packages such as fflas, ffpac, or other components are being used. The programmer working at this level of intimacy with LinBox is likely to develop some components that ought to be included in future releases of LinBox. Such contributions are warmly welcomed. The online documentation system is intended primarily for the programmer at level 3. Thus documentation is not generated to the last internal detail. It is supposed that the the level 4 (and 3) programmer, when studying internal details, will be best served by reading the code. It is possible, if you wish, to set doxygen parameters so as to have a documentation listing for every class and function. Good luck separating wheat from chaff in that case.

    In this tutorial we will discuss a simple application at level 3, the design of a program to compute the determinant of a sparse matrix over GF(101). The programmer has 3 major issues: field, matrix, algorithm. The basic algorithm choice is between blackbox and elimination algorithms. If our matrix is A, then the algorithm call may look like

    determinant(det, A, Method::Blackbox());
    //or
    determinant(det, A, Method::Elimination());
    
    To have access to this determinant function, #include <linbox/solutions/determinant.h>. The larger and sparser the matrix the more likely that the blackbox algorithm is fastest. Hybrids are under development to help make this choice, and even to make it at run time adaptively. The last argument to the solutions functions is a method object which specifies the algorithm to be used. In each case there is a default, so this argument is optional. Also, some method objects may be constructed so as to convey more detail about the algorithm to use. For example it may help to promise that the matrix is nonsingular or symmetric or to request a particular algorithm variant. The blackbox algorithm based fundamentally on Wiedemann's approach is specified by Method::Wiedemann, see linbox/solutions/methods.h for more details. Specification of a blocked blackbox algorithm may be advantageous (in the future). Elimination is likely fastest if the matrix is not extremely sparse or not large or not subject to rapid fill-in.

    Of course, first we must construct the matrix and field. For the field, you must first choose the class (representation type) of field and then instantiate your specific field.

    #include <linbox/field/modular.h>
    
    typedef Modular<short> Field;
    Field F(101);
    
    It is a good idea to use a typedef, making it easy to change representations later. The Modular field representations are LinBox's own and contain some useful optimizations. Another possibility is use of NTL's zz_p class. The linbox wrapper of that, called NTL_zz_p is found in linbox/field/NTL-zz_p.h. Or use a Givaro table based representation, GivaroGFq in linbox/field/givaro-gfq.h. ...and there are many other options. The program tests/test-fields.C will provide some timing data on the basic functions of each representation. In linbox, a Field class and the class representing the field entries are distinct types. The field object owns the arithmetic operations, whereas the entry objects may be of a primitive type such as short, int, double. Each field class Fld has the embedded class Fld::Element for it's elements.
    Field::Element a, b, c;
    F.init(a, 2); F.init(b, 3);
    F.mul(c, a, b); // c <- a*b
    F.write(cout, c);
    
    You have seen that the field representations are in subdirectory linbox/field. Similarly the matrix representations are in linbox/blackbox. All of these are are suitable for blackbox algorithms. Only those deriving from representations in linbox/matrix are suitable for elimination. For a sparse matrix, TriplesBB is a good representation choice if a blackbox algorithm is to be used. For a {0,1}-incidence matrix, the class ZeroOne will be more economical of space and time. On the other hand, if elimination is to be used, those will not serve at all, but SparseMatrix, which allows internal modification, will do the trick. The ordinary matrix representation is DenseMatrix. If your matrix structure allows you to compute matrix-vector products in a way faster than these classes provide, you can gain by defining your own matrix class adhering to the blackbox interface. The main components of the blackbox interface are member functions apply() and applyTranspose() functions. A.apply(y, x) performs y leftarrow Ax. Then there is the question of initializing matrix entries. Two basic approaches are illustrated here.
    TriplesBB A;
    A.read("triples-file"); // initialize A from data in file (including shape).
    
    Or a program can add entries to a sparse or dense matrix one by one using the setEntry function.
    SparseMatrix B(100, 200); // 100 by 200 zero matrix (so far).
    for ( ... )
    {
       Field::Element v;
       F.init(v, ...);
       B.setEntry(i, j, v);  // put nonzerp v in i,j position.
    }
    
    Putting it all together, we may have a program looking like this.
    #include 
    #include 
    #include 
    using namespace LinBox;
    
    main(){
    typedef Modular Field;
    typedef DenseMatrix Matrix;
    Field F(65521);
    Matrix A; A.read("datafile");
    Field::Element det;
    determinant(det, A, blasElimination);
    F.write(cout << "the determinant is ", det) << endl;
    }
    
    This tutorial should continue with a discussion of compilation issues, but it doesn't. Something useful may be learned from examining the Makefile.am in the examples directory. linbox-1.3.2/examples/000077500000000000000000000000001176453053400146365ustar00rootroot00000000000000linbox-1.3.2/examples/Makefile.am000066400000000000000000000066171176453053400167040ustar00rootroot00000000000000# Copyright (c) 2010 the LinBox group # This file is part of LinBox # ========LICENCE======== # This file is part of the library LinBox. # # LinBox is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # # This library 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 # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # ========LICENCE======== #/ #INCLUDES=-I$(top_srcdir) AM_CPPFLAGS=-I$(top_srcdir) -I$(top_srcdir)/linbox #if LinBoxSrcOnly #AM_CPPFLAGS=-g -DLinBoxSrcOnly $(GMP_CFLAGS) $(NTL_CFLAGS) $(GIVARO_CFLAGS) $(LIDIA_CFLAGS) #LINBOX_LIBS= #else #AM_CPPFLAGS=-g $(GMP_CFLAGS) $(NTL_CFLAGS) $(GIVARO_CFLAGS) $(LIDIA_CFLAGS) #LINBOX_LIBS= $(top_builddir)/linbox/liblinbox.la #endif # SAFER_FLAGS=--std=c++98 -g -Wall -Wextra -Wno-ignored-qualifiers -Wno-unused-parameter # SAFER_FLAGS=-g -Wall -Wextra -Wno-unused-parameter # AM_CXXFLAGS = $(SAFER_FLAGS) -DLinBoxSrcOnly -DDEBUG -O0 AM_CXXFLAGS = @DEFAULT_CFLAGS@ -DLinBoxSrcOnly -DDISABLE_COMMENTATOR AM_CPPFLAGS += $(GMP_CFLAGS) $(NTL_CFLAGS) $(FFLAS_FFPACK_CFLAGS) $(GIVARO_CFLAGS) $(LIDIA_CFLAGS) $(IML_CFLAGS) #LDADD = $(NTL_LIBS) $(GIVARO_LIBS) $(LIDIA_LIBS) $(BLAS_LIBS) $(GMP_LIBS) "-Wl,-enable-auto-import" LDADD = $(NTL_LIBS) $(GIVARO_LIBS) $(LIDIA_LIBS) $(BLAS_LIBS) $(GMP_LIBS) $(MPFR_LIBS) $(FPLLL_LIBS) $(LDFLAGS) $(IML_LIBS) # AM_LDFLAGS=-static AM_LDFLAGS = $(top_srcdir)/linbox/.libs/liblinbox.a #EX_LDADD = $(NTL_LIBS) $(GMP_LIBS) $(GIVARO_LIBS) $(LIDIA_LIBS) $(BLAS_LIBS) #LDADD = $(LINBOX_LIBS) $(EX_LDADD) SUBDIRS=fields EXAMPLES=rank det minpoly valence solve dot-product echelon sparseelimdet sparseelimrank checksolve doubledet smithvalence # EXAMPLES+=nulp yabla GIVARONTL_EXAMPLES=smith charpoly graph-charpoly if LINBOX_HAVE_NTL if LINBOX_HAVE_GIVARO USE_GIVARONTL_EXAMPLES = $(GIVARONTL_EXAMPLES) endif endif EXTRA_PROGRAMS= $(EXAMPLES) $(USE_GIVARONTL_EXAMPLES) CLEANFILES=$(EXTRA_PROGRAMS) EXTRA_DIST = examples.doxy smithvalence.h examples: ${EXTRA_PROGRAMS} dot_product_SOURCES = dot-product.C doubledet_SOURCES = doubledet.C #linbox_program_SOURCES = \ # linbox-program.C checksolve_SOURCES = checksolve.C charpoly_SOURCES = charpoly.C graph_charpoly_SOURCES = graph-charpoly.C det_SOURCES = det.C rank_SOURCES = rank.C smith_SOURCES = smith.C minpoly_SOURCES = minpoly.C valence_SOURCES = valence.C solve_SOURCES = solve.C echelon_SOURCES = echelon.C smithvalence_SOURCES = smithvalence.C sparseelimdet_SOURCES = sparseelimdet.C sparseelimrank_SOURCES = sparseelimrank.C LINBOX=@prefix@ # no /bin if LinBox is uncompiled #LINBOX_BIN=$(LINBOX)/bin LINBOX_BIN=@bindir@ # for compilation of new examples %:%.C $(CXX) $(CXXFLAGS) $(AM_CXXFLAGS) $(OPTFLAGS) ${INCLUDES} $(AM_CPPFLAGS) $*.C -o $@ $(AM_LDFLAGS) $(LDADD) %:%.cpp $(CXX) $(CXXFLAGS) $(AM_CXXFLAGS) $(OPTFLAGS) ${INCLUDES} $(AM_CPPFLAGS) $*.cpp -o $@ $(AM_LDFLAGS) $(LDADD) linbox-1.3.2/examples/Makefile.in000066400000000000000000001004161176453053400167050ustar00rootroot00000000000000# Makefile.in generated by automake 1.11.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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@ # Copyright (c) 2010 the LinBox group # This file is part of LinBox # ========LICENCE======== # This file is part of the library LinBox. # # LinBox is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # # This library 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 # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # ========LICENCE======== #/ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd 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 = : build_triplet = @build@ host_triplet = @host@ EXTRA_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_3) subdir = examples DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(srcdir)/Readme-make.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/macros/aclocal-include.m4 \ $(top_srcdir)/macros/config-header.m4 \ $(top_srcdir)/macros/debug.m4 \ $(top_srcdir)/macros/expat-check.m4 \ $(top_srcdir)/macros/fflas-ffpack-check.m4 \ $(top_srcdir)/macros/fplll-check.m4 \ $(top_srcdir)/macros/givaro-check.m4 \ $(top_srcdir)/macros/gmp-check.m4 \ $(top_srcdir)/macros/iml-check.m4 \ $(top_srcdir)/macros/lapack-check.m4 \ $(top_srcdir)/macros/libtool.m4 \ $(top_srcdir)/macros/lidia-check.m4 \ $(top_srcdir)/macros/linbox-benchmark.m4 \ $(top_srcdir)/macros/linbox-doc.m4 \ $(top_srcdir)/macros/linbox-misc.m4 \ $(top_srcdir)/macros/linbox-opt.m4 \ $(top_srcdir)/macros/ltoptions.m4 \ $(top_srcdir)/macros/ltsugar.m4 \ $(top_srcdir)/macros/ltversion.m4 \ $(top_srcdir)/macros/lt~obsolete.m4 \ $(top_srcdir)/macros/m4ri-check.m4 \ $(top_srcdir)/macros/m4rie-check.m4 \ $(top_srcdir)/macros/maple-check.m4 \ $(top_srcdir)/macros/mpfr-check.m4 \ $(top_srcdir)/macros/ntl-check.m4 \ $(top_srcdir)/macros/saclib-check.m4 \ $(top_srcdir)/macros/sage-check.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = Readme-make CONFIG_CLEAN_VPATH_FILES = am__EXEEXT_1 = rank$(EXEEXT) det$(EXEEXT) minpoly$(EXEEXT) \ valence$(EXEEXT) solve$(EXEEXT) dot-product$(EXEEXT) \ echelon$(EXEEXT) sparseelimdet$(EXEEXT) \ sparseelimrank$(EXEEXT) checksolve$(EXEEXT) doubledet$(EXEEXT) \ smithvalence$(EXEEXT) am__EXEEXT_2 = smith$(EXEEXT) charpoly$(EXEEXT) \ graph-charpoly$(EXEEXT) @LINBOX_HAVE_GIVARO_TRUE@@LINBOX_HAVE_NTL_TRUE@am__EXEEXT_3 = $(am__EXEEXT_2) am_charpoly_OBJECTS = charpoly.$(OBJEXT) charpoly_OBJECTS = $(am_charpoly_OBJECTS) charpoly_LDADD = $(LDADD) am__DEPENDENCIES_1 = charpoly_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) am_checksolve_OBJECTS = checksolve.$(OBJEXT) checksolve_OBJECTS = $(am_checksolve_OBJECTS) checksolve_LDADD = $(LDADD) checksolve_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) am_det_OBJECTS = det.$(OBJEXT) det_OBJECTS = $(am_det_OBJECTS) det_LDADD = $(LDADD) det_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) am_dot_product_OBJECTS = dot-product.$(OBJEXT) dot_product_OBJECTS = $(am_dot_product_OBJECTS) dot_product_LDADD = $(LDADD) dot_product_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) am_doubledet_OBJECTS = doubledet.$(OBJEXT) doubledet_OBJECTS = $(am_doubledet_OBJECTS) doubledet_LDADD = $(LDADD) doubledet_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) am_echelon_OBJECTS = echelon.$(OBJEXT) echelon_OBJECTS = $(am_echelon_OBJECTS) echelon_LDADD = $(LDADD) echelon_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) am_graph_charpoly_OBJECTS = graph-charpoly.$(OBJEXT) graph_charpoly_OBJECTS = $(am_graph_charpoly_OBJECTS) graph_charpoly_LDADD = $(LDADD) graph_charpoly_DEPENDENCIES = $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) am_minpoly_OBJECTS = minpoly.$(OBJEXT) minpoly_OBJECTS = $(am_minpoly_OBJECTS) minpoly_LDADD = $(LDADD) minpoly_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) am_rank_OBJECTS = rank.$(OBJEXT) rank_OBJECTS = $(am_rank_OBJECTS) rank_LDADD = $(LDADD) rank_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) am_smith_OBJECTS = smith.$(OBJEXT) smith_OBJECTS = $(am_smith_OBJECTS) smith_LDADD = $(LDADD) smith_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) am_smithvalence_OBJECTS = smithvalence.$(OBJEXT) smithvalence_OBJECTS = $(am_smithvalence_OBJECTS) smithvalence_LDADD = $(LDADD) smithvalence_DEPENDENCIES = $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) am_solve_OBJECTS = solve.$(OBJEXT) solve_OBJECTS = $(am_solve_OBJECTS) solve_LDADD = $(LDADD) solve_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) am_sparseelimdet_OBJECTS = sparseelimdet.$(OBJEXT) sparseelimdet_OBJECTS = $(am_sparseelimdet_OBJECTS) sparseelimdet_LDADD = $(LDADD) sparseelimdet_DEPENDENCIES = $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) am_sparseelimrank_OBJECTS = sparseelimrank.$(OBJEXT) sparseelimrank_OBJECTS = $(am_sparseelimrank_OBJECTS) sparseelimrank_LDADD = $(LDADD) sparseelimrank_DEPENDENCIES = $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) am_valence_OBJECTS = valence.$(OBJEXT) valence_OBJECTS = $(am_valence_OBJECTS) valence_LDADD = $(LDADD) valence_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = am__depfiles_maybe = CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(charpoly_SOURCES) $(checksolve_SOURCES) $(det_SOURCES) \ $(dot_product_SOURCES) $(doubledet_SOURCES) $(echelon_SOURCES) \ $(graph_charpoly_SOURCES) $(minpoly_SOURCES) $(rank_SOURCES) \ $(smith_SOURCES) $(smithvalence_SOURCES) $(solve_SOURCES) \ $(sparseelimdet_SOURCES) $(sparseelimrank_SOURCES) \ $(valence_SOURCES) DIST_SOURCES = $(charpoly_SOURCES) $(checksolve_SOURCES) \ $(det_SOURCES) $(dot_product_SOURCES) $(doubledet_SOURCES) \ $(echelon_SOURCES) $(graph_charpoly_SOURCES) \ $(minpoly_SOURCES) $(rank_SOURCES) $(smith_SOURCES) \ $(smithvalence_SOURCES) $(solve_SOURCES) \ $(sparseelimdet_SOURCES) $(sparseelimrank_SOURCES) \ $(valence_SOURCES) RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BLAS_CFLAGS = @BLAS_CFLAGS@ BLAS_LIBS = @BLAS_LIBS@ CC = @CC@ CCNAM = @CCNAM@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DBG = @DBG@ DEBUG_CFLAGS = @DEBUG_CFLAGS@ DEFAULT_CFLAGS = @DEFAULT_CFLAGS@ DEFS = @DEFS@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXPAT_CFLAGS = @EXPAT_CFLAGS@ EXPAT_LIBS = @EXPAT_LIBS@ FFLAS_FFPACK_CFLAGS = @FFLAS_FFPACK_CFLAGS@ FFLAS_FFPACK_LIBS = @FFLAS_FFPACK_LIBS@ FFLAS_FFPACK_LOC = @FFLAS_FFPACK_LOC@ FGREP = @FGREP@ FPLLL_CFLAGS = @FPLLL_CFLAGS@ FPLLL_LIBS = @FPLLL_LIBS@ GIVARO_CFLAGS = @GIVARO_CFLAGS@ GIVARO_LIBS = @GIVARO_LIBS@ GMP_CFLAGS = @GMP_CFLAGS@ GMP_LIBS = @GMP_LIBS@ GMP_VERSION = @GMP_VERSION@ GREP = @GREP@ IML_CFLAGS = @IML_CFLAGS@ IML_LIBS = @IML_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIDIA_CFLAGS = @LIDIA_CFLAGS@ LIDIA_LIBS = @LIDIA_LIBS@ LINBOX_BENCH_PATH = @LINBOX_BENCH_PATH@ LINBOX_DOC_PATH = @LINBOX_DOC_PATH@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ M4RIE_CFLAGS = @M4RIE_CFLAGS@ M4RIE_LIBS = @M4RIE_LIBS@ M4RI_CFLAGS = @M4RI_CFLAGS@ M4RI_LIBS = @M4RI_LIBS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAPLE_CFLAGS = @MAPLE_CFLAGS@ MAPLE_HOME = @MAPLE_HOME@ MAPLE_LIBS = @MAPLE_LIBS@ MAPLE_VERSION = @MAPLE_VERSION@ MKDIR_P = @MKDIR_P@ MPFR_CFLAGS = @MPFR_CFLAGS@ MPFR_LIBS = @MPFR_LIBS@ NM = @NM@ NMEDIT = @NMEDIT@ NTL_CFLAGS = @NTL_CFLAGS@ NTL_LIBS = @NTL_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PROF = @PROF@ RANLIB = @RANLIB@ RM = @RM@ SACLIB_CFLAGS = @SACLIB_CFLAGS@ SACLIB_LIBS = @SACLIB_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TESTS_CFLAGS = @TESTS_CFLAGS@ VERSION = @VERSION@ WARN = @WARN@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__leading_dot = @am__leading_dot@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ #INCLUDES=-I$(top_srcdir) AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/linbox $(GMP_CFLAGS) \ $(NTL_CFLAGS) $(FFLAS_FFPACK_CFLAGS) $(GIVARO_CFLAGS) \ $(LIDIA_CFLAGS) $(IML_CFLAGS) #if LinBoxSrcOnly #AM_CPPFLAGS=-g -DLinBoxSrcOnly $(GMP_CFLAGS) $(NTL_CFLAGS) $(GIVARO_CFLAGS) $(LIDIA_CFLAGS) #LINBOX_LIBS= #else #AM_CPPFLAGS=-g $(GMP_CFLAGS) $(NTL_CFLAGS) $(GIVARO_CFLAGS) $(LIDIA_CFLAGS) #LINBOX_LIBS= $(top_builddir)/linbox/liblinbox.la #endif # SAFER_FLAGS=--std=c++98 -g -Wall -Wextra -Wno-ignored-qualifiers -Wno-unused-parameter # SAFER_FLAGS=-g -Wall -Wextra -Wno-unused-parameter # AM_CXXFLAGS = $(SAFER_FLAGS) -DLinBoxSrcOnly -DDEBUG -O0 AM_CXXFLAGS = @DEFAULT_CFLAGS@ -DLinBoxSrcOnly -DDISABLE_COMMENTATOR #LDADD = $(NTL_LIBS) $(GIVARO_LIBS) $(LIDIA_LIBS) $(BLAS_LIBS) $(GMP_LIBS) "-Wl,-enable-auto-import" LDADD = $(NTL_LIBS) $(GIVARO_LIBS) $(LIDIA_LIBS) $(BLAS_LIBS) $(GMP_LIBS) $(MPFR_LIBS) $(FPLLL_LIBS) $(LDFLAGS) $(IML_LIBS) # AM_LDFLAGS=-static AM_LDFLAGS = $(top_srcdir)/linbox/.libs/liblinbox.a #EX_LDADD = $(NTL_LIBS) $(GMP_LIBS) $(GIVARO_LIBS) $(LIDIA_LIBS) $(BLAS_LIBS) #LDADD = $(LINBOX_LIBS) $(EX_LDADD) SUBDIRS = fields EXAMPLES = rank det minpoly valence solve dot-product echelon sparseelimdet sparseelimrank checksolve doubledet smithvalence # EXAMPLES+=nulp yabla GIVARONTL_EXAMPLES = smith charpoly graph-charpoly @LINBOX_HAVE_GIVARO_TRUE@@LINBOX_HAVE_NTL_TRUE@USE_GIVARONTL_EXAMPLES = $(GIVARONTL_EXAMPLES) CLEANFILES = $(EXTRA_PROGRAMS) EXTRA_DIST = examples.doxy smithvalence.h dot_product_SOURCES = dot-product.C doubledet_SOURCES = doubledet.C #linbox_program_SOURCES = \ # linbox-program.C checksolve_SOURCES = checksolve.C charpoly_SOURCES = charpoly.C graph_charpoly_SOURCES = graph-charpoly.C det_SOURCES = det.C rank_SOURCES = rank.C smith_SOURCES = smith.C minpoly_SOURCES = minpoly.C valence_SOURCES = valence.C solve_SOURCES = solve.C echelon_SOURCES = echelon.C smithvalence_SOURCES = smithvalence.C sparseelimdet_SOURCES = sparseelimdet.C sparseelimrank_SOURCES = sparseelimrank.C LINBOX = @prefix@ # no /bin if LinBox is uncompiled #LINBOX_BIN=$(LINBOX)/bin LINBOX_BIN = @bindir@ all: all-recursive .SUFFIXES: .SUFFIXES: .C .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu --ignore-deps examples/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu --ignore-deps examples/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): Readme-make: $(top_builddir)/config.status $(srcdir)/Readme-make.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ charpoly$(EXEEXT): $(charpoly_OBJECTS) $(charpoly_DEPENDENCIES) $(EXTRA_charpoly_DEPENDENCIES) @rm -f charpoly$(EXEEXT) $(CXXLINK) $(charpoly_OBJECTS) $(charpoly_LDADD) $(LIBS) checksolve$(EXEEXT): $(checksolve_OBJECTS) $(checksolve_DEPENDENCIES) $(EXTRA_checksolve_DEPENDENCIES) @rm -f checksolve$(EXEEXT) $(CXXLINK) $(checksolve_OBJECTS) $(checksolve_LDADD) $(LIBS) det$(EXEEXT): $(det_OBJECTS) $(det_DEPENDENCIES) $(EXTRA_det_DEPENDENCIES) @rm -f det$(EXEEXT) $(CXXLINK) $(det_OBJECTS) $(det_LDADD) $(LIBS) dot-product$(EXEEXT): $(dot_product_OBJECTS) $(dot_product_DEPENDENCIES) $(EXTRA_dot_product_DEPENDENCIES) @rm -f dot-product$(EXEEXT) $(CXXLINK) $(dot_product_OBJECTS) $(dot_product_LDADD) $(LIBS) doubledet$(EXEEXT): $(doubledet_OBJECTS) $(doubledet_DEPENDENCIES) $(EXTRA_doubledet_DEPENDENCIES) @rm -f doubledet$(EXEEXT) $(CXXLINK) $(doubledet_OBJECTS) $(doubledet_LDADD) $(LIBS) echelon$(EXEEXT): $(echelon_OBJECTS) $(echelon_DEPENDENCIES) $(EXTRA_echelon_DEPENDENCIES) @rm -f echelon$(EXEEXT) $(CXXLINK) $(echelon_OBJECTS) $(echelon_LDADD) $(LIBS) graph-charpoly$(EXEEXT): $(graph_charpoly_OBJECTS) $(graph_charpoly_DEPENDENCIES) $(EXTRA_graph_charpoly_DEPENDENCIES) @rm -f graph-charpoly$(EXEEXT) $(CXXLINK) $(graph_charpoly_OBJECTS) $(graph_charpoly_LDADD) $(LIBS) minpoly$(EXEEXT): $(minpoly_OBJECTS) $(minpoly_DEPENDENCIES) $(EXTRA_minpoly_DEPENDENCIES) @rm -f minpoly$(EXEEXT) $(CXXLINK) $(minpoly_OBJECTS) $(minpoly_LDADD) $(LIBS) rank$(EXEEXT): $(rank_OBJECTS) $(rank_DEPENDENCIES) $(EXTRA_rank_DEPENDENCIES) @rm -f rank$(EXEEXT) $(CXXLINK) $(rank_OBJECTS) $(rank_LDADD) $(LIBS) smith$(EXEEXT): $(smith_OBJECTS) $(smith_DEPENDENCIES) $(EXTRA_smith_DEPENDENCIES) @rm -f smith$(EXEEXT) $(CXXLINK) $(smith_OBJECTS) $(smith_LDADD) $(LIBS) smithvalence$(EXEEXT): $(smithvalence_OBJECTS) $(smithvalence_DEPENDENCIES) $(EXTRA_smithvalence_DEPENDENCIES) @rm -f smithvalence$(EXEEXT) $(CXXLINK) $(smithvalence_OBJECTS) $(smithvalence_LDADD) $(LIBS) solve$(EXEEXT): $(solve_OBJECTS) $(solve_DEPENDENCIES) $(EXTRA_solve_DEPENDENCIES) @rm -f solve$(EXEEXT) $(CXXLINK) $(solve_OBJECTS) $(solve_LDADD) $(LIBS) sparseelimdet$(EXEEXT): $(sparseelimdet_OBJECTS) $(sparseelimdet_DEPENDENCIES) $(EXTRA_sparseelimdet_DEPENDENCIES) @rm -f sparseelimdet$(EXEEXT) $(CXXLINK) $(sparseelimdet_OBJECTS) $(sparseelimdet_LDADD) $(LIBS) sparseelimrank$(EXEEXT): $(sparseelimrank_OBJECTS) $(sparseelimrank_DEPENDENCIES) $(EXTRA_sparseelimrank_DEPENDENCIES) @rm -f sparseelimrank$(EXEEXT) $(CXXLINK) $(sparseelimrank_OBJECTS) $(sparseelimrank_LDADD) $(LIBS) valence$(EXEEXT): $(valence_OBJECTS) $(valence_DEPENDENCIES) $(EXTRA_valence_DEPENDENCIES) @rm -f valence$(EXEEXT) $(CXXLINK) $(valence_OBJECTS) $(valence_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c .C.o: $(CXXCOMPILE) -c -o $@ $< .C.obj: $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .C.lo: $(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs # 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): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__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; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ 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 || \ set "$$@" "$$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; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) 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; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done 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: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-generic clean-libtool \ ctags ctags-recursive distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs installdirs-am \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags tags-recursive uninstall uninstall-am examples: ${EXTRA_PROGRAMS} # for compilation of new examples %:%.C $(CXX) $(CXXFLAGS) $(AM_CXXFLAGS) $(OPTFLAGS) ${INCLUDES} $(AM_CPPFLAGS) $*.C -o $@ $(AM_LDFLAGS) $(LDADD) %:%.cpp $(CXX) $(CXXFLAGS) $(AM_CXXFLAGS) $(OPTFLAGS) ${INCLUDES} $(AM_CPPFLAGS) $*.cpp -o $@ $(AM_LDFLAGS) $(LDADD) # 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: linbox-1.3.2/examples/Readme-make.in000066400000000000000000000110301176453053400172710ustar00rootroot00000000000000#!/bin/sh # # Created by B. David Saunders # Modified by G. Villard # mar mai 6 18:15:17 CEST 2003 # dim aou 3 01:22:55 CEST 2003 ##################################################################################### # This Readme-make is actually a makefile illustrating two ways (A and B below) # to compile programs which use LinBox. # # Usage: "make -f Readme-make " ##################################################################################### # # Linbox is a C++ template source library using a two level directory structure. # To include a linbox file write "#include ". # For compiling code using linbox, three issues arise. # 1. location of LinBox include directory (which contains linbox/subdir/file.h). # 2. location of LinBox lib directory. Some components of LinBox ( those in linbox/util/ ) # are separately compiled and installed in this library. It is possible to include # sources from linbox/util/ rather than linking to this library. Compile # with "-DLinBoxSrcOnly". # 3. LinBox depends on other packages for some of it's functionality. The compiler must # find the include files and library objects for these packages. # Of these GMP is necessary, the others are optional. # # This makefile illustrates two ways to proceed (A and B below). # # ----> In both cases REPLACE ".." below with your LinBox top directory # e.g. LINBOX=/home/gvillard/Soft/linbox LINBOX=@prefix@ # ----> And put here your compiler's name and options #CCC=g++ CPPFLAGS= -O0 LDFLAGS= ######################################################################################### # A. # # If your LinBox library is compiled, normally the rest of this makefile # needn't be modified. # # If the LinBox library is compiled, use `$(LINBOX_BIN)/linbox-config --cflags --libs` # on the compile command to get the include and lib locations for LinBox and the # other packages it uses that were available when it was installed. # This is the simplest way to proceed. # This approach is used here for targets whose source suffix is .C # # no /bin if LinBox is uncompiled LINBOX_BIN=$(LINBOX)/bin #LINBOX_BIN=@bindir@ %:%.C #$(CXX) $(CPPFLAGS) $*.C -o $* $(shell $(LINBOX_BIN)/linbox-config --cflags --libs) CXXFLAGS+= $(shell $(LINBOX_BIN)/linbox-config --cflags) LOADLIBES+= $(shell $(LINBOX_BIN)/linbox-config --libs) ######################################################################################### # B. # You can compile from LinBox sources even without compiling LinBox. This approach is used # in this makefile example for targets whose source suffix is .cc or .cpp. # You must first indicate in this makefile the locations of LinBox and the packages used. # ----> Simply REPLACE ".." below with your LinBox top and packages directories GMP=.. #NTL=.. #GIVARO=.. #LIDIA=.. #SACLIB=.. # e.g. #GMP=/usr/local/algebra/gmp #NTL=/usr/local/algebra/ntl #GIVARO=/usr/local/algebra/givaro #LIDIA=/usr/local/algebra/lidia #SACLIB=/usr/local/algebra/saclib ###################################################################################### # Normally the rest of this makefile needn't be modified. Change remaining definitions # only when, in your installations, the includes or libs are not in the indicated places. ###################################################################################### LINBOX_INCL= -I$(LINBOX) -DLinBoxSrcOnly # GMP is a necessary component, used throughout LinBox. GMP_INCL= -I$(GMP)/include GMP_LIB= -L$(GMP)/lib -lgmp GMP_RLIB= -R$(GMP)/lib -lgmp # NTL is an optional component, used in a number of field classes. NTL_INCL= -I$(NTL)/include NTL_LIB= -L$(NTL)/lib -lntl # GIVARO is an optional component, used for instance in the Zech log fields GIVARO_INCL= -I$(GIVARO)/include GIVARO_LIB= -L$(GIVARO)/lib # LIDIA is an optional component. LIDIA_INCL= -I$(LIDIA)/include LIDIA_LIB= -L$(LIDIA)/lib # SACLIB is an optional component, not currently used. SACLIB_INCL= -I$(SACLIB)/include SACLIB_LIB= -L$(SACLIB)/lib INCL= $(LINBOX_INCL) $(GMP_INCL) INCL+=$(NTL_INCL) $(GIVARO_INCL) $(LIDIA_INCL) $(SACLIB_INCL) LIB= $(LINBOX_LIB) $(GMP_LIB) LIB+= $(NTL_LIB) $(GIVARO_LIB) $(LIDIA_LIB) $(SACLIB_LIB) # fixme: this is udel specific. RLIB= $(LINBOX_RLIB) $(GMP_RLIB) -R/usr/local/gnu/gcc/lib %:%.cc $(CCC) $(CPPFLAGS) $(LDFLAGS) $*.cc -o $* $(INCL) $(LIB) $(RLIB) # ... or use separate compilation and linkage %.o:%.cpp $(CCC) $(CPPFLAGS) $(INCL) $*.cpp -c %:%.o $(CCC) $(LDFLAGS) $*.o -o $* $(LIB) clean: rm -f *.o linbox-1.3.2/examples/charpoly.C000066400000000000000000000114361176453053400165700ustar00rootroot00000000000000/* * examples/charpoly.C * * Copyright (C) 2005, 2010 D. Saunders, C. Pernet, J-G. Dumas * ========LICENCE======== * This file is part of the library LinBox. * * LinBox is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ========LICENCE======== */ /** \file examples/charpoly.C * @example examples/charpoly.C \brief Characteristic polynomial of matrix over Z or Zp. \ingroup examples */ #include #include #include "linbox/util/timer.h" #include "linbox/field/modular.h" #include "linbox/field/unparametric.h" #include "linbox/blackbox/sparse.h" using namespace std; #include "linbox/solutions/charpoly.h" #include "linbox/ring/givaro-polynomial.h" using namespace LinBox; template std::ostream& printPolynomial (std::ostream& out, const Field &F, const Polynomial &v) { for (int i = v.size () - 1; i >= 0; i--) { F.write (out, v[i]); if (i > 0) out << " X^" << i << " + "; } return out; } template std::ostream& prettyprintIntegerPolynomial (std::ostream& out, const Field &F, const Polynomial &v) { size_t n = v.size()-1; if (n == 0) { F.write(out, v[0]); } else { if(v[n] != 0) { if (v[n] != 1) F.write(out, v[n]) << '*'; out << 'X'; if (n > 1) out << '^' << n; for (int i = (int)n - 1; i > 0; i--) { if (v[i] != 0) { if (v[i] >0) out << " + "; if (v[i] != 1) F.write (out, v[i]) << '*'; out << 'X'; if (i > 1) out << '^' << i; } } if (v[0] != 0) { if (v[0] >0) out << " + "; F.write(out, v[0]); } } } return out; } template std::ostream& printFactorization (std::ostream& out, const Field &F, const Factors &f, const Exponents& exp) { typename Factors::const_iterator itf = f.begin(); typename Exponents::const_iterator ite = exp.begin(); for ( ; itf != f.end(); ++itf, ++ite) { prettyprintIntegerPolynomial(out << '(', F, *(*itf)) << ')'; if (*ite > 1) out << '^' << *ite; out << endl; } return out; } int main (int argc, char **argv) { commentator().setMaxDetailLevel (2); commentator().setMaxDepth (2); commentator().setReportStream (std::cerr); cout< 3) { cerr << "Usage: charpoly [

    ]" << endl; return -1; } ifstream input (argv[1]); if (!input) { cerr << "Error opening matrix file " << argv[1] << endl; return -1; } if (argc == 2) { PID_integer ZZ; BlasMatrix A (ZZ); A.read (input); typedef GivPolynomialRing IntPolRing; IntPolRing::Element c_A; Timer tim; tim.clear();tim.start(); charpoly (c_A, A, Method::Blackbox()); tim.stop(); cout << "Characteristic Polynomial is "; //printPolynomial (cout, ZZ, c_A) << endl; cout << tim << endl; #ifdef __LINBOX_HAVE_NTL cout << "Do you want a factorization (y/n) ? "; char tmp; cin >> tmp; if (tmp == 'y' || tmp == 'Y') { commentator().start("Integer Polynomial factorization by NTL", "NTLfac"); vector intFactors; vector exp; IntPolRing IPD(ZZ); tim.start(); IPD.factor (intFactors, exp, c_A); tim.stop(); commentator().stop("done", NULL, "NTLfac"); printFactorization(cout << intFactors.size() << " integer polynomial factors:" << endl, ZZ, intFactors, exp) << endl; vector::const_iterator itf = intFactors.begin(); for ( ; itf != intFactors.end(); ++itf) delete *itf; cout << tim << endl; } #endif } if (argc == 3) { typedef Modular Field; double q = atof(argv[2]); Field F(q); BlasMatrix B (F); B.read (input); cout << "B is " << B.rowdim() << " by " << B.coldim() << endl; GivPolynomialRing::Element c_B; Timer tim; tim.clear();tim.start(); charpoly (c_B, B); tim.stop(); cout << "Characteristic Polynomial is "; //printPolynomial (cout, F, c_B) << endl; cout << tim << endl; } return 0; } // vim:sts=8:sw=8:ts=8:noet:sr:cino=>s,f0,{0,g0,(0,:0,t0,+0,=s // Local Variables: // mode: C++ // tab-width: 8 // indent-tabs-mode: nil // c-basic-offset: 8 // End: linbox-1.3.2/examples/checksolve.C000066400000000000000000000056161176453053400171000ustar00rootroot00000000000000/* * examples/checksolve.C * * Copyright (C) 2007 C. Pernet * ========LICENCE======== * This file is part of the library LinBox. * * LinBox is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ========LICENCE======== */ /**\file examples/checksolve.C * @example examples/checksolve.C \brief Solving of sparse matrix over Z or Zp. \ingroup examples */ //#include "linbox-config.h" #include #include "linbox/field/modular.h" #include "linbox/solutions/solve.h" #include "linbox/util/matrix-stream.h" #include "linbox/solutions/methods.h" using namespace LinBox; // using namespace std; int main (int argc, char **argv) { // commentator().setMaxDetailLevel (-1); // commentator().setMaxDepth (-1); // commentator().setReportStream (std::cerr); if (argc < 2 || argc > 4) { std::cerr << "Usage: checksolve

    " << std::endl; return 0; } std::ifstream input (argv[1]); if (!input) { std::cerr << "Error opening matrix file " << argv[1] << std::endl; return -1; } std::ifstream invect(argv[2]); if (!input) { std::cerr << "Error opening vector file " << argv[2] << std::endl; return -1; } typedef Modular Field; double q = atof(argv[3]); Field F(q); MatrixStream< Field > ms ( F, input ); BlasMatrix A (ms); // A.write(std::cout); std::cout << "A is " << A.rowdim() << " by " << A.coldim() << std::endl; std::vector X( A.coldim()),B(A.rowdim()); for(std::vector::iterator it=B.begin(); it != B.end(); ++it) invect >> *it; std::cout << "B is [ "< r(A.rowdim()); BlasMatrixDomain BMD(F); BMD.mul(r, static_cast& >(A), X); //A.apply (r,X); VectorDomain VD(F); if (VD.areEqual (r,B)) std::cout<<"CHECK"< #include "linbox/field/modular.h" #include "linbox/blackbox/sparse.h" #include "linbox/solutions/det.h" #include "linbox/util/matrix-stream.h" using namespace LinBox; using namespace std; int main (int argc, char **argv) { commentator().setMaxDetailLevel (-1); commentator().setMaxDepth (-1); commentator().setReportStream (std::cerr); if (argc <= 1 || argc > 3) { cerr << "Usage: det [

    ]" << endl; return -1; } if (argc == 2 ) { // For a small integer matrix test, do "det data/mat2S". // It is a 2 by 2 matrix with determinant = -2. typedef PID_integer Integers; Integers ZZ; ifstream input (argv[1]); if (!input) { cerr << "Error opening matrix file " << argv[1] << endl; return -1; } MatrixStream< Integers> ms ( ZZ, input ); BlasMatrix A(ms); cout << "Matrix is " << A.rowdim() << " by " << A.coldim() << endl; Integers::Element det_A; det (det_A, A); cout << "Determinant is "; ZZ.write(cout, det_A) << endl; } if (argc == 3) { typedef Modular Field; double q = atof(argv[2]); Field F(q); ifstream input (argv[1]); if (!input) { cerr << "Error opening matrix file " << argv[1] << endl; return -1; } MatrixStream< Field > ms ( F, input ); SparseMatrix B (ms); cout << "Matrix is " << B.rowdim() << " by " << B.coldim() << endl; Field::Element det_B; det (det_B, B); cout << "Determinant is "; F.write(cout, det_B) << " mod " << q << endl; } return 0; } // vim:sts=8:sw=8:ts=8:noet:sr:cino=>s,f0,{0,g0,(0,:0,t0,+0,=s // Local Variables: // mode: C++ // tab-width: 8 // indent-tabs-mode: nil // c-basic-offset: 8 // End: linbox-1.3.2/examples/dot-product.C000066400000000000000000000056411176453053400172140ustar00rootroot00000000000000/* * examples/dot-product.C * * Copyright (C) 2002, 2010 Bradford Hovinen * ========LICENCE======== * This file is part of the library LinBox. * * LinBox is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ========LICENCE======== */ /** \file examples/dot-product.C * @example examples/dot-product.C * \brief Timings on dot products of random vectors. * \ingroup examples * * \author Bradford Hovinen * * Use of vectors meeting the LinBox dense and sparse vector archetypes * is illustrated and their dot-product times are benchmarked. * * Constructs random vectors and computes their dot product, giving the * required time. */ #include "linbox/linbox-config.h" #include #include "linbox/field/modular.h" #include "linbox/vector/vector-domain.h" #include "linbox/vector/stream.h" #include "linbox/util/commentator.h" using namespace LinBox; typedef Modular Field; /// no command line args int main (int argc, char **argv) { // Constants: we are working with an n x n matrix over GF(q) const int n = 10000000; const double p = .001; const int q = 32749; commentator().setMaxDepth (1); commentator().setReportStream (std::cout); Field F (q); RandomDenseStream::Dense> factory1 (F, n); RandomSparseStream::SparseSeq> factory2 (F, p, n); RandomSparseStream::SparsePar> factory3 (F, p, n); Vector::Dense v1 (n), v2 (n); Vector::SparseSeq v3; Vector::SparsePar v4; factory1 >> v1 >> v2; factory2 >> v3; factory3 >> v4; VectorDomain VD (F); Field::Element res; commentator().start ("dense/dense dot product (1)"); for (int i = 0; i < 1; i++) VD.dot (res, v1, v2); commentator().stop ("done"); commentator().start ("dense/sparse sequence dot product (1000)"); for (int i = 0; i < 1000; i++) VD.dot (res, v1, v3); commentator().stop ("done"); commentator().start ("dense/sparse parallel dot product (1000)"); for (int i = 0; i < 1000; i++) VD.dot (res, v1, v4); commentator().stop ("done"); return 0; } // vim:sts=8:sw=8:ts=8:noet:sr:cino=>s,f0,{0,g0,(0,:0,t0,+0,=s // Local Variables: // mode: C++ // tab-width: 8 // indent-tabs-mode: nil // c-basic-offset: 8 // End: linbox-1.3.2/examples/doubledet.C000066400000000000000000000055321176453053400167160ustar00rootroot00000000000000 /* * examples/doubledet.C * * Copyright (C) 2008, 2010 C. Pernet * ========LICENCE======== * This file is part of the library LinBox. * * LinBox is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ========LICENCE======== */ /*! @file examples/doubledet.C * @example examples/doubledet.C * @ingroup examples * @brief computes doubleDet. */ #include #include "linbox/linbox-config.h" #include "linbox/field/PID-integer.h" #include "linbox/util/matrix-stream.h" #include "linbox/solutions/det.h" #include "linbox/algorithms/double-det.h" using namespace LinBox; using namespace std; int main (int argc, char **argv) { // commentator().setMaxDetailLevel (-1); // commentator().setMaxDepth (-1); // commentator().setReportStream (std::cerr); PID_integer ZZ; ifstream input (argv[1]); if (!input) { cerr << "Error opening matrix file " << argv[1] << endl; return -1; } MatrixStream ms (ZZ, input); BlasMatrix A (ms); cout << "Matrix is " << A.rowdim() << " by " << A.coldim() << endl; if (A.rowdim() != A.coldim() + 1){ cerr<<"Wrong dimensions: A must be (n+1) x n"< 2) proof = true; //doubleDet (det1, det2, A, true); doubleDet (det1, det2, A, proof); tim.stop(); // Check solution size_t n = A.coldim(); BlasMatrix B (ZZ, n, n); for (size_t i=0; is,f0,{0,g0,(0,:0,t0,+0,=s // Local Variables: // mode: C++ // tab-width: 8 // indent-tabs-mode: nil // c-basic-offset: 8 // End: linbox-1.3.2/examples/echelon.C000066400000000000000000000046251176453053400163660ustar00rootroot00000000000000 /* * examples/echelon.C * * Copyright (C) 2007, 2010 C. Pernet * ========LICENCE======== * This file is part of the library LinBox. * * LinBox is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ========LICENCE======== */ /** \file examples/echelon.C * @example examples/echelon.C \brief Echelon form of matrix over Zp. \ingroup examples */ #include #include "linbox/field/modular.h" #include "linbox/util/matrix-stream.h" #include "linbox/algorithms/echelon-form.h" #include using namespace LinBox; using namespace std; int main (int argc, char **argv) { if (argc < 3 || argc > 3) { cerr << "Usage: echelon

    " << endl; return -1; } ifstream input (argv[1]); if (!input) { cerr << "Error opening matrix file " << argv[1] << endl; return -1; } typedef Modular Field; double q = atof(argv[2]); Field F(q); MatrixStream ms(F,input); BlasMatrix A(ms); BlasMatrix E(F,A.rowdim(),A.coldim()); cout << "A is " << A.rowdim() << " by " << A.coldim() << endl; cout << A << std::endl; EchelonFormDomain > EFD (F); EFD.rowReducedEchelon(E,A); #ifdef COMPARE_FFPACK BlasMatrix G(A); size_t * P = new size_t[G.coldim()]; size_t * Q = new size_t[G.rowdim()]; size_t r = (size_t)FFPACK::ReducedRowEchelonForm (F, G.rowdim(), G.coldim(), G.getWritePointer(), G.coldim(), P, Q,false); if (G.coldim() <20) G.write(cerr<<"FFPACK::Echelon = "</dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd 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 = : build_triplet = @build@ host_triplet = @host@ EXTRA_PROGRAMS = ex-fields$(EXEEXT) ex-fields-archetype$(EXEEXT) \ modular-int$(EXEEXT) subdir = examples/fields DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/macros/aclocal-include.m4 \ $(top_srcdir)/macros/config-header.m4 \ $(top_srcdir)/macros/debug.m4 \ $(top_srcdir)/macros/expat-check.m4 \ $(top_srcdir)/macros/fflas-ffpack-check.m4 \ $(top_srcdir)/macros/fplll-check.m4 \ $(top_srcdir)/macros/givaro-check.m4 \ $(top_srcdir)/macros/gmp-check.m4 \ $(top_srcdir)/macros/iml-check.m4 \ $(top_srcdir)/macros/lapack-check.m4 \ $(top_srcdir)/macros/libtool.m4 \ $(top_srcdir)/macros/lidia-check.m4 \ $(top_srcdir)/macros/linbox-benchmark.m4 \ $(top_srcdir)/macros/linbox-doc.m4 \ $(top_srcdir)/macros/linbox-misc.m4 \ $(top_srcdir)/macros/linbox-opt.m4 \ $(top_srcdir)/macros/ltoptions.m4 \ $(top_srcdir)/macros/ltsugar.m4 \ $(top_srcdir)/macros/ltversion.m4 \ $(top_srcdir)/macros/lt~obsolete.m4 \ $(top_srcdir)/macros/m4ri-check.m4 \ $(top_srcdir)/macros/m4rie-check.m4 \ $(top_srcdir)/macros/maple-check.m4 \ $(top_srcdir)/macros/mpfr-check.m4 \ $(top_srcdir)/macros/ntl-check.m4 \ $(top_srcdir)/macros/saclib-check.m4 \ $(top_srcdir)/macros/sage-check.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am_ex_fields_OBJECTS = ex-fields.$(OBJEXT) ex_fields_OBJECTS = $(am_ex_fields_OBJECTS) ex_fields_LDADD = $(LDADD) am__DEPENDENCIES_1 = ex_fields_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) am_ex_fields_archetype_OBJECTS = ex-fields-archetype.$(OBJEXT) ex_fields_archetype_OBJECTS = $(am_ex_fields_archetype_OBJECTS) ex_fields_archetype_LDADD = $(LDADD) ex_fields_archetype_DEPENDENCIES = $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) am_modular_int_OBJECTS = modular-int.$(OBJEXT) modular_int_OBJECTS = $(am_modular_int_OBJECTS) modular_int_LDADD = $(LDADD) modular_int_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = am__depfiles_maybe = CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(ex_fields_SOURCES) $(ex_fields_archetype_SOURCES) \ $(modular_int_SOURCES) DIST_SOURCES = $(ex_fields_SOURCES) $(ex_fields_archetype_SOURCES) \ $(modular_int_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BLAS_CFLAGS = @BLAS_CFLAGS@ BLAS_LIBS = @BLAS_LIBS@ CC = @CC@ CCNAM = @CCNAM@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DBG = @DBG@ DEBUG_CFLAGS = @DEBUG_CFLAGS@ DEFAULT_CFLAGS = @DEFAULT_CFLAGS@ DEFS = @DEFS@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXPAT_CFLAGS = @EXPAT_CFLAGS@ EXPAT_LIBS = @EXPAT_LIBS@ FFLAS_FFPACK_CFLAGS = @FFLAS_FFPACK_CFLAGS@ FFLAS_FFPACK_LIBS = @FFLAS_FFPACK_LIBS@ FFLAS_FFPACK_LOC = @FFLAS_FFPACK_LOC@ FGREP = @FGREP@ FPLLL_CFLAGS = @FPLLL_CFLAGS@ FPLLL_LIBS = @FPLLL_LIBS@ GIVARO_CFLAGS = @GIVARO_CFLAGS@ GIVARO_LIBS = @GIVARO_LIBS@ GMP_CFLAGS = @GMP_CFLAGS@ GMP_LIBS = @GMP_LIBS@ GMP_VERSION = @GMP_VERSION@ GREP = @GREP@ IML_CFLAGS = @IML_CFLAGS@ IML_LIBS = @IML_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIDIA_CFLAGS = @LIDIA_CFLAGS@ LIDIA_LIBS = @LIDIA_LIBS@ LINBOX_BENCH_PATH = @LINBOX_BENCH_PATH@ LINBOX_DOC_PATH = @LINBOX_DOC_PATH@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ M4RIE_CFLAGS = @M4RIE_CFLAGS@ M4RIE_LIBS = @M4RIE_LIBS@ M4RI_CFLAGS = @M4RI_CFLAGS@ M4RI_LIBS = @M4RI_LIBS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAPLE_CFLAGS = @MAPLE_CFLAGS@ MAPLE_HOME = @MAPLE_HOME@ MAPLE_LIBS = @MAPLE_LIBS@ MAPLE_VERSION = @MAPLE_VERSION@ MKDIR_P = @MKDIR_P@ MPFR_CFLAGS = @MPFR_CFLAGS@ MPFR_LIBS = @MPFR_LIBS@ NM = @NM@ NMEDIT = @NMEDIT@ NTL_CFLAGS = @NTL_CFLAGS@ NTL_LIBS = @NTL_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PROF = @PROF@ RANLIB = @RANLIB@ RM = @RM@ SACLIB_CFLAGS = @SACLIB_CFLAGS@ SACLIB_LIBS = @SACLIB_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TESTS_CFLAGS = @TESTS_CFLAGS@ VERSION = @VERSION@ WARN = @WARN@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__leading_dot = @am__leading_dot@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I$(top_srcdir) -DLinBoxSrcOnly $(GMP_CFLAGS) \ $(NTL_CFLAGS) -DEXAMPLE_DATADIR=\"$(srcdir)/data\" #AM_CPPFLAGS=$(GMP_CFLAGS) $(NTL_CFLAGS) -DEXAMPLE_DATADIR=\"$(srcdir)/data\" #LDADD = $(top_builddir)/linbox/liblinbox.a $(GMP_LIBS) $(NTL_LIBS) AM_CXXFLAGS = @DEFAULT_CFLAGS@ -DLinBoxSrcOnly LDADD = $(GMP_LIBS) $(NTL_LIBS) -lgivaro -lclapack -lcblas -latlas $(LDFLAGS) ex_fields_SOURCES = ex-fields.C ex_fields_archetype_SOURCES = ex-fields-archetype.C modular_int_SOURCES = modular-int.C all: all-am .SUFFIXES: .SUFFIXES: .C .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu --ignore-deps examples/fields/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu --ignore-deps examples/fields/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): ex-fields$(EXEEXT): $(ex_fields_OBJECTS) $(ex_fields_DEPENDENCIES) $(EXTRA_ex_fields_DEPENDENCIES) @rm -f ex-fields$(EXEEXT) $(CXXLINK) $(ex_fields_OBJECTS) $(ex_fields_LDADD) $(LIBS) ex-fields-archetype$(EXEEXT): $(ex_fields_archetype_OBJECTS) $(ex_fields_archetype_DEPENDENCIES) $(EXTRA_ex_fields_archetype_DEPENDENCIES) @rm -f ex-fields-archetype$(EXEEXT) $(CXXLINK) $(ex_fields_archetype_OBJECTS) $(ex_fields_archetype_LDADD) $(LIBS) modular-int$(EXEEXT): $(modular_int_OBJECTS) $(modular_int_DEPENDENCIES) $(EXTRA_modular_int_DEPENDENCIES) @rm -f modular-int$(EXEEXT) $(CXXLINK) $(modular_int_OBJECTS) $(modular_int_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c .C.o: $(CXXCOMPILE) -c -o $@ $< .C.obj: $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .C.lo: $(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs 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; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ 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; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) 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; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool ctags distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am # 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: linbox-1.3.2/examples/fields/ex-fields-archetype.C000066400000000000000000000055571176453053400220660ustar00rootroot00000000000000/* * examples/fields/ex-fields-archetype.C * * Copyright (C) 2002, 2010 G. Villard * ========LICENCE======== * This file is part of the library LinBox. * * LinBox is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ========LICENCE======== */ /** \file examples/fields/ex-fields-archetype.C * \author Gilles Villard * \brief On using the field archetype to avoid code bloat. * * Use of a function compiled with the field archetype but called * with two distinct field types. */ // --------------------------------------------- #include #include #include // --------------------------------------------- //#include "linbox/field/unparametric.h" //#include "linbox/modular.h" #include "linbox/field/ntl.h" #include "linbox/field/archetype.h" using namespace LinBox; // --------------------------------------------- /* The template function "fct" reads two elements "a" and "b" of the * field "K" from the standard input and writes a/b on the standard output */ template int fct(const Field& K) { typedef typename Field::Element K_elt; K_elt a,b,r; K.init(a); K.init(b); K.init(r); K.read(std::cin,a); K.read(std::cin,b); K.div(r,a,b); K.write(std::cout,r) << "\n"; return 0; } // --------------------------------------------- /// no command line args int main() { /* The field objects "K_o" and "Q_o" are constructed as in previous examples */ // UnparametricField Q_o; NTL_RR Q_o ; NTL::RR::SetPrecision(400); NTL::RR::SetOutputPrecision(50); // UnparametricField K_o; NTL::zz_p::init(553); NTL_zz_p K_o ; /* These field objects "K_o" and "Q_o" of different types can be converted to * objects Q and K of a unique type "Field_archetype" for instance using * a constructor: */ FieldArchetype Q( & Q_o ); FieldArchetype K( & K_o ); /* The template function "fct" is called with two different fields but the * template is instantiated only once since it is called with a unique * template parameter "Field_archetype" */ fct(Q); fct(K); return 0; }; // vim:sts=8:sw=8:ts=8:noet:sr:cino=>s,f0,{0,g0,(0,:0,t0,+0,=s // Local Variables: // mode: C++ // tab-width: 8 // indent-tabs-mode: nil // c-basic-offset: 8 // End: linbox-1.3.2/examples/fields/ex-fields.C000066400000000000000000000052711176453053400200750ustar00rootroot00000000000000/* * examples/fields/ex-fields.C * * Copyright (C) 2001, 2002, 2010 G. Villard * ========LICENCE======== * This file is part of the library LinBox. * * LinBox is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ========LICENCE======== */ /** \file examples/fields/ex-fields.C * \author Gilles Villard * \brief Using a template function with two distinct fields. */ // --------------------------------------------- #include "linbox/linbox-config.h" #include // --------------------------------------------- #include "linbox/field/modular.h" #include "linbox/field/ntl.h" using namespace LinBox; using namespace std; /** The template function "fct" reads two elements "a" and "b" of the * field "K" from the standard input and writes a/b on the standard output */ template void divide_ex(const Field& K) { /* "K" is a field domain (a C++ object) of type "Field" (here the template * parameter). The type of the elements of "K" is obtained through * "Field" by typename Field::Element */ typedef typename Field::Element K_elt; K_elt a,b,r; K.init(a); K.init(b); K.init(r); cout << "division example: enter two numbers: "; K.read(cin,a); K.read(cin,b); K.div(r,a,b); K.write( K.write(cout<< "the quotient in ") << " is ", r) << endl; } // --------------------------------------------- /// no command line args int main() { /* Using the parameterized domain capabilities, several domains * representing integers modulo may be used simultaneously. */ Modular D(3), K(7); divide_ex(D); divide_ex(K); // NTL arbitrary precision real field // (Could be parameterized by the precision) // UnparametricField K2; NTL_RR K2 ; NTL::RR::SetPrecision(500); NTL::RR::SetOutputPrecision(50); // NTL modulo p field //UnparametricField K2; //NTL::zz_p::init(553); divide_ex(K2); return 0; }; // vim:sts=8:sw=8:ts=8:noet:sr:cino=>s,f0,{0,g0,(0,:0,t0,+0,=s // Local Variables: // mode: C++ // tab-width: 8 // indent-tabs-mode: nil // c-basic-offset: 8 // End: linbox-1.3.2/examples/fields/modular-int.C000066400000000000000000000072601176453053400204500ustar00rootroot00000000000000 /* * examples/modular-int.C * * Copyright (C) 2005, 2010 D. Saunders, Z. Wang * ========LICENCE======== * This file is part of the library LinBox. * * LinBox is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ========LICENCE======== */ /** \file examples/fields/modular-int.C \brief Example of arithmetic in the Modular finite field. */ //by Zhendong wan wan@udel.edu #include /* the header file for modular*/ #include "linbox/field/modular-int.h" int main (int argc, char **argv) { /* construct the Z/101Z field */ LinBox::Modular F(101); /* declare local variable a, b, c, x, y*/ LinBox::Modular::Element a, b, c, x, y; // initializtion F.init(a, 92); F.init(b, 50); F.init(c, 56); F.init(x, 33); F.init(y, 45); /* +, -, *, / arithmetic operation */ //compute c <- a + b mod 101; F.add(c,a,b); //output value of a F.write(std::cout,a); std::cout << " + "; //output value of b F.write(std::cout,b); std::cout << " = "; //output value of c F.write(std::cout,c); std::cout << " mod 101" << "\n"; //compute c <- a - b mod 101; F.sub(c,a,b); //output value of a F.write(std::cout,a); std::cout << " - "; //output value of b F.write(std::cout,b); std::cout << " = "; //output value of c F.write(std::cout,c); std::cout << " mod 101" << "\n"; //compute c <- a * b mod 101; F.mul(c,a,b); //output value of a F.write(std::cout,a); std::cout << " * "; //output value of b F.write(std::cout,b); std::cout << " = "; //output value of c F.write(std::cout,c); std::cout << " mod 101" << "\n"; //compute c <- a / b mod 101; F.div(c,a,b); //output value of a F.write(std::cout,a); std::cout << " / "; //output value of b F.write(std::cout,b); std::cout << " = "; //output value of c F.write(std::cout,c); std::cout << " mod 101" << "\n"; //compute c = 1 /a mod 101; F.inv(c,a); std::cout << "1 / " << a << " = "; //output value of c F.write(std::cout,c); std::cout << " mod 101" << "\n"; /* Inplace operation */ //compute a *= b; F.mulin(a,b); //compute a /= b; F.divin(a,b); //compute a <- 1 / a/; F.invin(a); /* a * x + y operation */ //compute c <- a * x + y; F.axpy(c,a,x,y); //compute c += a * x; F.axpyin(c,a,x); /* compare operation */ // test if a == 1 mod 101; //output value of a F.write(std::cout,a); std::cout << " == 1 mod 101 " << (F.isOne(a) ? "true" : "false") << "\n"; //test if a == 0 mod 101; //output value of a F.write(std::cout,a); std::cout << " == 0 mod 101 " << (F.isZero(a) ? "true" : "false") << "\n" ; // test if a == b mod 101; //output value of a F.write(std::cout,a); std::cout << " == "; //output value of b F.write(std::cout,b); std::cout << " mod 101 " << (F.areEqual(a,b) ? "true" : "false") << "\n"; //For performance, we recommend to use all possible operation, for example, using axpy, instead of mul, then addin. return 0; } // vim:sts=8:sw=8:ts=8:noet:sr:cino=>s,f0,{0,g0,(0,:0,t0,+0,=s // Local Variables: // mode: C++ // tab-width: 8 // indent-tabs-mode: nil // c-basic-offset: 8 // End: linbox-1.3.2/examples/graph-charpoly.C000066400000000000000000000057051176453053400176710ustar00rootroot00000000000000 /* * examples/graph-charpoly.C * * Copyright (C) 2005, 2007, 2010 C. Pernet ========LICENCE======== * This file is part of the library LinBox. * * LinBox is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ========LICENCE======== */ /*! @file examples/graph-charpoly.C * @example examples/graph-charpoly.C * @ingroup examples * @brief Compute the integer characteristic polynomial of symetric matrices with (0,1) coefficients. * Example for Pr G. Royle. */ #include #include "linbox/blackbox/zero-one.h" #include "linbox/field/PID-integer.h" #include "linbox/solutions/charpoly.h" #include "linbox/ring/givaro-polynomial.h" #include "linbox/solutions/methods.h" using namespace std; using namespace LinBox; template void printPolynomial(const Field& F, const Polynomial& P) { int n= (int) P.size()-1; for (int i=0;i0)?"+":""),P[0]); } else{ cout<<"X^"<1; --i) if (!F.isZero(P[i])) F.write(cout<<((P[i]>0)?"+":""),P[i])<<"*X^"<0)?"+":""),P[1])<<"*X"; if ( P[0] != 0) F.write(cout<<((P[0]>0)?"+":""),P[0]); } } typedef ZeroOne Matrix; typedef GivPolynomialRing IntPolRing; int main (int argc, char **argv) { commentator().getMessageClass (BRIEF_REPORT).setMaxDepth (2); commentator().getMessageClass (BRIEF_REPORT).setMaxDetailLevel (Commentator::LEVEL_UNIMPORTANT); if (argc != 2) { cerr << "Usage: graph-charpoly " < ZZ; PID_integer ZZ; Matrix A(ZZ); A.read (input); commentator().report(1, BRIEF_REPORT)<< "A is " << A.rowdim() << " by " << A.coldim() << endl; IntPolRing::Element c_A; charpoly (c_A, A, Method::Blackbox(Method::Wiedemann( Specifier::SYMMETRIC))); cout<< "Characteristic Polynomial is "; printPolynomial (ZZ, c_A); return 0; } // vim:sts=8:sw=8:ts=8:noet:sr:cino=>s,f0,{0,g0,(0,:0,t0,+0,=s // Local Variables: // mode: C++ // tab-width: 8 // indent-tabs-mode: nil // c-basic-offset: 8 // End: linbox-1.3.2/examples/minpoly.C000066400000000000000000000063151176453053400164360ustar00rootroot00000000000000 /* * examples/minpoly.C * * Copyright (C) 2005, 2010 D Saunders, J-G Dumas * ========LICENCE======== * This file is part of the library LinBox. * * LinBox is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ========LICENCE======== */ /** \file examples/minpoly.C * @example examples/minpoly.C \brief Minimal polynomial of a sparse matrix. \ingroup examples */ #include template void printPolynomial (const Field &F, const Polynomial &v) { for (int i = (int)v.size () ; i-- ; ) { F.write (std::cout, v[i]); if (i > 0) std::cout << " x^" << i << " + "; } std::cout << std::endl; } #include "linbox/field/modular.h" #include "linbox/blackbox/sparse.h" #include "linbox/solutions/minpoly.h" using namespace LinBox; using namespace std; int main (int argc, char **argv) { commentator().setMaxDetailLevel (-1); commentator().setMaxDepth (-1); commentator().setReportStream (std::cerr); int a = argc; while(a--){ cerr << "argv[" << a << "] = " << argv[a] << endl; } if (argc < 2) { cerr << "Usage: minpoly [

    ]" << endl; return -1; } ifstream input (argv[1]); if (!input) { cerr << "Error opening matrix file " << argv[1] << endl; return -1; } if (argc != 3) { int process = 0; Method::Blackbox M; #ifdef __LINBOX_HAVE_MPI Communicator C(&argc, &argv); process = C.rank(); M.communicatorp(&C); #endif PID_integer ZZ; SparseMatrix A (ZZ); A.read (input); if(process == 0) cout << "A is " << A.rowdim() << " by " << A.coldim() << endl; vector m_A; minpoly (m_A, A, M); if(process == 0){ cout << "Minimal Polynomial is "; printPolynomial (ZZ, m_A); } // minpoly (m_A, A, Method::BlasElimination() ); // if(process == 0){ // cout << "Minimal Polynomial is "; // printPolynomial (ZZ, m_A); // } } else{ typedef Modular Field; double q = atof(argv[2]); Field F(q); SparseMatrix B (F); B.read (input); cout << "B is " << B.rowdim() << " by " << B.coldim() << endl; vector m_B; minpoly (m_B, B); cout << "Minimal Polynomial is "; printPolynomial (F, m_B); // minpoly (m_A, A, Method::BlasElimination() ); // cout << "Minimal Polynomial is "; // printPolynomial (F, m_B); } return 0; } // vim:sts=8:sw=8:ts=8:noet:sr:cino=>s,f0,{0,g0,(0,:0,t0,+0,=s // Local Variables: // mode: C++ // tab-width: 8 // indent-tabs-mode: nil // c-basic-offset: 8 // End: linbox-1.3.2/examples/rank.C000066400000000000000000000072431176453053400157030ustar00rootroot00000000000000/* * examples/rank.C * * Copyright (C) 2005, 2010 D. Saunders, J-G Dumas * * ========LICENCE======== * This file is part of the library LinBox. * * LinBox is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ========LICENCE======== */ /**\file examples/rank.C * @example examples/rank.C \brief Rank of sparse matrix over Z or Zp. \ingroup examples */ #include #include #include "linbox/field/modular.h" #include "linbox/field/gf2.h" #include "linbox/blackbox/sparse.h" #include "linbox/blackbox/zero-one.h" #include "linbox/solutions/rank.h" #include "linbox/util/matrix-stream.h" #include "linbox/field/givaro.h" using namespace LinBox; /// rank or rank mod p int main (int argc, char **argv) { commentator().setMaxDetailLevel (-1); commentator().setMaxDepth (-1); commentator().setReportStream (std::cerr); if (argc < 2 || argc > 3) { std::cerr << "Usage: rank [

    ]" << std::endl; return -1; } std::ifstream input (argv[1]); if (!input) { std::cerr << "Error opening matrix file: " << argv[1] << std::endl; return -1; } long unsigned int r; if (argc == 2) { // rank over the rational numbers. /* We could pick a random prime and work mod that prime, But * the point here is that the rank function in solutions/ * handles that issue. Our matrix here is an integer or * rational matrix and our concept is that we are getting the * rank of that matrix by some blackbox magic inside linbox. */ LinBox::GivaroRational ZZ; MatrixStream ms( ZZ, input ); SparseMatrix A ( ms ); std::cout << "A is " << A.rowdim() << " by " << A.coldim() << std::endl; LinBox::rank (r, A); } if (argc == 3) { // rank mod a prime /* //for prime greater than wordsize: stringstream qstr(argv[2]); integer q; qstr >> q; typedef Modular Field; */ /* //to use doubles, prime < 2^{23} double q = atof(argv[2]); typedef Modular Field; */ //to use ints, prime < 2^{31} int32_t q = atoi(argv[2]); typedef Modular Field; Field F(q); MatrixStream ms( F, input ); SparseMatrix::SparseSeq > B (ms); std::cout << "B is " << B.rowdim() << " by " << B.coldim() << std::endl; if (B.rowdim() <= 20 && B.coldim() <= 20) B.write(std::cout) << std::endl; // Using the adaptive LinBox Solution LinBox::rank(r,B); // using BlackBoxes #if 0 /* too bad */ Method::Blackbox MBB; MBB.certificate(true); Linbox::rank(r, B, MBB); #endif // using in place Sparse Elimination with linear pivoting #if 0 /* too bad */ Method::SparseElimination SE; SE.strategy(Specifier::PIVOT_LINEAR); rankin (r, B, SE); if (B.rowdim() <= 20 && B.coldim() <= 20) B.write(std::cout) << std::endl; #endif } std::cout << "Rank is " << r << std::endl; return 0; } // vim:sts=8:sw=8:ts=8:noet:sr:cino=>s,f0,{0,g0,(0,\:0,t0,+0,=s // Local Variables: // mode: C++ // tab-width: 8 // indent-tabs-mode: nil // c-basic-offset: 8 // End: linbox-1.3.2/examples/smith.C000066400000000000000000000356401176453053400160760ustar00rootroot00000000000000/* * examples/smith.C * * Copyright (C) 2005, 2010 D. Saunders, Z. Wang, J-G Dumas * ========LICENCE======== * This file is part of the library LinBox. * * LinBox is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ========LICENCE======== */ /** \file examples/smith.C * @example examples/smith.C \brief mod m Smith form by elmination \ingroup examples \author bds & zw Various Smith form algorithms may be used for matrices over the integers or over Z_m. Moduli greater than 2^32 are not supported. Several types of example matrices may be constructed or matrix read from file. Run the program with no arguments for a synopsis of the command line parameters. For the "adaptive" method, the matrix must be over the integers. This is expected to work best for large matrices. For the "2local" method, the computaattion is done mod 2^32. For the "local" method, the modulus must be a prime power. For the "ilio" method, the modulus may be arbitrary composite. If the modulus is a multiple of the integer determinant, the intege Smith form is obtained. Determinant plus ilio may be best for smaller matrices. This example was used during the design process of the adaptive algorithm. */ #include #include #include #include using namespace std; #include "linbox/field/modular.h" #include "linbox/blackbox/sparse.h" #include "linbox/algorithms/smith-form-sparseelim-local.h" #include "linbox/util/timer.h" #include "linbox/field/unparametric.h" #include "linbox/field/local2_32.h" #include "linbox/field/PIR-modular-int32.h" #include "linbox/algorithms/smith-form-local.h" #include "linbox/algorithms/smith-form-iliopoulos.h" #include "linbox/algorithms/smith-form-adaptive.h" using namespace LinBox; // #ifndef BIG template void Mat(BlasMatrix& M, PIR& R, int n, string src, string file, string format); template void distinct (I1 a, I1 b, Lp& c); template void display(I b, I e); int main(int argc, char* argv[]) { typedef PIRModular PIR; if (argc < 5) { cout << "usage: " << argv[0] << " alg m n source format \n" << endl; cout << "alg = `adaptive', `ilio', `local', or `2local', \n" << "m is modulus (ignored by 2local, adaptive), " << "n is matrix order, \n" << "source is `random', `random-rough', `fib', `tref', or a filename \n" << "format is `dense' or `sparse' (if matrix from a file)\n" << "compile with -DBIG if you want big integers used.\n"; return 0; } string algo = argv[1]; int m = atoi(argv[2]); int n = atoi(argv[3]); string src = argv[4]; string file = src; string format = (argc >= 6 ? argv[5] : ""); UserTimer T; if (algo == "adaptive") { typedef PID_integer Ints; Ints Z; BlasMatrix M(Z); Mat(M, Z, n, src, file, format); vector v(n); T.start(); SmithFormAdaptive::smithForm(v, M); T.stop(); list > p; distinct(v.begin(), v.end(), p); cout << "#"; display(p.begin(), p.end()); cout << "# adaptive, Ints, n = " << n << endl; cout << "T" << n << "adaptive" << m << " := "; } else if (algo == "ilio") { PIR R(m); BlasMatrix M(R); Mat(M, R, n, src, file, format); T.start(); SmithFormIliopoulos::smithFormIn (M); T.stop(); typedef list< PIR::Element > List; List L; for (size_t i = 0; i < M.rowdim(); ++i) L.push_back(M[(int)i][i]); list > p; distinct(L.begin(), L.end(), p); cout << "#"; display(p.begin(), p.end()); cout << "# ilio, PIR-Modular-int32_t(" << m << "), n = " << n << endl; cout << "T" << n << "ilio" << m << " := "; } else if (algo == "local") { // m must be a prime power if (format == "sparse" ) { typedef Modular Field; Field F(m); std::ifstream input (argv[4]); if (!input) { std::cerr << "Error opening matrix file: " << argv[1] << std::endl; return -1; } MatrixStream ms( F, input ); SparseMatrix::SparseSeq > B (ms); std::cout << "B is " << B.rowdim() << " by " << B.coldim() << std::endl; if (B.rowdim() <= 20 && B.coldim() <= 20) B.write(std::cout) << std::endl; Integer p(m), im(m); // Should better ask user to give the prime !!! for(unsigned int k = 2; ( ( ! Givaro::probab_prime(p) ) && (p > 1) ); ++k) Givaro::root( p, im, k ); // using Sparse Elimination LinBox::PowerGaussDomain< Field > PGD( F ); std::vector > local; PGD(local, B, m, (int)p); typedef list< Field::Element > List; List L; for ( std::vector >::iterator p_it = local.begin(); p_it != local.end(); ++p_it) { for(size_t i = 0; i < (size_t) p_it->first; ++i) L.push_back((Field::Element)p_it->second); } size_t M = (B.rowdim() > B.coldim() ? B.coldim() : B.rowdim()); for (size_t i = L.size(); i < M; ++i) L.push_back(0); list > pl; distinct(L.begin(), L.end(), pl); std::cout << "#"; //display(local.begin(), local.end()); display(pl.begin(), pl.end()); cout << "# local, PowerGaussDomain(" << M << "), n = " << n << endl; } else { PIR R(m); BlasMatrix M(R); Mat(M, R, n, src, file, format); typedef list< PIR::Element > List; List L; SmithFormLocal SmithForm; T.start(); SmithForm( L, M, R ); T.stop(); list > p; distinct(L.begin(), L.end(), p); cout << "#"; display(p.begin(), p.end()); cout << "# local, PIR-Modular-int32_t(" << m << "), n = " << n << endl; } cout << "T" << n << "local" << m << " := "; } else if (algo == "2local") { Local2_32 R; BlasMatrix M(R); Mat(M, R, n, src, file, format); typedef list< Local2_32::Element > List; List L; SmithFormLocal SmithForm; T.start(); SmithForm( L, M, R ); T.stop(); list > p; distinct(L.begin(), L.end(), p); cout << "#"; display(p.begin(), p.end()); cout << "# 2local, Local2_32, n = " << n << endl; cout << "T" << n << "local2_32 := "; } else { printf ("Unknown algorithms\n"); exit (-1); } T.print(cout); cout << ";" << endl; return 0 ; } template < class Ring > void scramble(BlasMatrix& M) { Ring R = M.field(); int N,n = (int)M.rowdim(); // number of random basic row and col ops. N = n; for (int k = 0; k < N; ++k) { int i = rand()%(int)M.rowdim(); int j = rand()%(int)M.coldim(); if (i == j) continue; // M*i += alpha M*j and Mi* += beta Mj //int a = rand()%2; int a = 0; for (size_t l = 0; l < M.rowdim(); ++l) { if (a) R.subin(M[(int)l][i], M[(int)l][j]); else R.addin(M[(int)l][i], M[(int)l][j]); //K.axpy(c, M.getEntry(l, i), x, M.getEntry(l, j)); //M.setEntry(l, i, c); } //a = rand()%2; for (size_t l = 0; l < M.coldim(); ++l) { if (a) R.subin(M[i][l], M[j][l]); else R.addin(M[i][l], M[j][l]); } } std::ofstream out("matrix", std::ios::out); out << n << " " << n << "\n"; for (int i = 0; i < n; ++ i) { for ( int j = 0; j < n; ++ j) { R. write(out, M[i][j]); out << " "; } out << "\n"; } //} } // This mat will have s, near sqrt(n), distinct invariant factors, // each repeated twice), involving the s primes 101, 103, ... template void RandomRoughMat(BlasMatrix& M, PIR& R, int n) { typename PIR::Element zero; R.init(zero, 0); M.resize(n, n, zero); if (n > 10000) {cerr << "n too big" << endl; exit(-1);} int jth_factor[130] = {2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 503, 509, 521, 523, 541, 547, 557, 563, 569, 571, 577, 587, 593, 599, 601, 607, 613, 617, 619, 631, 641, 643, 647, 653, 659, 661, 673, 677, 683, 691, 701, 709, 719, 727, 733}; for (int j= 0, i = 0 ; i < n; ++j) { typename PIR::Element v; R.init(v, jth_factor[25+j]); for (int k = j ; k > 0 && i < n ; --k) { M[i][i] = v; ++i; if (i < n) {M[i][i] = v; ++i;} } } scramble(M); } // This mat will have the same nontrivial invariant factors as // diag(1,2,3,5,8, ... 999, 0, 1, 2, ...). template void RandomFromDiagMat(BlasMatrix& M, PIR& R, int n) { typename PIR::Element zero; R.init(zero, 0); M.resize(n, n, zero); for (int i= 0 ; i < n; ++i) R.init(M[i][i], i % 1000 + 1); scramble(M); } // This mat will have the same nontrivial invariant factors as // diag(1,2,3,5,8, ... fib(k)), where k is about sqrt(n). // The basic matrix is block diagonal with i-th block of order i and // being a tridiagonal {-1,0,1} matrix whose snf = diag(i-1 1's, fib(i)), // where fib(1) = 1, fib(2) = 2. But note that, depending on n, // the last block may be truncated, thus repeating an earlier fibonacci number. template void RandomFibMat(BlasMatrix& M, PIR& R, int n) { typename PIR::Element zero; R.init(zero, 0); M.resize(n, n, zero); typename PIR::Element one; R.init(one, 1); for (int i= 0 ; i < n; ++i) M[i][i] = one; int j = 1, k = 0; for (int i= 0 ; i < n-1; ++i) { if ( i == k) { M[i][i+1] = zero; k += ++j; } else { M[i][i+1] = one; R.negin(one); } R.neg(M[i+1][i], M[i][i+1]); } scramble(M); } ////////////////////////////////// // special mats tref and krat // Trefethen's challenge #7 mat (primes on diag, 1's on 2^e bands). template void TrefMat(BlasMatrix& M, PIR& R, int n) { typename PIR::Element zero; R.init(zero, 0); M.resize(n, n, zero); std::vector power2; int i = 1; do { power2. push_back(i); i *= 2; } while (i < n); std::ifstream in ("prime", std::ios::in); for ( i = 0; i < n; ++ i) in >> M[i][i]; std::vector::iterator p; for ( i = 0; i < n; ++ i) { for ( p = power2. begin(); (p != power2. end()) && (*p <= i); ++ p) M[i][i - *p] = 1; for ( p = power2. begin(); (p != power2. end()) && (*p < n - i); ++ p) M[i][i + *p] = 1; } } //// end tref /////// begin krat ///////////////////////////// struct pwrlist { vector m; pwrlist(integer q) { m.push_back(1); m.push_back(q); //cout << "pwrlist " << m[0] << " " << m[1] << endl; } integer operator[](int e) { for (int i = (int)m.size(); i <= e; ++i) m.push_back(m[1]*m[i-1]); return m[e]; } }; // Read "1" or "q" or "q^e", for some (small) exponent e. // Return value of the power of q at q = _q. template num& qread(num& Val, pwrlist& M, istream& in) { char c; in >> c; // next nonwhitespace if (c == '0') return Val = 0; if (c == '1') return Val = 1; if (c != 'p' && c != 'q') { cout << "exiting due to unknown char " << c << endl; exit(-1);} in.get(c); if (c !='^') {in.putback(c); return Val = M[1];} else { int expt; in >> expt; return Val = M[expt]; }; } template void KratMat(BlasMatrix& M, PIR& R, int q, istream& in) { pwrlist pwrs(q); for (unsigned int i = 0; i < M.rowdim(); ++ i) for ( unsigned int j = 0; j < M.coldim(); ++ j) { int Val; qread(Val, pwrs, in); R. init (M[i][j], Val); } } ///// end krat //////////////////////////// template void distinct (I1 a, I1 b, Lp& c) { typename I1::value_type e; size_t count = 0; if (a != b) {e = *a; ++a; count = 1;} else return; while (a != b) { if (*a == e) ++count; else { c.push_back(typename Lp::value_type(e, count)); e = *a; count = 1; } ++a; } c.push_back(typename Lp::value_type(e, count)); return; } template void display(I b, I e) { cout << "("; for (I p = b; p != e; ++p) cout << p->first << " " << p->second << ", "; cout << ")" << endl; } /** Output matrix is determined by src which may be: "random-rough" This mat will have s, near sqrt(n), distinct invariant factors, each repeated twice), involving the s primes 101, 103, ... "random" This mat will have the same nontrivial invariant factors as diag(1,2,3,5,8, ... 999, 0, 1, 2, ...). "fib" This mat will have the same nontrivial invariant factors as diag(1,2,3,5,8, ... fib(k)), where k is about sqrt(n). The basic matrix is block diagonal with i-th block of order i and being a tridiagonal {-1,0,1} matrix whose snf = diag(i-1 1's, fib(i)), where fib(1) = 1, fib(2) = 2. But note that, depending on n, the last block may be truncated, thus repeating an earlier fibonacci number. "file" (or any other string) mat read from named file with format "sparse" or "dense". Also "tref" and file with format "kdense" */ template void Mat(BlasMatrix& M, PIR& R, int n, string src, string file, string format) { typename PIR::Element zero; R.init(zero, 0); if (src == "random-rough") RandomRoughMat(M, R, n); else if (src == "random") RandomFromDiagMat(M, R, n); else if (src == "fib") RandomFibMat(M, R, n); else if (src == "tref") TrefMat(M, R, n); else // from file { int rdim, cdim; std::ifstream in (file.c_str(), std::ios::in); if (! in) { cerr << "error: unable to open file" << endl; exit(-1); } in >> rdim >> cdim; M. resize (rdim, cdim); integer Val; if (format == "dense" ) { for (int i = 0; i < rdim; ++ i) for ( int j = 0; j < cdim; ++ j) { in >> Val; R. init (M[i][j], Val); } } else if (format == "sparse") { int i, j; char mark; in >> mark; LinBox::integer val; do { in >> i >> j; in. ignore (1); in >> val; if ( i == 0) break; R. init (M[i-1][j-1], val); } while (true); } //Krattenthaler's q^e matrices, given by exponent else if (format == "kdense") KratMat(M, R, n, in); else { cout << "Format: " << format << " Unknown\n"; exit (-1); } } /*show some entries for (int k = 0; k < 10; ++k) cout << M.getEntry(0,k) << " " << M.getEntry(M.rowdim()-1, M.coldim()-1 - k) << endl; cout << endl << M.rowdim() << " " << M.coldim() << endl; */ /* some row ops and some col ops */ } // Mat //@} // vim:sts=8:sw=8:ts=8:noet:sr:cino=>s,f0,{0,g0,(0,:0,t0,+0,=s // Local Variables: // mode: C++ // tab-width: 8 // indent-tabs-mode: nil // c-basic-offset: 8 // End: linbox-1.3.2/examples/smithvalence.C000066400000000000000000000141661176453053400174340ustar00rootroot00000000000000/* * examples/smithvalence.C * * Copyright (C) 2010 J-G Dumas * ========LICENCE======== * This file is part of the library LinBox. * * LinBox is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ========LICENCE======== */ /**\file examples/smithvalence.C * @example examples/smithvalence.C \brief Valence of sparse matrix over Z or Zp. \ingroup examples */ //#include "linbox-config.h" #include #include "smithvalence.h" using namespace LinBox; int main (int argc, char **argv) { // commentator().setMaxDetailLevel (-1); // commentator().setMaxDepth (-1); // commentator().setReportStream (std::cerr); if (argc < 2 || argc > 4) { std::cerr << "Usage: valence [-ata|-aat|valence] [coprime]" << std::endl; return -1; } std::ifstream input (argv[1]); if (!input) { std::cerr << "Error opening matrix file " << argv[1] << std::endl; return -1; } PID_integer ZZ; MatrixStream< PID_integer > ms( ZZ, input ); typedef SparseMatrix Blackbox; Blackbox A (ms); input.close(); std::cout << "A is " << A.rowdim() << " by " << A.coldim() << std::endl; PID_integer::Element val_A; Givaro::Timer chrono; chrono.start(); if (argc >= 3) { Transpose T(&A); if (strcmp(argv[2],"-ata") == 0) { Compose< Transpose, Blackbox > C (&T, &A); std::cout << "A^T A is " << C.rowdim() << " by " << C.coldim() << std::endl; valence(val_A, C); } else if (strcmp(argv[2],"-aat") == 0) { Compose< Blackbox, Transpose > C (&A, &T); std::cout << "A A^T is " << C.rowdim() << " by " << C.coldim() << std::endl; valence(val_A, C); } else { std::cout << "Suppose primes are contained in " << argv[2] << std::endl; val_A = integer(argv[2]); } } else { if (A.rowdim() != A.coldim()) { std::cerr << "Valence works only on square matrices, try either to change the dimension in the matrix file, or to compute the valence of A A^T or A^T A, via the -aat or -ata options." << std::endl; exit(0); } else valence (val_A, A); } std::cout << "Valence is " << val_A << std::endl; std::vector Moduli; std::vector exponents; Givaro::IntFactorDom<> FTD; typedef std::pair PairIntRk; std::vector< PairIntRk > smith; integer coprimeV=2; if (argc >= 4) { coprimeV = integer(argv[3]); } while ( gcd(val_A,coprimeV) > 1 ) { FTD.nextprimein(coprimeV); } if (argc >= 4) { std::cout << "Suppose " << argv[3] << " is coprime with Smith form" << std::endl; } std::cout << "integer rank: " << std::endl; unsigned long coprimeR; LRank(coprimeR, argv[1], coprimeV); smith.push_back(PairIntRk(coprimeV, coprimeR)); // std::cerr << "Rank mod " << coprimeV << " is " << coprimeR << std::endl; std::cout << "Some factors (5000 factoring loop bound): "; FTD.set(Moduli, exponents, val_A, 5000); std::vector::const_iterator eit=exponents.begin(); for(std::vector::const_iterator mit=Moduli.begin(); mit != Moduli.end(); ++mit,++eit) std::cout << *mit << '^' << *eit << ' '; std::cout << std::endl; std::vector SmithDiagonal(coprimeR,integer(1)); for(std::vector::const_iterator mit=Moduli.begin(); mit != Moduli.end(); ++mit) { unsigned long r; LRank(r, argv[1], *mit); // std::cerr << "Rank mod " << *mit << " is " << r << std::endl; smith.push_back(PairIntRk(*mit, r)); for(size_t i=r; i < coprimeR; ++i) SmithDiagonal[i] *= *mit; } eit=exponents.begin(); std::vector::const_iterator sit=smith.begin(); for( ++sit; sit != smith.end(); ++sit, ++eit) { if (sit->second != coprimeR) { std::vector ranks; ranks.push_back(sit->second); size_t effexp; if (*eit > 1) { PRank(ranks, effexp, argv[1], sit->first, *eit, coprimeR); } else { PRank(ranks, effexp, argv[1], sit->first, 2, coprimeR); } if (ranks.size() == 1) ranks.push_back(coprimeR); if (effexp < *eit) { for(size_t expo = effexp<<1; ranks.back() < coprimeR; expo<<=1) { PRankInteger(ranks, argv[1], sit->first, expo, coprimeR); } } else { for(size_t expo = (*eit)<<1; ranks.back() < coprimeR; expo<<=1) { PRank(ranks, effexp, argv[1], sit->first, expo, coprimeR); if (ranks.size() < expo) { std::cerr << "It seems we need a larger prime power, it will take longer ..." << std::endl; // break; PRankInteger(ranks, argv[1], sit->first, expo, coprimeR); } } } std::vector::const_iterator rit=ranks.begin(); // unsigned long modrank = *rit; for(++rit; rit!= ranks.end(); ++rit) { if ((*rit)>= coprimeR) break; for(size_t i=(*rit); i < coprimeR; ++i) SmithDiagonal[i] *= sit->first; // modrank = *rit; } } } integer si=1; size_t num=0; for( std::vector::const_iterator dit=SmithDiagonal.begin(); dit != SmithDiagonal.end(); ++dit) { if (*dit == si) ++num; else { std::cerr << '[' << si << ',' << num << "] "; num=1; si = *dit; } } std::cerr << '[' << si << ',' << num << "] " << std::endl; chrono.stop(); std::cerr << chrono << std::endl; return 0; } // vim:sts=8:sw=8:ts=8:noet:sr:cino=>s,f0,{0,g0,(0,:0,t0,+0,=s // Local Variables: // mode: C++ // tab-width: 8 // indent-tabs-mode: nil // c-basic-offset: 8 // End: linbox-1.3.2/examples/smithvalence.h000066400000000000000000000202511176453053400174710ustar00rootroot00000000000000/* * examples/smithvalence.h * Copyright (c) Linbox * ========LICENCE======== * This file is part of the library LinBox. * * LinBox is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ========LICENCE======== */ /**\file examples/smithvalence.h * @example examples/smithvalence.h \brief Valence of sparse matrix over Z or Zp. \ingroup examples */ #include #include "linbox/field/gf2.h" #include "linbox/field/modular.h" #include "linbox/field/givaro.h" #include "linbox/field/field-traits.h" #include "linbox/blackbox/transpose.h" #include "linbox/blackbox/compose.h" #include "linbox/blackbox/sparse.h" #include "linbox/solutions/rank.h" #include "linbox/solutions/valence.h" #include "linbox/algorithms/smith-form-sparseelim-local.h" #include "linbox/util/matrix-stream.h" #include "linbox/util/timer.h" template unsigned long& TempLRank(unsigned long& r, char * filename, const Field& F) { std::ifstream input(filename); LinBox::MatrixStream< Field > msf( F, input ); LinBox::SparseMatrix::SparseSeq> FA(msf); input.close(); LinBox::Timer tim; tim.start(); LinBox::rankin(r, FA); tim.stop(); F.write(std::cerr << "Rank over ") << " is " << r << ' ' << tim << std::endl; return r; } unsigned long& TempLRank(unsigned long& r, char * filename, const LinBox::GF2& F2) { std::ifstream input(filename); LinBox::ZeroOne A; A.read(input); input.close(); LinBox::Timer tim; tim.start(); LinBox::rankin(r, A, LinBox::Method::SparseElimination() ); tim.stop(); F2.write(std::cerr << "Rank over ") << " is " << r << ' ' << tim << std::endl; return r; } unsigned long& LRank(unsigned long& r, char * filename,Givaro::Integer p) { Givaro::Integer maxmod16; LinBox::FieldTraits >::maxModulus(maxmod16); Givaro::Integer maxmod32; LinBox::FieldTraits >::maxModulus(maxmod32); Givaro::Integer maxmod53; LinBox::FieldTraits >::maxModulus(maxmod53); Givaro::Integer maxmod64; LinBox::FieldTraits >::maxModulus(maxmod64); if (p == 2) { LinBox::GF2 F2; return TempLRank(r, filename, F2); } else if (p <= maxmod16) { typedef LinBox::GivaroZpz Field; Field F(p); return TempLRank(r, filename, F); } else if (p <= maxmod32) { typedef LinBox::GivaroZpz Field; Field F(p); return TempLRank(r, filename, F); } else if (p <= maxmod53) { typedef LinBox::Modular Field; Field F(p); return TempLRank(r, filename, F); } else if (p <= maxmod64) { typedef LinBox::GivaroZpz Field; Field F(p); return TempLRank(r, filename, F); } else { typedef LinBox::GivaroZpz Field; Field F(p); return TempLRank(r, filename, F); } return r; } std::vector& PRank(std::vector& ranks, size_t& effective_exponent, char * filename,Givaro::Integer p, size_t e, size_t intr) { effective_exponent = e; Givaro::Integer maxmod; LinBox::FieldTraits >::maxModulus(maxmod); if (p <= maxmod) { typedef LinBox::GivaroZpz Ring; int64_t lp(p); Givaro::Integer q = pow(p,e); int64_t lq(q); if (q >Givaro::Integer(lq)) { std::cerr << "Power rank might need extra large composite (" << p << '^' << e << ")." << std::endl; // << "Such a large composite is not yet implemented ..." << std::endl; q = p; lq = (int64_t)q; for(effective_exponent=1; q == Givaro::Integer(lq); ++effective_exponent) { q *= p; lq = (int64_t)q; } q/=p; --effective_exponent; lq = (int64_t)q; std::cerr << "First trying: " << lq << " (=" << p << '^' << effective_exponent << ", without further warning this will be sufficient)." << std::endl; } Ring F(lq); std::ifstream input(filename); LinBox::MatrixStream ms( F, input ); LinBox::SparseMatrix::SparseSeq > A (ms); input.close(); LinBox::PowerGaussDomain< Ring > PGD( F ); LinBox::Timer tim; tim.clear(); tim.start(); PGD.prime_power_rankin( lq, lp, ranks, A, A.rowdim(), A.coldim(), std::vector()); tim.stop(); F.write(std::cerr << "Ranks over ") << " are " ; for(std::vector::const_iterator rit=ranks.begin(); rit != ranks.end(); ++rit) std::cerr << *rit << ' '; std::cerr << ' ' << tim << std::endl; } else { std::cerr << "*** WARNING *** Sorry power rank mod large composite not yet implemented" << std::endl; std::cerr << "*** WARNING *** Assuming integer rank, extra factors in the Smith form could be missing" << std::endl; ranks.resize(0); ranks.push_back(intr); } return ranks; } #include "linbox/algorithms/smith-form-sparseelim-poweroftwo.h" std::vector& PRankPowerOfTwo(std::vector& ranks, size_t& effective_exponent, char * filename, size_t e, size_t intr) { effective_exponent = e; typedef uint64_t RingElements; if (e > 63) { std::cerr << "Power rank power of two might need extra large composite (2^" << e << ")." << std::endl; std::cerr << "First trying: 63, without further warning this will be sufficient)." << std::endl; effective_exponent = 63; } std::ifstream input(filename); typedef LinBox::UnparametricField Ring; Ring F; LinBox::MatrixStream ms( F, input ); LinBox::SparseMatrix::SparseSeq > A (ms); input.close(); LinBox::PowerGaussDomainPowerOfTwo< uint64_t > PGD; LinBox::Timer tim; tim.clear(); tim.start(); PGD.prime_power_rankin( effective_exponent, ranks, A, A.rowdim(), A.coldim(), std::vector()); tim.stop(); std::cerr << "Ranks over 2^" << effective_exponent << " are " ; for(std::vector::const_iterator rit=ranks.begin(); rit != ranks.end(); ++rit) std::cerr << *rit << ' '; std::cerr << ' ' << tim << std::endl; return ranks; } std::vector& PRankInteger(std::vector& ranks, char * filename,Givaro::Integer p, size_t e, size_t intr) { typedef LinBox::GivaroZpz Ring; Givaro::Integer q = pow(p,e); Ring F(q); std::ifstream input(filename); LinBox::MatrixStream ms( F, input ); LinBox::SparseMatrix::SparseSeq > A (ms); input.close(); LinBox::PowerGaussDomain< Ring > PGD( F ); LinBox::Timer tim; tim.clear(); tim.start(); PGD.prime_power_rankin( q, p, ranks, A, A.rowdim(), A.coldim(), std::vector()); tim.stop(); F.write(std::cerr << "Ranks over ") << " are " ; for(std::vector::const_iterator rit=ranks.begin(); rit != ranks.end(); ++rit) std::cerr << *rit << ' '; std::cerr << ' ' << tim << std::endl; return ranks; } std::vector& PRankIntegerPowerOfTwo(std::vector& ranks, char * filename, size_t e, size_t intr) { typedef LinBox::PID_integer Ring; Ring ZZ; std::ifstream input(filename); LinBox::MatrixStream ms( ZZ, input ); LinBox::SparseMatrix::SparseSeq > A (ms); input.close(); LinBox::PowerGaussDomainPowerOfTwo< Givaro::Integer > PGD; LinBox::Timer tim; tim.clear(); tim.start(); PGD.prime_power_rankin( e, ranks, A, A.rowdim(), A.coldim(), std::vector()); tim.stop(); std::cerr << "Ranks over 2^" << e << " are " ; for(std::vector::const_iterator rit=ranks.begin(); rit != ranks.end(); ++rit) std::cerr << *rit << ' '; std::cerr << ' ' << tim << std::endl; return ranks; } linbox-1.3.2/examples/solve.C000066400000000000000000000210551176453053400160750ustar00rootroot00000000000000/* * examples/solve.C * * Copyright (C) 2005, 2010 J-G Dumas, D. Saunders, P. Giorgi * ========LICENCE======== * This file is part of the library LinBox. * * LinBox is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ========LICENCE======== */ /** @file examples/solve.C * @ingroup examples * @brief Blackbox solvers. * @warning some are commented out... * @example examples/solve.C */ #include #include "linbox/field/modular.h" #include "linbox/blackbox/sparse.h" #include "linbox/solutions/solve.h" #include "linbox/util/matrix-stream.h" #include "linbox/solutions/methods.h" using namespace LinBox; using namespace std; int main (int argc, char **argv) { commentator().setMaxDetailLevel (-1); commentator().setMaxDepth (-1); commentator().setReportStream (std::cerr); if (argc < 2 || argc > 4) { cerr << "Usage: solve [] [

    ]" << endl; return 0; } srand48( BaseTimer::seed() ); std::ifstream input (argv[1]); if (!input) { cerr << "Error opening matrix file " << argv[1] << endl; return -1; } std::ifstream invect; bool createB = false; int ModComp = 0; if (argc == 2) { createB = true; ModComp = 0; } if (argc == 3) { invect.open (argv[2], std::ifstream::in); if (!invect) { createB = true; ModComp = 2; } else { createB = false; ModComp = 0; } } if (argc == 4) { ModComp = 3; invect.open (argv[2], std::ifstream::in); if (!invect) { createB = true; } else createB = false; } if (ModComp) { typedef Modular Field; double q = atof(argv[ModComp]); Field F(q); MatrixStream< Field > ms ( F, input ); SparseMatrix A (ms); // A.write(std::cout); cout << "A is " << A.rowdim() << " by " << A.coldim() << endl; std::vector X( A.coldim()),B(A.rowdim()); if (createB) { cerr << "Creating a random {-1,1} vector " << endl; std::vector U( A.coldim() ); for(std::vector::iterator it=U.begin(); it != U.end(); ++it) if (drand48() <0.5) F.init(*it,-1); else F.init(*it,1); A.apply(B,U); } else { for(std::vector::iterator it=B.begin(); it != B.end(); ++it) invect >> *it; } // A.write(std::cout << "A: ") << std::endl; std::cout << "B is ["; for(std::vector::const_iterator it=B.begin();it != B.end(); ++it) F.write(cout, *it) << " "; std::cout << "]" << std::endl; Timer chrono; // Sparse Elimination std::cout << "Sparse Elimination" << std::endl; chrono.clear(); chrono.start(); solve (X, A, B, Method::SparseElimination()); chrono.stop(); std::cout << "(Sparse Gauss) Solution is ["; for(std::vector::const_iterator it=X.begin();it != X.end(); ++it) F.write(cout, *it) << " "; std::cout << "]" << std::endl; std::cout << "CPU time (seconds): " << chrono.usertime() << std::endl<::const_iterator it=X.begin();it != X.end(); ++it) F.write(cout, *it) << " "; std::cout << "]" << std::endl; std::cout << "CPU time (seconds): " << chrono.usertime() << std::endl<< std::endl; // Wiedemann std::cout << "Blackbox" << std::endl; chrono.clear(); chrono.start(); solve (X, A, B, Method::Blackbox()); chrono.stop(); std::cout << "(Wiedemann) Solution is ["; for(std::vector::const_iterator it=X.begin();it != X.end(); ++it) F.write(cout, *it) << " "; std::cout << "]" << std::endl; std::cout << "CPU time (seconds): " << chrono.usertime() << std::endl<::const_iterator it=X.begin();it != X.end(); ++it) F.write(cout, *it) << " "; std::cout << "]" << std::endl; std::cout << "CPU time (seconds): " << chrono.usertime() << std::endl<< std::endl; // Block Lanczos std::cout << "Block Lanczos" << std::endl; Method::BlockLanczos MBL; MBL.preconditioner(Specifier::FULL_DIAGONAL); chrono.clear(); chrono.start(); solve (X, A, B, MBL); chrono.stop(); std::cout << "(Block Lanczos) Solution is ["; for(std::vector::const_iterator it=X.begin();it != X.end(); ++it) F.write(cout, *it) << " "; std::cout << "]" << std::endl; std::cout << "CPU time (seconds): " << chrono.usertime() << std::endl<< std::endl; #endif } else { PID_integer ZZ; MatrixStream< PID_integer > ms( ZZ, input ); SparseMatrix A (ms); PID_integer::Element d; std::cout << "A is " << A.rowdim() << " by " << A.coldim() << std::endl; std::vector X( A.coldim()),B(A.rowdim()); if (createB) { cerr << "Creating a random {-1,1} vector " << endl; for(std::vector::iterator it=B.begin(); it != B.end(); ++it) if (drand48() <0.5) *it = -1; else *it = 1; } else { for(std::vector::iterator it=B.begin(); it != B.end(); ++it) invect >> *it; } std::cout << "B is ["; for(std::vector::const_iterator it=B.begin(); it != B.end(); ++it) ZZ.write(cout, *it) << " "; std::cout << "]" << std::endl; Timer chrono; // Wiedemann std::cout << "Wiedemann" << std::endl; chrono.start(); solve (X, d, A, B, Method::Wiedemann()); chrono.stop(); std::cout << "(Wiedemann) Solution is ["; for(std::vector::const_iterator it=X.begin();it != X.end(); ++it) ZZ.write(cout, *it) << " "; std::cout << "] / "; ZZ.write(std::cout, d) << std::endl; std::cout << "CPU time (seconds): " << chrono.usertime() << std::endl; // BlasElimination std::cout << "BlasElimination" << std::endl; chrono.start(); solve (X, d, A, B, Method::BlasElimination()); chrono.stop(); std::cout << "(BlasElimination) Solution is ["; for(std::vector::const_iterator it=X.begin();it != X.end(); ++it) ZZ.write(cout, *it) << " "; std::cout << "] / "; ZZ.write(std::cout, d)<< std::endl; std::cout << "CPU time (seconds): " << chrono.usertime() << std::endl; // Sparse Elimination std::cout << "Sparse Elimination" << std::endl; chrono.start(); solve (X, d, A, B, Method::SparseElimination()); chrono.stop(); std::cout << "(SparseElimination) Solution is ["; for(std::vector::const_iterator it=X.begin();it != X.end(); ++it) ZZ.write(cout, *it) << " "; std::cout << "] / "; ZZ.write(std::cout, d)<< std::endl; std::cout << "CPU time (seconds): " << chrono.usertime() << std::endl; #if 0 // Lanczos std::cout << "Lanczos" << std::endl; chrono.start(); solve (X, d, A, B, Method::Lanczos()); chrono.stop(); std::cout << "(Lanczos) Solution is ["; for(std::vector::const_iterator it=X.begin();it != X.end(); ++it) ZZ.write(cout, *it) << " "; std::cout << "] / "; ZZ.write(std::cout, d) << std::endl; std::cout << "CPU time (seconds): " << chrono.usertime() << std::endl; // Block Lanczos std::cout << "Block Lanczos" << std::endl; chrono.clear(); chrono.start(); solve (X, d, A, B, Method::BlockLanczos()); chrono.stop(); std::cout << "(Block Lanczos) Solution is ["; for(std::vector::const_iterator it=X.begin();it != X.end(); ++it) ZZ.write(cout, *it) << " "; std::cout << "] / "; ZZ.write(std::cout, d) << std::endl; std::cout << "CPU time (seconds): " << chrono.usertime() << std::endl; #endif } return 0; } // vim:sts=8:sw=8:ts=8:noet:sr:cino=>s,f0,{0,g0,(0,:0,t0,+0,=s // Local Variables: // mode: C++ // tab-width: 8 // indent-tabs-mode: nil // c-basic-offset: 8 // End: linbox-1.3.2/examples/sparseelimdet.C000066400000000000000000000062371176453053400176130ustar00rootroot00000000000000/* * examples/sparseelimdet.C * * Copyright (C) 2006, 2010 J-G Dumas * ========LICENCE======== * This file is part of the library LinBox. * * LinBox is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ========LICENCE======== */ /** \file examples/sparseelimdet.C * @example examples/sparseelimdet.C \brief Gaussian elimination determinant of sparse matrix over Z or Zp. \ingroup examples */ //#include "linbox-config.h" #include #include #include #include "linbox/field/modular.h" #include "linbox/field/gf2.h" #include "linbox/blackbox/sparse.h" #include "linbox/blackbox/zero-one.h" #include "linbox/solutions/rank.h" #include "linbox/solutions/det.h" #include "linbox/util/matrix-stream.h" using namespace LinBox; using namespace std; int main (int argc, char **argv) { commentator().setMaxDetailLevel (-1); commentator().setMaxDepth (-1); commentator().setReportStream (std::cerr); if (argc < 2 || argc > 3) { cerr << "Usage: sparseelimdet [

    ]" << endl; return -1; } ifstream input (argv[1]); if (!input) { cerr << "Error opening matrix file: " << argv[1] << endl; return -1; } Method::SparseElimination SE; if (argc == 2) { // determinant over the integers. PID_integer ZZ; PID_integer::Element d; MatrixStream ms( ZZ, input ); SparseMatrix::SparseSeq > A ( ms ); cout << "A is " << A.rowdim() << " by " << A.coldim() << endl; SE.strategy(Specifier::PIVOT_LINEAR); det (d, A, SE); ZZ.write(cout << "Determinant is ", d) << endl; } if (argc == 3) { double q = atof(argv[2]); typedef Modular Field; Field::Element d; Field F(q); MatrixStream ms( F, input ); SparseMatrix::SparseSeq > B (ms); cout << "B is " << B.rowdim() << " by " << B.coldim() << endl; if (B.rowdim() <= 20 && B.coldim() <= 20) B.write(cout) << endl; SE.strategy(Specifier::PIVOT_NONE); // using Sparse Elimination det (d, B, SE); if (B.rowdim() <= 20 && B.coldim() <= 20) B.write(cout) << endl; F.write(cout << "Determinant is ", d) << endl; SE.strategy(Specifier::PIVOT_LINEAR); // using Sparse Elimination with reordering detin (d, B, SE); if (B.rowdim() <= 20 && B.coldim() <= 20) B.write(cout) << endl; F.write(cout << "Determinant is ", d) << endl; } return 0; } // vim:sts=8:sw=8:ts=8:noet:sr:cino=>s,f0,{0,g0,(0,:0,t0,+0,=s // Local Variables: // mode: C++ // tab-width: 8 // indent-tabs-mode: nil // c-basic-offset: 8 // End: linbox-1.3.2/examples/sparseelimrank.C000066400000000000000000000065371176453053400177750ustar00rootroot00000000000000/* * examples/sparseelimrank.C * * Copyright (C) 2006, 2010 J-G Dumas * ========LICENCE======== * This file is part of the library LinBox. * * LinBox is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ========LICENCE======== */ /** \file examples/sparseelimrank.C * @example examples/sparseelimrank.C \brief Gaussian elimination Rank of sparse matrix over Z or Zp. \ingroup examples */ //#include "linbox-config.h" #include #include #include #include "linbox/field/modular.h" #include "linbox/field/gf2.h" #include "linbox/blackbox/sparse.h" #include "linbox/blackbox/zero-one.h" #include "linbox/solutions/rank.h" #include "linbox/util/matrix-stream.h" #include "linbox/field/givaro.h" using namespace LinBox; using namespace std; int main (int argc, char **argv) { commentator().setMaxDetailLevel (-1); commentator().setMaxDepth (-1); commentator().setReportStream (std::cerr); if (argc < 2 || argc > 3) { cerr << "Usage: rank [

    ]" << endl; return -1; } ifstream input (argv[1]); if (!input) { cerr << "Error opening matrix file: " << argv[1] << endl; return -1; } long unsigned int r; if (argc == 2) { // rank over the integers. /* We could pick a random prime and work mod that prime, But the point here is that the rank function in solutions/ handles that issue. Our matrix here is an integer matrix and our concept is that we are getting the rank of that matrix by some blackbox magic inside linbox. */ LinBox::GivaroRational ZZ; MatrixStream ms( ZZ, input ); SparseMatrix A ( ms ); cout << "A is " << A.rowdim() << " by " << A.coldim() << endl; LinBox::rank (r, A, Method::SparseElimination() ); cout << "Rank is " << r << endl; } if (argc == 3) { double q = atof(argv[2]); typedef Modular Field; Field F(q); MatrixStream ms( F, input ); SparseMatrix::SparseSeq > B (ms); cout << "B is " << B.rowdim() << " by " << B.coldim() << endl; if (B.rowdim() <= 20 && B.coldim() <= 20) B.write(cout) << endl; Method::SparseElimination SE; SE.strategy(Specifier::PIVOT_NONE); // using Sparse Elimination LinBox::rank (r, B, SE); if (B.rowdim() <= 20 && B.coldim() <= 20) B.write(cout) << endl; cout << "Rank is " << r << endl; SE.strategy(Specifier::PIVOT_LINEAR); // using Sparse Elimination LinBox::rank (r, B, SE); if (B.rowdim() <= 20 && B.coldim() <= 20) B.write(cout) << endl; cout << "Rank is " << r << endl; } return 0; } // vim:sts=8:sw=8:ts=8:noet:sr:cino=>s,f0,{0,g0,(0,:0,t0,+0,=s // Local Variables: // mode: C++ // tab-width: 8 // indent-tabs-mode: nil // c-basic-offset: 8 // End: linbox-1.3.2/examples/valence.C000066400000000000000000000055711176453053400163670ustar00rootroot00000000000000/* * examples/valence.C * * Copyright (C) 2005, 2010 J-G Dumas * ========LICENCE======== * This file is part of the library LinBox. * * LinBox is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ========LICENCE======== */ /**\file examples/valence.C * \brief Valence of sparse matrix over Z or Zp. * \ingroup examples * @example examples/valence.C */ //#include "linbox-config.h" #include #include "linbox/field/modular.h" #include "linbox/blackbox/transpose.h" #include "linbox/blackbox/compose.h" #include "linbox/blackbox/sparse.h" #include "linbox/solutions/valence.h" #include "linbox/util/matrix-stream.h" using namespace LinBox; int main (int argc, char **argv) { commentator().setMaxDetailLevel (-1); commentator().setMaxDepth (-1); commentator().setReportStream (std::cerr); if (argc < 2 || argc > 3) { std::cerr << "Usage: valence [-ata|-aat]" << std::endl; return -1; } std::ifstream input (argv[1]); if (!input) { std::cerr << "Error opening matrix file " << argv[1] << std::endl; return -1; } PID_integer ZZ; MatrixStream< PID_integer > ms( ZZ, input ); typedef SparseMatrix Blackbox; Blackbox A (ms); std::cout << "A is " << A.rowdim() << " by " << A.coldim() << std::endl; PID_integer::Element val_A; if (argc == 3) { Transpose T(&A); if (strcmp(argv[2],"-aat")) { Compose< Transpose, Blackbox > C (&T, &A); std::cout << "A^T A is " << C.rowdim() << " by " << C.coldim() << std::endl; valence(val_A, C); } else { Compose< Blackbox, Transpose > C (&A, &T); std::cout << "A A^T is " << C.rowdim() << " by " << C.coldim() << std::endl; valence(val_A, C); } } else { if (A.rowdim() != A.coldim()) { std::cerr << "Valence works only on square matrices, try either to change the dimension in the matrix file, or to compute the valence of A A^T or A^T A, via the -aat or -ata options." << std::endl; exit(0); } else valence (val_A, A); } std::cout << "Valence is " << val_A << std::endl; return 0; } // vim:sts=8:sw=8:ts=8:noet:sr:cino=>s,f0,{0,g0,(0,:0,t0,+0,=s // Local Variables: // mode: C++ // tab-width: 8 // indent-tabs-mode: nil // c-basic-offset: 8 // End: linbox-1.3.2/interfaces/000077500000000000000000000000001176453053400151435ustar00rootroot00000000000000linbox-1.3.2/interfaces/Makefile.am000066400000000000000000000016001176453053400171740ustar00rootroot00000000000000# Copyright (c) 2010 the LinBox group # ========LICENCE======== # This file is part of the library LinBox. # # LinBox is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # # This library 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 # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # ========LICENCE======== SUBDIRS=driver kaapi maple sage linbox-1.3.2/interfaces/Makefile.in000066400000000000000000000477661176453053400172340ustar00rootroot00000000000000# Makefile.in generated by automake 1.11.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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@ # Copyright (c) 2010 the LinBox group # ========LICENCE======== # This file is part of the library LinBox. # # LinBox is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # # This library 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 # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # ========LICENCE======== VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd 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 = : build_triplet = @build@ host_triplet = @host@ subdir = interfaces DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/macros/aclocal-include.m4 \ $(top_srcdir)/macros/config-header.m4 \ $(top_srcdir)/macros/debug.m4 \ $(top_srcdir)/macros/expat-check.m4 \ $(top_srcdir)/macros/fflas-ffpack-check.m4 \ $(top_srcdir)/macros/fplll-check.m4 \ $(top_srcdir)/macros/givaro-check.m4 \ $(top_srcdir)/macros/gmp-check.m4 \ $(top_srcdir)/macros/iml-check.m4 \ $(top_srcdir)/macros/lapack-check.m4 \ $(top_srcdir)/macros/libtool.m4 \ $(top_srcdir)/macros/lidia-check.m4 \ $(top_srcdir)/macros/linbox-benchmark.m4 \ $(top_srcdir)/macros/linbox-doc.m4 \ $(top_srcdir)/macros/linbox-misc.m4 \ $(top_srcdir)/macros/linbox-opt.m4 \ $(top_srcdir)/macros/ltoptions.m4 \ $(top_srcdir)/macros/ltsugar.m4 \ $(top_srcdir)/macros/ltversion.m4 \ $(top_srcdir)/macros/lt~obsolete.m4 \ $(top_srcdir)/macros/m4ri-check.m4 \ $(top_srcdir)/macros/m4rie-check.m4 \ $(top_srcdir)/macros/maple-check.m4 \ $(top_srcdir)/macros/mpfr-check.m4 \ $(top_srcdir)/macros/ntl-check.m4 \ $(top_srcdir)/macros/saclib-check.m4 \ $(top_srcdir)/macros/sage-check.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = depcomp = am__depfiles_maybe = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BLAS_CFLAGS = @BLAS_CFLAGS@ BLAS_LIBS = @BLAS_LIBS@ CC = @CC@ CCNAM = @CCNAM@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DBG = @DBG@ DEBUG_CFLAGS = @DEBUG_CFLAGS@ DEFAULT_CFLAGS = @DEFAULT_CFLAGS@ DEFS = @DEFS@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXPAT_CFLAGS = @EXPAT_CFLAGS@ EXPAT_LIBS = @EXPAT_LIBS@ FFLAS_FFPACK_CFLAGS = @FFLAS_FFPACK_CFLAGS@ FFLAS_FFPACK_LIBS = @FFLAS_FFPACK_LIBS@ FFLAS_FFPACK_LOC = @FFLAS_FFPACK_LOC@ FGREP = @FGREP@ FPLLL_CFLAGS = @FPLLL_CFLAGS@ FPLLL_LIBS = @FPLLL_LIBS@ GIVARO_CFLAGS = @GIVARO_CFLAGS@ GIVARO_LIBS = @GIVARO_LIBS@ GMP_CFLAGS = @GMP_CFLAGS@ GMP_LIBS = @GMP_LIBS@ GMP_VERSION = @GMP_VERSION@ GREP = @GREP@ IML_CFLAGS = @IML_CFLAGS@ IML_LIBS = @IML_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIDIA_CFLAGS = @LIDIA_CFLAGS@ LIDIA_LIBS = @LIDIA_LIBS@ LINBOX_BENCH_PATH = @LINBOX_BENCH_PATH@ LINBOX_DOC_PATH = @LINBOX_DOC_PATH@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ M4RIE_CFLAGS = @M4RIE_CFLAGS@ M4RIE_LIBS = @M4RIE_LIBS@ M4RI_CFLAGS = @M4RI_CFLAGS@ M4RI_LIBS = @M4RI_LIBS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAPLE_CFLAGS = @MAPLE_CFLAGS@ MAPLE_HOME = @MAPLE_HOME@ MAPLE_LIBS = @MAPLE_LIBS@ MAPLE_VERSION = @MAPLE_VERSION@ MKDIR_P = @MKDIR_P@ MPFR_CFLAGS = @MPFR_CFLAGS@ MPFR_LIBS = @MPFR_LIBS@ NM = @NM@ NMEDIT = @NMEDIT@ NTL_CFLAGS = @NTL_CFLAGS@ NTL_LIBS = @NTL_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PROF = @PROF@ RANLIB = @RANLIB@ RM = @RM@ SACLIB_CFLAGS = @SACLIB_CFLAGS@ SACLIB_LIBS = @SACLIB_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TESTS_CFLAGS = @TESTS_CFLAGS@ VERSION = @VERSION@ WARN = @WARN@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__leading_dot = @am__leading_dot@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = driver kaapi maple sage all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu --ignore-deps interfaces/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu --ignore-deps interfaces/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs # 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): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__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; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ 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 || \ set "$$@" "$$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; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) 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; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done 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: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-generic clean-libtool \ ctags ctags-recursive distclean distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-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: linbox-1.3.2/interfaces/driver/000077500000000000000000000000001176453053400164365ustar00rootroot00000000000000linbox-1.3.2/interfaces/driver/Makefile.am000066400000000000000000000052461176453053400205010ustar00rootroot00000000000000# Copyright (c) 2010 the LinBox group #========LICENCE======== # This file is part of the library LinBox. # # LinBox is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # # This library 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 # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # ========LICENCE======== if LINBOX_COMPILE_DRIVERS pkgincludesubdir=$(includedir)/interfaces/driver AM_CPPFLAGS=-I$(top_srcdir) -I. -I../../linbox AM_CXXFLAGS = @DEFAULT_CFLAGS@ -DDISABLE_COMMENTATOR $(GMP_CFLAGS) $(FFLAS_FFPACK_CFLAGS) $(BLAS_CFLAGS) $(GIVARO_CFLAGS) #ifdef HAVE_NTL AM_CXXFLAGS +=$(NTL_CFLAGS) #endif #LDADD= $(GMP_LIBS) $(NTL_LIBS) $(BLAS_LIBS) $(MAPLE_LIBS) $(GIVARO_LIBS) "../../linbox/liblinbox.la -z muldefs" lib_LTLIBRARIES=liblbdriver.la liblbdriver_la_SOURCES= lb-element.C \ lb-domain.C \ lb-vector.C \ lb-polynomial.C \ lb-det.C \ lb-rank.C \ lb-garbage.C \ lb-minpoly.C \ lb-blackbox.C \ lb-charpoly.C # \ # lb-solve.C liblbdriver_la_LDFLAGS=$(GIVARO_LIBS) $(GMP_LIBS) $(NTL_LIBS) $(BLAS_LIBS) $(LDFLAGS) $(top_srcdir)/linbox/liblinbox.la -Wl,-zmuldefs pkginclude_HEADERS=\ lb-driver.h \ lb-blackbox-abstract.h \ lb-blackbox-type.h \ lb-domain-function.h \ lb-element-collection.h \ lb-polynomial.h \ lb-vector-data.h \ lb-blackbox-collection.h \ lb-charpoly.h \ lb-domain-functor.h \ lb-element-data.h \ lb-rank.h \ lb-vector-function.h \ lb-blackbox-data.h \ lb-det.h \ lb-domain.h \ lb-element.h \ lb-solve.h \ lb-vector-functor.h \ lb-blackbox-function.h \ lb-domain-abstract.h \ lb-domain-type.h \ lb-garbage.h \ lb-utilities.h \ lb-vector.h \ lb-blackbox-functor.h \ lb-domain-collection.h \ lb-interface.h \ lb-vector-abstract.h \ lb-vector-type.h \ lb-blackbox.h \ lb-domain-data.h \ lb-element-abstract.h \ lb-minpoly.h \ lb-vector-collection.h endif linbox-1.3.2/interfaces/driver/Makefile.in000066400000000000000000000610401176453053400205040ustar00rootroot00000000000000# Makefile.in generated by automake 1.11.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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@ # Copyright (c) 2010 the LinBox group #========LICENCE======== # This file is part of the library LinBox. # # LinBox is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # # This library 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 # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # ========LICENCE======== VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd 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 = : build_triplet = @build@ host_triplet = @host@ subdir = interfaces/driver DIST_COMMON = $(am__pkginclude_HEADERS_DIST) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/macros/aclocal-include.m4 \ $(top_srcdir)/macros/config-header.m4 \ $(top_srcdir)/macros/debug.m4 \ $(top_srcdir)/macros/expat-check.m4 \ $(top_srcdir)/macros/fflas-ffpack-check.m4 \ $(top_srcdir)/macros/fplll-check.m4 \ $(top_srcdir)/macros/givaro-check.m4 \ $(top_srcdir)/macros/gmp-check.m4 \ $(top_srcdir)/macros/iml-check.m4 \ $(top_srcdir)/macros/lapack-check.m4 \ $(top_srcdir)/macros/libtool.m4 \ $(top_srcdir)/macros/lidia-check.m4 \ $(top_srcdir)/macros/linbox-benchmark.m4 \ $(top_srcdir)/macros/linbox-doc.m4 \ $(top_srcdir)/macros/linbox-misc.m4 \ $(top_srcdir)/macros/linbox-opt.m4 \ $(top_srcdir)/macros/ltoptions.m4 \ $(top_srcdir)/macros/ltsugar.m4 \ $(top_srcdir)/macros/ltversion.m4 \ $(top_srcdir)/macros/lt~obsolete.m4 \ $(top_srcdir)/macros/m4ri-check.m4 \ $(top_srcdir)/macros/m4rie-check.m4 \ $(top_srcdir)/macros/maple-check.m4 \ $(top_srcdir)/macros/mpfr-check.m4 \ $(top_srcdir)/macros/ntl-check.m4 \ $(top_srcdir)/macros/saclib-check.m4 \ $(top_srcdir)/macros/sage-check.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgincludedir)" LTLIBRARIES = $(lib_LTLIBRARIES) liblbdriver_la_LIBADD = am__liblbdriver_la_SOURCES_DIST = lb-element.C lb-domain.C lb-vector.C \ lb-polynomial.C lb-det.C lb-rank.C lb-garbage.C lb-minpoly.C \ lb-blackbox.C lb-charpoly.C @LINBOX_COMPILE_DRIVERS_TRUE@am_liblbdriver_la_OBJECTS = \ @LINBOX_COMPILE_DRIVERS_TRUE@ lb-element.lo lb-domain.lo \ @LINBOX_COMPILE_DRIVERS_TRUE@ lb-vector.lo lb-polynomial.lo \ @LINBOX_COMPILE_DRIVERS_TRUE@ lb-det.lo lb-rank.lo \ @LINBOX_COMPILE_DRIVERS_TRUE@ lb-garbage.lo lb-minpoly.lo \ @LINBOX_COMPILE_DRIVERS_TRUE@ lb-blackbox.lo lb-charpoly.lo liblbdriver_la_OBJECTS = $(am_liblbdriver_la_OBJECTS) liblbdriver_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(liblbdriver_la_LDFLAGS) $(LDFLAGS) -o $@ @LINBOX_COMPILE_DRIVERS_TRUE@am_liblbdriver_la_rpath = -rpath \ @LINBOX_COMPILE_DRIVERS_TRUE@ $(libdir) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = am__depfiles_maybe = CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(liblbdriver_la_SOURCES) DIST_SOURCES = $(am__liblbdriver_la_SOURCES_DIST) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__pkginclude_HEADERS_DIST = lb-driver.h lb-blackbox-abstract.h \ lb-blackbox-type.h lb-domain-function.h \ lb-element-collection.h lb-polynomial.h lb-vector-data.h \ lb-blackbox-collection.h lb-charpoly.h lb-domain-functor.h \ lb-element-data.h lb-rank.h lb-vector-function.h \ lb-blackbox-data.h lb-det.h lb-domain.h lb-element.h \ lb-solve.h lb-vector-functor.h lb-blackbox-function.h \ lb-domain-abstract.h lb-domain-type.h lb-garbage.h \ lb-utilities.h lb-vector.h lb-blackbox-functor.h \ lb-domain-collection.h lb-interface.h lb-vector-abstract.h \ lb-vector-type.h lb-blackbox.h lb-domain-data.h \ lb-element-abstract.h lb-minpoly.h lb-vector-collection.h HEADERS = $(pkginclude_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BLAS_CFLAGS = @BLAS_CFLAGS@ BLAS_LIBS = @BLAS_LIBS@ CC = @CC@ CCNAM = @CCNAM@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DBG = @DBG@ DEBUG_CFLAGS = @DEBUG_CFLAGS@ DEFAULT_CFLAGS = @DEFAULT_CFLAGS@ DEFS = @DEFS@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXPAT_CFLAGS = @EXPAT_CFLAGS@ EXPAT_LIBS = @EXPAT_LIBS@ FFLAS_FFPACK_CFLAGS = @FFLAS_FFPACK_CFLAGS@ FFLAS_FFPACK_LIBS = @FFLAS_FFPACK_LIBS@ FFLAS_FFPACK_LOC = @FFLAS_FFPACK_LOC@ FGREP = @FGREP@ FPLLL_CFLAGS = @FPLLL_CFLAGS@ FPLLL_LIBS = @FPLLL_LIBS@ GIVARO_CFLAGS = @GIVARO_CFLAGS@ GIVARO_LIBS = @GIVARO_LIBS@ GMP_CFLAGS = @GMP_CFLAGS@ GMP_LIBS = @GMP_LIBS@ GMP_VERSION = @GMP_VERSION@ GREP = @GREP@ IML_CFLAGS = @IML_CFLAGS@ IML_LIBS = @IML_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIDIA_CFLAGS = @LIDIA_CFLAGS@ LIDIA_LIBS = @LIDIA_LIBS@ LINBOX_BENCH_PATH = @LINBOX_BENCH_PATH@ LINBOX_DOC_PATH = @LINBOX_DOC_PATH@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ M4RIE_CFLAGS = @M4RIE_CFLAGS@ M4RIE_LIBS = @M4RIE_LIBS@ M4RI_CFLAGS = @M4RI_CFLAGS@ M4RI_LIBS = @M4RI_LIBS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAPLE_CFLAGS = @MAPLE_CFLAGS@ MAPLE_HOME = @MAPLE_HOME@ MAPLE_LIBS = @MAPLE_LIBS@ MAPLE_VERSION = @MAPLE_VERSION@ MKDIR_P = @MKDIR_P@ MPFR_CFLAGS = @MPFR_CFLAGS@ MPFR_LIBS = @MPFR_LIBS@ NM = @NM@ NMEDIT = @NMEDIT@ NTL_CFLAGS = @NTL_CFLAGS@ NTL_LIBS = @NTL_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PROF = @PROF@ RANLIB = @RANLIB@ RM = @RM@ SACLIB_CFLAGS = @SACLIB_CFLAGS@ SACLIB_LIBS = @SACLIB_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TESTS_CFLAGS = @TESTS_CFLAGS@ VERSION = @VERSION@ WARN = @WARN@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__leading_dot = @am__leading_dot@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ @LINBOX_COMPILE_DRIVERS_TRUE@pkgincludesubdir = $(includedir)/interfaces/driver @LINBOX_COMPILE_DRIVERS_TRUE@AM_CPPFLAGS = -I$(top_srcdir) -I. -I../../linbox #ifdef HAVE_NTL @LINBOX_COMPILE_DRIVERS_TRUE@AM_CXXFLAGS = @DEFAULT_CFLAGS@ \ @LINBOX_COMPILE_DRIVERS_TRUE@ -DDISABLE_COMMENTATOR \ @LINBOX_COMPILE_DRIVERS_TRUE@ $(GMP_CFLAGS) \ @LINBOX_COMPILE_DRIVERS_TRUE@ $(FFLAS_FFPACK_CFLAGS) \ @LINBOX_COMPILE_DRIVERS_TRUE@ $(BLAS_CFLAGS) $(GIVARO_CFLAGS) \ @LINBOX_COMPILE_DRIVERS_TRUE@ $(NTL_CFLAGS) #endif #LDADD= $(GMP_LIBS) $(NTL_LIBS) $(BLAS_LIBS) $(MAPLE_LIBS) $(GIVARO_LIBS) "../../linbox/liblinbox.la -z muldefs" @LINBOX_COMPILE_DRIVERS_TRUE@lib_LTLIBRARIES = liblbdriver.la @LINBOX_COMPILE_DRIVERS_TRUE@liblbdriver_la_SOURCES = lb-element.C \ @LINBOX_COMPILE_DRIVERS_TRUE@ lb-domain.C \ @LINBOX_COMPILE_DRIVERS_TRUE@ lb-vector.C \ @LINBOX_COMPILE_DRIVERS_TRUE@ lb-polynomial.C \ @LINBOX_COMPILE_DRIVERS_TRUE@ lb-det.C \ @LINBOX_COMPILE_DRIVERS_TRUE@ lb-rank.C \ @LINBOX_COMPILE_DRIVERS_TRUE@ lb-garbage.C \ @LINBOX_COMPILE_DRIVERS_TRUE@ lb-minpoly.C \ @LINBOX_COMPILE_DRIVERS_TRUE@ lb-blackbox.C \ @LINBOX_COMPILE_DRIVERS_TRUE@ lb-charpoly.C # \ # # lb-solve.C @LINBOX_COMPILE_DRIVERS_TRUE@liblbdriver_la_LDFLAGS = $(GIVARO_LIBS) $(GMP_LIBS) $(NTL_LIBS) $(BLAS_LIBS) $(LDFLAGS) $(top_srcdir)/linbox/liblinbox.la -Wl,-zmuldefs @LINBOX_COMPILE_DRIVERS_TRUE@pkginclude_HEADERS = \ @LINBOX_COMPILE_DRIVERS_TRUE@ lb-driver.h \ @LINBOX_COMPILE_DRIVERS_TRUE@ lb-blackbox-abstract.h \ @LINBOX_COMPILE_DRIVERS_TRUE@ lb-blackbox-type.h \ @LINBOX_COMPILE_DRIVERS_TRUE@ lb-domain-function.h \ @LINBOX_COMPILE_DRIVERS_TRUE@ lb-element-collection.h \ @LINBOX_COMPILE_DRIVERS_TRUE@ lb-polynomial.h \ @LINBOX_COMPILE_DRIVERS_TRUE@ lb-vector-data.h \ @LINBOX_COMPILE_DRIVERS_TRUE@ lb-blackbox-collection.h \ @LINBOX_COMPILE_DRIVERS_TRUE@ lb-charpoly.h \ @LINBOX_COMPILE_DRIVERS_TRUE@ lb-domain-functor.h \ @LINBOX_COMPILE_DRIVERS_TRUE@ lb-element-data.h \ @LINBOX_COMPILE_DRIVERS_TRUE@ lb-rank.h \ @LINBOX_COMPILE_DRIVERS_TRUE@ lb-vector-function.h \ @LINBOX_COMPILE_DRIVERS_TRUE@ lb-blackbox-data.h \ @LINBOX_COMPILE_DRIVERS_TRUE@ lb-det.h \ @LINBOX_COMPILE_DRIVERS_TRUE@ lb-domain.h \ @LINBOX_COMPILE_DRIVERS_TRUE@ lb-element.h \ @LINBOX_COMPILE_DRIVERS_TRUE@ lb-solve.h \ @LINBOX_COMPILE_DRIVERS_TRUE@ lb-vector-functor.h \ @LINBOX_COMPILE_DRIVERS_TRUE@ lb-blackbox-function.h \ @LINBOX_COMPILE_DRIVERS_TRUE@ lb-domain-abstract.h \ @LINBOX_COMPILE_DRIVERS_TRUE@ lb-domain-type.h \ @LINBOX_COMPILE_DRIVERS_TRUE@ lb-garbage.h \ @LINBOX_COMPILE_DRIVERS_TRUE@ lb-utilities.h \ @LINBOX_COMPILE_DRIVERS_TRUE@ lb-vector.h \ @LINBOX_COMPILE_DRIVERS_TRUE@ lb-blackbox-functor.h \ @LINBOX_COMPILE_DRIVERS_TRUE@ lb-domain-collection.h \ @LINBOX_COMPILE_DRIVERS_TRUE@ lb-interface.h \ @LINBOX_COMPILE_DRIVERS_TRUE@ lb-vector-abstract.h \ @LINBOX_COMPILE_DRIVERS_TRUE@ lb-vector-type.h \ @LINBOX_COMPILE_DRIVERS_TRUE@ lb-blackbox.h \ @LINBOX_COMPILE_DRIVERS_TRUE@ lb-domain-data.h \ @LINBOX_COMPILE_DRIVERS_TRUE@ lb-element-abstract.h \ @LINBOX_COMPILE_DRIVERS_TRUE@ lb-minpoly.h \ @LINBOX_COMPILE_DRIVERS_TRUE@ lb-vector-collection.h all: all-am .SUFFIXES: .SUFFIXES: .C .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu --ignore-deps interfaces/driver/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu --ignore-deps interfaces/driver/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done liblbdriver.la: $(liblbdriver_la_OBJECTS) $(liblbdriver_la_DEPENDENCIES) $(EXTRA_liblbdriver_la_DEPENDENCIES) $(liblbdriver_la_LINK) $(am_liblbdriver_la_rpath) $(liblbdriver_la_OBJECTS) $(liblbdriver_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c .C.o: $(CXXCOMPILE) -c -o $@ $< .C.obj: $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .C.lo: $(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-pkgincludeHEADERS: $(pkginclude_HEADERS) @$(NORMAL_INSTALL) @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(pkgincludedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkgincludedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgincludedir)" || exit $$?; \ done uninstall-pkgincludeHEADERS: @$(NORMAL_UNINSTALL) @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(pkgincludedir)'; $(am__uninstall_files_from_dir) 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; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ 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; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) 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; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgincludedir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-pkgincludeHEADERS install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-libLTLIBRARIES install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-libLTLIBRARIES uninstall-pkgincludeHEADERS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES clean-libtool ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am \ install-libLTLIBRARIES install-man install-pdf install-pdf-am \ install-pkgincludeHEADERS install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am \ uninstall-libLTLIBRARIES uninstall-pkgincludeHEADERS # 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: linbox-1.3.2/interfaces/driver/lb-blackbox-abstract.h000066400000000000000000000034401176453053400225710ustar00rootroot00000000000000/* lb-blackbox-abstract.h * Copyright (C) 2005 Pascal Giorgi * * Written by Pascal Giorgi * * ========LICENCE======== * This file is part of the library LinBox. * * LinBox is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. du -h tes * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ========LICENCE======== */ #ifndef __LINBOX_lb_blackbox_abstract_H #define __LINBOX_lb_blackbox_abstract_H #include #include /******************************** * Abstract object for Blackbox * ********************************/ class BlackboxAbstract : public LinBoxBaseVisitable{ public: virtual ~BlackboxAbstract(){}; virtual BlackboxAbstract* clone() const =0; virtual void* getPtr() const =0; virtual const DomainKey& getDomainKey() const =0; virtual const char* info() const =0; virtual void rebind(const DomainKey&) =0; LINBOX_VISITABLE(); }; #endif // vim:sts=8:sw=8:ts=8:noet:sr:cino=>s,f0,{0,g0,(0,:0,t0,+0,=s // Local Variables: // mode: C++ // tab-width: 8 // indent-tabs-mode: nil // c-basic-offset: 8 // End: linbox-1.3.2/interfaces/driver/lb-blackbox-collection.h000066400000000000000000000032371176453053400231250ustar00rootroot00000000000000/* lb-blackbox-collection.h * Copyright (C) 2005 Pascal Giorgi * * Written by Pascal Giorgi * * ========LICENCE======== * This file is part of the library LinBox. * * LinBox is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. du -h tes * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ========LICENCE======== */ #ifndef __LINBOX_lb_blackbox_collection_H #define __LINBOX_lb_blackbox_collection_H #include #include /************************** * Collection of Blackbox * **************************/ // definition of a key typedef size_t BlackboxKey; // comparison functor on key struct BlackboxKeyLessThan{ bool operator()(const BlackboxKey& k1, const BlackboxKey &k2) {return (k1 < k2);} }; // definition of a hash table type typedef std::map BlackboxTable; #endif // vim:sts=8:sw=8:ts=8:noet:sr:cino=>s,f0,{0,g0,(0,:0,t0,+0,=s // Local Variables: // mode: C++ // tab-width: 8 // indent-tabs-mode: nil // c-basic-offset: 8 // End: linbox-1.3.2/interfaces/driver/lb-blackbox-data.h000066400000000000000000000204511176453053400217000ustar00rootroot00000000000000/* lb-blackbox-data.h * Copyright (C) 2005 Pascal Giorgi * * Written by Pascal Giorgi * * ========LICENCE======== * This file is part of the library LinBox. * * LinBox is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. du -h tes * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ========LICENCE======== */ #ifndef __LINBOX_lb_blackbox_data_H #define __LINBOX_lb_blackbox_data_H #include "linbox/blackbox/sparse.h" #include "linbox/util/matrix-stream.h" #include #include #include #include #include #include #include extern BlackboxTable blackbox_hashtable; /****************************************************** * Functor to determine domain in Abstract Blackboxes * ******************************************************/ template class Blackbox, class Functor> class BlackboxSpecFunctor{ const Functor & fct; void *ptr; public: BlackboxSpecFunctor(const Functor &f, void *p) : fct(f), ptr(p) {} template void operator()(Result &res, Domain *d) const { Blackbox * b= static_cast*> (ptr); fct(res, b); } }; /******************************************** * Factory to construct Abstract Blackboxes * ********************************************/ class Blackbox_Factory { public: typedef BlackboxAbstract* (*createBlackbox_1_CallBack)(const DomainKey &, size_t, size_t, const char*); typedef BlackboxAbstract* (*createBlackbox_2_CallBack)(const DomainKey &, std::istream&, const char*); typedef std::map , ltstr> CallBackMap; bool add(const char *name, std::pair createD){ return _callback.insert(CallBackMap::value_type(name, createD)).second; } bool remove(const char *name){return _callback.erase(name) == 1;} BlackboxAbstract* create(const char *name, const DomainKey &k, size_t m, size_t n){ CallBackMap::iterator it = _callback.find(name); if (it != _callback.end()){ return it->second.first(k, m, m,name); } else { std::string mes("LinBox ERROR: you are trying to construct a non defined blackbox << "); mes+= std::string(name); mes+= std::string(" >>\n"); throw lb_runtime_error(mes.c_str());// throw an exception } } BlackboxAbstract* create(const char *name, const DomainKey &k, std::istream &is){ CallBackMap::iterator it = _callback.find(name); if (it != _callback.end()){ return it->second.second(k, is, name); } else { std::string mes("LinBox ERROR: you are trying to construct a non defined blackbox << "); mes+= std::string(name); mes+= std::string(" >>\n"); throw lb_runtime_error(mes.c_str());// throw an exception } } size_t size() { return _callback.size(); } private: CallBackMap _callback; }; /****************************** * Functor to copy Blackboxes * ******************************/ class CopyBlackboxFunctor { public: template void operator()(void *&res, Blackbox *B) const { res= new Blackbox(static_cast(*B)); } }; /********************************* * Functors to rebind Blackboxes * *********************************/ template class Blackbox> class RebindBlackboxFunctor{ void *&ptr; public: RebindBlackboxFunctor(void *&p) : ptr(p) {} template void operator()(const DomainKey &key, Domain *D) const { RebindBlackboxFunctor fct(ptr); DomainFunction::call(*D, key, fct); } template void operator()(DomainSource &res, DomainTarget *D) const { Blackbox *B_source= static_cast * > (ptr); Blackbox *B_target = NULL; /* was not init't */ typename Blackbox::template rebind()(*B_target, *B_source, *D); delete B_source; ptr = B_target; } }; /************************************************************ * Blackbox Envelope to be compliant with Blackbox Abstract * ************************************************************/ template class Blackbox> class BlackboxEnvelope : public BlackboxAbstract{ protected: void *ptr; DomainKey key; const char* _info; public: BlackboxEnvelope(void *p, const DomainKey &k, const char *Info) : ptr(p), key(k, true), _info(Info) {} ~BlackboxEnvelope(){} BlackboxAbstract* clone() const { CopyBlackboxFunctor Fct; void *b; launch(b, Fct); return new BlackboxEnvelope(b, key, _info); } void * getPtr() const { return ptr;} virtual const DomainKey& getDomainKey() const { return key; } LINBOX_VISITABLE(); template void launch (Result &res, const Functor &fct) const { BlackboxSpecFunctor bbs(fct, ptr); DomainFunction::call(res, key, bbs); } const char* info() const { std::string msg= "[ LinBox Blackbox (storage = "; msg+= std::string(_info); msg+= std::string(", domain = [LinBox Domain (type = "); msg+= std::string(key.Type()); msg+= std::string(", charact = "); msg+= std::string(key.Characteristic()); msg+= std::string(")] )]\n"); return msg.c_str(); } void rebind(const DomainKey &k) { RebindBlackboxFunctor Fct(ptr); DomainFunction::call(k, key, Fct); key = k; key.set_autogc(); } }; /********************************** * Functors to construct Blackbox * **********************************/ template class Blackbox> class CreateBlackboxFunctor{ size_t &_row; size_t &_col; public: CreateBlackboxFunctor(size_t &m, size_t &n) : _row(m), _col(n) {} template void operator()(void *&res, Domain *D) const { res = new Blackbox(*D, _row, _col); } }; template class Blackbox> class CreateBlackboxFromStreamFunctor{ std::istream ∈ public: CreateBlackboxFromStreamFunctor(std::istream &i) : in(i) {} template void operator()(void *&res, Domain *D) const { LinBox::MatrixStream ms(*D, in); res = new Blackbox(ms); } }; /****************************************************** * Blackbox construction function used in the Factory * ******************************************************/ template class Blackbox> BlackboxAbstract* constructBlackbox_from_size(const DomainKey &k, size_t m, size_t n, const char* info){ CreateBlackboxFunctor fct(m,n); void *bb; DomainFunction::call(bb, k, fct); BlackboxEnvelope *bbe = new BlackboxEnvelope (bb, k, info); return bbe; } template class Blackbox> BlackboxAbstract* constructBlackbox_from_stream (const DomainKey &k, std::istream &in, const char *info){ CreateBlackboxFromStreamFunctor fct(in); void *bb; DomainFunction::call(bb, k, fct); BlackboxEnvelope *bbe = new BlackboxEnvelope (bb, k, info); return bbe; } /************************************************************ * Function to add an abstract blackbox in linbox hashtable * ************************************************************/ const BlackboxKey& addBlackbox(BlackboxAbstract * v){ std::pair status; status = blackbox_hashtable.insert(std::pair (BlackboxKey(v), v)); if (status.second) return status.first->first; else throw lb_runtime_error("LinBox ERROR: blackbox creation failed \n");// throw an exception } #endif // vim:sts=8:sw=8:ts=8:noet:sr:cino=>s,f0,{0,g0,(0,:0,t0,+0,=s // Local Variables: // mode: C++ // tab-width: 8 // indent-tabs-mode: nil // c-basic-offset: 8 // End: linbox-1.3.2/interfaces/driver/lb-blackbox-function.h000066400000000000000000000052761176453053400226240ustar00rootroot00000000000000/* lb-blackbox-function.h * Copyright (C) 2005 Pascal Giorgi * * Written by Pascal Giorgi * * ========LICENCE======== * This file is part of the library LinBox. * * LinBox is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ========LICENCE======== */ #ifndef __LINBOX_lb_blackbox_function_H #define __LINBOX_lb_blackbox_function_H #include #include /*********************************************************** * API to launch a generic function over a linbox blackbox * **********************************************************/ class BlackboxFunction { public: // call a functor over a blackbox from the hashtable, result is given through 1st parameter template static void call(Result &res, const std::pair &blackbox, const Functor &functor){ ApplyBlackboxFunctor Ap(res, functor); (blackbox.second)->Accept(Ap); } // call a functor over a blackbox from the hashtable, no result template static void call(const std::pair &v, const Functor &f){ void *dumbresult; call(dumbresult,v,f); } // call a functor over a blackbox from its key, result is given through 1st parameter template static void call(Result &res, const BlackboxKey &key, const Functor &functor){ BlackboxTable::const_iterator it = blackbox_hashtable.find(key); if (it != blackbox_hashtable.end()) BlackboxFunction::call(res, *it, functor); else throw lb_runtime_error("LinBox ERROR: use of a non allocated blackbox \n");// throw an exception } // call a functor over a blackbox from its key, no result template static void call(const BlackboxKey &k, const Functor &f) { void *dumbresult; call(dumbresult,k,f); } }; #endif // vim:sts=8:sw=8:ts=8:noet:sr:cino=>s,f0,{0,g0,(0,:0,t0,+0,=s // Local Variables: // mode: C++ // tab-width: 8 // indent-tabs-mode: nil // c-basic-offset: 8 // End: linbox-1.3.2/interfaces/driver/lb-blackbox-functor.h000066400000000000000000000064031176453053400224500ustar00rootroot00000000000000/* lb-blackbox-functor.h * Copyright (C) 2005 Pascal Giorgi * * Written by Pascal Giorgi * * ========LICENCE======== * This file is part of the library LinBox. * * LinBox is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. du -h tes * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ========LICENCE======== */ #ifndef __LINBOX_lb_blackbox_functor_H #define __LINBOX_lb_blackbox_functor_H #include #include #include /************************************************************************* * Base class for apply functor over a blackbox (used for code generation) * *************************************************************************/ template class ApplyBlackboxFunctorBase { protected: Result *res; const Functor *fct; public: ApplyBlackboxFunctorBase(){} template void apply(const Blackbox &b){ b.launch(*res, *fct); } }; /*************************************** * Macro for automatic code generation * ***************************************/ #define LB_BLACKBOX_VISIT(B) \ void visit(const B &d){apply(d);} /********************************************************************************** * Generate automatically the visitors for all Blackbox in the blackbox type list * **********************************************************************************/ template class LinBoxBlackboxVisitor; template class LinBoxBlackboxVisitor{}; template class LinBoxBlackboxVisitor, Functor, Result> : public LinBoxVisitor , public ApplyBlackboxFunctorBase { public: LB_BLACKBOX_VISIT(T); }; template class LinBoxBlackboxVisitor, Functor, Result > : public LinBoxVisitor , public LinBoxBlackboxVisitor { public: LB_BLACKBOX_VISIT(Head); }; /**************************************************** * functionalities to apply functor over a blackbox * ****************************************************/ template class ApplyBlackboxFunctor : public LinBoxBlackboxVisitor { public: ApplyBlackboxFunctor(Result &r, const Functor &f) { this->res = &r; this->fct = &f; } }; #endif // vim:sts=8:sw=8:ts=8:noet:sr:cino=>s,f0,{0,g0,(0,:0,t0,+0,=s // Local Variables: // mode: C++ // tab-width: 8 // indent-tabs-mode: nil // c-basic-offset: 8 // End: linbox-1.3.2/interfaces/driver/lb-blackbox-type.h000066400000000000000000000046561176453053400217610ustar00rootroot00000000000000/* lb-blackbox-type.h * Copyright (C) 2005 Pascal Giorgi * * Written by Pascal Giorgi * * ========LICENCE======== * This file is part of the library LinBox. * * LinBox is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ========LICENCE======== */ #ifndef __LINBOX_lb_blackbox_type_H #define __LINBOX_lb_blackbox_type_H #include /**************************************** * Define the list of all Blackbox Type * ****************************************/ // (NEED TO USE ENVELOPE TO DEFINE A CONCRETE TYPE) typedef LinBoxTypelist < BlackboxEnvelope< LinBox::BlasMatrix > , LinBoxDumbType> BL1; //typedef LinBoxTypelist < BlackboxEnvelope< LinBox::SparseMatrix > , BL1> BL2; // define the blackbox typelist typedef BL1 BlackboxList; /********************************************* * Update the Factory with all blackbox type * *********************************************/ extern Blackbox_Factory linbox_blackbox; void UpdateBlackbox() { // linbox_blackbox.add("linbox_sparse", // Blackbox_Factory::CallBackMap::value_type::second_type( // constructBlackbox_from_size, constructBlackbox_from_stream )); linbox_blackbox.add("linbox_dense", Blackbox_Factory::CallBackMap::value_type::second_type( constructBlackbox_from_size, constructBlackbox_from_stream )); } /***************************** * Default type for blackbox * *****************************/ // definition of the default type blackbox #define default_blackbox "linbox_dense" #endif // vim:sts=8:sw=8:ts=8:noet:sr:cino=>s,f0,{0,g0,(0,:0,t0,+0,=s // Local Variables: // mode: C++ // tab-width: 8 // indent-tabs-mode: nil // c-basic-offset: 8 // End: linbox-1.3.2/interfaces/driver/lb-blackbox.C000066400000000000000000000157521176453053400207340ustar00rootroot00000000000000/* lb-blackbox.C * Copyright (C) 2005 Pascal Giorgi * * Written by Pascal Giorgi * * ========LICENCE======== * This file is part of the library LinBox. * * LinBox is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ========LICENCE======== */ #ifndef __LINBOX_lb_blackbox_C #define __LINBOX_lb_blackbox_C #include "linbox-config.h" #include #include #include //#include "linbox/matrix/matrix-category.h" /******************************** * Allocate the global variable * ********************************/ // global hashtable for the allocated blackbox BlackboxTable blackbox_hashtable; // global variable for the blackbox factory Blackbox_Factory linbox_blackbox; // global variable for current blackbox type const char* current_blackbox = default_blackbox; /******************************************************* * API to contruct a m x n zero blackbox over a domain * *******************************************************/ const BlackboxKey& createBlackbox(const DomainKey &k, size_t m, size_t n, const char* name){ const char* type = name; if (type == NULL) type = current_blackbox; BlackboxAbstract* bb = linbox_blackbox.create(type, k, m , n); return addBlackbox(bb); } /********************************************************** * API to contruct a blackbox over a domain from a stream * **********************************************************/ const BlackboxKey& createBlackbox(const DomainKey &k, std::istream &in, const char *name){ const char* type = name; if (type == NULL) type = current_blackbox; BlackboxAbstract* bb = linbox_blackbox.create(type, k, in); return addBlackbox(bb); } /************************************ * API to copy an existing blackbox * ************************************/ const BlackboxKey& copyBlackbox(const BlackboxKey &k){ BlackboxTable::iterator it = blackbox_hashtable.find(k); if (it == blackbox_hashtable.end()) throw lb_runtime_error("LinBox ERROR: blackbox does not exist (copying impossible)\n"); BlackboxAbstract *v = it->second->clone(); return addBlackbox(v); } /******************************************** * API to get the dimensions of a blackbox * ********************************************/ class BlackboxDimensionFunctor{ public: template void operator()(BlackboxDimension &dim, Blackbox *B) const{ dim.first = B->rowdim(); dim.second = B->coldim(); } }; BlackboxDimension getBlackboxDimension(const BlackboxKey &key){ std::pair dim; BlackboxDimensionFunctor Fct; BlackboxFunction::call(dim, key, Fct); return dim; } /******************************************* * API to set a blackbox with random value * *******************************************/ template class RandomBlackbox{ public: template void operator()(Blackbox *V, Domain *D) { throw lb_runtime_error("LinBox ERROR: incompatible blackbox type and domain type (set random value impossible)\n"); } }; template class RandomBlackbox{ public: template void operator()(Blackbox *V, Domain *D) { throw lb_runtime_error("LinBox ERROR: impossible to set random value (storage is a real blackbox)\n"); } }; template class RandomBlackbox{ public: template void operator()(Blackbox *B, Domain *D) { typename Domain::RandIter G(*D); for (size_t i=0; i< B->coldim();++i) for (size_t j=0;j< B->coldim();++j) G.random(B->refEntry(i,j)); } }; template class BlackboxAtRandomFunctorSpec{ protected: Blackbox *vect; public: BlackboxAtRandomFunctorSpec(Blackbox *V) : vect(V) {} template void operator()(void *, Domain *D) const { RandomBlackbox::Type>()(vect, D); } }; class BlackboxAtRandomFunctor{ protected: const BlackboxKey key; public: BlackboxAtRandomFunctor(const BlackboxKey &k) : key(k) {} template void operator()(void*, Blackbox *V) const { BlackboxTable::iterator it = blackbox_hashtable.find(key); if ( it == blackbox_hashtable.end()) throw lb_runtime_error("LinBox ERROR: invalid blackbox (set random value impossible)"); BlackboxAtRandomFunctorSpec Fct(V); DomainFunction::call(it->second->getDomainKey(), Fct); } }; void setBlackboxAtRandom(const BlackboxKey &k){ BlackboxAtRandomFunctor Fct(k); BlackboxFunction::call(k, Fct); } /********************************************** * API to rebind a blackbox over a new domain * **********************************************/ void rebindBlackbox(const BlackboxKey &Vkey, const DomainKey &Dkey){ BlackboxTable::iterator it = blackbox_hashtable.find(Vkey); if ( it == blackbox_hashtable.end()) throw lb_runtime_error("LinBox ERROR: invalid blackbox (rebinding to another domain impossible)"); it->second->rebind(Dkey); } /************************************************* * API to write a blackbox over an output stream * *************************************************/ class WriteBlackboxFunctor{ std::ostream &os; public: WriteBlackboxFunctor(std::ostream &o) : os(o) {} template void operator() (void*, Blackbox *B) const { B->write(os); } }; void writeBlackbox (const BlackboxKey &key, std::ostream &os){ WriteBlackboxFunctor Fct(os); BlackboxFunction::call(key, Fct); } /******************************************* * API to modify the current blackbox type * *******************************************/ void setBlackbox(const char* t){ current_blackbox= t; } /************************************ * API to write info on a blackbox * ************************************/ void writeBlackboxInfo(const BlackboxKey &k, std::ostream& os){ BlackboxTable::const_iterator it= blackbox_hashtable.find(k); if ( it == blackbox_hashtable.end()) throw lb_runtime_error("LinBox ERROR: invalid blackbox (writing blackbox information impossible)"); os<second->info(); } #endif // vim:sts=8:sw=8:ts=8:noet:sr:cino=>s,f0,{0,g0,(0,:0,t0,+0,=s // Local Variables: // mode: C++ // tab-width: 8 // indent-tabs-mode: nil // c-basic-offset: 8 // End: linbox-1.3.2/interfaces/driver/lb-blackbox.h000066400000000000000000000063571176453053400210020ustar00rootroot00000000000000/* lb-blackbox.h * Copyright (C) 2005 Pascal Giorgi * * Written by Pascal Giorgi * * ========LICENCE======== * This file is part of the library LinBox. * * LinBox is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ========LICENCE======== */ #ifndef __LINBOX_lb_blackbox_H #define __LINBOX_lb_blackbox_H #include #include /*************************** * Initializer of Blackbox * ***************************/ void UpdateBlackbox(); /******************************************************* * API to contruct a m x n zero blackbox over a domain * *******************************************************/ const BlackboxKey& createBlackbox(const DomainKey &k, size_t m, size_t n, const char* name=NULL); /********************************************************** * API to contruct a blackbox over a domain from a stream * **********************************************************/ const BlackboxKey& createBlackbox(const DomainKey &k, std::istream &is, const char *name=NULL); /************************************ * API to copy an existing blackbox * ************************************/ const BlackboxKey& copyBlackbox(const BlackboxKey &k); /******************************************** * API to get the dimensions of a blackbox * ********************************************/ typedef std::pair BlackboxDimension; BlackboxDimension getBlackboxDimension(const BlackboxKey &key); /******************************************* * API to write a blackbox over an ostream * *******************************************/ void writeBlackbox (const BlackboxKey &key, std::ostream &os); /******************************************* * API to set a blackbox with random value * *******************************************/ void setBlackboxAtRandom(const BlackboxKey &k); /********************************************** * API to rebind a blackbox over a new domain * **********************************************/ void rebindBlackbox(const BlackboxKey &Vkey, const DomainKey &Dkey); /******************************************* * API to modify the current blackbox type * *******************************************/ void setBlackbox(const char* t); /************************************ * API to write info on a blackbox * ************************************/ void writeBlackboxInfo(const BlackboxKey &k, std::ostream& os); #endif // vim:sts=8:sw=8:ts=8:noet:sr:cino=>s,f0,{0,g0,(0,:0,t0,+0,=s // Local Variables: // mode: C++ // tab-width: 8 // indent-tabs-mode: nil // c-basic-offset: 8 // End: linbox-1.3.2/interfaces/driver/lb-charpoly.C000066400000000000000000000073211176453053400207610ustar00rootroot00000000000000/* lb-charpoly.C * Copyright (C) 2005 Pascal Giorgi * * Written by Pascal Giorgi * * ========LICENCE======== * This file is part of the library LinBox. * * LinBox is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ========LICENCE======== */ #ifndef __LINBOX_lb_charpoly_C #define __LINBOX_lb_charpoly_C #include "linbox/solutions/charpoly.h" #ifdef __LINBOX_HAVE_GIVARO #include "linbox/ring/givaro-polynomial.h" #endif #include #include #include extern BlackboxTable blackbox_hashtable; extern VectorTable vector_hashtable; /************************************* * Characteristic Polynomial Functor * *************************************/ template class CharpolyFunctor{ protected: Method meth; public: CharpolyFunctor(Method m= Method()) : meth(m) {} template void operator() (Result &res, Blackbox *B) const { typedef typename Blackbox::Field Field; typedef typename Field::Element Element; #ifdef __LINBOX_HAVE_GIVARO // use givpolynomial du to non genericity of charpoly over integer typename LinBox::GivPolynomialRing::Element pol; LinBox::charpoly(pol, *B, meth); // convert back the result to std::vector std::vector *phi = static_cast*> (res); phi->resize(pol.size()); for (size_t i=0; i< pol.size(); ++i) B->field().assign((*phi)[i], pol[i]); #else throw lb_runtime_error("LinBox ERROR: charpoly computation requires Givaro library, computation impossible)\n"); #endif } }; /******************************************************************** * API for characteristic polynomial computation * * characteristic polynomial is returned through a given vector key * ********************************************************************/ void lb_charpoly(const VectorKey &res, const BlackboxKey& key) { VectorTable::iterator it = vector_hashtable.find(res); if ( it == vector_hashtable.end()) throw lb_runtime_error("LinBox ERROR: result polynomial does not exist (charpoly computation impossible)\n"); CharpolyFunctor<> fct; void *ret = it->second->getPtr(); BlackboxFunction::call(ret, key, fct); } /************************************************************** * API for characteristic polynomial computation * * characteristic polynomial is returned through a vector key * **************************************************************/ const VectorKey& lb_charpoly(const BlackboxKey& key) { BlackboxTable::iterator it = blackbox_hashtable.find(key); if ( it == blackbox_hashtable.end()) throw lb_runtime_error("LinBox ERROR: blackbox is not defined (charpoly computation impossible)"); const VectorKey *res = & createVector(it->second->getDomainKey(), 0, "linbox_dense"); lb_charpoly(*res, key); return *res; } #endif // vim:sts=8:sw=8:ts=8:noet:sr:cino=>s,f0,{0,g0,(0,:0,t0,+0,=s // Local Variables: // mode: C++ // tab-width: 8 // indent-tabs-mode: nil // c-basic-offset: 8 // End: linbox-1.3.2/interfaces/driver/lb-charpoly.h000066400000000000000000000036031176453053400210250ustar00rootroot00000000000000/* lb-charpoly.h * Copyright (C) 2005 Pascal Giorgi * * Written by Pascal Giorgi * * ========LICENCE======== * This file is part of the library LinBox. * * LinBox is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ========LICENCE======== */ #ifndef __LINBOX_lb_charpoly_H #define __LINBOX_lb_charpoly_H #include #include /******************************************************************** * API for characteristic polynomial computation * * characteristic polynomial is returned through a given vector key * ********************************************************************/ void lb_charpoly(const VectorKey &res, const BlackboxKey& key); /************************************************************** * API for characteristic polynomial computation * * characteristic polynomial is returned through a vector key * **************************************************************/ const VectorKey& lb_charpoly(const BlackboxKey& key); #endif // vim:sts=8:sw=8:ts=8:noet:sr:cino=>s,f0,{0,g0,(0,:0,t0,+0,=s // Local Variables: // mode: C++ // tab-width: 8 // indent-tabs-mode: nil // c-basic-offset: 8 // End: linbox-1.3.2/interfaces/driver/lb-det.C000066400000000000000000000066271176453053400177240ustar00rootroot00000000000000/* lb-det.C * Copyright (C) 2005 Pascal Giorgi * * Written by Pascal Giorgi * * ========LICENCE======== * This file is part of the library LinBox. * * LinBox is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ========LICENCE======== */ #ifndef __LINBOX_lb_det_C #define __LINBOX_lb_det_C #include "linbox-config.h" #include "linbox/solutions/det.h" #include #include #include #include extern BlackboxTable blackbox_hashtable; extern DomainTable domain_hashtable; /******************************************************** * list of available method for determinant computation * ********************************************************/ const char* lb_determinant_methods(); /*********************** * Determinant Functor * ***********************/ template class DeterminantFunctor{ private: Method meth; public: DeterminantFunctor(Method m = Method()) : meth(m) {} template void operator() (EltAbstract *&res, Blackbox *B) const { typedef typename Blackbox::Field::Element Element; if (Element *d = (dynamic_cast*>(res))->getElement()) LinBox::det(*d, *B, meth); else throw lb_runtime_error("LinBox ERROR: incompatible blackbox and element type (determinant computation impossible)"); } }; /******************************************************* * API for determinant computation * * determinant is returned through a given element key * *******************************************************/ void lb_determinant(const EltKey& Ekey, const BlackboxKey& Bkey, const char* method) { EltTable::iterator it = element_hashtable.find(Ekey); if ( it == element_hashtable.end()) throw lb_runtime_error("LinBox ERROR: invalid element (determinant computation impossible)"); DeterminantFunctor<> fct; BlackboxFunction::call(it->second, Bkey, fct); } /************************************************** * API for determinant computation * * determinant is returned through an element key * **************************************************/ const EltKey& lb_determinant(const BlackboxKey& key, const char *method) { BlackboxTable::iterator it = blackbox_hashtable.find(key); if (it == blackbox_hashtable.end()) throw lb_runtime_error("LinBox ERROR: blackbox does not exist (determinant computation impossible)\n"); const DomainKey *d = &(it->second->getDomainKey()); const EltKey *e = &createElement(*d); lb_determinant(*e, key, method); return *e; } #endif // vim:sts=8:sw=8:ts=8:noet:sr:cino=>s,f0,{0,g0,(0,:0,t0,+0,=s // Local Variables: // mode: C++ // tab-width: 8 // indent-tabs-mode: nil // c-basic-offset: 8 // End: linbox-1.3.2/interfaces/driver/lb-det.h000066400000000000000000000040641176453053400177620ustar00rootroot00000000000000/* lb-det.h * Copyright (C) 2005 Pascal Giorgi * * Written by Pascal Giorgi * * ========LICENCE======== * This file is part of the library LinBox. * * LinBox is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ========LICENCE======== */ #ifndef __LINBOX_lb_det_H #define __LINBOX_lb_det_H #include #include /******************************************************* * API for determinant computation * * determinant is returned through a given element key * *******************************************************/ void lb_determinant(const EltKey &Ekey, const BlackboxKey &Bkey, const char *method="hybrid"); /************************************************** * API for determinant computation * * determinant is returned through an element key * **************************************************/ const EltKey& lb_determinant(const BlackboxKey &key, const char *method="hybrid"); /************************************************************* * API to print available method for determinant computation * *************************************************************/ const char* lb_determinant_methods(); #endif // vim:sts=8:sw=8:ts=8:noet:sr:cino=>s,f0,{0,g0,(0,:0,t0,+0,=s // Local Variables: // mode: C++ // tab-width: 8 // indent-tabs-mode: nil // c-basic-offset: 8 // End: linbox-1.3.2/interfaces/driver/lb-domain-abstract.h000066400000000000000000000030161176453053400222520ustar00rootroot00000000000000/* lb-domain-abstract.h * Copyright (C) 2005 Pascal Giorgi * * Written by Pascal Giorgi * * ========LICENCE======== * This file is part of the library LinBox. * * LinBox is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. du -h tes * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ========LICENCE======== */ #ifndef __LINBOX_lb_domain_abstract_H #define __LINBOX_lb_domain_abstract_H #include /****************************** * Abstract object for Domains * *******************************/ class DomainAbstract : public LinBoxBaseVisitable { public: virtual ~DomainAbstract() {} //virtual const char* info() const =0; virtual DomainAbstract* clone() const =0; LINBOX_VISITABLE(); }; #endif // vim:sts=8:sw=8:ts=8:noet:sr:cino=>s,f0,{0,g0,(0,:0,t0,+0,=s // Local Variables: // mode: C++ // tab-width: 8 // indent-tabs-mode: nil // c-basic-offset: 8 // End: linbox-1.3.2/interfaces/driver/lb-domain-collection.h000066400000000000000000000064731176453053400226140ustar00rootroot00000000000000/* lb-domain-collection.h * Copyright (C) 2005 Pascal Giorgi * * Written by Pascal Giorgi * * ========LICENCE======== * This file is part of the library LinBox. * * LinBox is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. du -h tes * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ========LICENCE======== */ #ifndef __LINBOX_lb_domain_collection_H #define __LINBOX_lb_domain_collection_H #include "linbox/integer.h" #include #include /************************* * Collection of Domains * *************************/ // definition of a unique key (using embedded reference counting to manage domain) class DomainKey { private: LinBox::integer *pfirst; const char **psecond; size_t *counter; mutable bool autogc; public: DomainKey(const LinBox::integer &p, const char* name) : pfirst(new LinBox::integer(p)), psecond(new const char*(name)), counter(new size_t(0)), autogc(false) {} DomainKey(const DomainKey &k, bool gc = false) : pfirst(k.pfirst), psecond(k.psecond), counter(k.counter), autogc(gc) {(*counter)++;} ~DomainKey() { if (autogc){ extern void deleteDomain(const DomainKey &key); if ((*counter) == 0) deleteDomain(*this); else (*counter)--; } else{ if ((*counter) == 0) { delete counter; delete pfirst; delete psecond;} else (*counter)--; } } const DomainKey& operator= (const DomainKey &k) { if (autogc){ extern void deleteDomain(const DomainKey &key); if ((*counter) == 0) deleteDomain(*this); else (*counter)--; } else{ if ((*counter) == 0) { delete counter; delete pfirst; delete psecond;} else (*counter)--; } pfirst = k.pfirst; psecond = k.psecond; counter = k.counter; autogc = k.autogc; (*counter)++; return *this; } bool free() const {return ((*counter) == 0);} void dispose() const { (*counter)--; } void copy() const { (*counter)++; } void set_autogc() const {autogc=true;} bool lessThan(const DomainKey &k) const { return (strcmp(*psecond, *(k.psecond))<0) || ((strcmp(*psecond, *(k.psecond))==0) && ( *pfirst < *(k.pfirst ))); } LinBox::integer Characteristic() const {return *pfirst;} const char* Type() const {return *psecond;} size_t getcounter() const {return *counter;} }; // comparison functor on key struct DomainKeyLessThan{ bool operator()(const DomainKey& k1, const DomainKey &k2) { return k1.lessThan(k2);} }; // definition of a hash table type typedef std::map DomainTable; #endif // vim:sts=8:sw=8:ts=8:noet:sr:cino=>s,f0,{0,g0,(0,:0,t0,+0,=s // Local Variables: // mode: C++ // tab-width: 8 // indent-tabs-mode: nil // c-basic-offset: 8 // End: linbox-1.3.2/interfaces/driver/lb-domain-data.h000066400000000000000000000113741176453053400213660ustar00rootroot00000000000000/* lb-domain-data.h * Copyright (C) 2005 Pascal Giorgi * * Written by Pascal Giorgi * * ========LICENCE======== * This file is part of the library LinBox. * * LinBox is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ========LICENCE======== */ #ifndef __LINBOX_lb_domain_data_H #define __LINBOX_lb_domain_data_H #include "linbox-config.h" #include "linbox/integer.h" #include "linbox/field/field-traits.h" #include #include #include #include #include #include extern DomainTable domain_hashtable; /***************************************** * Factory to construct Abstract Domains * *****************************************/ class Domain_Factory { public: typedef DomainAbstract* (*createDomainCallBack)(const LinBox::integer &); private: typedef std::map CallBackMap; CallBackMap _callback; public: bool add(const char *name, createDomainCallBack createD){ return _callback.insert(CallBackMap::value_type(name, createD)).second; } bool remove(const char *name){ return _callback.erase(name) == 1; } DomainAbstract* create(const char *name, const LinBox::integer &p){ CallBackMap::iterator it = _callback.find(name); if (it != _callback.end()){ return it->second(p); } else{ std::string mes("LinBox ERROR: you are trying to construct a non defined domain << "); mes+= std::string(name); mes+= std::string(" >>\n"); mes+= std::string(LinBox::integer(_callback.size())); throw lb_runtime_error(mes.c_str());// throw an exception } } size_t size() { return _callback.size(); } }; /********************************************************* * Specific Domain constructor according to the category * *********************************************************/ template class constructDomainFunctor { public: Domain* operator()(const LinBox::integer &p, Category){ throw lb_runtime_error("LinBox ERROR: try to construct a Domain of unknown category\n"); } }; template class constructDomainFunctor { public: Domain* operator()(const LinBox::integer &p, LinBox::RingCategories::ModularTag t) { return new Domain(p); } }; template class constructDomainFunctor { public: Domain* operator()(const LinBox::integer &p, LinBox::RingCategories::IntegerTag t) { return new Domain(); } }; template class constructDomainFunctor { public: Domain* operator()(const LinBox::integer &p, LinBox::RingCategories::RationalTag t) { return new Domain(); } }; /******************************************************** * Domain Envelope to be compliant with Domain Abstract * ********************************************************/ template class DomainEnvelope : public DomainAbstract { Domain *ptr; DomainEnvelope (Domain *D) : ptr(D) {} public: typedef Domain Self_t; typedef typename LinBox::FieldTraits::categoryTag categoryTag; DomainEnvelope() {} DomainEnvelope(const LinBox::integer &p) { ptr = constructDomainFunctor ()(p, categoryTag()); } ~DomainEnvelope() {delete ptr;} DomainAbstract* clone() const { return new DomainEnvelope (new Domain(*ptr)); } LINBOX_VISITABLE(); Domain *getDomain() const {return ptr;} }; /**************************************************** * Domain construction function used in the Factory * ****************************************************/ template DomainAbstract* constructDomain(const LinBox::integer &p) { //return constructDomainFunctor::categoryTag>()(p, typename LinBox::FieldTraits::categoryTag()); return static_cast(new DomainEnvelope(p)); } #endif // vim:sts=8:sw=8:ts=8:noet:sr:cino=>s,f0,{0,g0,(0,:0,t0,+0,=s // Local Variables: // mode: C++ // tab-width: 8 // indent-tabs-mode: nil // c-basic-offset: 8 // End: linbox-1.3.2/interfaces/driver/lb-domain-function.h000066400000000000000000000052641176453053400223030ustar00rootroot00000000000000/* lb-domain-function.h * Copyright (C) 2005 Pascal Giorgi * * Written by Pascal Giorgi * * ========LICENCE======== * This file is part of the library LinBox. * * LinBox is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ========LICENCE======== */ #ifndef __LINBOX_lb_domain_function_H #define __LINBOX_lb_domain_function_H #include #include /********************************************************* * API to launch a generic function over a linbox domain * *********************************************************/ extern DomainTable domain_hashtable; class DomainFunction { public: // call a functor over a domain from the hashtable, result is given through 1st parameter template static void call (Result &res, const std::pair &domain, const Functor &functor){ ApplyDomainFunctor Ap(res, functor); (domain.second)->Accept(Ap); } // call a functor over a domain from the hashtable, no result template static void call (const std::pair& k, const Functor& f){ void *dumbresult; call(dumbresult, k, f); } // call a functor over a domain from its key, result is given through 1st parameter template static void call (Result &res, const DomainKey &key, const Functor &functor){ DomainTable::iterator it = domain_hashtable.find(key); if (it != domain_hashtable.end()) DomainFunction::call(res, *it, functor); else throw lb_runtime_error("LinBox ERROR: use of a non allocated domain\n");// throw an exception } // call a functor over a domain from its key, no result template static void call (const DomainKey &k, const Functor &f){ void *dumbresult; call(dumbresult, k, f); } }; #endif // vim:sts=8:sw=8:ts=8:noet:sr:cino=>s,f0,{0,g0,(0,:0,t0,+0,=s // Local Variables: // mode: C++ // tab-width: 8 // indent-tabs-mode: nil // c-basic-offset: 8 // End: linbox-1.3.2/interfaces/driver/lb-domain-functor.h000066400000000000000000000063741176453053400221410ustar00rootroot00000000000000/* lb-domain-functor.h * Copyright (C) 2005 Pascal Giorgi * * Written by Pascal Giorgi * * ========LICENCE======== * This file is part of the library LinBox. * * LinBox is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. du -h tes * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ========LICENCE======== */ #ifndef __LINBOX_lb_domain_functor_H #define __LINBOX_lb_domain_functor_H #include #include #include /************************************************************************* * Base class for apply functor over a domain (used for code generation) * *************************************************************************/ template class ApplyDomainFunctorBase { protected: Result *res; const Functor *fct; public: ApplyDomainFunctorBase(){} template void apply(const Domain &d){ (*fct)(*res, d.getDomain()); } }; /*************************************** * Macro for automatic code generation * ***************************************/ #define LB_DOMAIN_VISIT(D) \ void visit(const DomainEnvelope &d){apply(d);} /******************************************************************************* * Generate automatically the visitors for all domains in the domain type list * *******************************************************************************/ template class LinBoxDomainVisitor; template class LinBoxDomainVisitor{}; template class LinBoxDomainVisitor, Functor, Result> : public LinBoxVisitor >, public ApplyDomainFunctorBase { public: LB_DOMAIN_VISIT(T); }; template class LinBoxDomainVisitor, Functor, Result > : public LinBoxVisitor > , public LinBoxDomainVisitor { public: LB_DOMAIN_VISIT(Head); }; /************************************************** * functionalities to apply functor over a domain * **************************************************/ template class ApplyDomainFunctor : public LinBoxDomainVisitor { public: ApplyDomainFunctor(Result &r, const Functor &f) { this->res=&r; this->fct=&f; } }; #endif // vim:sts=8:sw=8:ts=8:noet:sr:cino=>s,f0,{0,g0,(0,:0,t0,+0,=s // Local Variables: // mode: C++ // tab-width: 8 // indent-tabs-mode: nil // c-basic-offset: 8 // End: linbox-1.3.2/interfaces/driver/lb-domain-type.h000066400000000000000000000114001176453053400214240ustar00rootroot00000000000000/* lb-domain-type.h * Copyright (C) 2005 Pascal Giorgi * * Written by Pascal Giorgi * * ========LICENCE======== * This file is part of the library LinBox. * * LinBox is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ========LICENCE======== */ #ifndef __LINBOX_lb_domain_type_H #define __LINBOX_lb_domain_type_H #include "linbox/field/modular.h" #include "linbox/field/PID-integer.h" #include "linbox/field/gmp-rational.h" #ifdef __LINBOX_HAVE_NTL #include "linbox/field/ntl.h" #endif #ifdef __LINBOX_HAVE_GIVARO #include "linbox/field/givaro.h" #endif /************************************** * Define the list of all Domain Type * **************************************/ #define __LINBOX_MINIMIZE_DOMAIN #define __LINBOX_DOMAIN_ONLY typedef LinBoxTypelist < LinBox::Modular , LinBoxDumbType> DL1; typedef LinBoxTypelist < LinBox::PID_integer , DL1> DL2; typedef LinBoxTypelist < LinBox::GMPRationalField , DL2> DL3; typedef LinBoxTypelist < LinBox::Modular , DL3> DL4; typedef LinBoxTypelist < LinBox::Modular , DL4> DL5; typedef LinBoxTypelist < LinBox::Modular , DL5> DL6; #ifdef __LINBOX_MINIMIZE_DOMAIN typedef DL3 linbox_domain_list; #else typedef DL6 linbox_domain_list; #endif #ifdef __LINBOX_HAVE_NTL typedef LinBoxTypelist < LinBox::NTL_ZZ_p, LinBoxDumbType> DN1; typedef LinBoxTypelist < LinBox::NTL_zz_p, DN1> DN2; typedef LinBoxTypelist < LinBox::NTL_ZZ , DN2> DN3; #ifdef __LINBOX_MINIMIZE_DOMAIN typedef DN1 ntl_domain_list; #else typedef DN3 ntl_domain_list; #endif #else typedef LinBoxDumbType ntl_domain_list; #endif #ifdef __LINBOX_HAVE_GIVARO typedef LinBoxTypelist < LinBox::GivaroGfq, LinBoxDumbType> DG1; typedef LinBoxTypelist < LinBox::GivaroZpz< Givaro::Std32>, DG1> DG2; #ifdef __LINBOX_MINIMIZE_DOMAIN typedef DG1 givaro_domain_list; #else typedef DG2 givaro_domain_list; #endif #else typedef LinBoxDumbType givaro_domain_list; #endif // define DomainList to be the list of all domains #ifdef __LINBOX_DOMAIN_ONLY typedef linbox_domain_list DomainList; #else typedef LinBoxTL::Append< linbox_domain_list, LinBoxTL::Append< ntl_domain_list, givaro_domain_list>::Result>::Result DomainList; #endif /******************************************* * Update the Factory with all domain type * *******************************************/ extern Domain_Factory linbox_domain; void UpdateDomain(){ linbox_domain.add("linbox_field_dbl" , constructDomain >); linbox_domain.add("linbox_field_rational" , constructDomain); linbox_domain.add("linbox_ring_integer" , constructDomain); #ifndef __LINBOX_MINIMIZE_DOMAIN linbox_domain.add("linbox_field_32" , constructDomain >); linbox_domain.add("linbox_field_64" , constructDomain >); linbox_domain.add("linbox_field_mp" , constructDomain >); #endif #ifdef __LINBOX_HAVE_NTL linbox_domain.add("ntl_field_ZZ_p" , constructDomain); #ifndef __LINBOX_MINIMIZE_DOMAIN linbox_domain.add("ntl_field_zz_p" , constructDomain); linbox_domain.add("ntl_ring_integer" , constructDomain); #endif #endif #ifdef __LINBOX_HAVE_GIVARO linbox_domain.add("givaro_field_gfq" , constructDomain); #ifndef __LINBOX_MINIMIZE_DOMAIN linbox_domain.add("givaro_field_32" , constructDomain >); #endif #endif } /**************************** * Default type for Domains * ****************************/ // definition of the default type for prime field #define default_prime_field "linbox_field_dbl" // definition of the default type for rational field #define default_rational_field "linbox_field_rational" // definition of the default type for integer ring #define default_integer_ring "linbox_ring_integer" #endif // vim:sts=8:sw=8:ts=8:noet:sr:cino=>s,f0,{0,g0,(0,:0,t0,+0,=s // Local Variables: // mode: C++ // tab-width: 8 // indent-tabs-mode: nil // c-basic-offset: 8 // End: linbox-1.3.2/interfaces/driver/lb-domain.C000066400000000000000000000074411176453053400204120ustar00rootroot00000000000000/* lb-domain.C * Copyright (C) 2005 Pascal Giorgi * * Written by Pascal Giorgi * * ========LICENCE======== * This file is part of the library LinBox. * * LinBox is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ========LICENCE======== */ #ifndef __LINBOX_lb_domain_C #define __LINBOX_lb_domain_C #include #include /**************************** * Allocate global variable * ****************************/ // global hash table for allocated domains DomainTable domain_hashtable; // global variable for the factory Domain_Factory linbox_domain; // global variable for current prime field type const char* current_prime_field = default_prime_field; // global variable for current rational field type const char* current_rational_field = default_rational_field; // global variable for current integer ring type const char* current_integer_ring = default_integer_ring; /**************************** * API to contruct domains * ****************************/ const DomainKey& createDomain( const LinBox::integer characteristic, const char *name){ const char* type=name; if (name == NULL){ if (characteristic == 0) type = current_integer_ring; else type = current_prime_field; } DomainKey key(characteristic, type); // check if the domain is already constructed in domain hashtable // if so return the pointer to the domain DomainTable::const_iterator it= domain_hashtable.find(key) ; if (it != domain_hashtable.end()){ it->first.copy(); return it->first; } // need to create a new field DomainAbstract *domain = linbox_domain.create(type, characteristic); std::pair status= domain_hashtable.insert(std::pair (key, domain)); if (status.second) return status.first->first; else throw lb_runtime_error("LinBox ERROR: domain creation failed \n");// throw an exception } /************************ * API to copy domains * ************************/ const DomainKey copyDomain( const DomainKey &k){ return k; } /********************************************** * API to modify the current prime field type * **********************************************/ void setPrimeField(const char* t){ current_prime_field= t; } /************************************************* * API to modify the current rational field type * *************************************************/ void setRationalField(const char* t){ current_rational_field= t; } /*********************************************** * API to modify the current integer ring type * ***********************************************/ void setIntegerRing(const char* t){ current_integer_ring= t; } /********************************* * API to write info on a domain * *********************************/ void writeDomainInfo(const DomainKey &key, std::ostream& os){ os<<"[LinBox Domain (type = "<s,f0,{0,g0,(0,:0,t0,+0,=s // Local Variables: // mode: C++ // tab-width: 8 // indent-tabs-mode: nil // c-basic-offset: 8 // End: linbox-1.3.2/interfaces/driver/lb-domain.h000066400000000000000000000045511176453053400204560ustar00rootroot00000000000000/* lb-domain.h * Copyright (C) 2005 Pascal Giorgi * * Written by Pascal Giorgi * * ========LICENCE======== * This file is part of the library LinBox. * * LinBox is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ========LICENCE======== */ #ifndef __LINBOX_lb_domain_H #define __LINBOX_lb_domain_H #include #include "linbox/integer.h" /************************* * Initializer of Domain * *************************/ void UpdateDomain(); /**************************** * API to contruct domains * ****************************/ const DomainKey& createDomain( const LinBox::integer characteristic, const char *name=NULL); /************************ * API to copy domains * ************************/ const DomainKey copyDomain( const DomainKey &k); /********************************************** * API to modify the current prime field type * **********************************************/ void setPrimeField(const char* t); /************************************************* * API to modify the current rational field type * *************************************************/ void setRationalField(const char* t); /*********************************************** * API to modify the current integer ring type * ***********************************************/ void setIntegerRing(const char* t); /********************************* * API to write info on a domain * *********************************/ void writeDomainInfo(const DomainKey &k, std::ostream& os); #endif // end of file // vim:sts=8:sw=8:ts=8:noet:sr:cino=>s,f0,{0,g0,(0,:0,t0,+0,=s // Local Variables: // mode: C++ // tab-width: 8 // indent-tabs-mode: nil // c-basic-offset: 8 // End: linbox-1.3.2/interfaces/driver/lb-driver.h000066400000000000000000000052561176453053400205050ustar00rootroot00000000000000/* lb-driver.h * Copyright (C) 2005 Pascal Giorgi * * Written by Pascal Giorgi * * ========LICENCE======== * This file is part of the library LinBox. * * LinBox is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ========LICENCE======== */ #ifndef __LINBOX_lb_driver_H #define __LINBOX_lb_driver_H #include #include #include #include #include #include #include #include #include //problem with givaro-extension (UTT type is not always consistent) disabled in the code #include #include #include // overload PreconditionFailed to be a real exception std::ostringstream PrecondStream; void initException(){ LinBox::PreconditionFailed::setErrorStream(PrecondStream); } /*********************************** * Initialization of LinBox driver * ***********************************/ int LinBoxInit(){ initException(); UpdateDomain(); UpdateBlackbox(); UpdateVector(); return 0; } /*************************** * Close the LinBox Driver * ***************************/ int LinBoxEnd(){ LinBoxCollect(); return 0; } /****************************************** * Give info on LinBox driver active data * ******************************************/ void LinBoxDataInfo(std::ostringstream &out){ extern DomainTable domain_hashtable; extern BlackboxTable blackbox_hashtable; extern VectorTable vector_hashtable; extern EltTable element_hashtable; out<<"LinBox Driver active Data:\n" <<" - Domain : "<s,f0,{0,g0,(0,:0,t0,+0,=s // Local Variables: // mode: C++ // tab-width: 8 // indent-tabs-mode: nil // c-basic-offset: 8 // End: linbox-1.3.2/interfaces/driver/lb-element-abstract.h000066400000000000000000000031051176453053400224330ustar00rootroot00000000000000/* lb-element-abstract.h * Copyright (C) 2005 Pascal Giorgi * * Written by Pascal Giorgi * * ========LICENCE======== * This file is part of the library LinBox. * * LinBox is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. du -h tes * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ========LICENCE======== */ #ifndef __LINBOX_lb_element_abstract_H #define __LINBOX_lb_element_abstract_H #include #include /******************************** * Abstract object for Elements * ********************************/ class EltAbstract { public: virtual ~EltAbstract(){} virtual EltAbstract* clone() const =0; virtual const DomainKey& getDomainKey() const =0; //virtual const char* info() const =0; }; #endif // vim:sts=8:sw=8:ts=8:noet:sr:cino=>s,f0,{0,g0,(0,:0,t0,+0,=s // Local Variables: // mode: C++ // tab-width: 8 // indent-tabs-mode: nil // c-basic-offset: 8 // End: linbox-1.3.2/interfaces/driver/lb-element-collection.h000066400000000000000000000033301176453053400227630ustar00rootroot00000000000000/* lb-element-collection.h * Copyright (C) 2005 Pascal Giorgi * * Written by Pascal Giorgi * * ========LICENCE======== * This file is part of the library LinBox. * * LinBox is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. du -h tes * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ========LICENCE======== */ #ifndef __LINBOX_lb_collection_H #define __LINBOX_lb_collection_H #include #include /************************** * Collection of Elements * **************************/ // definition of a unique key typedef size_t EltKey; // comparison functor on key struct EltKeyLessThan{ bool operator()(const EltKey& k1, const EltKey &k2) { return (k1 < k2);} }; // definition of a hash table type typedef std::map EltTable; // definition of a serial element struct SerialElement { const char* type; std::list list; }; #endif // vim:sts=8:sw=8:ts=8:noet:sr:cino=>s,f0,{0,g0,(0,:0,t0,+0,=s // Local Variables: // mode: C++ // tab-width: 8 // indent-tabs-mode: nil // c-basic-offset: 8 // End: linbox-1.3.2/interfaces/driver/lb-element-data.h000066400000000000000000000047231176453053400215500ustar00rootroot00000000000000/* lb-element.h * Copyright (C) 2005 Pascal Giorgi * * Written by Pascal Giorgi * * ========LICENCE======== * This file is part of the library LinBox. * * LinBox is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ========LICENCE======== */ #ifndef __LINBOX_lb_element_data_H #define __LINBOX_lb_element_data_H #include #include #include #include extern EltTable element_hashtable; /********************************************************** * Element Envelope to be compliant with Element Abstract * **********************************************************/ template class EltEnvelope : public EltAbstract { DomainKey key; Element *ptr; public: EltEnvelope(const DomainKey &k, Element* e) : key(k, true), ptr(e) {} ~EltEnvelope() {delete ptr;} Element *getElement() const {return ptr;} const DomainKey& getDomainKey() const { return key;} EltAbstract* clone() const { return new EltEnvelope(key, new Element(*ptr));} }; /***************************************** * construction of Element from a Domain * *****************************************/ class CreateEltFunctor{ protected: const DomainKey &key; public: CreateEltFunctor(const DomainKey &k) : key(k) {} template void operator()(EltAbstract *& e, Domain *D) const{ e = new EltEnvelope (key, new typename Domain::Element()); } }; EltAbstract* constructElt(const DomainKey &key){ EltAbstract *e; CreateEltFunctor Fct(key); DomainFunction::call(e, key, Fct); return e; } #endif // vim:sts=8:sw=8:ts=8:noet:sr:cino=>s,f0,{0,g0,(0,:0,t0,+0,=s // Local Variables: // mode: C++ // tab-width: 8 // indent-tabs-mode: nil // c-basic-offset: 8 // End: linbox-1.3.2/interfaces/driver/lb-element.C000066400000000000000000000105061176453053400205700ustar00rootroot00000000000000/* lb-element.C * Copyright (C) 2005 Pascal Giorgi * * Written by Pascal Giorgi * * ========LICENCE======== * This file is part of the library LinBox. * * LinBox is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ========LICENCE======== */ #ifndef __LINBOX_lb_element_C #define __LINBOX_lb_element_C #include #include /******************************** * Allocate all global variable * ********************************/ // global hash table for allocated elements EltTable element_hashtable; /******************************************* * API to contruct a element over a domain * *******************************************/ const EltKey& createElement(const DomainKey &key) { EltAbstract *e = constructElt(key); std::pair status; status = element_hashtable.insert(std::pair (EltKey(e), e)); if (status.second) return status.first->first; else throw lb_runtime_error("LinBox ERROR: element creation failed \n");// throw an exception } /********************************************* * API to write an a element over its domain * *********************************************/ class WriteElementFunctor{ protected: std::ostream &os; EltAbstract *elt; public: WriteElementFunctor(std::ostream &o, EltAbstract* e) : os(o), elt(e) {} template void operator() (void*, Domain *D) const { if (EltEnvelope *ptr = dynamic_cast*>(elt)) D->write(os, *(ptr->getElement()))<<"\n"; else throw lb_runtime_error("LinBox ERROR: incompatible domain and element type (element writing impossible)"); } }; void writeElement (const EltKey &key, std::ostream &os){ EltTable::iterator it = element_hashtable.find(key); if ( it == element_hashtable.end()) throw lb_runtime_error("LinBox ERROR: invalid element (writing impossible)"); WriteElementFunctor Fct(os, it->second); DomainFunction::call(it->second->getDomainKey(), Fct); } /******************************* * API to serialize an element * *******************************/ template void ToSerialElement (SerialElement& s, typename Domain::Element &e, const Domain &D, Category cat){ s.type ="integer"; LinBox::integer elt; D.convert(elt, e); s.list.push_back(elt); } template void ToSerialElement (SerialElement& s, typename Domain::Element &e, const Domain &D, LinBox::RingCategories::RationalTag cat){ s.type ="rational"; LinBox::integer num, den; D.get_num(num, e); D.get_den(den, e); s.list.push_back(num); s.list.push_back(den); } class SerializeElementFunctor{ protected: EltAbstract *elt; public: SerializeElementFunctor(EltAbstract *e) : elt(e) {} template void operator() (SerialElement &s, Domain *D) const { if (EltEnvelope *ptr = dynamic_cast*>(elt)){ ToSerialElement(s, *(ptr->getElement()), *D, typename LinBox::FieldTraits::categoryTag()); } else throw lb_runtime_error("LinBox ERROR: incompatible domain and element type (element writing impossible)"); } }; void SerializeElement (SerialElement &s, const EltKey &key) { EltTable::iterator it = element_hashtable.find(key); if ( it == element_hashtable.end()) throw lb_runtime_error("LinBox ERROR: invalid element (serializing impossible)"); SerializeElementFunctor Fct(it->second); DomainFunction::call(s, it->second->getDomainKey(), Fct); } #endif // vim:sts=8:sw=8:ts=8:noet:sr:cino=>s,f0,{0,g0,(0,:0,t0,+0,=s // Local Variables: // mode: C++ // tab-width: 8 // indent-tabs-mode: nil // c-basic-offset: 8 // End: linbox-1.3.2/interfaces/driver/lb-element.h000066400000000000000000000034251176453053400206370ustar00rootroot00000000000000/* lb-element.h * Copyright (C) 2005 Pascal Giorgi * * Written by Pascal Giorgi * * ========LICENCE======== * This file is part of the library LinBox. * * LinBox is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ========LICENCE======== */ #ifndef __LINBOX_lb_element_H #define __LINBOX_lb_element_H #include #include /******************************************* * API to contruct a element over a domain * *******************************************/ const EltKey& createElement(const DomainKey &key); /********************************************* * API to write an a element over its domain * *********************************************/ void writeElement (const EltKey &key, std::ostream &os); /******************************* * API to serialize an element * *******************************/ void SerializeElement (SerialElement &s, const EltKey &key); #endif // vim:sts=8:sw=8:ts=8:noet:sr:cino=>s,f0,{0,g0,(0,:0,t0,+0,=s // Local Variables: // mode: C++ // tab-width: 8 // indent-tabs-mode: nil // c-basic-offset: 8 // End: linbox-1.3.2/interfaces/driver/lb-garbage.C000066400000000000000000000143501176453053400205300ustar00rootroot00000000000000/* lb-garbage.C * Copyright (C) 2005 Pascal Giorgi * * Written by Pascal Giorgi * * ========LICENCE======== * This file is part of the library LinBox. * * LinBox is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ========LICENCE======== */ #ifndef __LINBOX_lb_garbage_C #define __LINBOX_lb_garbage_C #include #include #include #include #include #define __LINBOX_NO_GC_EXCEPTION /*************************************** * API to delete a domain from ist key * ***************************************/ class DeleteElementFunctor{ protected: EltAbstract *elt; public: DeleteElementFunctor(EltAbstract *e) : elt(e) {} template void operator() (void *, Domain *D) const { if (EltEnvelope *ptr = dynamic_cast*>(elt)) delete ptr; else throw lb_runtime_error("LinBox ERROR: incompatible domain and element type (freeing element impossible)"); } }; void deleteElement(const EltKey &key){ EltTable::iterator it = element_hashtable.find(key); if ( it == element_hashtable.end()){ #ifndef __LINBOX_NO_GC_EXCEPTION throw lb_runtime_error("LinBox ERROR: invalid element (freeing impossible)"); #endif } else { DeleteElementFunctor Fct(it->second); #ifdef __LINBOX_NO_GC_EXCEPTION try { #endif DomainFunction::call(it->second->getDomainKey(), Fct); #ifdef __LINBOX_NO_GC_EXCEPTION } catch(lb_runtime_error &t){std::cout<<"LinBox exception catched\n"; exit(0);} #endif element_hashtable.erase(it); } } /***************************** * API to collect all domain * *****************************/ void collectElement(){ EltTable::iterator it = element_hashtable.begin(); for (;it != element_hashtable.end(); ++it){ delete it->second; element_hashtable.erase(it); } } /*************************************** * API to delete a domain from its key * ***************************************/ void deleteDomain(const DomainKey &key) { if (key.free()){ DomainTable::iterator it= domain_hashtable.find(key); delete it->second; domain_hashtable.erase(it); } else{ key.dispose(); } } /***************************** * API to collect all domain * *****************************/ void collectDomain(){ DomainTable::iterator it= domain_hashtable.begin(); for (; it != domain_hashtable.end(); ++it){ delete it->second; domain_hashtable.erase(it); } } /***************************************** * API to delete a blackbox from its key * *****************************************/ class DeleteBlackboxFunctor{ public: template void operator() (void *, Blackbox *B) const { delete B; } }; void deleteBlackbox (const BlackboxKey &key){ BlackboxTable::iterator it = blackbox_hashtable.find(key); if ( it == blackbox_hashtable.end()){ #ifndef __LINBOX_NO_GC_EXCEPTION throw lb_runtime_error("LinBox ERROR: invalid blackbox (freeing impossible)\n"); #else std::cout<<"LinBox ERROR: invalid blackbox (freeing impossible)\n"; #endif } else { DeleteBlackboxFunctor Fct; #ifdef __LINBOX_NO_GC_EXCEPTION try { #endif BlackboxFunction::call(key, Fct); #ifdef __LINBOX_NO_GC_EXCEPTION } catch (lb_runtime_error &t) {std::cout<<"LinBox exception catched: "<second; blackbox_hashtable.erase(it); } } /******************************* * API to collect all blackbox * *******************************/ void collectBlackbox(){ DeleteBlackboxFunctor Fct; BlackboxTable::iterator it= blackbox_hashtable.begin(); for (; it != blackbox_hashtable.end(); ++it){std::cout<<"bb to delete: "<second->info()<<"\n"; #ifdef __LINBOX_NO_GC_EXCEPTION try{ #endif BlackboxFunction::call(*it, Fct); #ifdef __LINBOX_NO_GC_EXCEPTION } catch (lb_runtime_error &t) {std::cout<<"LinBox exception catched\n"; exit(0);} #endif delete it->second; blackbox_hashtable.erase(it); } } /*************************************** * API to delete a vector from its key * ***************************************/ class DeleteVectorFunctor{ public: template void operator() (void*, Vector *V) const { delete V; } }; void deleteVector (const VectorKey &key){ VectorTable::iterator it = vector_hashtable.find(key); if ( it == vector_hashtable.end()){ #ifndef __LINBOX_NO_GC_EXCEPTION throw lb_runtime_error("LinBox ERROR: invalid vector (freeing impossible)"); #endif } else { DeleteVectorFunctor Fct; #ifdef __LINBOX_NO_GC_EXCEPTION try{ #endif VectorFunction::call(key, Fct); #ifdef __LINBOX_NO_GC_EXCEPTION } catch(lb_runtime_error &t) {exit(0);} #endif delete it->second; vector_hashtable.erase(it); } } /***************************** * API to collect all vector * *****************************/ void collectVector(){ DeleteVectorFunctor Fct; VectorTable::iterator it= vector_hashtable.begin(); for (; it != vector_hashtable.end(); ++it){ #ifdef __LINBOX_NO_GC_EXCEPTION try{ #endif VectorFunction::call(*it, Fct); #ifdef __LINBOX_NO_GC_EXCEPTION } catch (lb_runtime_error &t) {std::cout<<"LinBox exception catched\n"; exit(0);} #endif delete it->second; vector_hashtable.erase(it); } } /*********************************************** * API to collect all data allocated by LinBox * **********************************************/ void LinBoxCollect(){ collectVector(); collectBlackbox(); collectElement(); collectDomain(); } #endif // vim:sts=8:sw=8:ts=8:noet:sr:cino=>s,f0,{0,g0,(0,:0,t0,+0,=s // Local Variables: // mode: C++ // tab-width: 8 // indent-tabs-mode: nil // c-basic-offset: 8 // End: linbox-1.3.2/interfaces/driver/lb-garbage.h000066400000000000000000000051331176453053400205740ustar00rootroot00000000000000/* lb-garbage.h * Copyright (C) 2005 Pascal Giorgi * * Written by Pascal Giorgi * * ========LICENCE======== * This file is part of the library LinBox. * * LinBox is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ========LICENCE======== */ #ifndef __LINBOX_lb_garbage_H #define __LINBOX_lb_garbage_H #include #include #include #include /*************************************** * API to delete a domain from ist key * ***************************************/ void deleteElement(const EltKey &key); /***************************** * API to collect all domain * *****************************/ void collectElement(); /*************************************** * API to delete a domain from ist key * ***************************************/ void deleteDomain(const DomainKey &key); /***************************** * API to collect all domain * *****************************/ void collectDomain(); /***************************************** * API to delete a blackbox from its key * *****************************************/ void deleteBlackbox (const BlackboxKey &key); /******************************* * API to collect all blackbox * *******************************/ void collectBlackbox(); /*************************************** * API to delete a vector from its key * ***************************************/ void deleteVector (const VectorKey &key); /***************************** * API to collect all vector * *****************************/ void collectVector(); /*********************************************** * API to collect all data allocated by LinBox * **********************************************/ void LinBoxCollect(); #endif // vim:sts=8:sw=8:ts=8:noet:sr:cino=>s,f0,{0,g0,(0,:0,t0,+0,=s // Local Variables: // mode: C++ // tab-width: 8 // indent-tabs-mode: nil // c-basic-offset: 8 // End: linbox-1.3.2/interfaces/driver/lb-interface.h000066400000000000000000000037241176453053400211500ustar00rootroot00000000000000/* lb-interface.h * Copyright (C) 2005 Pascal Giorgi * * Written by Pascal Giorgi * * ========LICENCE======== * This file is part of the library LinBox. * * LinBox is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ========LICENCE======== */ #include #include #include #include #include #include #include #include #include //problem with givaro-extension (UTT type is not always consistent) disabled in the code #include #include #include // overload PreconditionFailed to be a real exception std::ostringstream PrecondStream; void initException(){ LinBox::PreconditionFailed::setErrorStream(PrecondStream); } /*********************************** * Initialization of LinBox driver * ***********************************/ void LinBoxInit(){ initException(); UpdateDomain(); UpdateBlackbox(); UpdateVector(); } /*************************** * Close the LinBox Driver * ***************************/ void LinBoxEnd(){ LinBoxCollect(); } // vim:sts=8:sw=8:ts=8:noet:sr:cino=>s,f0,{0,g0,(0,:0,t0,+0,=s // Local Variables: // mode: C++ // tab-width: 8 // indent-tabs-mode: nil // c-basic-offset: 8 // End: linbox-1.3.2/interfaces/driver/lb-minpoly.C000066400000000000000000000061221176453053400206250ustar00rootroot00000000000000/* lb-minpoly.C * Copyright (C) 2005 Pascal Giorgi * * Written by Pascal Giorgi * * ========LICENCE======== * This file is part of the library LinBox. * * LinBox is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ========LICENCE======== */ #ifndef __LINBOX_lb_minpoly_C #define __LINBOX_lb_minpoly_C #include "linbox/solutions/minpoly.h" #include #include #include extern BlackboxTable blackbox_hashtable; extern VectorTable vector_hashtable; /****************************** * Mininal Polynomial Functor * ******************************/ template class MinpolyFunctor{ protected: Method meth; public: MinpolyFunctor(Method m= Method()) : meth(m) {} template void operator() (Result &res, Blackbox *B) const { typedef typename Blackbox::Field::Element Element; std::vector * phi = static_cast*>(res); LinBox::minpoly(*phi, *B, meth); res = phi; } }; /************************************************************* * API for minimal polynomial computation * * minimal polynomial is returned through a given vector key * *************************************************************/ void lb_minpoly(const VectorKey &res, const BlackboxKey& key) { MinpolyFunctor<> fct; VectorTable::iterator it = vector_hashtable.find(res); if ( it == vector_hashtable.end()) throw lb_runtime_error("LinBox ERROR: result polynomial does not exist (minpoly computation impossible)\n"); void *ret = it->second->getPtr(); BlackboxFunction::call(ret, key, fct); } /******************************************************* * API for minimal polynomial computation * * minimal polynomial is returned through a vector key * *******************************************************/ const VectorKey& lb_minpoly(const BlackboxKey& key) { BlackboxTable::iterator it = blackbox_hashtable.find(key); if ( it == blackbox_hashtable.end()) throw lb_runtime_error("LinBox ERROR: blackbox is not defined (minpoly computation impossible)"); const VectorKey *res = & createVector(it->second->getDomainKey(), 0, "linbox_dense"); lb_minpoly(*res, key); return *res; } #endif // vim:sts=8:sw=8:ts=8:noet:sr:cino=>s,f0,{0,g0,(0,:0,t0,+0,=s // Local Variables: // mode: C++ // tab-width: 8 // indent-tabs-mode: nil // c-basic-offset: 8 // End: linbox-1.3.2/interfaces/driver/lb-minpoly.h000066400000000000000000000035051176453053400206740ustar00rootroot00000000000000/* lb-minpoly.h * Copyright (C) 2005 Pascal Giorgi * * Written by Pascal Giorgi * * ========LICENCE======== * This file is part of the library LinBox. * * LinBox is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ========LICENCE======== */ #ifndef __LINBOX_lb_minpoly_H #define __LINBOX_lb_minpoly_H #include #include /************************************************************* * API for minimal polynomial computation * * minimal polynomial is returned through a given vector key * *************************************************************/ void lb_minpoly(const VectorKey &res, const BlackboxKey& key); /******************************************************* * API for minimal polynomial computation * * minimal polynomial is returned through a vector key * *******************************************************/ const VectorKey& lb_minpoly(const BlackboxKey& key); #endif // vim:sts=8:sw=8:ts=8:noet:sr:cino=>s,f0,{0,g0,(0,:0,t0,+0,=s // Local Variables: // mode: C++ // tab-width: 8 // indent-tabs-mode: nil // c-basic-offset: 8 // End: linbox-1.3.2/interfaces/driver/lb-polynomial.C000066400000000000000000000126671176453053400213340ustar00rootroot00000000000000/* lb-polynomial.C * Copyright (C) 2005 Pascal Giorgi * * Written by Pascal Giorgi * * ========LICENCE======== * This file is part of the library LinBox. * * LinBox is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ========LICENCE======== */ #ifndef __LINBOX_lb_polynomial_C #define __LINBOX_lb_polynomial_C #include #include #include #include #include /*********************************************** * Polynomial are handled through dense vector * ***********************************************/ // nothing to do at this stage /************************************************************* * API to write a polynomial over the standard output stream * *************************************************************/ template class PrintPoly{ public: template< class Domain, class Poly> void operator()(Domain *D, Poly *poly, std::ostream &os){ throw lb_runtime_error("LinBox ERROR: incompatible type (polynomial writing impossible)\n"); } }; template class PrintPoly { public: template< class Domain, class Poly, class Out> void operator()(Domain *D, Poly *poly, Out &os){ size_t deg=poly->size()-1; while (D->isZero((*poly)[deg])) --deg; D->write(os,(*poly)[deg])<<".x^"< 1 ; --i) { if (!D->isZero((*poly)[i])){os<<" + ";D->write(os, (*poly)[i])<<".x^"< 1) if (!D->isZero((*poly)[1])){os<<" + ";D->write(os,(*poly)[1])<<".x";} if (deg > 0) if (!D->isZero((*poly)[0])){os<<" + ";D->write(os,(*poly)[0]);} os<<"\n"; } }; template class WritePolynomialSpecFunctor{ protected: std::ostream &os; Polynomial *poly; public: WritePolynomialSpecFunctor(std::ostream &o, Polynomial *P) : os(o), poly(P){} template void operator()(void *&, Domain *D) const { PrintPoly ()(D, poly, os); } }; class WritePolynomialFunctor{ protected: std::ostream &os; const PolynomialKey &key; public: WritePolynomialFunctor(std::ostream &o, const PolynomialKey &k) : os(o), key(k) {} template void operator() (void*, Polynomial *P) const { VectorTable::iterator it = vector_hashtable.find(key); if ( it == vector_hashtable.end()) throw lb_runtime_error("LinBox ERROR: invalid polynomial (writing impossible)"); WritePolynomialSpecFunctor Fct(os,P); DomainFunction::call(it->second->getDomainKey(), Fct); } }; void writePolynomial (const PolynomialKey &key, std::ostream &os){ WritePolynomialFunctor Fct(os, key); VectorFunction::call(key, Fct); } /********************************** * API to serialize a polynomial * **********************************/ template class ToSerialPolynomial { public: template inline void operator()(SerialPolynomial &s, Domain *D, Polynomial *poly){ throw lb_runtime_error("LinBox ERROR: incompatible type (polynomial writing impossible)\n"); } }; template class ToSerialPolynomial{ public: template inline void operator()(SerialPolynomial &s, Domain *D, Polynomial *poly){ s.type = "integer"; s.list.resize(poly->size()); typename Polynomial::const_iterator it_P= poly->begin(); std::vector::iterator it_s= s.list.begin(); for (; it_P != poly->end(); ++it_P, ++it_s) D->convert(*it_s, *it_P); } }; template class SerializePolynomialSpecFunctor{ protected: Polynomial *poly; public: SerializePolynomialSpecFunctor(Polynomial *P) : poly(P){} template void operator()(SerialPolynomial &s, Domain *D) const { ToSerialPolynomial()(s, D, poly); } }; class SerializePolynomialFunctor{ protected: const PolynomialKey &key; public: SerializePolynomialFunctor(const PolynomialKey &k) : key(k) {} template void operator() (SerialPolynomial& s, Polynomial *P) const { VectorTable::iterator it = vector_hashtable.find(key); if ( it == vector_hashtable.end()) throw lb_runtime_error("LinBox ERROR: invalid polynomial (serializing impossible)"); SerializePolynomialSpecFunctor Fct(P); DomainFunction::call(s, it->second->getDomainKey(), Fct); } }; void SerializePolynomial (SerialPolynomial &s, const PolynomialKey &key) { SerializePolynomialFunctor Fct(key); VectorFunction::call(s, key, Fct); } #endif // vim:sts=8:sw=8:ts=8:noet:sr:cino=>s,f0,{0,g0,(0,:0,t0,+0,=s // Local Variables: // mode: C++ // tab-width: 8 // indent-tabs-mode: nil // c-basic-offset: 8 // End: linbox-1.3.2/interfaces/driver/lb-polynomial.h000066400000000000000000000037211176453053400213700ustar00rootroot00000000000000/* lb-polynomial.h * Copyright (C) 2005 Pascal Giorgi * * Written by Pascal Giorgi * * ========LICENCE======== * This file is part of the library LinBox. * * LinBox is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ========LICENCE======== */ #ifndef __LINBOX_lb_polynomial_H #define __LINBOX_lb_polynomial_H #include /*********************************************** * Polynomial are handled through dense vector * ***********************************************/ typedef VectorKey PolynomialKey; // nothing to do at this stage (no creation available) /************************************************************* * API to write a polynomial over the standard output stream * *************************************************************/ void writePolynomial (const PolynomialKey &key, std::ostream &os); /********************************** * API to serialize a polynomial * **********************************/ struct SerialPolynomial{ const char *type; std::vector list; }; void SerializePolynomial (SerialPolynomial &s, const PolynomialKey &key); #endif // vim:sts=8:sw=8:ts=8:noet:sr:cino=>s,f0,{0,g0,(0,:0,t0,+0,=s // Local Variables: // mode: C++ // tab-width: 8 // indent-tabs-mode: nil // c-basic-offset: 8 // End: linbox-1.3.2/interfaces/driver/lb-rank.C000066400000000000000000000044241176453053400200740ustar00rootroot00000000000000/* lb-rank.C * Copyright (C) 2005 Pascal Giorgi * * Written by Pascal Giorgi * * ========LICENCE======== * This file is part of the library LinBox. * * LinBox is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ========LICENCE======== */ #ifndef __LINBOX_lb_rank_C #define __LINBOX_lb_rank_C #include "linbox/solutions/rank.h" #include #include extern BlackboxTable blackbox_hashtable; /**************** * Rank Functor * ****************/ template class RankFunctor{ private: Method meth; public: RankFunctor(Method m = Method()) : meth(m) {} template void operator() (unsigned long &res, Blackbox *B) const { LinBox::rank(res, *B, meth); } }; /********************************************************** * API for rank computation * * rank is returned through a given unsigned long integer * **********************************************************/ void lb_rank(unsigned long &res, const BlackboxKey& key){ RankFunctor<> fct; BlackboxFunction::call(res, key, fct); } /***************************************************** * API for rank computation * * rank is returned through an unsigned long integer * *****************************************************/ unsigned long lb_rank(const BlackboxKey& key){ unsigned long r; lb_rank(r, key); return r; } #endif // vim:sts=8:sw=8:ts=8:noet:sr:cino=>s,f0,{0,g0,(0,:0,t0,+0,=s // Local Variables: // mode: C++ // tab-width: 8 // indent-tabs-mode: nil // c-basic-offset: 8 // End: linbox-1.3.2/interfaces/driver/lb-rank.h000066400000000000000000000037101176453053400201360ustar00rootroot00000000000000/* lb-rank.h * Copyright (C) 2005 Pascal Giorgi * * Written by Pascal Giorgi * * ========LICENCE======== * This file is part of the library LinBox. * * LinBox is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ========LICENCE======== */ #ifndef __LINBOX_lb_rank_H #define __LINBOX_lb_rank_H #include /********************************************************** * API for rank computation * * rank is returned through a given unsigned long integer * **********************************************************/ void lb_rank(unsigned long &res, const BlackboxKey& key); /***************************************************** * API for rank computation * * rank is returned through an unsigned long integer * *****************************************************/ unsigned long lb_rank(const BlackboxKey& key); /****************************************************** * API to print available method for rank computation * ******************************************************/ const char* lb_rank_methods(); #endif // vim:sts=8:sw=8:ts=8:noet:sr:cino=>s,f0,{0,g0,(0,:0,t0,+0,=s // Local Variables: // mode: C++ // tab-width: 8 // indent-tabs-mode: nil // c-basic-offset: 8 // End: linbox-1.3.2/interfaces/driver/lb-solve.h000066400000000000000000000035361176453053400203410ustar00rootroot00000000000000/* lb-solve.h * Copyright (C) 2005 Pascal Giorgi * * Written by Pascal Giorgi * * ========LICENCE======== * This file is part of the library LinBox. * * LinBox is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ========LICENCE======== */ #ifndef __LINBOX_lb_solve_H #define __LINBOX_lb_solve_H #include #include /*********************************************************** * API for solving linear systems * * vector solution is returned through a given vector key * ***********************************************************/ void lb_solve(const VectorKey &res, const BlackboxKey &Bkey, const VectorKey &Vkey); /***************************************************** * API for solving linear systems * * vector solution is returned through a vector key * *****************************************************/ const VectorKey& lb_solve(const BlackboxKey &Bkey, const VectorKey &Vkey); #endif // vim:sts=8:sw=8:ts=8:noet:sr:cino=>s,f0,{0,g0,(0,:0,t0,+0,=s // Local Variables: // mode: C++ // tab-width: 8 // indent-tabs-mode: nil // c-basic-offset: 8 // End: linbox-1.3.2/interfaces/driver/lb-utilities.h000066400000000000000000000071241176453053400212210ustar00rootroot00000000000000/* lb-utilities.h * Copyright (C) 2005 Pascal Giorgi * * Written by Pascal Giorgi * * ========LICENCE======== * This file is part of the library LinBox. * * LinBox is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ========LICENCE======== */ #ifndef __LINBOX_lb_utilities_H #define __LINBOX_lb_utilities_H #include "linbox/util/error.h" #include "linbox/util/debug.h" #include #include /************************************** * definition of LinBox's exceptions * **************************************/ typedef LinBox::LinboxError lb_runtime_error; /************************************************ * definition of a functor to compare two char* * ************************************************/ struct ltstr { bool operator()(const char* s1, const char* s2) const {return strcmp(s1, s2) < 0;} }; /***************************************** * definition of LinBox's object visitor * *****************************************/ class LinBoxBaseVisitor { public: virtual ~LinBoxBaseVisitor() {} }; template class LinBoxVisitor : public virtual LinBoxBaseVisitor { public: virtual void visit(const T&) = 0; }; class LinBoxBaseVisitable { public: virtual ~LinBoxBaseVisitable(){} virtual void Accept(LinBoxBaseVisitor&) = 0; protected: template static void AcceptImpl(const T& visited, LinBoxBaseVisitor &guest){ if (LinBoxVisitor* ptr = dynamic_cast*> (&guest)) ptr->visit(visited); else throw lb_runtime_error("LinBox ERROR: no visitor found (check that all the type are defined in their corresponding type list)\n "); } }; #define LINBOX_VISITABLE() \ virtual void Accept(LinBoxBaseVisitor &guest) \ { AcceptImpl(*this, guest);} /******************************************* * definition of LinBox's object type list * *******************************************/ template struct LinBoxTypelist { typedef T Head; typedef U Tail; }; // Dumb type for ending a type list struct LinBoxDumbType{}; /************************************************* * function to append LinBox's object type list * *************************************************/ namespace LinBoxTL{ template struct Append; template <> struct Append { typedef LinBoxDumbType Result; }; template struct Append { typedef LinBoxTypelist Result; }; template struct Append > { typedef LinBoxTypelist Result; }; template struct Append , T > { typedef LinBoxTypelist::Result> Result; }; } #endif // vim:sts=8:sw=8:ts=8:noet:sr:cino=>s,f0,{0,g0,(0,:0,t0,+0,=s // Local Variables: // mode: C++ // tab-width: 8 // indent-tabs-mode: nil // c-basic-offset: 8 // End: linbox-1.3.2/interfaces/driver/lb-vector-abstract.h000066400000000000000000000034261176453053400223120ustar00rootroot00000000000000/* lb-vector-abstract.h * Copyright (C) 2005 Pascal Giorgi * * Written by Pascal Giorgi * * ========LICENCE======== * This file is part of the library LinBox. * * LinBox is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. du -h tes * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ========LICENCE======== */ #ifndef __LINBOX_lb_vector_abstract_H #define __LINBOX_lb_vector_abstract_H #include #include /******************************* * Abstract object for Vectors * *******************************/ class VectorAbstract : public LinBoxBaseVisitable { public: virtual ~VectorAbstract(){} virtual VectorAbstract* clone() const =0; virtual void* getPtr() const =0; virtual const DomainKey& getDomainKey() const =0; virtual const char* info() const =0; virtual void rebind(const DomainKey&) =0; LINBOX_VISITABLE(); }; #endif // vim:sts=8:sw=8:ts=8:noet:sr:cino=>s,f0,{0,g0,(0,:0,t0,+0,=s // Local Variables: // mode: C++ // tab-width: 8 // indent-tabs-mode: nil // c-basic-offset: 8 // End: linbox-1.3.2/interfaces/driver/lb-vector-collection.h000066400000000000000000000033621176453053400226410ustar00rootroot00000000000000/* lb-vector-collection.h * Copyright (C) 2005 Pascal Giorgi * * Written by Pascal Giorgi * * ========LICENCE======== * This file is part of the library LinBox. * * LinBox is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. du -h tes * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ========LICENCE======== */ #ifndef __LINBOX_lb_vector_collection_H #define __LINBOX_lb_vector_collection_H #include #include /************************* * Collection of Vectors * *************************/ // definition of a key typedef size_t VectorKey; // comparison functor on key struct VectorKeyLessThan{ bool operator()(const VectorKey& k1, const VectorKey &k2) { return (k1 < k2);}}; // definition of a hash table type typedef std::map VectorTable; // definition of a serial vector struct SerialVector { const char* type; std::vector list; }; #endif // vim:sts=8:sw=8:ts=8:noet:sr:cino=>s,f0,{0,g0,(0,:0,t0,+0,=s // Local Variables: // mode: C++ // tab-width: 8 // indent-tabs-mode: nil // c-basic-offset: 8 // End: linbox-1.3.2/interfaces/driver/lb-vector-data.h000066400000000000000000000206071176453053400214200ustar00rootroot00000000000000/* lb-vector-data.h * Copyright (C) 2005 Pascal Giorgi * * Written by Pascal Giorgi * * ========LICENCE======== * This file is part of the library LinBox. * * LinBox is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ========LICENCE======== */ #ifndef __LINBOX_lb_vector_data_H #define __LINBOX_lb_vector_data_H #include #include "linbox/field/hom.h" #include #include #include #include #include #include extern VectorTable vector_hashtable; /*************************************************** * Functor to determine domain in Abstract Vectors * ***************************************************/ template class Vector, class Functor, template class Alloc=std::allocator> class VectorSpecFunctor{ const Functor &fct; void *ptr; public: VectorSpecFunctor(const Functor &f, void *p) : fct(f), ptr(p) {} template void operator() (Result& res, Domain *d) const { fct(res, static_cast >*> (ptr)); } }; /***************************************** * Factory to construct Abstract Vectors * *****************************************/ class Vector_Factory { public: typedef VectorAbstract* (*createVector_1_CallBack)(const DomainKey &, size_t, const char*); typedef VectorAbstract* (*createVector_2_CallBack)(const DomainKey &, std::istream&, const char*); typedef std::map , ltstr> CallBackMap; bool add(const char *name, std::pair createD){ return _callback.insert(CallBackMap::value_type(name, createD)).second; } bool remove(const char *name){ return _callback.erase(name) == 1; } VectorAbstract* create(const char *name, const DomainKey &k, size_t n){ CallBackMap::iterator it = _callback.find(name); if (it != _callback.end()){ return it->second.first(k, n, name); } else { std::string mes("LinBox ERROR: you are trying to construct a non defined vector << "); mes+= std::string(name); mes+= std::string(" >>\n"); throw lb_runtime_error(mes.c_str());// throw an exception } } VectorAbstract* create(const char *name, const DomainKey &k, std::istream &is){ CallBackMap::iterator it = _callback.find(name); if (it != _callback.end()){ return it->second.second(k, is, name); } else { std::string mes("LinBox ERROR: you are trying to construct a non defined vector << "); mes+= std::string(name); mes+= std::string(" >>\n"); throw lb_runtime_error(mes.c_str());// throw an exception } } size_t size() { return _callback.size(); } private: CallBackMap _callback; }; /*************************** * Functor to copy Vectors * ***************************/ class CopyVectorFunctor { public: template void operator()(void *&res, Vector *V) const { res= new Vector(*V); } }; /****************************** * Functors to rebind Vectors * ******************************/ template class Vector, template class Alloc=std::allocator> class RebindVectorFunctor{ void *&ptr; public: RebindVectorFunctor(void *&p) : ptr(p) {} template void operator()(const DomainKey &key, Domain *D) const { RebindVectorFunctor fct(ptr); DomainFunction::call(*D, key, fct); } template void operator()(DomainSource &res, DomainTarget *D) const { Vector > *v_source= static_cast > * > (ptr); Vector > *v_target= new Vector >(v_source->size()); LinBox::Hom hom(res, *D); for (size_t i=0;isize();++i) hom.image((*v_target)[i], (*v_source)[i]); delete v_source; ptr = v_target; } }; /******************************************************** * Vector Envelope to be compliant with Vector Abstract * ********************************************************/ template > class Vector> class VectorEnvelope : public VectorAbstract { protected: void *ptr; DomainKey key; const char* _info; public: VectorEnvelope(void* p, const DomainKey &k, const char* Info) : ptr(p), key(k, true), _info(Info) {} ~VectorEnvelope() {} LINBOX_VISITABLE(); template void launch (Result &res, const Functor &fct) const { VectorSpecFunctor vs(fct, ptr); DomainFunction::call(res, key, vs); } VectorAbstract* clone() const { CopyVectorFunctor Fct; void *v; launch(v, Fct); return new VectorEnvelope(v, key, _info); } void * getPtr() const { return ptr;} const DomainKey& getDomainKey() const {return key;} const char* info() const { std::string msg= "[ LinBox Vector (storage = "; msg+= std::string(_info); msg+= std::string(", domain = [LinBox Domain (type = "); msg+= std::string(key.Type()); msg+= std::string(", charact = "); msg+= std::string(key.Characteristic()); msg+= std::string(")] )]\n"); return msg.c_str(); } void rebind(const DomainKey &k) { RebindVectorFunctor Fct(ptr); DomainFunction::call(k, key, Fct); key = k; key.set_autogc(); } }; /********************************* * Functors to construct Vectors * *********************************/ template class Vector, template class Alloc=std::allocator> class CreateVectorFunctor{ size_t &_dim; public: CreateVectorFunctor( size_t &n) : _dim(n) {} template void operator()(void *&res, Domain *D) const { typename Domain::Element zero; D->init(zero, 0UL); res = new Vector >(_dim, zero); } }; template class Vector, template class Alloc=std::allocator> class CreateVectorFromStreamFunctor{ std::istream ∈ public: CreateVectorFromStreamFunctor(std::istream &i) : in(i) {} template void operator()(void *&res, Domain *D) const { size_t n; LinBox::integer tmp; in>>n; Vector > * v = new Vector >(n); typename Vector >::iterator it = v->begin(); for (; it != v->end(); ++it){ in>>tmp; D->init(*it, tmp); } res =v; } }; /****************************************************** * Vector construction function used in the Factory * ******************************************************/ template > class Vector> VectorAbstract* constructVector_from_size(const DomainKey &k, size_t n, const char* info){ CreateVectorFunctor fct(n); void *bb; DomainFunction::call(bb, k, fct); VectorEnvelope *bbe = new VectorEnvelope (bb, k, info); return bbe; } template > class Vector> VectorAbstract* constructVector_from_stream (const DomainKey &k, std::istream &in, const char *info){ CreateVectorFromStreamFunctor fct(in); void *v; DomainFunction::call(v, k, fct); VectorEnvelope *ve = new VectorEnvelope (v, k, info); return ve; } #endif // vim:sts=8:sw=8:ts=8:noet:sr:cino=>s,f0,{0,g0,(0,:0,t0,+0,=s // Local Variables: // mode: C++ // tab-width: 8 // indent-tabs-mode: nil // c-basic-offset: 8 // End: linbox-1.3.2/interfaces/driver/lb-vector-function.h000066400000000000000000000052071176453053400223330ustar00rootroot00000000000000/* lb-vector-function.h * Copyright (C) 2005 Pascal Giorgi * * Written by Pascal Giorgi * * ========LICENCE======== * This file is part of the library LinBox. * * LinBox is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ========LICENCE======== */ #ifndef __LINBOX_lb_vector_function_H #define __LINBOX_lb_vector_function_H #include #include /********************************************************* * API to launch a generic function over a linbox vector * *********************************************************/ class VectorFunction { public: // call a functor over a vector from the hashtable, result is given through 1st parameter template static void call(Result &res, const std::pair &vector, const Functor &functor){ ApplyVectorFunctor Ap(res, functor); (vector.second)->Accept(Ap); } // call a functor over a vector from the hashtable, no result template static void call(const std::pair &v, const Functor &f){ void *dumbresult; call(dumbresult,v,f); } // call a functor over a vector from its key, result is given through 1st parameter template static void call(Result &res, const VectorKey &key, const Functor &functor){ VectorTable::const_iterator it = vector_hashtable.find(key); if (it != vector_hashtable.end()) VectorFunction::call(res, *it, functor); else throw lb_runtime_error("LinBox ERROR: use of a non allocated vector\n");// throw an exception } // call a functor over a vector from its key, no result template static void call(const VectorKey &k, const Functor &f) { void *dumbresult; call(dumbresult,k,f); } }; #endif // vim:sts=8:sw=8:ts=8:noet:sr:cino=>s,f0,{0,g0,(0,:0,t0,+0,=s // Local Variables: // mode: C++ // tab-width: 8 // indent-tabs-mode: nil // c-basic-offset: 8 // End: linbox-1.3.2/interfaces/driver/lb-vector-functor.h000066400000000000000000000063331176453053400221670ustar00rootroot00000000000000/* lb-vector-functor.h * Copyright (C) 2005 Pascal Giorgi * * Written by Pascal Giorgi * * ========LICENCE======== * This file is part of the library LinBox. * * LinBox is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. du -h tes * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ========LICENCE======== */ #ifndef __LINBOX_lb_vector_functor_H #define __LINBOX_lb_vector_functor_H #include #include #include /************************************************************************* * Base class for apply functor over a vector (used for code generation) * *************************************************************************/ template class ApplyVectorFunctorBase { protected: Result *res; const Functor *fct; public: ApplyVectorFunctorBase(){} template void apply(const Vector &b){ b.launch(*res, *fct); } }; /*************************************** * Macro for automatic code generation * ***************************************/ #define LB_VECTOR_VISIT(B) \ void visit(const B &d){apply(d);} /********************************************************************************** * Generate automatically the visitors for all Vector in the vector type list * **********************************************************************************/ template class LinBoxVectorVisitor; template class LinBoxVectorVisitor{}; template class LinBoxVectorVisitor, Functor, Result> : public LinBoxVisitor , public ApplyVectorFunctorBase { public: LB_VECTOR_VISIT(T); }; template class LinBoxVectorVisitor, Functor, Result > : public LinBoxVisitor , public LinBoxVectorVisitor { public: LB_VECTOR_VISIT(Head); }; /**************************************************** * functionalities to apply functor over a vector * ****************************************************/ template class ApplyVectorFunctor : public LinBoxVectorVisitor { public: ApplyVectorFunctor(Result &r, const Functor &f) { this->res = &r; this->fct = &f; } }; #endif // vim:sts=8:sw=8:ts=8:noet:sr:cino=>s,f0,{0,g0,(0,:0,t0,+0,=s // Local Variables: // mode: C++ // tab-width: 8 // indent-tabs-mode: nil // c-basic-offset: 8 // End: linbox-1.3.2/interfaces/driver/lb-vector-type.h000066400000000000000000000040261176453053400214650ustar00rootroot00000000000000/* lb-vector-type.h * Copyright (C) 2005 Pascal Giorgi * * Written by Pascal Giorgi * * ========LICENCE======== * This file is part of the library LinBox. * * LinBox is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ========LICENCE======== */ #ifndef __LINBOX_lb_vector_type_H #define __LINBOX_lb_vector_type_H /************************************** * Define the list of all Vector Type * **************************************/ // (NEED TO USE ENVELOPE TO DEFINE A CONCRETE TYPE) typedef LinBoxTypelist < VectorEnvelope< std::vector > , LinBoxDumbType> VL1; // define the vector typelist typedef VL1 VectorList; /******************************************* * Update the Factory with all vector type * *******************************************/ extern Vector_Factory linbox_vector; void UpdateVector() { linbox_vector.add("linbox_dense", Vector_Factory::CallBackMap::value_type::second_type( constructVector_from_size, constructVector_from_stream )); } /*************************** * Default type for vector * ***************************/ // definition of the default type vector #define default_vector "linbox_dense" #endif // vim:sts=8:sw=8:ts=8:noet:sr:cino=>s,f0,{0,g0,(0,:0,t0,+0,=s // Local Variables: // mode: C++ // tab-width: 8 // indent-tabs-mode: nil // c-basic-offset: 8 // End: linbox-1.3.2/interfaces/driver/lb-vector.C000066400000000000000000000242211176453053400204400ustar00rootroot00000000000000/* lb-vector.C * Copyright (C) 2005 Pascal Giorgi * * Written by Pascal Giorgi * * ========LICENCE======== * This file is part of the library LinBox. * * LinBox is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ========LICENCE======== */ #ifndef __LINBOX_lb_vector_C #define __LINBOX_lb_vector_C #include "linbox-config.h" #include #include #include /*\************************** * Allocate global variable * ****************************/ // global hash table for allocated vector VectorTable vector_hashtable; // global variable for the factory Vector_Factory linbox_vector; // global variable for current vector type const char* current_vector = default_vector; /********************************************************** * function to add an abstract vector in linbox hashtable * **********************************************************/ const VectorKey& addVector(VectorAbstract * v){ std::pair status; status = vector_hashtable.insert(std::pair (VectorKey(v), v)); if (status.second) return status.first->first; else throw lb_runtime_error("LinBox ERROR: vector creation failed \n");// throw an exception } /********************************************************* * API to contruct a n dimensional vector over a domain * *********************************************************/ const VectorKey& createVector(const DomainKey &k, size_t n, const char *name){ const char *type=name; if (type == NULL) type= current_vector; VectorAbstract *v = linbox_vector.create(type, k, n); return addVector(v); } /****************************************** * API to contruct a vector from a stream * ******************************************/ const VectorKey& createVector(const DomainKey &k, std::istream &in, const char *name){ const char *type=name; if (type == NULL) type= current_vector; VectorAbstract *v = linbox_vector.create(type, k, in); return addVector(v); } /********************************** * API to copy an existing vector * **********************************/ const VectorKey& copyVector(const VectorKey &k){ VectorTable::iterator it = vector_hashtable.find(k); if (it == vector_hashtable.end()) throw lb_runtime_error("LinBox ERROR: vector does not exist (copying impossible)\n"); VectorAbstract *v = it->second->clone(); return addVector(v); } /****************************************** * API to get the dimensions of a vector * ******************************************/ class VectorDimensionFunctor{ public: template void operator()(size_t &dim, Vector *V) const{ dim = V->size(); } }; size_t getVectorDimension(const VectorKey &key){ size_t dim; VectorDimensionFunctor Fct; VectorFunction::call(dim, key, Fct); return dim; } /***************************************** * API to set a vector with random value * *****************************************/ template class RandomVector{ public: template void operator()(Vector *V, Domain *D) { throw lb_runtime_error("LinBox ERROR: incompatible type (vector writing impossible)\n"); } }; template class RandomVector{ public: template void operator()(Vector *V, Domain *D) { typename Domain::RandIter G(*D); for (size_t i=0; i< V->size();++i) G.random((*V)[i]); } }; template class VectorAtRandomFunctorSpec{ protected: Vector *vect; public: VectorAtRandomFunctorSpec(Vector *V) : vect(V) {} template void operator()(void *, Domain *D) const { RandomVector()(vect, D); } }; class VectorAtRandomFunctor{ protected: const VectorKey key; public: VectorAtRandomFunctor(const VectorKey &k) : key(k) {} template void operator()(void*, Vector *V) const { VectorTable::iterator it = vector_hashtable.find(key); if ( it == vector_hashtable.end()) throw lb_runtime_error("LinBox ERROR: invalid vector (set random value impossible)"); VectorAtRandomFunctorSpec Fct(V); DomainFunction::call(it->second->getDomainKey(), Fct); } }; void setVectorAtRandom(const VectorKey &k){ VectorAtRandomFunctor Fct(k); VectorFunction::call(k, Fct); } /******************************************** * API to rebind a vector over a new domain * ********************************************/ void rebindVector(const VectorKey &Vkey, const DomainKey &Dkey){ VectorTable::iterator it = vector_hashtable.find(Vkey); if ( it == vector_hashtable.end()) throw lb_runtime_error("LinBox ERROR: invalid vector (rebinding to another domain impossible)"); it->second->rebind(Dkey); } /***************************************** * API to write a vector over an ostream * *****************************************/ template class PrintVector{ public: template< class Domain, class Poly, class Out> void operator()(Domain *D, Poly *poly, Out &os){ throw lb_runtime_error("LinBox ERROR: incompatible type (vector writing impossible)\n"); } }; template class PrintVector { public: template< class Domain, class Vector, class Out> void operator()(Domain *D, Vector *vect, Out &os){ os<<" [ "; for (size_t i=0; isize()-1; ++i){ D->write(os, (*vect)[i])<<" , "; } D->write(os, (*vect)[vect->size()-1]); os<<" ]\n"; } }; template class WriteVectorSpecFunctor{ protected: std::ostream &os; Vector *vect; public: WriteVectorSpecFunctor(std::ostream &o, Vector *V) : os(o), vect(V){} template void operator()(void *&, Domain *D) const { PrintVector ()(D, vect, os); } }; class WriteVectorFunctor{ protected: std::ostream &os; const VectorKey &key; public: WriteVectorFunctor(std::ostream &o, const VectorKey &k) : os(o), key(k) {} template void operator() (void*, Vector *V) const { VectorTable::iterator it = vector_hashtable.find(key); if ( it == vector_hashtable.end()) throw lb_runtime_error("LinBox ERROR: invalid vector (writing impossible)"); WriteVectorSpecFunctor Fct(os,V); DomainFunction::call(it->second->getDomainKey(), Fct); } }; void writeVector (const VectorKey &key, std::ostream &os){ WriteVectorFunctor Fct(os, key); VectorFunction::call(key, Fct); } /******************************************* * API to modify the current vector type * *******************************************/ void setVector(const char* t){ current_vector= t; } /********************************* * API to write info on a vector * *********************************/ void writeVectorInfo(const VectorKey &key, std::ostream& os){ VectorTable::iterator it = vector_hashtable.find(key); if ( it == vector_hashtable.end()) throw lb_runtime_error("LinBox ERROR: invalid vector (writing vector info impossible)"); os<second->info(); } /********************************** * API to serialize a vector * **********************************/ template class ToSerialVector { public: template inline void operator()(SerialVector &s, Domain *D, Vector *poly){ throw lb_runtime_error("LinBox ERROR: incompatible type (vector writing impossible)\n"); } }; template class ToSerialVector{ public: template inline void operator()(SerialVector &s, Domain *D, Vector *poly){ s.type = "integer"; s.list.resize(poly->size()); typename Vector::const_iterator it_P= poly->begin(); std::vector::iterator it_s= s.list.begin(); for (; it_P != poly->end(); ++it_P, ++it_s) D->convert(*it_s, *it_P); } }; template class ToSerialVector{ public: template inline void operator()(SerialVector &s, Domain *D, Vector *poly){ s.type = "rational"; s.list.resize(2*poly->size()); typename Vector::const_iterator it_P= poly->begin(); std::vector::iterator it_s= s.list.begin(); for (; it_P != poly->end(); ++it_P, ++it_s){ D->get_num(*it_s, *it_P); ++it_s; D->get_den(*it_s, *it_P); } } }; template class SerializeVectorSpecFunctor{ protected: Vector *poly; public: SerializeVectorSpecFunctor(Vector *P) : poly(P){} template void operator()(SerialVector &s, Domain *D) const { ToSerialVector::categoryTag>()(s, D, poly); } }; class SerializeVectorFunctor{ protected: const VectorKey &key; public: SerializeVectorFunctor(const VectorKey &k) : key(k) {} template void operator() (SerialVector& s, Vector *P) const { VectorTable::iterator it = vector_hashtable.find(key); if ( it == vector_hashtable.end()) throw lb_runtime_error("LinBox ERROR: invalid vector (serializing impossible)"); SerializeVectorSpecFunctor Fct(P); DomainFunction::call(s, it->second->getDomainKey(), Fct); } }; void SerializeVector (SerialVector &s, const VectorKey &key) { SerializeVectorFunctor Fct(key); VectorFunction::call(s, key, Fct); } #endif // vim:sts=8:sw=8:ts=8:noet:sr:cino=>s,f0,{0,g0,(0,:0,t0,+0,=s // Local Variables: // mode: C++ // tab-width: 8 // indent-tabs-mode: nil // c-basic-offset: 8 // End: linbox-1.3.2/interfaces/driver/lb-vector.h000066400000000000000000000062731176453053400205140ustar00rootroot00000000000000/* lb-vector.h * Copyright (C) 2005 Pascal Giorgi * * Written by Pascal Giorgi * * ========LICENCE======== * This file is part of the library LinBox. * * LinBox is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ========LICENCE======== */ #ifndef __LINBOX_lb_vector_H #define __LINBOX_lb_vector_H #include #include /************************* * Initializer of Vector * *************************/ void UpdateVector(); /********************************************************* * API to contruct a n dimensional vector over a domain * *********************************************************/ const VectorKey& createVector(const DomainKey &k, size_t n, const char *name=NULL); /****************************************** * API to contruct a vector from a stream * ******************************************/ const VectorKey& createVector(const DomainKey &k, std::istream &in, const char *name=NULL); /********************************** * API to copy an existing vector * **********************************/ const VectorKey& copyVector(const VectorKey &k); /****************************************** * API to get the dimensions of a vector * ******************************************/ size_t getVectorDimension(const VectorKey &key); /***************************************** * API to set a vector with random value * *****************************************/ void setVectorAtRandom(const VectorKey &k); /******************************************** * API to rebind a vector over a new domain * ********************************************/ void rebindVector(const VectorKey &Vkey, const DomainKey &Dkey); /**************************************** * API to write a vector over an stream * ****************************************/ void writeVector (const VectorKey &key, std::ostream &os); /******************************************* * API to modify the current vector type * *******************************************/ void setVector(const char* t); /********************************* * API to write info on a vector * *********************************/ void writeVectorInfo(const VectorKey &k, std::ostream& os); /****************************** * API to serialize a vector * ******************************/ void SerializeVector (SerialVector &s, const VectorKey &key); #endif // vim:sts=8:sw=8:ts=8:noet:sr:cino=>s,f0,{0,g0,(0,:0,t0,+0,=s // Local Variables: // mode: C++ // tab-width: 8 // indent-tabs-mode: nil // c-basic-offset: 8 // End: linbox-1.3.2/interfaces/kaapi/000077500000000000000000000000001176453053400162305ustar00rootroot00000000000000linbox-1.3.2/interfaces/kaapi/Makefile.am000066400000000000000000000016561176453053400202740ustar00rootroot00000000000000# Copyright (c) 2010 the LinBox group # ========LICENCE======== # This file is part of the library LinBox. # # LinBox is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # # This library 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 # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # ========LICENCE======== pkgincludesubdir=$(pkgincludedir)/kaapi pkgincludesub_HEADERS = \ communicate.h linbox-1.3.2/interfaces/kaapi/Makefile.in000066400000000000000000000422461176453053400203050ustar00rootroot00000000000000# Makefile.in generated by automake 1.11.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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@ # Copyright (c) 2010 the LinBox group # ========LICENCE======== # This file is part of the library LinBox. # # LinBox is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # # This library 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 # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # ========LICENCE======== VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd 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 = : build_triplet = @build@ host_triplet = @host@ subdir = interfaces/kaapi DIST_COMMON = $(pkgincludesub_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/macros/aclocal-include.m4 \ $(top_srcdir)/macros/config-header.m4 \ $(top_srcdir)/macros/debug.m4 \ $(top_srcdir)/macros/expat-check.m4 \ $(top_srcdir)/macros/fflas-ffpack-check.m4 \ $(top_srcdir)/macros/fplll-check.m4 \ $(top_srcdir)/macros/givaro-check.m4 \ $(top_srcdir)/macros/gmp-check.m4 \ $(top_srcdir)/macros/iml-check.m4 \ $(top_srcdir)/macros/lapack-check.m4 \ $(top_srcdir)/macros/libtool.m4 \ $(top_srcdir)/macros/lidia-check.m4 \ $(top_srcdir)/macros/linbox-benchmark.m4 \ $(top_srcdir)/macros/linbox-doc.m4 \ $(top_srcdir)/macros/linbox-misc.m4 \ $(top_srcdir)/macros/linbox-opt.m4 \ $(top_srcdir)/macros/ltoptions.m4 \ $(top_srcdir)/macros/ltsugar.m4 \ $(top_srcdir)/macros/ltversion.m4 \ $(top_srcdir)/macros/lt~obsolete.m4 \ $(top_srcdir)/macros/m4ri-check.m4 \ $(top_srcdir)/macros/m4rie-check.m4 \ $(top_srcdir)/macros/maple-check.m4 \ $(top_srcdir)/macros/mpfr-check.m4 \ $(top_srcdir)/macros/ntl-check.m4 \ $(top_srcdir)/macros/saclib-check.m4 \ $(top_srcdir)/macros/sage-check.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = depcomp = am__depfiles_maybe = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(pkgincludesubdir)" HEADERS = $(pkgincludesub_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BLAS_CFLAGS = @BLAS_CFLAGS@ BLAS_LIBS = @BLAS_LIBS@ CC = @CC@ CCNAM = @CCNAM@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DBG = @DBG@ DEBUG_CFLAGS = @DEBUG_CFLAGS@ DEFAULT_CFLAGS = @DEFAULT_CFLAGS@ DEFS = @DEFS@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXPAT_CFLAGS = @EXPAT_CFLAGS@ EXPAT_LIBS = @EXPAT_LIBS@ FFLAS_FFPACK_CFLAGS = @FFLAS_FFPACK_CFLAGS@ FFLAS_FFPACK_LIBS = @FFLAS_FFPACK_LIBS@ FFLAS_FFPACK_LOC = @FFLAS_FFPACK_LOC@ FGREP = @FGREP@ FPLLL_CFLAGS = @FPLLL_CFLAGS@ FPLLL_LIBS = @FPLLL_LIBS@ GIVARO_CFLAGS = @GIVARO_CFLAGS@ GIVARO_LIBS = @GIVARO_LIBS@ GMP_CFLAGS = @GMP_CFLAGS@ GMP_LIBS = @GMP_LIBS@ GMP_VERSION = @GMP_VERSION@ GREP = @GREP@ IML_CFLAGS = @IML_CFLAGS@ IML_LIBS = @IML_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIDIA_CFLAGS = @LIDIA_CFLAGS@ LIDIA_LIBS = @LIDIA_LIBS@ LINBOX_BENCH_PATH = @LINBOX_BENCH_PATH@ LINBOX_DOC_PATH = @LINBOX_DOC_PATH@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ M4RIE_CFLAGS = @M4RIE_CFLAGS@ M4RIE_LIBS = @M4RIE_LIBS@ M4RI_CFLAGS = @M4RI_CFLAGS@ M4RI_LIBS = @M4RI_LIBS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAPLE_CFLAGS = @MAPLE_CFLAGS@ MAPLE_HOME = @MAPLE_HOME@ MAPLE_LIBS = @MAPLE_LIBS@ MAPLE_VERSION = @MAPLE_VERSION@ MKDIR_P = @MKDIR_P@ MPFR_CFLAGS = @MPFR_CFLAGS@ MPFR_LIBS = @MPFR_LIBS@ NM = @NM@ NMEDIT = @NMEDIT@ NTL_CFLAGS = @NTL_CFLAGS@ NTL_LIBS = @NTL_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PROF = @PROF@ RANLIB = @RANLIB@ RM = @RM@ SACLIB_CFLAGS = @SACLIB_CFLAGS@ SACLIB_LIBS = @SACLIB_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TESTS_CFLAGS = @TESTS_CFLAGS@ VERSION = @VERSION@ WARN = @WARN@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__leading_dot = @am__leading_dot@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ pkgincludesubdir = $(pkgincludedir)/kaapi pkgincludesub_HEADERS = \ communicate.h all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu --ignore-deps interfaces/kaapi/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu --ignore-deps interfaces/kaapi/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-pkgincludesubHEADERS: $(pkgincludesub_HEADERS) @$(NORMAL_INSTALL) @list='$(pkgincludesub_HEADERS)'; test -n "$(pkgincludesubdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(pkgincludesubdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(pkgincludesubdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkgincludesubdir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgincludesubdir)" || exit $$?; \ done uninstall-pkgincludesubHEADERS: @$(NORMAL_UNINSTALL) @list='$(pkgincludesub_HEADERS)'; test -n "$(pkgincludesubdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(pkgincludesubdir)'; $(am__uninstall_files_from_dir) 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; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ 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; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) 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; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(HEADERS) installdirs: for dir in "$(DESTDIR)$(pkgincludesubdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-pkgincludesubHEADERS install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-pkgincludesubHEADERS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool ctags distclean distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-pkgincludesubHEADERS install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-pkgincludesubHEADERS # 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: linbox-1.3.2/interfaces/kaapi/communicate.h000066400000000000000000000047711176453053400207160ustar00rootroot00000000000000/* Copyright (C) LinBox * * * * ========LICENCE======== * This file is part of the library LinBox. * * LinBox is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ========LICENCE======== */ #ifndef __LINBOX_kaapi_communicate_H #define __LINBOX_kaapi_communicate_H #include #include "linbox/integer.h" #include "linbox/field/modular-double.h" #include "linbox/matrix/sparse.h" /* * gmp integers */ a1::OStream& operator<<( a1::OStream& out, const Integer& x ) { std::ostringstream oss; oss << x; return out << oss.str(); } a1::IStream& operator>>( a1::IStream& in, Integer& x ) { std::string is; in >> is; std::istringstream iss(is); iss >> x; return in; } /* * modular double * we first inherit from them to access protected memebers */ /// limited doc so far. namespace kaapi { template struct Modular; /* * double specialization */ template <> struct Modular : LinBox::Modular { const double& get_modulus() const { return this->modulus; } const unsigned long& get_lmodulus() const { return this->lmodulus; } double& get_modulus() { return this->modulus; } unsigned long& get_lmodulus() { return this->lmodulus; } }; } //namespace a1::OStream& operator<<( a1::OStream& out, const LinBox::Modular& m) { const kaapi::Modular* m_tmp = static_cast*>(&m); return out << m_tmp->get_modulus() << m_tmp->get_lmodulus() ; } a1::IStream& operator>>( a1::IStream& in, LinBox::Modular& m) { kaapi::Modular* m_tmp = static_cast*>(&m); return in >> m_tmp->get_modulus() >> m_tmp->get_lmodulus() ; } #endif //__LINBOX_kaapi_communicate_H // vim:sts=8:sw=8:ts=8:noet:sr:cino=>s,f0,{0,g0,(0,:0,t0,+0,=s // Local Variables: // mode: C++ // tab-width: 8 // indent-tabs-mode: nil // c-basic-offset: 8 // End: linbox-1.3.2/interfaces/maple/000077500000000000000000000000001176453053400162415ustar00rootroot00000000000000linbox-1.3.2/interfaces/maple/Makefile.am000066400000000000000000000031631176453053400203000ustar00rootroot00000000000000# Copyright (c) 2010 the LinBox group # ========LICENCE======== # This file is part of the library LinBox. # # LinBox is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # # This library 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 # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # ========LICENCE======== if LINBOX_HAVE_MAPLE pkgincludesubdir=$(includedir)/interfaces/maple/new AM_CPPFLAGS =-I$(top_srcdir) -I. -I../../linbox AM_CXXFLAGS = @DEFAULT_CFLAGS@ -DDISABLE_COMMENTATOR -I../driver $(GMP_CFLAGS) $(NTL_CFLAGS) $(ATLAS_CFLAGS) $(FFLAS_FFPACK_CFLAGS) $(MAPLE_CFLAGS) $(GIVARO_CFLAGS) lib_LTLIBRARIES=liblbmaple.la liblbmaple_la_SOURCES= lb-maple.C liblbmaple_la_LDFLAGS=$(GIVARO_LIBS) $(GMP_LIBS) $(NTL_LIBS) $(BLAS_LIBS) $(MAPLE_LIBS) $(top_srcdir)/interfaces/driver/liblbdriver.la -Wl,-zmuldefs $(LDFLAGS) pkginclude_HEADERS =lb-maple.h lb-maple-utilities.h install-data-local: sh lb-maple-path.sh "$(libdir)/liblbmaple.so" $(INSTALL_DATA) lb-maple.mpl $(libdir)/lb-maple.mpl install-data-hook: cd $(libdir) && \ $(MAPLE_HOME)/bin/maple lb-maple.mpl 2>&1 > /dev/null endif linbox-1.3.2/interfaces/maple/Makefile.in000066400000000000000000000525641176453053400203220ustar00rootroot00000000000000# Makefile.in generated by automake 1.11.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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@ # Copyright (c) 2010 the LinBox group # ========LICENCE======== # This file is part of the library LinBox. # # LinBox is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # # This library 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 # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # ========LICENCE======== VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd 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 = : build_triplet = @build@ host_triplet = @host@ subdir = interfaces/maple DIST_COMMON = $(am__pkginclude_HEADERS_DIST) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/macros/aclocal-include.m4 \ $(top_srcdir)/macros/config-header.m4 \ $(top_srcdir)/macros/debug.m4 \ $(top_srcdir)/macros/expat-check.m4 \ $(top_srcdir)/macros/fflas-ffpack-check.m4 \ $(top_srcdir)/macros/fplll-check.m4 \ $(top_srcdir)/macros/givaro-check.m4 \ $(top_srcdir)/macros/gmp-check.m4 \ $(top_srcdir)/macros/iml-check.m4 \ $(top_srcdir)/macros/lapack-check.m4 \ $(top_srcdir)/macros/libtool.m4 \ $(top_srcdir)/macros/lidia-check.m4 \ $(top_srcdir)/macros/linbox-benchmark.m4 \ $(top_srcdir)/macros/linbox-doc.m4 \ $(top_srcdir)/macros/linbox-misc.m4 \ $(top_srcdir)/macros/linbox-opt.m4 \ $(top_srcdir)/macros/ltoptions.m4 \ $(top_srcdir)/macros/ltsugar.m4 \ $(top_srcdir)/macros/ltversion.m4 \ $(top_srcdir)/macros/lt~obsolete.m4 \ $(top_srcdir)/macros/m4ri-check.m4 \ $(top_srcdir)/macros/m4rie-check.m4 \ $(top_srcdir)/macros/maple-check.m4 \ $(top_srcdir)/macros/mpfr-check.m4 \ $(top_srcdir)/macros/ntl-check.m4 \ $(top_srcdir)/macros/saclib-check.m4 \ $(top_srcdir)/macros/sage-check.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgincludedir)" LTLIBRARIES = $(lib_LTLIBRARIES) liblbmaple_la_LIBADD = am__liblbmaple_la_SOURCES_DIST = lb-maple.C @LINBOX_HAVE_MAPLE_TRUE@am_liblbmaple_la_OBJECTS = lb-maple.lo liblbmaple_la_OBJECTS = $(am_liblbmaple_la_OBJECTS) liblbmaple_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(liblbmaple_la_LDFLAGS) $(LDFLAGS) -o $@ @LINBOX_HAVE_MAPLE_TRUE@am_liblbmaple_la_rpath = -rpath $(libdir) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = am__depfiles_maybe = CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(liblbmaple_la_SOURCES) DIST_SOURCES = $(am__liblbmaple_la_SOURCES_DIST) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__pkginclude_HEADERS_DIST = lb-maple.h lb-maple-utilities.h HEADERS = $(pkginclude_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BLAS_CFLAGS = @BLAS_CFLAGS@ BLAS_LIBS = @BLAS_LIBS@ CC = @CC@ CCNAM = @CCNAM@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DBG = @DBG@ DEBUG_CFLAGS = @DEBUG_CFLAGS@ DEFAULT_CFLAGS = @DEFAULT_CFLAGS@ DEFS = @DEFS@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXPAT_CFLAGS = @EXPAT_CFLAGS@ EXPAT_LIBS = @EXPAT_LIBS@ FFLAS_FFPACK_CFLAGS = @FFLAS_FFPACK_CFLAGS@ FFLAS_FFPACK_LIBS = @FFLAS_FFPACK_LIBS@ FFLAS_FFPACK_LOC = @FFLAS_FFPACK_LOC@ FGREP = @FGREP@ FPLLL_CFLAGS = @FPLLL_CFLAGS@ FPLLL_LIBS = @FPLLL_LIBS@ GIVARO_CFLAGS = @GIVARO_CFLAGS@ GIVARO_LIBS = @GIVARO_LIBS@ GMP_CFLAGS = @GMP_CFLAGS@ GMP_LIBS = @GMP_LIBS@ GMP_VERSION = @GMP_VERSION@ GREP = @GREP@ IML_CFLAGS = @IML_CFLAGS@ IML_LIBS = @IML_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIDIA_CFLAGS = @LIDIA_CFLAGS@ LIDIA_LIBS = @LIDIA_LIBS@ LINBOX_BENCH_PATH = @LINBOX_BENCH_PATH@ LINBOX_DOC_PATH = @LINBOX_DOC_PATH@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ M4RIE_CFLAGS = @M4RIE_CFLAGS@ M4RIE_LIBS = @M4RIE_LIBS@ M4RI_CFLAGS = @M4RI_CFLAGS@ M4RI_LIBS = @M4RI_LIBS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAPLE_CFLAGS = @MAPLE_CFLAGS@ MAPLE_HOME = @MAPLE_HOME@ MAPLE_LIBS = @MAPLE_LIBS@ MAPLE_VERSION = @MAPLE_VERSION@ MKDIR_P = @MKDIR_P@ MPFR_CFLAGS = @MPFR_CFLAGS@ MPFR_LIBS = @MPFR_LIBS@ NM = @NM@ NMEDIT = @NMEDIT@ NTL_CFLAGS = @NTL_CFLAGS@ NTL_LIBS = @NTL_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PROF = @PROF@ RANLIB = @RANLIB@ RM = @RM@ SACLIB_CFLAGS = @SACLIB_CFLAGS@ SACLIB_LIBS = @SACLIB_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TESTS_CFLAGS = @TESTS_CFLAGS@ VERSION = @VERSION@ WARN = @WARN@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__leading_dot = @am__leading_dot@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ @LINBOX_HAVE_MAPLE_TRUE@pkgincludesubdir = $(includedir)/interfaces/maple/new @LINBOX_HAVE_MAPLE_TRUE@AM_CPPFLAGS = -I$(top_srcdir) -I. -I../../linbox @LINBOX_HAVE_MAPLE_TRUE@AM_CXXFLAGS = @DEFAULT_CFLAGS@ -DDISABLE_COMMENTATOR -I../driver $(GMP_CFLAGS) $(NTL_CFLAGS) $(ATLAS_CFLAGS) $(FFLAS_FFPACK_CFLAGS) $(MAPLE_CFLAGS) $(GIVARO_CFLAGS) @LINBOX_HAVE_MAPLE_TRUE@lib_LTLIBRARIES = liblbmaple.la @LINBOX_HAVE_MAPLE_TRUE@liblbmaple_la_SOURCES = lb-maple.C @LINBOX_HAVE_MAPLE_TRUE@liblbmaple_la_LDFLAGS = $(GIVARO_LIBS) $(GMP_LIBS) $(NTL_LIBS) $(BLAS_LIBS) $(MAPLE_LIBS) $(top_srcdir)/interfaces/driver/liblbdriver.la -Wl,-zmuldefs $(LDFLAGS) @LINBOX_HAVE_MAPLE_TRUE@pkginclude_HEADERS = lb-maple.h lb-maple-utilities.h all: all-am .SUFFIXES: .SUFFIXES: .C .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu --ignore-deps interfaces/maple/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu --ignore-deps interfaces/maple/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done liblbmaple.la: $(liblbmaple_la_OBJECTS) $(liblbmaple_la_DEPENDENCIES) $(EXTRA_liblbmaple_la_DEPENDENCIES) $(liblbmaple_la_LINK) $(am_liblbmaple_la_rpath) $(liblbmaple_la_OBJECTS) $(liblbmaple_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c .C.o: $(CXXCOMPILE) -c -o $@ $< .C.obj: $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .C.lo: $(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-pkgincludeHEADERS: $(pkginclude_HEADERS) @$(NORMAL_INSTALL) @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(pkgincludedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkgincludedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgincludedir)" || exit $$?; \ done uninstall-pkgincludeHEADERS: @$(NORMAL_UNINSTALL) @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(pkgincludedir)'; $(am__uninstall_files_from_dir) 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; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ 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; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) 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; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgincludedir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." @LINBOX_HAVE_MAPLE_FALSE@install-data-local: @LINBOX_HAVE_MAPLE_FALSE@install-data-hook: clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-data-local install-pkgincludeHEADERS @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) install-data-hook install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-libLTLIBRARIES install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-libLTLIBRARIES uninstall-pkgincludeHEADERS .MAKE: install-am install-data-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES clean-libtool ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am \ install-data-hook install-data-local install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am \ install-libLTLIBRARIES install-man install-pdf install-pdf-am \ install-pkgincludeHEADERS install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am \ uninstall-libLTLIBRARIES uninstall-pkgincludeHEADERS @LINBOX_HAVE_MAPLE_TRUE@install-data-local: @LINBOX_HAVE_MAPLE_TRUE@ sh lb-maple-path.sh "$(libdir)/liblbmaple.so" @LINBOX_HAVE_MAPLE_TRUE@ $(INSTALL_DATA) lb-maple.mpl $(libdir)/lb-maple.mpl @LINBOX_HAVE_MAPLE_TRUE@install-data-hook: @LINBOX_HAVE_MAPLE_TRUE@ cd $(libdir) && \ @LINBOX_HAVE_MAPLE_TRUE@ $(MAPLE_HOME)/bin/maple lb-maple.mpl 2>&1 > /dev/null # 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: linbox-1.3.2/interfaces/maple/lb-maple-utilities.h000066400000000000000000000472241176453053400221250ustar00rootroot00000000000000/* lb-maple-utilities.h * Copyright (C) 2005 Pascal Giorgi * * Written by Pascal Giorgi * * ========LICENCE======== * This file is part of the library LinBox. * * LinBox is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ========LICENCE======== */ #ifndef __LINBOX_lb_maple_utilities_H #define __LINBOX_lb_maple_utilities_H #include "linbox-config.h" #include extern "C" { #include #include #include "mpltable.h" } //#define __LB_PRINT_GC #define __LINBOX_GC extern "C" { #ifdef __LINBOX_MAPLE_GMP_ACCESS extern void * (*__gmp_allocate_func)(size_t); extern void * (*__gmp_reallocate_func)(void*, size_t,size_t); extern void (*__gmp_free_func)(void*, size_t); static void * (*LB_GMP_ALLOC)(size_t) = __gmp_allocate_func; static void * (*LB_GMP_REALLOC)(void*,size_t,size_t) = __gmp_reallocate_func; static void (*LB_GMP_FREE)(void*,size_t) = __gmp_free_func; #endif void LB_GMP_SET(){ #ifdef __LINBOX_MAPLE_GMP_ACCESS mp_set_memory_functions(NULL,NULL,NULL); #endif } void LB_GMP_RESTORE() { #ifdef __LINBOX_MAPLE_GMP_ACCESS mp_set_memory_functions(LB_GMP_ALLOC,LB_GMP_REALLOC, LB_GMP_FREE); #endif } /********************************* * Raising LinBox error in Maple * *********************************/ static void lbRaiseError(MKernelVector kv, lb_runtime_error &t){ std::ostringstream out; out<s,f0,{0,g0,(0,:0,t0,+0,=s // Local Variables: // mode: C++ // tab-width: 8 // indent-tabs-mode: nil // c-basic-offset: 8 // End: linbox-1.3.2/interfaces/maple/lb-maple.C000066400000000000000000000760321176453053400200460ustar00rootroot00000000000000/* lb-maple.C * Copyright (C) 2005 Pascal Giorgi * * Written by Pascal Giorgi * * ========LICENCE======== * This file is part of the library LinBox. * * LinBox is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ========LICENCE======== */ #ifndef __LINBOX_lb_maple_C #define __LINBOX_lb_maple_C #include #include #include #include #include "linbox/util/timer.h" extern "C"{ #include } extern "C" { /*********************************** * Initializer of LinBox interface * ***********************************/ ALGEB lbStart (MKernelVector kv, ALGEB *argv){ //MaplePrintf(kv, "LinBox driver initialization...\n"); try {LinBoxInit();} catch(lb_runtime_error &t){lbRaiseError(kv, t);} lb_kv = kv; return ToMapleNULL(kv); } ALGEB lbStop (MKernelVector kv, ALGEB *argv){ //MaplePrintf(kv, "LinBox driver termination..."); std::cout<<"terminating LinBox..."; //try{LinBoxEnd();} //catch(lb_runtime_error &t){lbRaiseError(kv, t);} std::cout<<"done\n"; return ToMapleNULL(kv); } /************************************** * Information from the LinBox driver * **************************************/ ALGEB lbDataInfo (MKernelVector kv, ALGEB *argv){ std::ostringstream out; LinBoxDataInfo(out); size_t l=out.str().length(); char* msg = new char[l]; strncpy(msg, out.str().c_str(), l); MaplePrintf(kv, msg); delete msg; return ToMapleNULL(kv); } /****************************************** ****************************************** *** Function to create LinBox's object *** ****************************************** ******************************************/ /********************************** * Interface to create an element * **********************************/ ALGEB lbCreateElement (MKernelVector kv, ALGEB *argv){ M_INT argc = MapleNumArgs(kv, (ALGEB) argv); if (argc != 1){ MapleRaiseError(kv, "wrong number of arguments"); return ToMapleNULL(kv); } const DomainKey *key = &MapleToDomainKey(kv, argv[1]); try { LB_GMP_SET(); const EltKey *k = &createElement(*key); LB_GMP_RESTORE(); return ElementKeyToMaple(kv, *k); } catch ( lb_runtime_error &t ) { lbRaiseError(kv, t); return ToMapleNULL(kv); } } /******************************** * Interface to create a domain * ********************************/ ALGEB lbCreateDomain (MKernelVector kv, ALGEB *argv){ M_INT argc = MapleNumArgs(kv, (ALGEB) argv); const DomainKey *key; try { if (argc < 1){ LB_GMP_SET(); key = &createDomain(0); LB_GMP_RESTORE(); return DomainKeyToMaple(kv, *key); } //LinBox::integer *p = GMPMapleToLinBox(kv, argv[1]); LinBox::integer p; GMPMapleToLinBox(p, kv, argv[1]); if (argc == 1){ LB_GMP_SET(); key = &createDomain(p); LB_GMP_RESTORE(); return DomainKeyToMaple(kv, *key); } if (argc == 2){ LB_GMP_SET(); key = &createDomain(p, MapleToString(kv, argv[2])); LB_GMP_RESTORE(); return DomainKeyToMaple(kv, *key); } if (argc > 2){ MapleRaiseError(kv, "wrong number of argument"); return ToMapleNULL(kv); } } catch ( lb_runtime_error &t ) { lbRaiseError(kv, t); return ToMapleNULL(kv);} return ToMapleNULL(kv); } /********************************** * Interface to create a blackbox * **********************************/ ALGEB lbCreateBlackboxFromMatrix(MKernelVector kv, ALGEB A, const LinBox::integer &p){ RTableSettings setting; RTableGetSettings(kv,&setting,A); size_t m,n; m = RTableUpperBound(kv, A, 1); n = RTableUpperBound(kv, A, 2); std::stringstream *buffer= new std::stringstream();//std::string(buffer_data, m*n)); //Timer chrono; //chrono.start(); if (setting.storage == RTABLE_RECT) DenseMatrixToBuffer(kv, A, *buffer, m, n, setting); else if (setting.storage == RTABLE_SPARSE) SparseMatrixToBuffer(kv, A, *buffer, m, n, setting); else MapleRaiseError(kv, "Matrix storage must be either dense or sparse"); //chrono.stop(); //std::ofstream FILE("MAPLE_FILE.TXT"); //FILE<str()<<"\n"; //FILE.close(); //std::cout<<"buffering in <- : "< : "< 4)){ MapleRaiseError(kv, "wrong number of arguments"); return ToMapleNULL(kv); } try { if (argc == 1){ if (IsMapleRTable(kv, argv[1])) return lbCreateBlackboxFromMatrix(kv, argv[1], LinBox::integer(0)); } if (argc == 2){ if (IsMapleInteger(kv, argv[1]) && IsMapleRTable(kv, argv[2])){ //LinBox::integer *p = GMPMapleToLinBox(kv, argv[1]); LinBox::integer p; GMPMapleToLinBox(p, kv, argv[1]); LB_GMP_SET(); ALGEB ret = lbCreateBlackboxFromMatrix(kv, argv[2], p); LB_GMP_RESTORE(); return ret; } if (IsMapleDomainKey(kv, argv[1]) && IsMapleString(kv, argv[2])) { const DomainKey *k = &MapleToDomainKey(kv, argv[1]); std::ifstream in(MapleToString(kv, argv[2])); LB_GMP_SET(); key = &createBlackbox(*k, in); LB_GMP_RESTORE(); return BlackboxKeyToMaple(kv, *key); } } if (argc == 3){ if (IsMapleDomainKey(kv, argv[1])){ const DomainKey *k = &MapleToDomainKey(kv, argv[1]); if (IsMapleInteger(kv, argv[2])){ LB_GMP_SET(); key = &createBlackbox(*k, MapleToInteger32(kv, argv[2]), MapleToInteger32(kv, argv[3])); LB_GMP_RESTORE(); } else { std::ifstream in( MapleToString(kv, argv[2])); LB_GMP_SET(); key = &createBlackbox(*k, in, MapleToString(kv, argv[3])); LB_GMP_RESTORE(); } return BlackboxKeyToMaple(kv, *key); } } if (argc == 4){ if (IsMapleDomainKey(kv, argv[1])) { const DomainKey *k = &MapleToDomainKey(kv, argv[1]); LB_GMP_SET(); key = &createBlackbox(*k, MapleToInteger32(kv, argv[2]), MapleToInteger32(kv, argv[3]), MapleToString(kv, argv[4])); LB_GMP_RESTORE(); return BlackboxKeyToMaple(kv, *key); } } MapleRaiseError(kv, "wrong types of arguments"); } catch ( lb_runtime_error &t ) { lbRaiseError(kv, t); } return ToMapleNULL(kv); } /******************************** * Interface to create a vector * ********************************/ ALGEB lbCreateVectorFromVector(MKernelVector kv, ALGEB V, const LinBox::integer &p){ LB_GMP_SET(); const DomainKey *Dkey = &createDomain(p); LB_GMP_RESTORE(); std::stringstream buffer; RTableSettings setting; RTableData tmp; RTableGetSettings(kv,&setting,V); size_t n; n = RTableUpperBound(kv, V, 1); buffer< 4)){ MapleRaiseError(kv, "wrong number of arguments"); return ToMapleNULL(kv); } try { if (argc == 1){ if (IsMapleRTable(kv, argv[1])) return lbCreateVectorFromVector(kv, argv[1], LinBox::integer(0)); } if (argc == 2){ if (IsMapleInteger(kv, argv[1]) && IsMapleRTable(kv, argv[2])){ //LinBox::integer *p = GMPMapleToLinBox(kv, argv[1]); LinBox::integer p; GMPMapleToLinBox(p, kv, argv[1]); LB_GMP_SET(); ALGEB ret = lbCreateVectorFromVector(kv, argv[2], p); LB_GMP_RESTORE(); return ret; } if ( IsMapleDomainKey(kv, argv[1]) && IsMapleInteger(kv, argv[2])) { const DomainKey *k = &MapleToDomainKey(kv, argv[1]); LB_GMP_SET(); key = &createVector(*k, MapleToInteger32(kv, argv[2])); LB_GMP_RESTORE(); return VectorKeyToMaple(kv, *key); } } if (argc == 3){ if ( IsMapleDomainKey(kv, argv[1]) && IsMapleInteger(kv, argv[2]) && IsMapleString(kv, argv[3])){ const DomainKey *k = &MapleToDomainKey(kv, argv[1]); LB_GMP_SET(); key = &createVector(*k, MapleToInteger32(kv, argv[2]), MapleToString(kv, argv[3])); LB_GMP_RESTORE(); return VectorKeyToMaple(kv, *key); } } MapleRaiseError(kv, "wrong types of arguments"); } catch ( lb_runtime_error &t ) { lbRaiseError(kv, t); } return ToMapleNULL(kv); } /*************************** *************************** *** Domain's Functions **** *************************** ***************************/ /****************************** * Interface to copy a Domain * *****************************/ ALGEB lbCopyDomain (MKernelVector kv, ALGEB *argv){ try { const DomainKey *key = &MapleToDomainKey(kv, argv[1]); return DomainKeyToMaple(kv, copyDomain(*key)); } catch (lb_runtime_error &t) { lbRaiseError(kv, t);} return ToMapleNULL(kv); } /***************************************************** * Interface to change globally the prime field type * *****************************************************/ ALGEB lbSetPrimeField (MKernelVector kv, ALGEB *argv){ M_INT argc = MapleNumArgs(kv, (ALGEB) argv); if (argc != 1){ MapleRaiseError(kv, "wrong number of arguments"); return ToMapleNULL(kv); } if (!IsMapleString(kv, argv[1])){ MapleRaiseError(kv, "String expected for 1st argument"); return ToMapleNULL(kv); } setPrimeField(MapleToString(kv, argv[1])); return ToMapleNULL(kv); } /******************************************************** * Interface to change globally the rational field type * ********************************************************/ ALGEB lbSetRationalField (MKernelVector kv, ALGEB *argv){ M_INT argc = MapleNumArgs(kv, (ALGEB) argv); if (argc != 1){ MapleRaiseError(kv, "wrong number of arguments"); return ToMapleNULL(kv); } if (!IsMapleString(kv, argv[1])){ MapleRaiseError(kv, "String expected for 1s argument"); return ToMapleNULL(kv); } setRationalField(MapleToString(kv, argv[1])); return ToMapleNULL(kv); } /****************************************************** * Interface to change globally the integer ring type * ******************************************************/ ALGEB lbSetIntegerRing (MKernelVector kv, ALGEB *argv){ M_INT argc = MapleNumArgs(kv, (ALGEB) argv); if (argc != 1){ MapleRaiseError(kv, "wrong number of arguments"); return ToMapleNULL(kv); } if (!IsMapleString(kv, argv[1])){ MapleRaiseError(kv, "String expected for 1s argument"); return ToMapleNULL(kv); } setIntegerRing(MapleToString(kv, argv[1])); return ToMapleNULL(kv); } /***************************** ***************************** *** Blackbox's Functions **** ***************************** *****************************/ /******************************** * Interface to copy a blackbox * ********************************/ ALGEB lbCopyBlackbox (MKernelVector kv, ALGEB *argv){ try { const BlackboxKey *key = &MapleToBlackboxKey(kv, argv[1]); return BlackboxKeyToMaple(kv, copyBlackbox(*key)); } catch (lb_runtime_error &t) { lbRaiseError(kv, t);} return ToMapleNULL(kv); } /************************************************ * Interface to get the dimension of a blackbox * ************************************************/ ALGEB lbGetBlackboxDimension (MKernelVector kv, ALGEB *argv){ // not yet : pb with return value ? return ToMapleNULL(kv); } /******************************************* * Interface to write a blackbox in a file * *******************************************/ ALGEB lbWriteBlackbox (MKernelVector kv, ALGEB *argv){ try { std::ofstream os(MapleToString(kv, argv[2])); const BlackboxKey *key = &MapleToBlackboxKey(kv, argv[1]); writeBlackbox(*key, os); return ToMapleNULL(kv); } catch (lb_runtime_error &t) { lbRaiseError(kv, t);} return ToMapleNULL(kv); } /************************************************** * Interface to fill a blackbox with random value * **************************************************/ ALGEB lbSetBlackboxAtRandom (MKernelVector kv, ALGEB *argv){ try { const BlackboxKey *key = &MapleToBlackboxKey(kv, argv[1]); setBlackboxAtRandom(*key); return argv[1]; } catch (lb_runtime_error &t) { lbRaiseError(kv, t);} return ToMapleNULL(kv); } /****************************************************** * Interface to rebind a blackbox over another domain * ******************************************************/ ALGEB lbRebindBlackbox (MKernelVector kv, ALGEB *argv){ try { const DomainKey *Dkey = &MapleToDomainKey(kv, argv[1]);; const BlackboxKey *Bkey = &MapleToBlackboxKey(kv, argv[2]); rebindBlackbox(*Bkey, *Dkey); return ToMapleNULL(kv); } catch (lb_runtime_error &t) { lbRaiseError(kv, t);} return ToMapleNULL(kv); } /************************************************** * Interface to change globally the blackbox type * **************************************************/ ALGEB lbSetBlackbox (MKernelVector kv, ALGEB *argv){ M_INT argc = MapleNumArgs(kv, (ALGEB) argv); if (argc != 1){ MapleRaiseError(kv, "wrong number of parameter in lbSetBlackbox"); return ToMapleNULL(kv); } if (!IsMapleString(kv, argv[1])){ MapleRaiseError(kv, "lbSetBlackbox expects a string as parameter"); return ToMapleNULL(kv); } setBlackbox(MapleToString(kv, argv[1])); return ToMapleNULL(kv); } /*************************** *************************** *** Vector's Functions **** *************************** ***************************/ /****************************** * Interface to copy a vector * ******************************/ ALGEB lbCopyVector (MKernelVector kv, ALGEB *argv){ try { const VectorKey *key = &MapleToVectorKey(kv, argv[1]); return VectorKeyToMaple(kv, copyVector(*key)); } catch (lb_runtime_error &t) { lbRaiseError(kv, t);} return ToMapleNULL(kv); } /********************************************** * Interface to get the dimension of a vector * **********************************************/ ALGEB lbGetVectorDimension (MKernelVector kv, ALGEB *argv){ try { const VectorKey *key = &MapleToVectorKey(kv, argv[1]); size_t n = getVectorDimension(*key); return ToMapleInteger(kv, n); } catch (lb_runtime_error &t) {lbRaiseError(kv, t);} return ToMapleNULL(kv); } /***************************************** * Interface to write a vector in a file * *****************************************/ ALGEB lbWriteVector (MKernelVector kv, ALGEB *argv){ try { std::ofstream os(MapleToString(kv, argv[2])); const VectorKey *key = &MapleToVectorKey(kv, argv[1]); writeVector(*key, os); return ToMapleNULL(kv); } catch (lb_runtime_error &t) { lbRaiseError(kv, t);} return ToMapleNULL(kv); } /************************************************ * Interface to fill a vector with random value * ************************************************/ ALGEB lbSetVectorAtRandom (MKernelVector kv, ALGEB *argv){ try { const VectorKey *key = &MapleToVectorKey(kv, argv[1]); setVectorAtRandom(*key); return argv[1]; } catch (lb_runtime_error &t) { lbRaiseError(kv, t);} return ToMapleNULL(kv); } /****************************************************** * Interface to rebind a vector over another domain * ******************************************************/ ALGEB lbRebindVector (MKernelVector kv, ALGEB *argv){ try { const DomainKey *Dkey = &MapleToDomainKey(kv, argv[1]);; const VectorKey *Bkey = &MapleToVectorKey(kv, argv[2]); rebindVector(*Bkey, *Dkey); return argv[2]; } catch (lb_runtime_error &t) { lbRaiseError(kv, t);} return ToMapleNULL(kv); } /************************************************ * Interface to change globally the vector type * ************************************************/ ALGEB lbSetVector (MKernelVector kv, ALGEB *argv){ M_INT argc = MapleNumArgs(kv, (ALGEB) argv); if (argc != 1){ MapleRaiseError(kv, "wrong number of arguments"); return ToMapleNULL(kv); } if (!IsMapleString(kv, argv[1])){ MapleRaiseError(kv, "String expected as 1st argument"); return ToMapleNULL(kv); } setVector(MapleToString(kv, argv[1])); return ToMapleNULL(kv); } /******************************* ******************************* *** Polynomial's Functions **** ******************************* *******************************/ /*********************************** * Interface to write a polynomial * ***********************************/ ALGEB lbWritePolynomial (MKernelVector kv, ALGEB *argv){ try { std::ofstream os(MapleToString(kv, argv[2])); const VectorKey *key = &MapleToVectorKey(kv, argv[1]); writePolynomial(*key, os); return ToMapleNULL(kv); } catch (lb_runtime_error &t) { lbRaiseError(kv, t);} return ToMapleNULL(kv); } /********************************* ********************************* **** list of LinBox solutions *** ********************************* *********************************/ /****************************************************** * Interface to compute the determinant of a blackbox * ******************************************************/ ALGEB lbDeterminant (MKernelVector kv, ALGEB *argv){ M_INT argc = MapleNumArgs(kv, (ALGEB) argv); try{ if (argc == 1){ LB_GMP_SET(); const BlackboxKey *key = &MapleToBlackboxKey(kv, argv[1]); const EltKey *k = &lb_determinant(*key); LB_GMP_RESTORE(); return ElementKeyToMaple(kv, *k); } if (argc == 2){ LB_GMP_SET(); const EltKey *k = &MapleToElementKey(kv, argv[1]); const BlackboxKey *key = &MapleToBlackboxKey(kv, argv[2]); lb_determinant(*k, *key); LB_GMP_RESTORE(); return ToMapleNULL(kv); } } catch (lb_runtime_error &t) { lbRaiseError(kv, t);} return ToMapleNULL(kv); } /*********************************************** * Interface to compute the rank of a blackbox * ***********************************************/ ALGEB lbRank (MKernelVector kv, ALGEB *argv){ M_INT argc = MapleNumArgs(kv, (ALGEB) argv); try{ if (argc == 1){ LB_GMP_SET(); const BlackboxKey *key = &MapleToBlackboxKey(kv, argv[1]); size_t r = lb_rank(*key); LB_GMP_RESTORE(); return ToMapleInteger(kv, r); } if (argc == 2){ LB_GMP_SET(); size_t *r = (size_t*) MapleToPointer(kv, argv[1]); const BlackboxKey *key = &MapleToBlackboxKey(kv, argv[2]); lb_determinant(*r, *key); LB_GMP_RESTORE(); return ToMapleNULL(kv); } } catch (lb_runtime_error &t) { lbRaiseError(kv, t);} return ToMapleNULL(kv); } /************************************************************* * Interface to compute the minimal polynomial of a blackbox * *************************************************************/ ALGEB lbMinpoly (MKernelVector kv, ALGEB *argv){ M_INT argc = MapleNumArgs(kv, (ALGEB) argv); try{ if (argc == 1){ LB_GMP_SET(); const BlackboxKey *key = &MapleToBlackboxKey(kv, argv[1]); const PolynomialKey *k = &lb_minpoly(*key); LB_GMP_RESTORE(); return PolynomialKeyToMaple(kv, *k); } if (argc == 2){ LB_GMP_SET(); const PolynomialKey *k = &MapleToPolynomialKey(kv, argv[1]); const BlackboxKey *key = &MapleToBlackboxKey(kv, argv[2]); lb_minpoly(*k, *key); LB_GMP_RESTORE(); return ToMapleNULL(kv); } } catch (lb_runtime_error &t) { lbRaiseError(kv, t);} return ToMapleNULL(kv); } /******************************************************************** * Interface to compute the characteristic polynomial of a blackbox * ********************************************************************/ ALGEB lbCharpoly (MKernelVector kv, ALGEB *argv){ M_INT argc = MapleNumArgs(kv, (ALGEB) argv); try{ if (argc == 1){ LB_GMP_SET(); const BlackboxKey *key = &MapleToBlackboxKey(kv, argv[1]); const PolynomialKey *k = &lb_charpoly(*key); LB_GMP_RESTORE(); return PolynomialKeyToMaple(kv, *k); } if (argc == 2){ LB_GMP_SET(); const PolynomialKey *k = &MapleToPolynomialKey(kv, argv[1]); const BlackboxKey *key = &MapleToBlackboxKey(kv, argv[2]); lb_charpoly(*k, *key); LB_GMP_RESTORE(); return ToMapleNULL(kv); } } catch (lb_runtime_error &t) { lbRaiseError(kv, t);} return ToMapleNULL(kv); } /************************************** * Interface to solve a linear system * **************************************/ ALGEB lbSolve (MKernelVector kv, ALGEB *argv){ M_INT argc = MapleNumArgs(kv, (ALGEB) argv); try{ if (argc == 2){ LB_GMP_SET(); const BlackboxKey *Bkey = &MapleToBlackboxKey(kv, argv[1]); const VectorKey *Vkey = &MapleToVectorKey(kv, argv[2]); const VectorKey *Rkey = &lb_solve(*Bkey, *Vkey); LB_GMP_RESTORE(); return VectorKeyToMaple(kv, *Rkey); } if (argc == 3){ LB_GMP_SET(); const VectorKey *Rkey = &MapleToVectorKey(kv, argv[1]); const BlackboxKey *Bkey = &MapleToBlackboxKey(kv, argv[2]); const VectorKey *Vkey = &MapleToVectorKey(kv, argv[3]); lb_solve(*Rkey, *Bkey, *Vkey); LB_GMP_RESTORE(); return ToMapleNULL(kv); } } catch (lb_runtime_error &t) { lbRaiseError(kv, t);} return ToMapleNULL(kv); } /******************************************* ******************************************* **** Conversion from LinBox to Maple **** ******************************************* *******************************************/ /*********************************************************** * API to convert a domain element to its Maple equivalent * ***********************************************************/ ALGEB lbConvertElement (MKernelVector kv, ALGEB *argv){ try { const EltKey *k = &MapleToElementKey(kv, argv[1]); SerialElement s; SerializeElement(s, *k); if (strcmp(s.type, "integer")==0) return LinBoxToGMPMaple(kv, s.list.front()); else if (strcmp(s.type,"rational")==0){ ALGEB n,d,f; n = LinBoxToGMPMaple(kv, s.list.front()); d = LinBoxToGMPMaple(kv, s.list.back()); f = EvalMapleStatement(kv,"Fraction:"); return EvalMapleProc(kv, f, 2, n, d); } else MapleRaiseError(kv, "LinBox internal error (serializing element problem)"); } catch (lb_runtime_error &t) {lbRaiseError(kv, t);} return ToMapleNULL(kv); } /***************************************************** * API to convert a blackbox to its Maple equivalent * *****************************************************/ ALGEB lbConvertBlackbox (MKernelVector kv, ALGEB *argv){ return ToMapleNULL(kv); } /*************************************************** * API to convert a Vector to its Maple equivalent * ***************************************************/ ALGEB lbConvertVector (MKernelVector kv, ALGEB *argv){ try { const VectorKey *k = &MapleToVectorKey(kv, argv[1]); SerialVector s; SerializeVector(s, *k); if (strcmp(s.type, "integer")==0){ size_t n = s.list.size(); RTableSettings setting; M_INT bounds[2];bounds[0]=1;bounds[1]=n; RTableGetDefaults(kv, &setting); setting.num_dimensions=1; setting.subtype=RTABLE_COLUMN; setting.data_type=RTABLE_DAG; ALGEB vector = RTableCreate(kv, &setting, NULL, bounds); M_INT index[1]; RTableData tmp; for (size_t i=1; i>1; RTableSettings setting; M_INT bounds[2];bounds[0]=1;bounds[1]=n; RTableGetDefaults(kv, &setting); setting.num_dimensions=1; setting.subtype=RTABLE_COLUMN; setting.data_type=RTABLE_DAG; ALGEB vector = RTableCreate(kv, &setting, NULL, bounds); ALGEB f = EvalMapleStatement(kv,"Fraction:"); M_INT index[1]; RTableData tmp; for (size_t i=1; is,f0,{0,g0,(0,:0,t0,+0,=s // Local Variables: // mode: C++ // tab-width: 8 // indent-tabs-mode: nil // c-basic-offset: 8 // End: linbox-1.3.2/interfaces/maple/lb-maple.h000066400000000000000000000074031176453053400201070ustar00rootroot00000000000000/* lb-maple.h * Copyright (C) 2005 Pascal Giorgi * * Written by Pascal Giorgi * * ========LICENCE======== * This file is part of the library LinBox. * * LinBox is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ========LICENCE======== */ #ifndef __LINBOX_lb_maple_H #define __LINBOX_lb_maple_H #include #include extern "C" { /*********************************** * Initializer of LinBox interface * ***********************************/ ALGEB lbStart (MKernelVector kv, ALGEB *argv); ALGEB lbStop (MKernelVector kv, ALGEB *argv); /************************************** * Information from the LinBox driver * **************************************/ ALGEB lbDataInfo (MKernelVector kv, ALGEB *argv); /************************************** * Function to create LinBox's object * **************************************/ ALGEB lbCreateElement (MKernelVector kv, ALGEB *argv); ALGEB lbCreateDomain (MKernelVector kv, ALGEB *argv); ALGEB lbCreateBlackbox (MKernelVector kv, ALGEB *argv); ALGEB lbCreateVector (MKernelVector kv, ALGEB *argv); /********************** * Domain's Functions * **********************/ ALGEB lbSetPrimeField (MKernelVector kv, ALGEB *argv); ALGEB lbSetRationalField (MKernelVector kv, ALGEB *argv); ALGEB lbSetIntegerRing (MKernelVector kv, ALGEB *argv); /************************ * Blackbox's Functions * ************************/ ALGEB lbCopyBlackbox (MKernelVector kv, ALGEB *argv); ALGEB lbGetBlackboxDimension (MKernelVector kv, ALGEB *argv); ALGEB lbSetBlackboxAtRandom (MKernelVector kv, ALGEB *argv); ALGEB lbRebindBlackbox (MKernelVector kv, ALGEB *argv); ALGEB lbWriteBlackbox (MKernelVector kv, ALGEB *argv); ALGEB lbSetBlackbox (MKernelVector kv, ALGEB *argv); /************************ * Vector's Functions * ************************/ ALGEB lbCopyVector (MKernelVector kv, ALGEB *argv); ALGEB lbGetVectorDimension (MKernelVector kv, ALGEB *argv); ALGEB lbSetVectorAtRandom (MKernelVector kv, ALGEB *argv); ALGEB lbRebindVector (MKernelVector kv, ALGEB *argv); ALGEB lbWriteVector (MKernelVector kv, ALGEB *argv); ALGEB lbSetVector (MKernelVector kv, ALGEB *argv); /************************** * Polynomial's Functions * **************************/ ALGEB lbWritePolynomial (MKernelVector kv, ALGEB *argv); /****************************** * LinBox available solutions * ******************************/ ALGEB lbDeterminant (MKernelVector kv, ALGEB *argv); ALGEB lbRank (MKernelVector kv, ALGEB *argv); ALGEB lbMinpoly (MKernelVector kv, ALGEB *argv); ALGEB lbCharpoly (MKernelVector kv, ALGEB *argv); ALGEB lbSolve (MKernelVector kv, ALGEB *argv); } // end of extern "C" #endif // vim:sts=8:sw=8:ts=8:noet:sr:cino=>s,f0,{0,g0,(0,:0,t0,+0,=s // Local Variables: // mode: C++ // tab-width: 8 // indent-tabs-mode: nil // c-basic-offset: 8 // End: linbox-1.3.2/interfaces/sage/000077500000000000000000000000001176453053400160625ustar00rootroot00000000000000linbox-1.3.2/interfaces/sage/Makefile.am000066400000000000000000000027231176453053400201220ustar00rootroot00000000000000# Copyright (c) 2010 the LinBox group # ========LICENCE======== # This file is part of the library LinBox. # # LinBox is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # # This library 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 # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # ========LICENCE======== if LINBOX_HAVE_SAGE AM_CPPFLAGS=-I$(top_srcdir) -I. -I../../linbox AM_CXXFLAGS = @DEFAULT_CFLAGS@ -DDISABLE_COMMENTATOR $(GMP_CFLAGS) $(NTL_CFLAGS) $(ATLAS_CFLAGS) $(FFLAS_FFPACK_CFLAGS) $(GIVARO_CFLAGS) lib_LTLIBRARIES = liblinboxsage.la liblinboxsage_la_SOURCES = linbox-sage.C pkginclude_HEADERS = linbox-sage.h #liblinboxsage_la_LIBADD = -llinbox $(BLAS_LIBS) #gentoo's linbox-1.1.6-fix-undefined-symbols.patch liblinboxsage_la_LIBADD = $(top_builddir)/linbox/liblinbox.la liblinboxsage_la_LDFLAGS = $(GIVARO_LIBS) $(GMP_LIBS) $(NTL_LIBS) $(BLAS_LIBS) $(MAPLE_LIBS) $(LDFLAGS) -version-info 0:0:0 #-Wl,-zmuldefs endif linbox-1.3.2/interfaces/sage/Makefile.in000066400000000000000000000517261176453053400201420ustar00rootroot00000000000000# Makefile.in generated by automake 1.11.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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@ # Copyright (c) 2010 the LinBox group # ========LICENCE======== # This file is part of the library LinBox. # # LinBox is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # # This library 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 # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # ========LICENCE======== VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd 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 = : build_triplet = @build@ host_triplet = @host@ subdir = interfaces/sage DIST_COMMON = $(am__pkginclude_HEADERS_DIST) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/macros/aclocal-include.m4 \ $(top_srcdir)/macros/config-header.m4 \ $(top_srcdir)/macros/debug.m4 \ $(top_srcdir)/macros/expat-check.m4 \ $(top_srcdir)/macros/fflas-ffpack-check.m4 \ $(top_srcdir)/macros/fplll-check.m4 \ $(top_srcdir)/macros/givaro-check.m4 \ $(top_srcdir)/macros/gmp-check.m4 \ $(top_srcdir)/macros/iml-check.m4 \ $(top_srcdir)/macros/lapack-check.m4 \ $(top_srcdir)/macros/libtool.m4 \ $(top_srcdir)/macros/lidia-check.m4 \ $(top_srcdir)/macros/linbox-benchmark.m4 \ $(top_srcdir)/macros/linbox-doc.m4 \ $(top_srcdir)/macros/linbox-misc.m4 \ $(top_srcdir)/macros/linbox-opt.m4 \ $(top_srcdir)/macros/ltoptions.m4 \ $(top_srcdir)/macros/ltsugar.m4 \ $(top_srcdir)/macros/ltversion.m4 \ $(top_srcdir)/macros/lt~obsolete.m4 \ $(top_srcdir)/macros/m4ri-check.m4 \ $(top_srcdir)/macros/m4rie-check.m4 \ $(top_srcdir)/macros/maple-check.m4 \ $(top_srcdir)/macros/mpfr-check.m4 \ $(top_srcdir)/macros/ntl-check.m4 \ $(top_srcdir)/macros/saclib-check.m4 \ $(top_srcdir)/macros/sage-check.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgincludedir)" LTLIBRARIES = $(lib_LTLIBRARIES) @LINBOX_HAVE_SAGE_TRUE@liblinboxsage_la_DEPENDENCIES = \ @LINBOX_HAVE_SAGE_TRUE@ $(top_builddir)/linbox/liblinbox.la am__liblinboxsage_la_SOURCES_DIST = linbox-sage.C @LINBOX_HAVE_SAGE_TRUE@am_liblinboxsage_la_OBJECTS = linbox-sage.lo liblinboxsage_la_OBJECTS = $(am_liblinboxsage_la_OBJECTS) liblinboxsage_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(liblinboxsage_la_LDFLAGS) $(LDFLAGS) -o $@ @LINBOX_HAVE_SAGE_TRUE@am_liblinboxsage_la_rpath = -rpath $(libdir) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = am__depfiles_maybe = CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(liblinboxsage_la_SOURCES) DIST_SOURCES = $(am__liblinboxsage_la_SOURCES_DIST) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__pkginclude_HEADERS_DIST = linbox-sage.h HEADERS = $(pkginclude_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BLAS_CFLAGS = @BLAS_CFLAGS@ BLAS_LIBS = @BLAS_LIBS@ CC = @CC@ CCNAM = @CCNAM@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DBG = @DBG@ DEBUG_CFLAGS = @DEBUG_CFLAGS@ DEFAULT_CFLAGS = @DEFAULT_CFLAGS@ DEFS = @DEFS@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXPAT_CFLAGS = @EXPAT_CFLAGS@ EXPAT_LIBS = @EXPAT_LIBS@ FFLAS_FFPACK_CFLAGS = @FFLAS_FFPACK_CFLAGS@ FFLAS_FFPACK_LIBS = @FFLAS_FFPACK_LIBS@ FFLAS_FFPACK_LOC = @FFLAS_FFPACK_LOC@ FGREP = @FGREP@ FPLLL_CFLAGS = @FPLLL_CFLAGS@ FPLLL_LIBS = @FPLLL_LIBS@ GIVARO_CFLAGS = @GIVARO_CFLAGS@ GIVARO_LIBS = @GIVARO_LIBS@ GMP_CFLAGS = @GMP_CFLAGS@ GMP_LIBS = @GMP_LIBS@ GMP_VERSION = @GMP_VERSION@ GREP = @GREP@ IML_CFLAGS = @IML_CFLAGS@ IML_LIBS = @IML_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIDIA_CFLAGS = @LIDIA_CFLAGS@ LIDIA_LIBS = @LIDIA_LIBS@ LINBOX_BENCH_PATH = @LINBOX_BENCH_PATH@ LINBOX_DOC_PATH = @LINBOX_DOC_PATH@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ M4RIE_CFLAGS = @M4RIE_CFLAGS@ M4RIE_LIBS = @M4RIE_LIBS@ M4RI_CFLAGS = @M4RI_CFLAGS@ M4RI_LIBS = @M4RI_LIBS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAPLE_CFLAGS = @MAPLE_CFLAGS@ MAPLE_HOME = @MAPLE_HOME@ MAPLE_LIBS = @MAPLE_LIBS@ MAPLE_VERSION = @MAPLE_VERSION@ MKDIR_P = @MKDIR_P@ MPFR_CFLAGS = @MPFR_CFLAGS@ MPFR_LIBS = @MPFR_LIBS@ NM = @NM@ NMEDIT = @NMEDIT@ NTL_CFLAGS = @NTL_CFLAGS@ NTL_LIBS = @NTL_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PROF = @PROF@ RANLIB = @RANLIB@ RM = @RM@ SACLIB_CFLAGS = @SACLIB_CFLAGS@ SACLIB_LIBS = @SACLIB_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TESTS_CFLAGS = @TESTS_CFLAGS@ VERSION = @VERSION@ WARN = @WARN@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__leading_dot = @am__leading_dot@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ @LINBOX_HAVE_SAGE_TRUE@AM_CPPFLAGS = -I$(top_srcdir) -I. -I../../linbox @LINBOX_HAVE_SAGE_TRUE@AM_CXXFLAGS = @DEFAULT_CFLAGS@ -DDISABLE_COMMENTATOR $(GMP_CFLAGS) $(NTL_CFLAGS) $(ATLAS_CFLAGS) $(FFLAS_FFPACK_CFLAGS) $(GIVARO_CFLAGS) @LINBOX_HAVE_SAGE_TRUE@lib_LTLIBRARIES = liblinboxsage.la @LINBOX_HAVE_SAGE_TRUE@liblinboxsage_la_SOURCES = linbox-sage.C @LINBOX_HAVE_SAGE_TRUE@pkginclude_HEADERS = linbox-sage.h #liblinboxsage_la_LIBADD = -llinbox $(BLAS_LIBS) #gentoo's linbox-1.1.6-fix-undefined-symbols.patch @LINBOX_HAVE_SAGE_TRUE@liblinboxsage_la_LIBADD = $(top_builddir)/linbox/liblinbox.la @LINBOX_HAVE_SAGE_TRUE@liblinboxsage_la_LDFLAGS = $(GIVARO_LIBS) $(GMP_LIBS) $(NTL_LIBS) $(BLAS_LIBS) $(MAPLE_LIBS) $(LDFLAGS) -version-info 0:0:0 #-Wl,-zmuldefs all: all-am .SUFFIXES: .SUFFIXES: .C .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu --ignore-deps interfaces/sage/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu --ignore-deps interfaces/sage/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done liblinboxsage.la: $(liblinboxsage_la_OBJECTS) $(liblinboxsage_la_DEPENDENCIES) $(EXTRA_liblinboxsage_la_DEPENDENCIES) $(liblinboxsage_la_LINK) $(am_liblinboxsage_la_rpath) $(liblinboxsage_la_OBJECTS) $(liblinboxsage_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c .C.o: $(CXXCOMPILE) -c -o $@ $< .C.obj: $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .C.lo: $(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-pkgincludeHEADERS: $(pkginclude_HEADERS) @$(NORMAL_INSTALL) @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(pkgincludedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkgincludedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgincludedir)" || exit $$?; \ done uninstall-pkgincludeHEADERS: @$(NORMAL_UNINSTALL) @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(pkgincludedir)'; $(am__uninstall_files_from_dir) 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; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ 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; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) 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; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgincludedir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-pkgincludeHEADERS install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-libLTLIBRARIES install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-libLTLIBRARIES uninstall-pkgincludeHEADERS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES clean-libtool ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am \ install-libLTLIBRARIES install-man install-pdf install-pdf-am \ install-pkgincludeHEADERS install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am \ uninstall-libLTLIBRARIES uninstall-pkgincludeHEADERS # 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: linbox-1.3.2/interfaces/sage/linbox-sage.C000066400000000000000000000500131176453053400203750ustar00rootroot00000000000000/* linbox-sage.C * Copyright (C) 2007 Martin Albrecht * 2008 Clement Pernet * * Written by Martin Albrecht * Clement Pernet * * ========LICENCE======== * This file is part of the library LinBox. * * LinBox is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ========LICENCE======== */ #include #include #include #include #include #include "linbox-sage.h" #include "linbox/util/commentator.h" #include "linbox/blackbox/sparse.h" //#include "linbox/element/givaro-polynomial.h" #include "linbox/matrix/blas-matrix.h" #include "linbox/matrix/sparse.h" #include "linbox/vector/sparse.h" #include "linbox/algorithms/blas-domain.h" #include "linbox/algorithms/echelon-form.h" #include "linbox/algorithms/gauss.h" #include "linbox/algorithms/smith-form-adaptive.h" #include #include "linbox/solutions/rank.h" #include "linbox/solutions/det.h" #include "linbox/solutions/solve.h" #include "linbox/solutions/methods.h" #include "linbox/solutions/minpoly.h" #include "linbox/solutions/charpoly.h" #include "linbox/algorithms/double-det.h" #include "linbox/integer.h" #include "linbox/field/gmp-rational.h" #include "linbox/ring/givaro-polynomial.h" #include "linbox/field/modular.h" using namespace LinBox; /************************************************************************* dense modulo Z/nZ *************************************************************************/ //we are using Modular here as it seems to be best supported /* NOTE: There are many echelon form functions, possible base rings, etc. Strangely, most don't build. This combination below does though. */ void linbox_modn_dense_delete_array_double(double * f) { delete[] f; } void linbox_modn_dense_delete_array_float(float * f) {delete[] f; } template unsigned long int linbox_modn_dense_echelonize (Element modulus, Element* matrix, size_t nrows, size_t ncols) { Modular F(modulus); size_t * P=new size_t[ncols]; size_t * Q=new size_t[nrows]; size_t r = FFPACK::ReducedRowEchelonForm(F, nrows, ncols, matrix, ncols, P,Q); for (size_t i=0; i(modulus, matrix, nrows, ncols); } EXTERN unsigned long int linbox_modn_dense_echelonize_float (float modulus, float * matrix, size_t nrows, size_t ncols) { return (unsigned long) linbox_modn_dense_echelonize(modulus,matrix,nrows,ncols); } template unsigned long int linbox_modn_dense_rank (Element modulus, Element* matrix, size_t nrows, size_t ncols) { Modular F (modulus); Element * Ad = new Element [nrows*ncols]; for (size_t i=0; i< nrows; ++i) for (size_t j = 0; j < ncols; ++j) *(Ad + i * ncols + j) = *(matrix + i*ncols + j); size_t r = FFPACK::Rank (F, nrows, ncols, Ad, ncols); delete[] Ad; return r; } EXTERN unsigned long int linbox_modn_dense_rank_double (double modulus, double* matrix, size_t nrows, size_t ncols) { return linbox_modn_dense_rank(modulus,matrix,nrows,ncols); } EXTERN unsigned long int linbox_modn_dense_rank_float (float modulus, float* matrix, size_t nrows, size_t ncols) { return linbox_modn_dense_rank(modulus,matrix,nrows,ncols); } template Element linbox_modn_dense_det(Element modulus,Element*matrix,size_t nrows,size_t ncols) { Modular F (modulus); Element * Ad = new Element [nrows*ncols]; for (size_t i=0; i< nrows; ++i) for (size_t j = 0; j < ncols; ++j) *(Ad + i * ncols + j) = *(matrix+i*ncols+j); Element dd = FFPACK::Det (F, nrows, ncols, Ad, ncols); delete[] Ad; return dd; } EXTERN double linbox_modn_dense_det_double (double modulus, double* matrix, size_t nrows, size_t ncols) { return linbox_modn_dense_det(modulus,matrix,nrows,ncols); } EXTERN float linbox_modn_dense_det_float (float modulus, float* matrix, size_t nrows, size_t ncols) { return linbox_modn_dense_det(modulus,matrix,nrows,ncols); } template Element* linbox_modn_dense_minpoly (Element modulus, Element ** mp, size_t* degree, size_t n, Element *matrix) { typedef Modular Field; typedef std::vector Polynomial; Modular F(modulus); // Warning: super sketchy memory alloc here!!!! std::vector *minP=new std::vector(n); Element * X = new Element[n*(n+1)]; size_t * P = new size_t[n]; // FIXME: check the memory management: better to allocate mp in sage // FFPACK::MinPoly (F, *minP, n, matrix, n, X, n, P); FFPACK::MinPoly (F, *minP, n, matrix, n, X, n, P); *degree=minP->size()-1; *mp = &(*minP)[0]; delete[] P; delete[] X; return *mp; } EXTERN double* linbox_modn_dense_minpoly_double (double modulus, double ** mp, size_t* degree, size_t n, double*matrix) { return linbox_modn_dense_minpoly (modulus, mp, degree, n, matrix); } EXTERN float* linbox_modn_dense_minpoly_float (float modulus, float ** mp, size_t* degree, size_t n, float *matrix) { return linbox_modn_dense_minpoly (modulus, mp, degree, n, matrix); } template Polynomial & mulpoly(const Field& F, Polynomial &res, const Polynomial & P1, const Polynomial & P2) { size_t i,j; // Warning: assumes that res is allocated to the size of the product //res.resize(P1.size()+P2.size()-1); for (i=0;i Element* linbox_modn_dense_charpoly (Element modulus, Element *& cp, size_t n, Element *matrix) { Modular F(modulus); // FIXME: check the memory management: better to allocate mp in sage std::list > P_list; FFPACK::CharPoly (F, P_list, n, matrix, n); std::vector* tmp = new std::vector (n+1); std::vector P; typename std::list >::const_iterator it; it = P_list.begin(); P = *(it++); while( it!=P_list.end() ){ ::mulpoly (F,*tmp, P, *it); P = *tmp; // delete &(*it); ++it; } return cp = &(*tmp)[0]; } EXTERN double* linbox_modn_dense_charpoly_double (double modulus, double ** cp, size_t n, double * matrix) { return linbox_modn_dense_charpoly(modulus,*cp,n,matrix); } EXTERN float* linbox_modn_dense_charpoly_float (float modulus, float ** cp, size_t n, float * matrix) { return linbox_modn_dense_charpoly(modulus,*cp,n,matrix); } template unsigned long linbox_modn_dense_col_rankprofile_submatrix_indices (Element modulus, Element* matrix, size_t ** row_idx, size_t ** col_idx, size_t* rank, size_t nrows, size_t ncols) { Modular F (modulus); Element * Ad = new Element [nrows*ncols]; for (size_t i=0; i< nrows; ++i) for (size_t j = 0; j < ncols; ++j) *(Ad + i * ncols + j) = *(matrix +i*ncols + j); FFPACK::ColRankProfileSubmatrixIndices (F, nrows, ncols, Ad, ncols, *row_idx, *col_idx, *rank); delete[] Ad; return *rank; } EXTERN unsigned long linbox_modn_dense_col_rankprofile_submatrix_indices_double (double modulus, double* matrix, size_t ** row_idx, size_t ** col_idx, size_t * rank, size_t nrows, size_t ncols) { return linbox_modn_dense_col_rankprofile_submatrix_indices(modulus,matrix,row_idx,col_idx,rank,nrows,ncols); } EXTERN unsigned long linbox_modn_dense_col_rankprofile_submatrix_indices_float (float modulus, float* matrix, size_t ** row_idx, size_t ** col_idx, size_t * rank, size_t nrows,size_t ncols) { return linbox_modn_dense_col_rankprofile_submatrix_indices(modulus,matrix,row_idx,col_idx,rank,nrows,ncols); } template unsigned long linbox_modn_dense_col_rankprofile_submatrix (Element modulus, Element* matrix, Element* ans, size_t& rank, size_t nrows, size_t ncols) { Modular F (modulus); //FIXME: check the memory managmenent Element * Ad = new Element [nrows*ncols]; for (size_t i=0; i< nrows; ++i) for (size_t j = 0; j < ncols; ++j) *(Ad + i * ncols + j) = *(matrix + i*ncols + j); size_t R = FFPACK::ColRankProfileSubmatrix (F, nrows, ncols, ans, ncols, ans, rank); delete[] Ad; return R; } EXTERN unsigned long linbox_modn_dense_col_rankprofile_submatrix_double (double modulus, double* matrix, double* out, size_t* rank, size_t nrows, size_t ncols) { return linbox_modn_dense_col_rankprofile_submatrix(modulus,matrix,out,*rank, nrows,ncols); } EXTERN unsigned long linbox_modn_dense_col_rankprofile_submatrix_float (float modulus, float* matrix, float* out, size_t* rank, size_t nrows, size_t ncols) { return linbox_modn_dense_col_rankprofile_submatrix(modulus,matrix,out,*rank,nrows,ncols); } template Element* linbox_modn_dense_matrix_matrix_multiply (Element modulus, Element *ans, Element *A, Element *B, size_t m, size_t n, size_t k) { Modular F(modulus); FFLAS::fgemm (F, FFLAS::FflasNoTrans, FFLAS::FflasNoTrans, m,n,k, 1.0, A, k, B, n, 0.0, ans, n); return ans; } EXTERN double* linbox_modn_dense_matrix_matrix_multiply_double(double modulus, double * ans, double *A, double *B, size_t m,size_t n,size_t k) { return linbox_modn_dense_matrix_matrix_multiply(modulus,ans,A,B,m,n,k); } EXTERN float* linbox_modn_dense_matrix_matrix_multiply_float(float modulus, float * ans, float *A, float *B, size_t m,size_t n,size_t k) { return linbox_modn_dense_matrix_matrix_multiply(modulus,ans,A,B,m,n,k); } template Element * linbox_modn_dense_matrix_matrix_general_multiply(Element modulus, Element *ans, Element alpha, Element beta, Element *A, Element *B, size_t m, size_t n, size_t k) { Modular F(modulus); FFLAS::fgemm (F, FFLAS::FflasNoTrans, FFLAS::FflasNoTrans, m,n,k, alpha, A, k, B, n, beta,ans, n); return ans; } EXTERN double* linbox_modn_dense_matrix_matrix_general_multiply_double (double modulus, double * ans, double alpha, double beta, double *A, double *B, size_t m, size_t n, size_t k) { return linbox_modn_dense_matrix_matrix_general_multiply(modulus,ans,alpha,beta,A,B,m,n,k); } EXTERN float* linbox_modn_dense_matrix_matrix_general_multiply_float (float modulus, float * ans, float alpha, float beta, float *A, float *B, size_t m, size_t n, size_t k) { return linbox_modn_dense_matrix_matrix_general_multiply(modulus,ans,alpha,beta,A,B,m,n,k); } /************************************************************************* dense over ZZ *************************************************************************/ typedef PID_integer IntegerRing; template void printPolynomial (const Field &F, const Polynomial &v) { for (int i = v.size () - 1; i >= 0; i--) { F.write (std::cout, v[i]); if (i > 0) std::cout << " x^" << i << " + "; } std::cout << std::endl; } SpyInteger spy; typedef GivPolynomialRing IntPolRing; void get_matrix(BlasMatrix &A, mpz_t** matrix) { size_t i, j; for (i=0; i < A.rowdim(); ++i) { for (j=0; j < A.coldim(); ++j) { IntegerRing::Element t; mpz_set(spy.get_mpz(t), matrix[i][j]); A.setEntry(i, j, t); } } } template void set_matrix(mpz_t** matrix, BlasMatrix& A) { size_t i, j; for (i=0; i < A.rowdim(); ++i) { for (j=0; j < A.coldim(); ++j) { mpz_set(matrix[i][j], spy.get_mpz(A.getEntry(i,j))); } } } // void linbox_integer_dense_minpoly_hacked(mpz_t* *mp, size_t* degree, size_t n, mpz_t** matrix, int do_minpoly) // { // /* We program around a bizarre bug in linbox, where minpoly doesn't work // on matrices that are n x n with n divisible by 4! // */ // size_t m; // if (n % 4 == 0 || !do_minpoly) { // m = n + 1; // } // else { // m = n; // } // IntegerRing ZZ; // BlasMatrix A(ZZ, m, m); // get_matrix(A, matrix); // // vector m_A; // IntPolRing::Element m_A; // if (do_minpoly) // minpoly(m_A, A); // else // charpoly(m_A, A); // if (n%4 == 0 || !do_minpoly) { // /* Program around the bug. // It is OK that this code is crappy and redundant, since it will get replaced // when linbox gets fixed. */ // int divide_by_x; // if (!do_minpoly) // divide_by_x = 1; // else { // long unsigned int r; // rank(r, A); // divide_by_x = (r==n); // } // if (divide_by_x) { // /* x was not a factor of the charpoly after all. */ // (*mp) = new mpz_t[m_A.size()-1]; // *degree = m_A.size() - 2; // for (size_t k=0; k <= *degree; ++k) { // mpz_init((*mp)[k]); // mpz_set((*mp)[k], spy.get_mpz(m_A[k+1])); // } // return; // } // } // (*mp) = new mpz_t[m_A.size()]; // *degree = m_A.size() - 1; // for (size_t k=0; k <= *degree; ++k) { // mpz_init((*mp)[k]); // mpz_set((*mp)[k], spy.get_mpz(m_A[k])); // } // } void linbox_integer_dense_charpoly(mpz_t* &mp, size_t& degree, size_t n, mpz_t** matrix) { IntegerRing ZZ; BlasMatrix A(ZZ, n, n); get_matrix(A, matrix); IntPolRing::Element m_A; charpoly(m_A, A); mp = new mpz_t[m_A.size()]; degree = m_A.size() - 1; for (size_t i=0; i <= degree; ++i) { mpz_init(mp[i]); mpz_set(mp[i], spy.get_mpz(m_A[i])); } } void linbox_integer_dense_minpoly(mpz_t* &mp, size_t& degree, size_t n, mpz_t** matrix) { IntegerRing ZZ; BlasMatrix A(ZZ, n, n); get_matrix(A, matrix); IntPolRing::Element m_A; minpoly(m_A, A); mp = new mpz_t[m_A.size()]; degree = m_A.size() - 1; for (size_t i=0; i <= degree; ++i) { mpz_init(mp[i]); mpz_set(mp[i], spy.get_mpz(m_A[i])); } } void linbox_integer_dense_delete_array(mpz_t* f) { delete[] f; } int linbox_integer_dense_matrix_matrix_multiply(mpz_t** ans, mpz_t **A, mpz_t **B, size_t A_nr, size_t A_nc,size_t B_nc) { IntegerRing ZZ; BlasMatrix AA(ZZ, A_nr, A_nc); BlasMatrix BB(ZZ, A_nc, B_nc); BlasMatrix CC(ZZ, A_nr, B_nc); get_matrix(AA, A); get_matrix(BB, B); MatrixDomain MD(ZZ); MD.mul(CC, AA, BB); set_matrix(ans, CC); return 0; } unsigned long linbox_integer_dense_rank(mpz_t** matrix, size_t nrows, size_t ncols) { IntegerRing ZZ; BlasMatrix A(ZZ, nrows, ncols); get_matrix(A, matrix); unsigned long r; rank(r, A); return r; } void linbox_integer_dense_det(mpz_t ans, mpz_t** matrix, size_t nrows, size_t ncols) { commentator().setMaxDetailLevel(0); commentator().setMaxDepth (0); IntegerRing ZZ; BlasMatrix A ( ZZ, nrows, ncols); get_matrix(A, matrix); IntegerRing::Element d; det(d, A); mpz_set(ans, spy.get_mpz(d)); } #ifdef __LINBOX_HAVE_NTL BlasMatrix new_matrix_integer_dense_ntl(mpz_t** matrix, size_t nrows, size_t ncols) { NTL_ZZ Z; BlasMatrix A (Z,nrows, ncols); size_t i, j; for (i=0; i < nrows; ++i) { for (j=0; j < ncols; ++j) { NTL_ZZ::Element t; PID_integer::Element s; mpz_set(spy.get_mpz(s), matrix[i][j]); Z.init(t, s); A.setEntry(i, j, t); } } return A; } #endif void linbox_integer_dense_double_det (mpz_t ans1, mpz_t ans2, mpz_t **a, mpz_t ** b, mpz_t **c, size_t n, int proof) { IntegerRing ZZ; BlasMatrix A(ZZ, n+1, n); size_t i, j; for (i=0; i < n-1; ++i) { for (j=0; j < n; ++j) { IntegerRing::Element t; mpz_set(spy.get_mpz(t), a[i][j]); A.setEntry(i, j, t); } } for (j=0; j < n; ++j) { PID_integer::Element t; mpz_set(spy.get_mpz(t), b[0][j]); A.setEntry (n-1, j, t); mpz_set (spy.get_mpz(t), c[0][j]); A.setEntry (n, j, t); } PID_integer::Element d1,d2; doubleDet (d1, d2, A, proof); mpz_set(ans1, spy.get_mpz(d1)); mpz_set(ans2, spy.get_mpz(d2)); } #if 0 /* This won't build on OS X PPC. */ #ifdef __LINBOX_HAVE_NTL void linbox_integer_dense_smithform(mpz_t **v, mpz_t **matrix, size_t nrows, size_t ncols) { typedef NTL_ZZ Ints; Ints Z; BlasMatrix M(new_matrix_integer_dense_ntl(matrix, nrows, ncols)); std::vector w(ncols); SmithFormAdaptive::smithForm(w, M); (*v) = new mpz_t[ncols]; for (size_t i=0; i < ncols; ++i) { mpz_init((*v)[i]); mpz_set((*v)[i], spy.get_mpz(w[i])); } } #endif #endif /************************************************************************* sparse modulo Z/nZ *************************************************************************/ struct c_vector_modint_linbox { // copy of the declaration in vector_modn_sparse.pxi int *entries; int p; size_t *positions; size_t degree; size_t num_nonzero; }; typedef unsigned int mod_int; typedef Modular GFp; typedef GFp::Element GFpElement; typedef std::vector > SparseSeqVectorGFp; typedef SparseMatrix SparseMatrixGFp; static SparseMatrixGFp linbox_new_modn_sparse_matrix(mod_int modulus, size_t numrows, size_t numcols, void *rows) { GFp F(modulus); SparseMatrixGFp M(F, numrows, numcols); struct c_vector_modint_linbox *A = static_cast(rows); for(size_t i = 0; i < numrows; ++i) { for(size_t j = 0; j < A[i].num_nonzero; ++j) { M.setEntry(i, A[i].positions[j], A[i].entries[j]); } } return M; } static std::vector linbox_new_modn_sparse_vector(mod_int modulus, size_t len, void *_vec) { GFp F(modulus); std::vector A(len); if (_vec==NULL) { return A; } struct c_vector_modint_linbox *vec = static_cast(_vec); for(size_t i = 0; i < vec->num_nonzero; ++i) { A[vec->positions[i]] = vec->entries[i]; } return A; } unsigned long linbox_modn_sparse_matrix_rank(mod_int modulus, size_t numrows, size_t numcols, void *rows, int gauss) { GFp F(modulus); unsigned long M_rank; GFpElement M_det; GaussDomain dom(F); SparseMatrixGFp M( linbox_new_modn_sparse_matrix(modulus, numrows, numcols, rows) ); if(!gauss) { dom.InPlaceLinearPivoting(M_rank, M_det, M, numrows, numcols); } else { dom.NoReordering(M_rank, M_det, M, numrows, numcols); } //*pivots = (int*)calloc(sizeof(int), dom.pivots.size()); // int j=0; // for(std::vector::const_iterator i= dom.pivots.begin(); i!= dom.pivots.end(); ++i, ++j){ // (*pivots)[j] = *i; // } return M_rank; } std::vector linbox_modn_sparse_matrix_solve(mod_int p, size_t numrows, size_t numcols, void *_a, void *b, int method) { // solve ax = b, for x, a matrix, b vector, x vector GFp F(p); std::vector X( numrows); std::vector B( linbox_new_modn_sparse_vector(p, numcols, b)); SparseMatrixGFp A(linbox_new_modn_sparse_matrix(p, numrows, numcols, _a)); switch(method) { case 1: solve(X, A, B, Method::BlasElimination()); break; case 2: solve(X, A, B, Method::Blackbox()); break; case 3: solve(X, A, B, Method::Wiedemann()); break; default: solve(X, A, B); } return X; } // vim:sts=8:sw=8:ts=8:noet:sr:cino=>s,f0,{0,g0,(0,:0,t0,+0,=s // Local Variables: // mode: C++ // tab-width: 8 // indent-tabs-mode: nil // c-basic-offset: 8 // End: linbox-1.3.2/interfaces/sage/linbox-sage.h000066400000000000000000000153621176453053400204520ustar00rootroot00000000000000/* linbox-sage.h * Copyright (C) 2007 Martin Albrecht * 2008 Clement Pernet * * Written by Martin Albrecht * Clement Pernet * * ========LICENCE======== * This file is part of the library LinBox. * * LinBox is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ========LICENCE======== */ #ifndef __LINBOX_sage_H #define __LINBOX_sagE_H #include #include #include #ifdef __cplusplus #define EXTERN extern "C" #else #define EXTERN #endif /***************************************************************** Dense over Z/nZ. *****************************************************************/ // Element could be either double or float EXTERN void linbox_modn_dense_delete_array_double (double *f); EXTERN void linbox_modn_dense_delete_array_float (float *f); EXTERN unsigned long int linbox_modn_dense_echelonize_double (double modulus, double*matrix, size_t nrows, size_t ncols); EXTERN unsigned long int linbox_modn_dense_echelonize_float (float modulus, float * matrix,size_t nrows, size_t ncols); EXTERN unsigned long int linbox_modn_dense_rank_double (double modulus, double* matrix, size_t nrows, size_t ncols); EXTERN unsigned long int linbox_modn_dense_rank_float (float modulus, float* matrix, size_t nrows, size_t ncols); template Element linbox_modn_dense_det(Element modulus,Element*matrix,size_t nrows,size_t ncols); EXTERN double linbox_modn_dense_det_double (double modulus, double* matrix, size_t nrows, size_t ncols); EXTERN float linbox_modn_dense_det_float (float modulus, float* matrix, size_t nrows, size_t ncols); template Element * linbox_modn_dense_minpoly (Element modulus, Element ** mp, size_t* degree, size_t n, Element *matrix); EXTERN double* linbox_modn_dense_minpoly_double (double modulus, double ** mp, size_t* degree, size_t n, double*matrix); EXTERN float* linbox_modn_dense_minpoly_float (float modulus, float ** mp, size_t* degree, size_t n, float *matrix); template Element* linbox_modn_dense_charpoly (Element modulus, Element *& cp, size_t n, Element * matrix); EXTERN double* linbox_modn_dense_charpoly_double (double modulus, double ** cp, size_t n, double * matrix); EXTERN float* linbox_modn_dense_charpoly_float (float modulus, float ** cp, size_t n, float * matrix); template Element*linbox_modn_dense_matrix_matrix_multiply(Element modulus, Element * ans, Element *A, Element *B, size_t m,size_t n,size_t k); EXTERN double* linbox_modn_dense_matrix_matrix_multiply_double(double modulus, double * ans, double *A, double *B, size_t m,size_t n,size_t k); EXTERN float* linbox_modn_dense_matrix_matrix_multiply_float(float modulus, float * ans, float *A, float *B, size_t m,size_t n,size_t k); template Element * linbox_modn_dense_matrix_matrix_general_multiply (Element modulus, Element * ans,Element alpha, Element beta,Element *A, Element *B,size_t m, size_t n, size_t k); EXTERN double* linbox_modn_dense_matrix_matrix_general_multiply_double (double modulus, double * ans, double alpha, double beta, double *A, double *B, size_t m, size_t n, size_t k); EXTERN float* linbox_modn_dense_matrix_matrix_general_multiply_float (float modulus, float * ans, float alpha, float beta, float *A, float *B, size_t m, size_t n, size_t k); template unsigned long linbox_modn_dense_col_rankprofile_submatrix (Element modulus,Element* matrix, Element*out, size_t& rank, size_t nrows, size_t ncols); EXTERN unsigned long linbox_modn_dense_col_rankprofile_submatrix_double (double modulus, double* matrix, double* out, size_t* rank, size_t nrows, size_t ncols); EXTERN unsigned long linbox_modn_dense_col_rankprofile_submatrix_float (float modulus, float* matrix, float* out, size_t* rank, size_t nrows, size_t ncols); template unsigned long linbox_modn_dense_col_rankprofile_submatrix_indices(Element modulus,Element* matrix,size_t** row_idx, size_t** col_idx, size_t* rank, size_t nrows,size_t ncols); EXTERN unsigned long linbox_modn_dense_col_rankprofile_submatrix_indices_double (double modulus, double* matrix, size_t ** row_idx, size_t ** col_idx, size_t * rank, size_t nrows, size_t ncols); EXTERN unsigned long linbox_modn_dense_col_rankprofile_submatrix_indices_float (float modulus, float* matrix, size_t ** row_idx, size_t ** col_idx, size_t * rank, size_t nrows,size_t ncols); /***************************************************************** Dense over ZZ *****************************************************************/ /* linbox_minpoly allocates space for minpoly, so you have to call linbox_delete_array to free it up afterwards. */ void linbox_integer_dense_minpoly (mpz_t*& minpoly, size_t& degree, size_t n, mpz_t** matrix); void linbox_integer_dense_charpoly (mpz_t*& minpoly, size_t& degree, size_t n, mpz_t** matrix); void linbox_integer_dense_delete_array (mpz_t* f); /* ans must be a pre-allocated and pre-initialized array of GMP ints. */ int linbox_integer_dense_matrix_matrix_multiply (mpz_t** ans, mpz_t **A, mpz_t **B, size_t m, size_t n, size_t k); unsigned long linbox_integer_dense_rank(mpz_t** matrix, size_t nrows, size_t ncols); void linbox_integer_dense_det(mpz_t ans, mpz_t** matrix, size_t nrows, size_t ncols); void linbox_integer_dense_smithform(mpz_t *&v, mpz_t **matrix, size_t nrows, size_t ncols); void linbox_integer_dense_double_det (mpz_t ans1, mpz_t ans2, mpz_t **a, mpz_t ** b, mpz_t **c, size_t n, int proof); /***************************************************************** Sparse over Z/nZ *****************************************************************/ unsigned long linbox_modn_sparse_matrix_rank(unsigned int modulus, size_t numrows, size_t numcols, void *rows, int reorder); std::vector linbox_modn_sparse_matrix_solve (unsigned int modulus, size_t numrows, size_t numcols, void *a, void *b, int method); #endif // __LINBOX_SAGE_H // vim:sts=8:sw=8:ts=8:noet:sr:cino=>s,f0,{0,g0,(0,:0,t0,+0,=s // Local Variables: // mode: C++ // tab-width: 8 // indent-tabs-mode: nil // c-basic-offset: 8 // End: linbox-1.3.2/linbox-config.in000066400000000000000000000027541176453053400161160ustar00rootroot00000000000000#! /bin/sh # Copyright (c) the LinBox group # This file is part of LinBox (and probably stolen here and there) # see COPYING for licence prefix=@prefix@ exec_prefix=@exec_prefix@ includedir=@includedir@ libdir=@libdir@ major=`echo @VERSION@ | cut -d'.' -f1` minor=`echo @VERSION@ | cut -d'.' -f2` micro=`echo @VERSION@ | cut -d'.' -f3` decvr=$((((($major*100)+$minor)*100)+$micro)) cflags=false libs=false usage() { cat </dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd 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 = : build_triplet = @build@ host_triplet = @host@ subdir = linbox DIST_COMMON = $(pkginclude_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/macros/aclocal-include.m4 \ $(top_srcdir)/macros/config-header.m4 \ $(top_srcdir)/macros/debug.m4 \ $(top_srcdir)/macros/expat-check.m4 \ $(top_srcdir)/macros/fflas-ffpack-check.m4 \ $(top_srcdir)/macros/fplll-check.m4 \ $(top_srcdir)/macros/givaro-check.m4 \ $(top_srcdir)/macros/gmp-check.m4 \ $(top_srcdir)/macros/iml-check.m4 \ $(top_srcdir)/macros/lapack-check.m4 \ $(top_srcdir)/macros/libtool.m4 \ $(top_srcdir)/macros/lidia-check.m4 \ $(top_srcdir)/macros/linbox-benchmark.m4 \ $(top_srcdir)/macros/linbox-doc.m4 \ $(top_srcdir)/macros/linbox-misc.m4 \ $(top_srcdir)/macros/linbox-opt.m4 \ $(top_srcdir)/macros/ltoptions.m4 \ $(top_srcdir)/macros/ltsugar.m4 \ $(top_srcdir)/macros/ltversion.m4 \ $(top_srcdir)/macros/lt~obsolete.m4 \ $(top_srcdir)/macros/m4ri-check.m4 \ $(top_srcdir)/macros/m4rie-check.m4 \ $(top_srcdir)/macros/maple-check.m4 \ $(top_srcdir)/macros/mpfr-check.m4 \ $(top_srcdir)/macros/ntl-check.m4 \ $(top_srcdir)/macros/saclib-check.m4 \ $(top_srcdir)/macros/sage-check.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgincludedir)" LTLIBRARIES = $(lib_LTLIBRARIES) liblinbox_la_DEPENDENCIES = util/libutil.la randiter/libranditer.la \ algorithms/libalgorithms.la am_liblinbox_la_OBJECTS = dummy.lo liblinbox_la_OBJECTS = $(am_liblinbox_la_OBJECTS) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = am__depfiles_maybe = CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(liblinbox_la_SOURCES) DIST_SOURCES = $(liblinbox_la_SOURCES) RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac HEADERS = $(pkginclude_HEADERS) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BLAS_CFLAGS = @BLAS_CFLAGS@ BLAS_LIBS = @BLAS_LIBS@ CC = @CC@ CCNAM = @CCNAM@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DBG = @DBG@ DEBUG_CFLAGS = @DEBUG_CFLAGS@ DEFAULT_CFLAGS = @DEFAULT_CFLAGS@ DEFS = @DEFS@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXPAT_CFLAGS = @EXPAT_CFLAGS@ EXPAT_LIBS = @EXPAT_LIBS@ FFLAS_FFPACK_CFLAGS = @FFLAS_FFPACK_CFLAGS@ FFLAS_FFPACK_LIBS = @FFLAS_FFPACK_LIBS@ FFLAS_FFPACK_LOC = @FFLAS_FFPACK_LOC@ FGREP = @FGREP@ FPLLL_CFLAGS = @FPLLL_CFLAGS@ FPLLL_LIBS = @FPLLL_LIBS@ GIVARO_CFLAGS = @GIVARO_CFLAGS@ GIVARO_LIBS = @GIVARO_LIBS@ GMP_CFLAGS = @GMP_CFLAGS@ GMP_LIBS = @GMP_LIBS@ GMP_VERSION = @GMP_VERSION@ GREP = @GREP@ IML_CFLAGS = @IML_CFLAGS@ IML_LIBS = @IML_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIDIA_CFLAGS = @LIDIA_CFLAGS@ LIDIA_LIBS = @LIDIA_LIBS@ LINBOX_BENCH_PATH = @LINBOX_BENCH_PATH@ LINBOX_DOC_PATH = @LINBOX_DOC_PATH@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ M4RIE_CFLAGS = @M4RIE_CFLAGS@ M4RIE_LIBS = @M4RIE_LIBS@ M4RI_CFLAGS = @M4RI_CFLAGS@ M4RI_LIBS = @M4RI_LIBS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAPLE_CFLAGS = @MAPLE_CFLAGS@ MAPLE_HOME = @MAPLE_HOME@ MAPLE_LIBS = @MAPLE_LIBS@ MAPLE_VERSION = @MAPLE_VERSION@ MKDIR_P = @MKDIR_P@ MPFR_CFLAGS = @MPFR_CFLAGS@ MPFR_LIBS = @MPFR_LIBS@ NM = @NM@ NMEDIT = @NMEDIT@ NTL_CFLAGS = @NTL_CFLAGS@ NTL_LIBS = @NTL_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PROF = @PROF@ RANLIB = @RANLIB@ RM = @RM@ SACLIB_CFLAGS = @SACLIB_CFLAGS@ SACLIB_LIBS = @SACLIB_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TESTS_CFLAGS = @TESTS_CFLAGS@ VERSION = @VERSION@ WARN = @WARN@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__leading_dot = @am__leading_dot@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I$(top_srcdir) SUBDIRS = util element field randiter vector matrix blackbox switch algorithms solutions ring BASIC_HDRS = \ integer.h \ config-blas.h linbox-config.h NTL_HDRS = GIVARO_HDRS = LIDIA_HDRS = @LINBOX_HAVE_NTL_TRUE@USE_NTL_HDRS = $(NTL_HDRS) @LINBOX_HAVE_GIVARO_TRUE@USE_GIVARO_HDRS = $(GIVARO_HDRS) @LINBOX_HAVE_LIDIA_TRUE@USE_LIDIA_HDRS = $(LIDIA_HDRS) pkginclude_HEADERS = \ $(BASIC_HDRS) \ $(USE_NTL_HDRS) \ $(USE_GIVARO_HDRS) \ $(USE_LIDIA_HDRS) EXTRA_DIST = \ $(NTL_HDRS) \ $(GIVARO_HDRS) \ $(LIDIA_HDRS) \ linbox.doxy \ archetypes.doxy lib_LTLIBRARIES = liblinbox.la liblinbox_la_SOURCES = dummy.C liblinbox_la_LIBADD = \ util/libutil.la \ randiter/libranditer.la \ algorithms/libalgorithms.la all: all-recursive .SUFFIXES: .SUFFIXES: .C .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu --ignore-deps linbox/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu --ignore-deps linbox/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done liblinbox.la: $(liblinbox_la_OBJECTS) $(liblinbox_la_DEPENDENCIES) $(EXTRA_liblinbox_la_DEPENDENCIES) $(CXXLINK) -rpath $(libdir) $(liblinbox_la_OBJECTS) $(liblinbox_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c .C.o: $(CXXCOMPILE) -c -o $@ $< .C.obj: $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .C.lo: $(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-pkgincludeHEADERS: $(pkginclude_HEADERS) @$(NORMAL_INSTALL) @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(pkgincludedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkgincludedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgincludedir)" || exit $$?; \ done uninstall-pkgincludeHEADERS: @$(NORMAL_UNINSTALL) @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(pkgincludedir)'; $(am__uninstall_files_from_dir) # 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): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__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; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ 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 || \ set "$$@" "$$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; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) 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; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile $(LTLIBRARIES) $(HEADERS) installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgincludedir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-pkgincludeHEADERS install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-libLTLIBRARIES install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-libLTLIBRARIES uninstall-pkgincludeHEADERS .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES clean-libtool ctags ctags-recursive \ distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-libLTLIBRARIES install-man install-pdf \ install-pdf-am install-pkgincludeHEADERS install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-recursive uninstall uninstall-am \ uninstall-libLTLIBRARIES uninstall-pkgincludeHEADERS # 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: linbox-1.3.2/linbox/algorithms/000077500000000000000000000000001176453053400164645ustar00rootroot00000000000000linbox-1.3.2/linbox/algorithms/Makefile.am000066400000000000000000000115761176453053400205320ustar00rootroot00000000000000# Copyright (c) 2010 the LinBox group # ========LICENCE======== # This file is part of the library LinBox. # # LinBox is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # # This library 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 # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # ========LICENCE======== pkgincludesubdir=$(pkgincludedir)/algorithms SUBDIRS=gauss matrix-blas3 noinst_LTLIBRARIES=libalgorithms.la libalgorithms_la_SOURCES= diophantine-solver.C # AM_CPPFLAGS= $(CBLAS_FLAG) $(GMP_CFLAGS) $(NTL_CFLAGS) $(GIVARO_CFLAGS) $(LIDIA_CFLAGS) AM_CXXFLAGS = @DEFAULT_CFLAGS@ -DDISABLE_COMMENTATOR $(CBLAS_FLAG) $(FFLAS_FFPACK_CFLAGS) $(GMP_CFLAGS) $(NTL_CFLAGS) $(ATLAS_CFLAGS) $(GIVARO_CFLAGS) $(LIDIA_CFLAGS) $(FPLLL_CFLAGS) pkgincludesub_HEADERS = \ blackbox-container.h \ blackbox-container-symmetric.h \ blackbox-container-symmetrize.h \ blackbox-container-base.h \ bbsolve.h \ double-det.h \ det-rational.h \ massey-domain.h \ wiedemann.h wiedemann.inl \ lanczos.h lanczos.inl \ block-lanczos.h block-lanczos.inl \ mg-block-lanczos.h mg-block-lanczos.inl \ la-block-lanczos.h la-block-lanczos.inl \ eliminator.h eliminator.inl \ gauss.h \ triangular-solve.h \ gauss-gf2.h \ triangular-solve-gf2.h \ dense-container.h \ cra-mpi.h \ cra-kaapi.h \ cra-domain.h \ cra-domain-seq.h \ cra-domain-omp.h \ cra-early-multip.h \ cra-early-single.h \ cra-full-multip.h \ cra-full-multip-fixed.h \ cra-givrnsfixed.h \ lazy-product.h \ rational-cra.h \ rational-cra2.h \ rational-cra-early-multip.h \ rational-cra-early-single.h \ rational-cra-full-multip.h \ blas-domain.h \ blas-domain.inl \ blas-domain-multimod.h \ bitonic-sort.h \ blackbox-block-container-base.h \ blackbox-block-container.h \ block-massey-domain.h \ block-wiedemann.h \ default.h \ signature.h \ smith-form-iliopoulos.h \ one-invariant-factor.h \ last-invariant-factor.h \ hybrid-det.h \ lifting-container.h \ smith-form-local.h \ smith-form-local2.inl \ matrix-inverse.h \ matrix-hom.h \ matrix-rank.h \ numeric-solver-lapack.h \ rational-solver-sn.h \ rational-solver-sn.inl \ dyadic-to-rational.h \ rational-reconstruction.h \ rational-reconstruction-base.h \ classic-rational-reconstruction.h \ fast-rational-reconstruction.h \ rational-solver.h \ rational-solver2.h \ rational-solver.inl \ diophantine-solver.h \ diophantine-solver.inl \ smith-form-binary.h \ smith-form-adaptive.h \ smith-form-adaptive.inl \ smith-form-sparseelim-local.h \ smith-form-sparseelim-poweroftwo.h \ rational-reconstruction2.h \ rational-solver-adaptive.h \ varprec-cra-early-single.h \ varprec-cra-early-multip.h \ vector-fraction.h \ whisart_trace.h \ cia.h \ lattice.h lattice.inl \ bbcharpoly.h \ charpoly-rational.h \ minpoly-integer.h \ minpoly-rational.h \ sigma-basis.h \ matpoly-mult.h \ echelon-form.h \ toeplitz-det.h \ dense-nullspace.h dense-nullspace.inl \ linbox-tags.h \ bm-seq.h \ short-vector.h \ rns.h rns.inl EXTRA_DIST = \ algorithms.doxy \ cra.doxy \ wiedemann.doxy \ lanczos.doxy \ sigmabasis.doxy \ elimination.doxy \ lattice.doxy \ diophantine.doxy \ gauss.doxy linbox-1.3.2/linbox/algorithms/Makefile.in000066400000000000000000000677241176453053400205510ustar00rootroot00000000000000# Makefile.in generated by automake 1.11.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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@ # Copyright (c) 2010 the LinBox group # ========LICENCE======== # This file is part of the library LinBox. # # LinBox is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # # This library 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 # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # ========LICENCE======== VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd 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 = : build_triplet = @build@ host_triplet = @host@ subdir = linbox/algorithms DIST_COMMON = $(pkgincludesub_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/macros/aclocal-include.m4 \ $(top_srcdir)/macros/config-header.m4 \ $(top_srcdir)/macros/debug.m4 \ $(top_srcdir)/macros/expat-check.m4 \ $(top_srcdir)/macros/fflas-ffpack-check.m4 \ $(top_srcdir)/macros/fplll-check.m4 \ $(top_srcdir)/macros/givaro-check.m4 \ $(top_srcdir)/macros/gmp-check.m4 \ $(top_srcdir)/macros/iml-check.m4 \ $(top_srcdir)/macros/lapack-check.m4 \ $(top_srcdir)/macros/libtool.m4 \ $(top_srcdir)/macros/lidia-check.m4 \ $(top_srcdir)/macros/linbox-benchmark.m4 \ $(top_srcdir)/macros/linbox-doc.m4 \ $(top_srcdir)/macros/linbox-misc.m4 \ $(top_srcdir)/macros/linbox-opt.m4 \ $(top_srcdir)/macros/ltoptions.m4 \ $(top_srcdir)/macros/ltsugar.m4 \ $(top_srcdir)/macros/ltversion.m4 \ $(top_srcdir)/macros/lt~obsolete.m4 \ $(top_srcdir)/macros/m4ri-check.m4 \ $(top_srcdir)/macros/m4rie-check.m4 \ $(top_srcdir)/macros/maple-check.m4 \ $(top_srcdir)/macros/mpfr-check.m4 \ $(top_srcdir)/macros/ntl-check.m4 \ $(top_srcdir)/macros/saclib-check.m4 \ $(top_srcdir)/macros/sage-check.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libalgorithms_la_LIBADD = am_libalgorithms_la_OBJECTS = diophantine-solver.lo libalgorithms_la_OBJECTS = $(am_libalgorithms_la_OBJECTS) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = am__depfiles_maybe = CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(libalgorithms_la_SOURCES) DIST_SOURCES = $(libalgorithms_la_SOURCES) RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(pkgincludesubdir)" HEADERS = $(pkgincludesub_HEADERS) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BLAS_CFLAGS = @BLAS_CFLAGS@ BLAS_LIBS = @BLAS_LIBS@ CC = @CC@ CCNAM = @CCNAM@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DBG = @DBG@ DEBUG_CFLAGS = @DEBUG_CFLAGS@ DEFAULT_CFLAGS = @DEFAULT_CFLAGS@ DEFS = @DEFS@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXPAT_CFLAGS = @EXPAT_CFLAGS@ EXPAT_LIBS = @EXPAT_LIBS@ FFLAS_FFPACK_CFLAGS = @FFLAS_FFPACK_CFLAGS@ FFLAS_FFPACK_LIBS = @FFLAS_FFPACK_LIBS@ FFLAS_FFPACK_LOC = @FFLAS_FFPACK_LOC@ FGREP = @FGREP@ FPLLL_CFLAGS = @FPLLL_CFLAGS@ FPLLL_LIBS = @FPLLL_LIBS@ GIVARO_CFLAGS = @GIVARO_CFLAGS@ GIVARO_LIBS = @GIVARO_LIBS@ GMP_CFLAGS = @GMP_CFLAGS@ GMP_LIBS = @GMP_LIBS@ GMP_VERSION = @GMP_VERSION@ GREP = @GREP@ IML_CFLAGS = @IML_CFLAGS@ IML_LIBS = @IML_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIDIA_CFLAGS = @LIDIA_CFLAGS@ LIDIA_LIBS = @LIDIA_LIBS@ LINBOX_BENCH_PATH = @LINBOX_BENCH_PATH@ LINBOX_DOC_PATH = @LINBOX_DOC_PATH@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ M4RIE_CFLAGS = @M4RIE_CFLAGS@ M4RIE_LIBS = @M4RIE_LIBS@ M4RI_CFLAGS = @M4RI_CFLAGS@ M4RI_LIBS = @M4RI_LIBS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAPLE_CFLAGS = @MAPLE_CFLAGS@ MAPLE_HOME = @MAPLE_HOME@ MAPLE_LIBS = @MAPLE_LIBS@ MAPLE_VERSION = @MAPLE_VERSION@ MKDIR_P = @MKDIR_P@ MPFR_CFLAGS = @MPFR_CFLAGS@ MPFR_LIBS = @MPFR_LIBS@ NM = @NM@ NMEDIT = @NMEDIT@ NTL_CFLAGS = @NTL_CFLAGS@ NTL_LIBS = @NTL_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PROF = @PROF@ RANLIB = @RANLIB@ RM = @RM@ SACLIB_CFLAGS = @SACLIB_CFLAGS@ SACLIB_LIBS = @SACLIB_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TESTS_CFLAGS = @TESTS_CFLAGS@ VERSION = @VERSION@ WARN = @WARN@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__leading_dot = @am__leading_dot@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ pkgincludesubdir = $(pkgincludedir)/algorithms SUBDIRS = gauss matrix-blas3 noinst_LTLIBRARIES = libalgorithms.la libalgorithms_la_SOURCES = diophantine-solver.C # AM_CPPFLAGS= $(CBLAS_FLAG) $(GMP_CFLAGS) $(NTL_CFLAGS) $(GIVARO_CFLAGS) $(LIDIA_CFLAGS) AM_CXXFLAGS = @DEFAULT_CFLAGS@ -DDISABLE_COMMENTATOR $(CBLAS_FLAG) $(FFLAS_FFPACK_CFLAGS) $(GMP_CFLAGS) $(NTL_CFLAGS) $(ATLAS_CFLAGS) $(GIVARO_CFLAGS) $(LIDIA_CFLAGS) $(FPLLL_CFLAGS) pkgincludesub_HEADERS = \ blackbox-container.h \ blackbox-container-symmetric.h \ blackbox-container-symmetrize.h \ blackbox-container-base.h \ bbsolve.h \ double-det.h \ det-rational.h \ massey-domain.h \ wiedemann.h wiedemann.inl \ lanczos.h lanczos.inl \ block-lanczos.h block-lanczos.inl \ mg-block-lanczos.h mg-block-lanczos.inl \ la-block-lanczos.h la-block-lanczos.inl \ eliminator.h eliminator.inl \ gauss.h \ triangular-solve.h \ gauss-gf2.h \ triangular-solve-gf2.h \ dense-container.h \ cra-mpi.h \ cra-kaapi.h \ cra-domain.h \ cra-domain-seq.h \ cra-domain-omp.h \ cra-early-multip.h \ cra-early-single.h \ cra-full-multip.h \ cra-full-multip-fixed.h \ cra-givrnsfixed.h \ lazy-product.h \ rational-cra.h \ rational-cra2.h \ rational-cra-early-multip.h \ rational-cra-early-single.h \ rational-cra-full-multip.h \ blas-domain.h \ blas-domain.inl \ blas-domain-multimod.h \ bitonic-sort.h \ blackbox-block-container-base.h \ blackbox-block-container.h \ block-massey-domain.h \ block-wiedemann.h \ default.h \ signature.h \ smith-form-iliopoulos.h \ one-invariant-factor.h \ last-invariant-factor.h \ hybrid-det.h \ lifting-container.h \ smith-form-local.h \ smith-form-local2.inl \ matrix-inverse.h \ matrix-hom.h \ matrix-rank.h \ numeric-solver-lapack.h \ rational-solver-sn.h \ rational-solver-sn.inl \ dyadic-to-rational.h \ rational-reconstruction.h \ rational-reconstruction-base.h \ classic-rational-reconstruction.h \ fast-rational-reconstruction.h \ rational-solver.h \ rational-solver2.h \ rational-solver.inl \ diophantine-solver.h \ diophantine-solver.inl \ smith-form-binary.h \ smith-form-adaptive.h \ smith-form-adaptive.inl \ smith-form-sparseelim-local.h \ smith-form-sparseelim-poweroftwo.h \ rational-reconstruction2.h \ rational-solver-adaptive.h \ varprec-cra-early-single.h \ varprec-cra-early-multip.h \ vector-fraction.h \ whisart_trace.h \ cia.h \ lattice.h lattice.inl \ bbcharpoly.h \ charpoly-rational.h \ minpoly-integer.h \ minpoly-rational.h \ sigma-basis.h \ matpoly-mult.h \ echelon-form.h \ toeplitz-det.h \ dense-nullspace.h dense-nullspace.inl \ linbox-tags.h \ bm-seq.h \ short-vector.h \ rns.h rns.inl EXTRA_DIST = \ algorithms.doxy \ cra.doxy \ wiedemann.doxy \ lanczos.doxy \ sigmabasis.doxy \ elimination.doxy \ lattice.doxy \ diophantine.doxy \ gauss.doxy all: all-recursive .SUFFIXES: .SUFFIXES: .C .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu --ignore-deps linbox/algorithms/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu --ignore-deps linbox/algorithms/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libalgorithms.la: $(libalgorithms_la_OBJECTS) $(libalgorithms_la_DEPENDENCIES) $(EXTRA_libalgorithms_la_DEPENDENCIES) $(CXXLINK) $(libalgorithms_la_OBJECTS) $(libalgorithms_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c .C.o: $(CXXCOMPILE) -c -o $@ $< .C.obj: $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .C.lo: $(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-pkgincludesubHEADERS: $(pkgincludesub_HEADERS) @$(NORMAL_INSTALL) @list='$(pkgincludesub_HEADERS)'; test -n "$(pkgincludesubdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(pkgincludesubdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(pkgincludesubdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkgincludesubdir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgincludesubdir)" || exit $$?; \ done uninstall-pkgincludesubHEADERS: @$(NORMAL_UNINSTALL) @list='$(pkgincludesub_HEADERS)'; test -n "$(pkgincludesubdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(pkgincludesubdir)'; $(am__uninstall_files_from_dir) # 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): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__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; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ 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 || \ set "$$@" "$$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; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) 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; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile $(LTLIBRARIES) $(HEADERS) installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(pkgincludesubdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-pkgincludesubHEADERS install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-pkgincludesubHEADERS .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-generic clean-libtool \ clean-noinstLTLIBRARIES ctags ctags-recursive distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-pkgincludesubHEADERS \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-recursive uninstall uninstall-am \ uninstall-pkgincludesubHEADERS # 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: linbox-1.3.2/linbox/algorithms/algorithms.doxy000066400000000000000000000060241176453053400215440ustar00rootroot00000000000000/* * Copyright (c) LinBox * * ========LICENCE======== * This file is part of the library LinBox. * * LinBox is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ========LICENCE======== */ /** \ingroup linbox * \defgroup algorithms algorithms * * \brief The core linear algebra algorithms of LinBox. * * The codes here implement algorithms for linear algebra problems. The names * often reflect the authorship of the central algorithm (Lanczos, Wiedemann, * ...). In contrast, the "drivers" in the \ref solutions directory are named * for the problem solved (rank, det, ...). Those are generally wrappers of * algorithms from this directory. Their purpose is to give a simple and * direct user interface and sometimes to provide a solution strategy which is * a hybrid of algorithms from this directory. * * %Algorithm classes and functions generally have the field class as a * template parameter. Blackbox algorithms may have a BlackboxMatrix parameter * or allow a Blackbox class as template parameter. Elimination codes work * over DenseMatrix or SparseMatrix types with varying degrees of substitution * among the types possible. * */ //@{ /// @name Blackbox Algorithms //@{ //@Include: wiedemann.h //@Include: lanczos.h //@Include: blackbox-container.h //@Include: blackbox-container-base.h //@Include: blackbox-container-symmetric.h //@Include: blackbox-container-symmetrize.h //@Include: massey-domain.h //@Include: density.h //@} /// @name Blackbox Block Algorithms //@{ //@Include: blackbox-block-container-base.h //@Include: blackbox-block-container.h //@Include: block-massey-domain.h //@Include: block-lanczos.h //@Include: dense-container.h //@Include: blas-domain.h //@} /// @name Rational Solver //@{ //@Include: rational-solver.h //@Include: diophantine-solver.h //@Include: lifting-container.h //@Include: rational-reconstruction.h //@Include: matrix-inverse.h //@Include: matrix-mod.h //@Include: matrix-rank.h //@Include: vector-fraction.h //@} /// @name Smith Normal Form //@{ //@Include: smith-form.h //@Include: iliopoulos-elimination.h //@Include: ith-invariant-factor.h //@Include: last-invariant-factor.h //@Include: local-smith.h //@Include: 2local-smith.h //@Include: bitonic-sort.h //@Include: default.h //@} //@Include: gauss.h //@Include: cra.h //@} // vim:syn=doxygen linbox-1.3.2/linbox/algorithms/bbcharpoly.h000066400000000000000000000425451176453053400207740ustar00rootroot00000000000000/* linbox/algorithms/bbchapoly.h * Copyright(C) LinBox * Written * by Clement Pernet * * * ========LICENCE======== * This file is part of the library LinBox. * * LinBox is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ========LICENCE======== *. */ /*! @file algorithms/bbcharpoly.h * @ingroup algorithms * @brief no doc. * */ #ifndef __LINBOX_bbcharpoly_H #define __LINBOX_bbcharpoly_H #define _LB_MAXITER 5 #include #include #include "linbox/blackbox/scalar-matrix.h" #include "linbox/blackbox/sum.h" #include "linbox/ring/givaro-polynomial.h" #include "linbox/field/modular.h" #include "linbox/field/field-traits.h" #include "linbox/solutions/det.h" #include "linbox/solutions/rank.h" #include "linbox/solutions/minpoly.h" #include "linbox/randiter/random-prime.h" #include "linbox/algorithms/matrix-hom.h" #include "linbox/blackbox/polynomial.h" namespace LinBox { /*! @internal * @ingroup charpoly * @brief BlackBox Characteristic Polynomial * @details NO DOC * @warning rebind comes from Givaro ! */ class BBcharpoly { template class FactorMult ; /*! @brief No doc */ template class FactorMult { public: FactorMult() : multiplicity(0),dep(NULL) {} FactorMult( FieldPoly* FP, IntPoly* IP, unsigned long m, FactorMult*d) : fieldP(FP), intP(IP), multiplicity(m), dep(d) {} FactorMult (const FactorMult& FM) : fieldP(FM.fieldP), intP(FM.intP), multiplicity(FM.multiplicity), dep(FM.dep) {} int update (const size_t n, int * goal) { if (dep->dep != NULL){ FactorMult*curr = dep; int k = dep->update (n,goal)+1; int d = ((int)dep->fieldP->size()-1)/k; int tmp = (int)(n-dep->multiplicity) / d; int i = k-1; while (curr->dep!=NULL){ curr = curr->dep; tmp-=i*(int)curr->multiplicity; --i; } tmp = tmp/k + (int)(multiplicity - dep->multiplicity) / d; dep->multiplicity = tmp ; //std::cerr<<"Updating "<<*dep->fieldP<<" --> mul = "<fieldP->size()-1); return k; } else{ int tmp = (int)((n - 2 * dep->multiplicity + multiplicity) / (dep->fieldP->size()-1)); *goal -= tmp * ((int)dep->fieldP->size()-1); //std::cerr<<"Updating (leaf)"<<*dep->fieldP<<" --> mul = "<multiplicity = tmp; return 1; } } FieldPoly *fieldP; IntPoly *intP; unsigned long multiplicity; FactorMult *dep; std::ostream& write(std::ostream& os) { return os<<" FieldPoly --> "< "< "< "< static Polynomial& blackboxcharpoly (Polynomial & P, const BlackBox & A, const Categorytag & tag, const Method::Blackbox & M); /** Algorithm computing the integer characteristic polynomial * of a blackbox. */ template < class BlackBox > static typename GivPolynomialRing::Element& blackboxcharpoly (typename GivPolynomialRing::Element & P, const BlackBox & A, const RingCategories::IntegerTag & tag, const Method::Blackbox & M) { commentator().start ("Integer BlackBox Charpoly ", "IbbCharpoly"); typename BlackBox::Field intRing = A.field(); typedef Modular Field; typedef typename BlackBox::template rebind::other FieldBlackBox; typedef GivPolynomialRing IntPolyDom; typedef typename IntPolyDom::Element IntPoly; typedef GivPolynomialRing::Element FieldPoly; // Set of factors-multiplicities sorted by degree typedef FactorMult FM; typedef std::multimap FactPoly; typedef typename FactPoly::iterator FactPolyIterator; std::multimap leadingBlocks; //typename std::multimap::iterator lead_it; FactPoly factCharPoly; size_t n = A.coldim(); IntPolyDom IPD(intRing); /* Computation of the integer minimal polynomial */ IntPoly intMinPoly; minpoly (intMinPoly, A, M); if (intMinPoly.size() == n+1){ commentator().stop ("done", NULL, "IbbCharpoly"); return P = intMinPoly; } /* Factorization over the integers */ std::vector intFactors; std::vector exp; IPD.factor (intFactors, exp, intMinPoly); size_t factnum = intFactors.size(); /* Choose a modular prime field */ RandomPrimeIterator primeg (28); ++primeg; Field F(*primeg); /* Building the structure of factors */ int goal =(int) n; for (size_t i = 0; i < intFactors.size(); ++i) { unsigned long deg = (intFactors[i]->size()-1); FactorMult* FFM=NULL; if (exp[i] > 1) { IntPoly *tmp = new IntPoly(*intFactors[i]); FM* depend = NULL; for (size_t j = 1; j <= exp[i]; ++j){ IntPoly * tmp2 = new IntPoly(*tmp); FieldPoly *tmp2p = new FieldPoly(tmp2->size()); typename IntPoly::template rebind() (*tmp2p, *tmp2, F); FFM = new FM (tmp2p, tmp2, 0, depend); factCharPoly.insert (std::pair (deg, FFM)); ++factnum; depend = FFM; deg += intFactors[i]->size()-1; if (j < exp[i]) IPD.mul (*tmp, *tmp2, *intFactors[i]); } delete tmp; --factnum; FFM->multiplicity = 1; // The last factor is present in minpoly goal -= (int)deg-(int)intFactors[i]->size()+1; leadingBlocks.insert (std::pair(FFM,false)); } else { FieldPoly* fp=new FieldPoly(intFactors[i]->size()); typename IntPoly::template rebind() (*fp, *(intFactors[i]), F); FFM = new FM (fp,intFactors[i],1,NULL); factCharPoly.insert (std::pair (intFactors[i]->size()-1, FFM)); leadingBlocks.insert (std::pair(FFM,false)); goal -= (int)deg; } } FieldBlackBox Ap(A, F); findMultiplicities (Ap, factCharPoly, leadingBlocks, goal, M); // Building the integer charpoly IntPoly intCharPoly (n+1); IntPoly tmpP; intRing.init (intCharPoly[0], 1); for (FactPolyIterator it_f = factCharPoly.begin(); it_f != factCharPoly.end(); ++it_f){ IPD.pow (tmpP, *it_f->second->intP, it_f->second->multiplicity); IPD.mulin (intCharPoly, tmpP); delete it_f->second->intP; delete it_f->second->fieldP; delete it_f->second; } commentator().stop ("done", NULL, "IbbCharpoly"); return P = intCharPoly; } /** Algorithm computing the characteristic polynomial * of a blackbox over a prime field. */ template < class BlackBox > static typename GivPolynomialRing::Element& blackboxcharpoly (typename GivPolynomialRing::Element & P, const BlackBox & A, const RingCategories::ModularTag & tag, const Method::Blackbox & M) { commentator().start ("Modular BlackBox Charpoly ", "MbbCharpoly"); typedef typename BlackBox::Field Field; typedef GivPolynomialRing PolyDom; typedef typename PolyDom::Element Polynomial; // Set of factors-multiplicities sorted by degree typedef std::multimap* > FactPoly; typedef typename FactPoly::iterator FactPolyIterator; std::multimap*,bool> leadingBlocks; //typename std::multimap*,bool>::iterator lead_it; Field F = A.field(); PolyDom PD (F); FactPoly factCharPoly; const size_t n = A.coldim(); /* Computation of the minimal polynomial */ Polynomial minPoly; minpoly (minPoly, A, M); //std::cerr<<"Minpoly = "< factors; std::vector exp; PD.factor (factors, exp, minPoly); size_t factnum = factors.size(); /* Building the structure of factors */ int goal = (int)n; for (size_t i = 0; i < factors.size(); ++i) { unsigned long deg = (factors[i]->size()-1); FactorMult* FFM=NULL; if (exp[i] > 1) { Polynomial* tmp = new Polynomial(*factors[i]); FactorMult* depend = NULL; for (size_t j = 1; j <= exp[i]; ++j){ Polynomial * tmp2 = new Polynomial(*tmp); FFM = new FactorMult (tmp2, tmp2, 0, depend); // std::cerr<<"Inserting new factor (exp>1): "<<(*tmp2)<* > (deg, FFM)); ++factnum; depend = FFM; deg += factors[i]->size()-1; if (j < exp[i]) PD.mul (*tmp, *tmp2, *factors[i]); } delete tmp; --factnum; FFM->multiplicity = 1; // The last factor is present in minpoly goal -= (int)(deg-factors[i]->size())+1; leadingBlocks.insert (std::pair*,bool>(FFM,false)); delete factors[i] ; } else { FFM = new FactorMult (factors[i],factors[i],1,NULL); //std::cerr<<"Inserting new factor : "<<*factors[i]<* > (factors[i]->size()-1, FFM)); leadingBlocks.insert (std::pair*,bool>(FFM,false)); goal -= (int)deg; } } findMultiplicities ( A, factCharPoly, leadingBlocks, goal, M); // Building the product Polynomial tmpP; F.init (charPoly[0], 1); for (FactPolyIterator it_f = factCharPoly.begin(); it_f != factCharPoly.end(); ++it_f){ PD.pow (tmpP, *it_f->second->fieldP, it_f->second->multiplicity); PD.mulin (charPoly, tmpP); delete it_f->second->fieldP; delete it_f->second; } } commentator().stop ("done", NULL, "MbbCharpoly"); return P = charPoly; } template < class FieldPoly,class IntPoly> static void trials( std::list > >& sols, const int goal, std::vector >& ufv, const int i0 ) { if ( !goal ){ sols.push_back( ufv); } else if ( goal > 0 ){ for (size_t i=i0; isize()+1, ufv, (int)i ); ufv[i].multiplicity--; } } } template static void findMultiplicities( const BlackBox& A, std::multimap* >& factCharPoly, std::multimap*,bool>& leadingBlocks, int goal, const Method::Blackbox &M) { typedef std::multimap* > FactPoly; typedef typename BlackBox::Field Field; typedef GivPolynomialRing PolyDom; typename FactPoly::iterator itf = factCharPoly.begin(); typename std::multimap*,bool>::iterator lead_it; Field F = A.field(); PolyDom PD(F); size_t factnum = factCharPoly.size(); size_t n = A.coldim(); /* Rank for the linear factors */ while ( ( factnum > 1 ) && ( itf->first == 1) ){ lead_it = leadingBlocks.find(itf->second); if ( lead_it != leadingBlocks.end()) lead_it->second = true; long unsigned int r; /* The matrix Pi (A) */ if (F.isZero (itf->second->fieldP->operator[](0))){ rank (r, A, M) ; } else { PolynomialBB PA (A, *itf->second->fieldP); rank (r, PA, M) ; } itf->second->multiplicity = r; //std::cerr<<"Rank 1 : "<<*itf->second->fieldP<<" --> "< maxIter ){ lead_it = leadingBlocks.find (itf->second); if ( lead_it != leadingBlocks.end()) lead_it->second = true; PolynomialBB PA (A, *itf->second->fieldP); long unsigned int r; rank (r, PA, M); itf->second->multiplicity =r; //std::cerr<<"Rank > 1 : "<<*itf->second->intP<<" --> "<* currFFM = lead_it->first; //std::cerr<<"Updating multiplicities of "<<*lead_it->first->fieldP<second){ // the leading block has not been computed // go to the last computed multiplicity of the sequence while (currFFM->dep!=NULL){ if (currFFM->dep->multiplicity != 0) break; currFFM = currFFM->dep; } if (currFFM->dep != NULL){ // Need one more computation: PolynomialBB PA (A, *currFFM->fieldP); long unsigned int r; rank (r, PA, M) ; //std::cerr<<"extra factor : "<<*currFFM->fieldP<<" --> "<multiplicity; currFFM->multiplicity = r; currFFM->update (n,&goal); currFFM->multiplicity = tmp; } } else { int lbm; if (currFFM->dep != NULL){ int k = currFFM->update (n,&goal)+1; int d = (int)(lead_it->first->fieldP->size()-1) / k; lbm = (int)(n-lead_it->first->multiplicity) / d; currFFM = currFFM->dep; do{ lbm -= (int)(currFFM->multiplicity * (currFFM->fieldP->size()-1)); currFFM = currFFM->dep; } while (currFFM!=NULL); lbm /= k; goal -= (lbm-1)*((int)lead_it->first->fieldP->size()-1); } else { lbm = (int)((n-lead_it->first->multiplicity) / ((int)lead_it->first->fieldP->size()-1)); goal -= (lbm-1)*((int)lead_it->first->fieldP->size()-1); } lead_it->first->multiplicity = lbm; } } // Recursive search typename FactPoly::iterator firstUnknowFactor = itf; if ( factnum <= _LB_MAXITER ){ std::vector > unknownFact (factnum); for (size_t i = 0; i < factnum; ++i, ++itf){ unknownFact[i] = *itf->second; } std::list > > sols; trials (sols, goal,unknownFact, 0); typename std::list > >::iterator uf_it = sols.begin(); if (sols.size()>1){ // Evaluation of P in random gamma typename Field::Element d, gamma, mgamma, d2; typename Field::RandIter g(F); do g.random(gamma); while (F.isZero(gamma)); //Building the matrix A + gamma.Id mod p F.neg( mgamma, gamma ); ScalarMatrix gammaId( F, n, gamma ); Sum > Agamma(A, gammaId); // Compute det (A+gamma.Id) det (d, Agamma, M); if (A.rowdim()%2) F.negin(d); // Compute Prod(Pi(-gamma)^mi) typename Field::Element tmp, e; F.init (d2,1); typename FactPoly::iterator it_f=factCharPoly.begin(); PolyDom PD_f (F); for (size_t i = 0; i < factCharPoly.size()-factnum; ++i, ++it_f){ PD_f.eval (tmp, *it_f->second->fieldP, mgamma); for (size_t j=0; j < it_f->second->multiplicity; ++j) F.mulin (d2, tmp); } while ( uf_it != sols.end() ){ F.init (e,1); for (size_t i = 0; i < uf_it->size(); ++i){ PD_f.eval( tmp, *(*uf_it)[i].fieldP, mgamma ); for (size_t j=0; j < (*uf_it)[i].multiplicity; ++j) F.mulin( e, tmp ); } F.mulin( e, d2); if (F.areEqual(e,d)) break; ++uf_it; } if (uf_it == sols.end()) std::cerr<<"FAIL:: No solutions found in recursive seach"< >::iterator it_fm = (*uf_it).begin(); for (; it_f != factCharPoly.end(); ++it_f, ++it_fm) it_f->second->multiplicity = it_fm->multiplicity; } } }; } #undef _LB_MAXITER #endif // __BBCHARPOLY_H // vim:sts=8:sw=8:ts=8:noet:sr:cino=>s,f0,{0,g0,(0,:0,t0,+0,=s // Local Variables: // mode: C++ // tab-width: 8 // indent-tabs-mode: nil // c-basic-offset: 8 // End: linbox-1.3.2/linbox/algorithms/bbsolve.h000066400000000000000000000254601176453053400203000ustar00rootroot00000000000000/* Copyright (c) LinBox * linbox/algorithms/bbsolve.h * (was linbox/solutions/solve.h) * written * by Bradford Hovinen * * * ========LICENCE======== * This file is part of the library LinBox. * * LinBox is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ========LICENCE======== *. */ #ifndef __LINBOX_bbsolve_H #define __LINBOX_bbsolve_H #include #include // must fix this list... #include "linbox/algorithms/wiedemann.h" #include "linbox/algorithms/lanczos.h" #include "linbox/algorithms/mg-block-lanczos.h" #include "linbox/util/debug.h" #include "linbox/vector/vector-domain.h" #include "linbox/solutions/methods.h" namespace LinBox { #if 0 /** @name Solvers * @brief Solving linear system Ax = b over the field F. */ @{ #endif #if 0 // for specialization on method. template Vector& solve (const Blackbox&A, Vector &x, const Vector &b, const Field &F, const MyMethod & m ); #endif /** Solve Ax=b over field F using Wiedemann's method, with inconsistency certificate. * * This is a general interface for the linear system solving * capabilities of LinBox. If the system is nonsingular, it returns * the unique solution, storing it in the vector x. If the system is * consistent and singular, it returns a random solution. Repeated * calls to this function can give a complete description of the * solution manifold. If the system is inconsistent and the * \ref SolverTraits structure supplied requests certification of * inconsistency, it fills in the certificate of * inconsistency. Otherwise, it runs through the number of iterations * specified in \c traits and throws a \ref SolveFailed exception * if it cannot find a solution. * * This specialization uses Wiedemann's algorithm and is the default. * * @param A Black box matrix of the system * @param x Place to store solution vector * @param b Right-hand side * @param u Vector in which to store certificate of inconsistency, if required * @param F Field over which to perform computations * @param traits \ref SolverTraits structure with user-specified parameters * @return Reference to solution vector */ template typename WiedemannSolver::ReturnStatus solve (const Blackbox &A, Vector &x, const Vector &b, Vector &u, const Field &F, const WiedemannTraits &traits = WiedemannTraits ()) { WiedemannSolver solver (F, traits); return solver.solve (A, x, b, u); } /** Solve Ax=b over field F using the Wiedemann method. * * This version differs from the one above in that there is no extra * parameter for the certificate of inconsistency, and it throws * exceptions if the solution fails. It also returns a reference to * the solution vector. */ template Vector &solve (const Blackbox &A, Vector &x, const Vector &b, const Field &F, const WiedemannTraits &traits = WiedemannTraits ()) { Vector u; WiedemannSolver solver (F, traits); VectorWrapper::ensureDim (u, A.rowdim ()); switch (solver.solve (A, x, b, u)) { case WiedemannSolver::OK: return x; case WiedemannSolver::FAILED: throw SolveFailed (); case WiedemannSolver::SINGULAR: throw SolveFailed (); case WiedemannSolver::INCONSISTENT: throw InconsistentSystem (u); default: throw LinboxError ("Bad return value from solve"); } } /** Solve Ax=b over field F using the Lanczos method. * * This is a general interface for the linear system solving capabilities of * LinBox. If the system is nonsingular, it returns the unique solution, storing * it in the vector x. If the system is consistent and singular, it returns a * random solution. Repeated calls to this function can give a complete * description of the solution manifold. If the system is inconsistent and the * \ref SolverTraits structure has result checking turned on, it runs through * the number of iterations specified in \c traits and throws a * \ref SolveFailed exception if it cannot find a solution. * * This specialization uses the Lanczos algorithm. * * @param A Black box matrix of the system * @param x Place to store solution vector * @param b Right-hand side * @param F Field over which to perform computations * @param traits \ref SolverTraits structure with user-specified parameters * @return Reference to solution vector */ template Vector &solve (const Blackbox &A, Vector &x, const Vector &b, const Field &F, const LanczosTraits &traits) { LanczosSolver solver (F, traits); return solver.solve (A, x, b); } /** Solve Ax=b over field F using the block Lanczos method. * * This is a general interface for the linear system solving capabilities of * LinBox. If the system is nonsingular, it returns the unique solution, storing * it in the vector x. If the system is consistent and singular, it returns a * random solution. Repeated calls to this function can give a complete * description of the solution manifold. If the system is inconsistent and the * \ref SolverTraits structure has result checking turned on, it runs through * the number of iterations specified in \c traits and throws a * \ref SolveFailed exception if it cannot find a solution. * * This specialization uses the block Lanczos algorithm. * * @param A Black box matrix of the system * @param x Place to store solution vector * @param b Right-hand side * @param F Field over which to perform computations * @param traits \ref SolverTraits structure with user-specified parameters * @return Reference to solution vector */ template Vector &solve (const Blackbox &A, Vector &x, const Vector &b, const Field &F, const BlockLanczosTraits &traits) { MGBlockLanczosSolver solver (F, traits); solver.solve (A, x, b); return x; } /** Solve Ax=b over field F using Gaussian elimination. * * This is a general interface for the linear system solving capabilities of * LinBox. If the system is nonsingular, it returns the unique solution, storing * it in the vector x. If the system is consistent and singular, it returns a * random solution. Repeated calls to this function can give a complete * description of the solution manifold. If the system is inconsistent and the * \ref SolverTraits structure supplied requests certification of * inconsistency, it throws an \ref InconsistentSystem exception, which * includes a certificate of inconsistency. Otherwise, it runs through the * number of iterations specified in \p traits and throws a * \ref SolveFailed exception if it cannot find a solution. * * @param A Black box matrix of the system * @param x Place to store solution vector * @param b Right-hand side * @param F Field over which to perform computations * @param traits \ref SolverTraits structure with user-specified parameters * @return Reference to solution vector */ template Vector &solve (const Matrix &A, Vector &x, const Vector &b, const Field &F, const BlasEliminationTraits &traits) { // N.B. This is a place holder; I am intending to fix this very shortly throw LinboxError ("Elimination-based solver not implemented"); return x; } /** Enumeration for results of next solver. * * SOLVE_SUCCESSFUL - System solution was succesful, \c x holds the solution * vector * SOLVE_INCONSISTENT - System was inconsistent, \c u holds the certificate * of inconsistency and \c x is untouched * SOLVE_FAILED - Neither a system solution nor a certificate of inconsistency * could be obtained before the maximum number of trials elapsed. Both \c x * and \c u are untouched. */ enum SolveResult { SOLVE_SUCCESSFUL, SOLVE_INCONSISTENT, SOLVE_FAILED }; /** Solve Ax=b over field F, returning consistency indicator * * This is a variant of \c solve that does not throw any exceptions unless * the user makes an error. It returns a \ref SolveResult enum indicating * whether the solve operation was successful, the system was inconsistent, or * the solve operation failed. The certificate of inconsistency, if requested, * is stored in a reference parameter supplied to this variant. * * @param A Black box matrix of the system * @param x Place to store solution vector * @param b Right-hand side * @param u Place to store certificate of inconsistency * @param F Field over which to perform computations * @param traits \ref SolverTraits structure with user-specified parameters * @return \ref SolveResult indicating whether the solve operation was * successful */ template SolveResult solve (const Blackbox &A, Vector &x, const Vector &b, const Field &F, Vector &u, const MethodTraits &traits = MethodTraits ()) { try { solve (A, x, b, F, traits); } catch (SolveFailed) { return SOLVE_FAILED; } catch (InconsistentSystem e) { VectorDomain VD (F); F.copy (u, e.certificate ()); return SOLVE_INCONSISTENT; } return SOLVE_SUCCESSFUL; } #if 0 @} #endif } #endif // __LINBOX_bbsolve_H // vim:sts=8:sw=8:ts=8:noet:sr:cino=>s,f0,{0,g0,(0,:0,t0,+0,=s // Local Variables: // mode: C++ // tab-width: 8 // indent-tabs-mode: nil // c-basic-offset: 8 // End: linbox-1.3.2/linbox/algorithms/bitonic-sort.h000066400000000000000000000051201176453053400212470ustar00rootroot00000000000000/* Copyright (C) LinBox * Written by Zhendong Wan * * * * ========LICENCE======== * This file is part of the library LinBox. * * LinBox is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ========LICENCE======== */ #ifndef __LINBOX_bitonic_sort_H #define __LINBOX_bitonic_sort_H /*! @file algorithms/bitonic-sort.h * Implement bitonic sorting network */ #include namespace LinBox { /* end - begin must be a power of 2*/ template void bitonicSort(Iterator begin, Iterator end, const Comparator& comparator = Comparator()); /* end - begin must be a power of 2*/ template void bitonicMerge(Iterator begin, Iterator end, const Comparator& comparator = Comparator()); /// template void bitonicSort(Iterator begin, Iterator end, const Comparator& comparator) { if (end - begin >= 2) { Iterator mid = begin + (end - begin) / 2; // Sort the first half bitonicSort(begin, mid, comparator); // Sort the second half bitonicSort(mid, end, comparator); // reverse the order of second half std::reverse(mid, end); // Bitonic merge two halves bitonicMerge(begin, end, comparator); } } template void bitonicMerge(Iterator begin, Iterator end, const Comparator& comparator) { if (end - begin >= 2) { Iterator mid = begin + (end - begin) / 2; Iterator p1 = begin; Iterator p2 = mid; // Compare network for (p1 = begin, p2 = mid; p2 != end; ++ p1, ++ p2) comparator(*p1, *p2); // Bitonic Merge first half bitonicMerge(begin, mid, comparator); // Bitonic Merge second half bitonicMerge(mid, end, comparator); } } } #endif //__LINBOX_bitonic_sort_H // vim:sts=8:sw=8:ts=8:noet:sr:cino=>s,f0,{0,g0,(0,:0,t0,+0,=s // Local Variables: // mode: C++ // tab-width: 8 // indent-tabs-mode: nil // c-basic-offset: 8 // End: linbox-1.3.2/linbox/algorithms/blackbox-block-container-base.h000066400000000000000000000145441176453053400244120ustar00rootroot00000000000000/* linbox/algorithms/blackbox-block-container-base.h * Copyright (C) 2002 Pascal Giorgi * * Written by Pascal Giorgi pascal.giorgi@ens-lyon.fr * * ========LICENCE======== * This file is part of the library LinBox. * * LinBox is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ========LICENCE======== */ /*! @file algorithms/blackbox-block-container-base.h * @ingroup algorithms * @brief NO DOC */ #ifndef __LINBOX_blackbox_block_container_base_H #define __LINBOX_blackbox_block_container_base_H #include // for seeding #include "linbox/linbox-config.h" #include "linbox/util/debug.h" #include "linbox/blackbox/archetype.h" #include "linbox/matrix/blas-matrix.h" #include "linbox/vector/vector-domain.h" #include "linbox/algorithms/blas-domain.h" namespace LinBox { #ifndef MIN #define MIN(a,b) ((a)<(b)?(a):(b)) #endif /** \brief A base class for BlackboxBlockContainer. * The primary member function is \c begin(). * It returns an iterator which after i increments (++) dereferences to * \f$U A^i V\f$, for \f$U\f$ and \f$V\f$ determined by the init * function. It is designed to be used with implementations of Block * Berlekamp-Massey such as BlockMasseyDomain. * * Subclasses complete the implementation by defining \c _launch() and * \c _wait(). */ template class BlackboxBlockContainerBase { public: typedef _Field Field; typedef typename Field::Element Element; typedef _Blackbox Blackbox; typedef BlasMatrix Block; typedef BlasMatrix Value; // Default constructors BlackboxBlockContainerBase () {} // Sequence constructor from a blackbox and a field // cs set the size of the sequence BlackboxBlockContainerBase (const Blackbox *BD, const Field &F, size_t m, size_t n, size_t seed=(size_t)time(NULL)) : _field(F) , _BB(BD), _size(BD->rowdim()/m + BD->coldim()/n +2) , _nn(BD->rowdim()), _m(m), _n(n), _blockU(F,_m,_nn),_blockV(F,_nn,_n),_value(_field,m,n), _seed(seed) {} virtual ~BlackboxBlockContainerBase(){} // iterator of the sequence class const_iterator { protected: BlackboxBlockContainerBase &_c; public: const_iterator () {} const_iterator (BlackboxBlockContainerBase &C) : _c (C) {} const_iterator &operator ++ () { _c._launch (); return *this; } const Value &operator * () { _c._wait (); return _c.getvalue();} }; // begin of the sequence iterator const_iterator begin () { return const_iterator (*this); } // end of the sequence iterator const_iterator end () { return const_iterator (); } // size of the sequence size_t size() const { return _size; } // field of the sequence const Field &getField () const { return _field; } // blackbox of the sequence const Blackbox *getBB () const { return _BB; } // row dimension of the sequence element size_t rowdim() const { return _m; } // column dimension of the sequence element size_t coldim() const { return _n; } protected: friend class const_iterator; /** Launches a process to do the computation of the next sequence * value: \f$U A^{i+1} V\f$. ...or just does it. */ virtual void _launch() = 0; /** If a separate process is computing the next value of \f$U * A^{i+1} V\f$, \c _wait() blocks until the value is ready. */ virtual void _wait() = 0; //-------------- /// Members //-------------- Field _field; const Blackbox *_BB; size_t _size; // length of sequence size_t _nn; // _BB order (square mat) size_t _m; // block rows size_t _n; // block cols // BDS 22.03.03 long casenumber; Block _blockU; Block _blockV; Value _value; size_t _seed; const Value &getvalue() {return _value;} //-------------- /// Initializers //-------------- // Blackbox multiplication using apply function void Mul(Block &M1, const Blackbox &M2 , const Block& M3) { linbox_check( M1.rowdim() == M2.rowdim()); linbox_check( M2.coldim() == M3.rowdim()); linbox_check( M1.coldim() == M3.coldim()); typename Block::ColIterator p1 = M1.colBegin(); typename Block::ConstColIterator p3 = M3.colBegin(); for (; p3 != M3.colEnd(); ++p1,++p3) { M2.apply(*p1,*p3); } } /// User Left and Right blocks void init (const Block& U, const Block& V) { linbox_check ( U.rowdim() == _m); linbox_check ( U.coldim() == _nn); linbox_check ( V.rowdim() == _nn); linbox_check ( V.coldim() == _n); casenumber = 1; _blockU = U; _blockV = V; _value = Value(_field,_m,_n); BlasMatrixDomain BMD(_field); BMD.mul(_value, _blockU, _blockV); } // Random Left Matrix and Right Matrix void init (size_t m, size_t n) { casenumber = 1; typename Field::RandIter G(_field,0,_seed); Block U (m, _BB->rowdim()); _blockU =U; Block V(_BB->coldim(), n); _blockV =V; typename Block::Iterator iter_U = _blockU.Begin(); for (; iter_U != _blockU.End();++iter_U) G.random(*iter_U); typename Block::Iterator iter_V = _blockV.Begin(); for (; iter_V != _blockV.End();++iter_V) G.random(*iter_V); _value = Value(_field,m,n); BlasMatrixDomain BMD(_field); BMD.mul(_value, _blockU, _blockV); } }; } #endif // __LINBOX_blackbox_block_container_base_H // vim:sts=8:sw=8:ts=8:noet:sr:cino=>s,f0,{0,g0,(0,:0,t0,+0,=s // Local Variables: // mode: C++ // tab-width: 8 // indent-tabs-mode: nil // c-basic-offset: 8 // End: linbox-1.3.2/linbox/algorithms/blackbox-block-container.h000066400000000000000000000327701176453053400235030ustar00rootroot00000000000000/* linbox/algorithms/blackbox-block-container.h * Copyright (C) 2002 Pascal Giorgi * * Written by Pascal Giorgi pascal.giorgi@ens-lyon.fr * * ========LICENCE======== * This file is part of the library LinBox. * * LinBox is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ========LICENCE======== */ /*! @file algorithms/blackbox-block-container.h * @ingroup algorithms * @brief no doc. */ #ifndef __LINBOX_blackbox_block_container_H #define __LINBOX_blackbox_block_container_H #include "linbox/linbox-config.h" #include "linbox/util/debug.h" #include "linbox/algorithms/blackbox-block-container-base.h" #include "linbox/matrix/blas-matrix.h" #include "linbox/algorithms/blas-domain.h" #define _BBC_TIMING #ifdef _BBC_TIMING #include #include "linbox/util/timer.h" #endif namespace LinBox { /*! @brief no doc. */ template class BlackboxBlockContainer : public BlackboxBlockContainerBase<_Field,_Blackbox> { public: typedef _Field Field; typedef typename Field::Element Element; typedef typename Field::RandIter RandIter; typedef BlasMatrix Block; typedef BlasMatrix Value; // Default constructor BlackboxBlockContainer () {} // constructor of the sequence from a blackbox, a field and one block projection BlackboxBlockContainer(const _Blackbox *D, const Field &F, const Block &U0) : BlackboxBlockContainerBase (D, F, U0.rowdim(), U0.coldim()) , _blockW(D->rowdim(), U0.coldim()), _BMD(F) { #ifdef _BBC_TIMING clearTimer(); tSequence.clear(); tSequence.start(); #endif this->init (U0, U0); #ifdef _BBC_TIMING tSequence.stop(); ttSequence += tSequence; #endif } // constructor of the sequence from a blackbox, a field and two blocks projection BlackboxBlockContainer(const _Blackbox *D, const Field &F, const Block &U0, const Block& V0) : BlackboxBlockContainerBase (D, F,U0.rowdim(), V0.coldim()) , _blockW(F,D->rowdim(), V0.coldim()), _BMD(F) { #ifdef _BBC_TIMING clearTimer(); tSequence.clear(); tSequence.start(); #endif this->init (U0, V0); #ifdef _BBC_TIMING tSequence.stop(); ttSequence += tSequence; #endif } // constructor of the sequence from a blackbox, a field and two blocks random projection BlackboxBlockContainer(const _Blackbox *D, const Field &F, size_t m, size_t n, size_t seed= (size_t)time(NULL)) : BlackboxBlockContainerBase (D, F, m, n,seed) , _blockW(F,D->rowdim(), n), _BMD(F) { #ifdef _BBC_TIMING clearTimer(); tSequence.clear(); tSequence.start(); #endif this->init (m, n); #ifdef _BBC_TIMING tSequence.stop(); ttSequence += tSequence; #endif } #ifdef _BBC_TIMING void clearTimer() { ttSequence.clear(); } void printTimer() { std::cout<<"Sequence Computation "< _BMD; #ifdef _BBC_TIMING Timer ttSequence, tSequence; #endif // launcher of the next sequence element computation void _launch () { #ifdef _BBC_TIMING tSequence.clear(); tSequence.start(); #endif if (this->casenumber) { this->Mul(_blockW,*this->_BB,this->_blockV); _BMD.mul(this->_value, this->_blockU, _blockW); this->casenumber = 0; } else { this->Mul(this->_blockV,*this->_BB,_blockW); _BMD.mul(this->_value, this->_blockU, this->_blockV); this->casenumber = 1; } #ifdef _BBC_TIMING tSequence.stop(); ttSequence +=tSequence; #endif } void _wait () {} }; /*! @brief no doc. */ template class BlackboxBlockContainerRecord : public BlackboxBlockContainerBase<_Field,_Blackbox> { public: typedef _Field Field; typedef typename Field::Element Element; typedef typename Field::RandIter RandIter; typedef BlasMatrix Block; typedef BlasMatrix Value; enum Launcher {RowUpdate=0, ColUpdate=1, Nothing=2}; // Default constructor BlackboxBlockContainerRecord () {} // constructor of the sequence from a blackbox, a field and one block projection BlackboxBlockContainerRecord(const _Blackbox *D, const Field &F, const Block &U0) : BlackboxBlockContainerBase (D, F, U0.rowdim(), U0.coldim()) , _blockW(F, D->rowdim(), U0.coldim()), _BMD(F), _launcher(Nothing), _iter(1) { this->init (U0, U0); _rep = std::vector (this->_size, Value(F)); _Vcopy = this->_blockV; for (size_t i=0;i< this->_size;++i){ _rep[i] = this->_value; _launch_record(); } this->_value=_rep[0]; } // constructor of the sequence from a blackbox, a field and two blocks projection BlackboxBlockContainerRecord(const _Blackbox *D, const Field &F, const Block &U0, const Block& V0, bool denseblock= true) : BlackboxBlockContainerBase (D, F,U0.rowdim(), V0.coldim()) , _blockW(F,D->rowdim(), V0.coldim()), _BMD(F), _launcher(Nothing), _iter(1) { #ifdef _BBC_TIMING clearTimer(); tSequence.clear(); tSequence.start(); #endif this->init (U0, V0); _rep = std::vector (this->_size, Value(F)); _Vcopy = this->_blockV; if (denseblock) { for (size_t i=0;i< this->_size;++i){ _rep[i] = this->_value; _launch_record(); } } else { _rep.resize(_rep.size()-3); size_t block= U0.rowdim(); size_t Nn = U0.coldim()/block; _Special_U.resize(block, std::vector(Nn)); for (size_t i=0;i_size-3;++i){ _launch_record_notdense(); _rep[i] = this->_value; } } this->_value=_rep[0]; #ifdef _BBC_TIMING tSequence.stop(); ttSequence += tSequence; #endif } // constructor of the sequence from a blackbox, a field and two blocks random projection BlackboxBlockContainerRecord(const _Blackbox *D, const Field &F, size_t m, size_t n, size_t seed= (size_t)time(NULL)) : BlackboxBlockContainerBase (D, F, m, n,seed), _blockW(D->rowdim(), n), _BMD(F), _launcher(Nothing), _iter(1) { #ifdef _BBC_TIMING clearTimer(); tSequence.clear(); tSequence.start(); #endif this->init (m,n); _rep = std::vector (this->_size); _Vcopy = this->_blockV; for (size_t i=0;i< this->_size;++i){ _rep[i] = this->_value; _launch_record(); } this->_value=_rep[0]; #ifdef _BBC_TIMING tSequence.stop(); ttSequence += tSequence; #endif } void setU (const std::vector &b, size_t k) { linbox_check( b.size() == this->_row); _launcher = RowUpdate; _upd_idx = k; _u = b; _w.resize(this->_row); _iter = 1; _case = 1; #ifdef _BBC_TIMING tSequence.clear(); tSequence.start(); #endif std::vector _row_value(this->_n); _BMD.mul(_row_value, b, _Vcopy); this->_value = _rep[0]; for (size_t j=0; j< this->_n; ++j) this->_value.setEntry(_upd_idx, j, _row_value[j]); #ifdef _BBC_TIMING tSequence.stop(); ttSequence += tSequence; #endif } void setV (const std::vector &b, size_t k) { linbox_check( b.size() == this->_col); _launcher = ColUpdate; _upd_idx = k; _u = b; _w.resize(this->_col); _iter = 1; _case = 1; #ifdef _BBC_TIMING tSequence.clear(); tSequence.start(); #endif std::vector _col_value(this->_m); _BMD.mul(_col_value, this->_blockU, b); this->_value = _rep[0]; for (size_t j=0; j< this->_m; ++j) this->_value.setEntry(j, _upd_idx, _col_value[j]); #ifdef __BBC_TIMING tSequence.stop(); ttSequence += tSequence; #endif } void recompute() { switch(_launcher) { case Nothing: this->_value=_rep[0]; _iter=1; break; case RowUpdate: #ifdef _BBC_TIMING tSequence.clear(); tSequence.start(); #endif for (size_t i=0;i< this->_size;++i){ _rep[i]=this->_value; _launch_record_row(); } _launcher=Nothing; this->_value=_rep[0]; _iter=1; #ifdef _BBC_TIMING tSequence.stop(); ttSequence += tSequence; #endif break; case ColUpdate: #ifdef _BBC_TIMING tSequence.clear(); tSequence.start(); #endif for (size_t i=0;i< this->_size;++i){ _rep[i]=this->_value; _launch_record_col(); } _launcher=Nothing; this->_value=_rep[0]; _iter=1; break; #ifdef _BBC_TIMING tSequence.stop(); ttSequence += tSequence; #endif default : throw LinboxError ("Bad argument in BlackboxBlockContainerRecord, _launch() function\n"); break; } } #ifdef _BBC_TIMING void clearTimer() { ttSequence.clear(); } void printTimer() { std::cout<<"Sequence Computation "<& getRep() const { return _rep;} protected: Block _blockW; Block _Vcopy; BlasMatrixDomain _BMD; std::vector _rep; size_t _upd_idx; std::vector _u; std::vector _w; Launcher _launcher; size_t _iter; size_t _case; std::vector > _Special_U; #ifdef _BBC_TIMING Timer ttSequence, tSequence; #endif // launcher of computation of sequence element void _launch_record () { if (this->casenumber) { Mul(_blockW,*this->_BB,this->_blockV); _BMD.mul(this->_value, this->_blockU, _blockW); this->casenumber = 0; } else { Mul(this->_blockV,*this->_BB,_blockW); _BMD.mul(this->_value, this->_blockU, this->_blockV); this->casenumber = 1; } } // launcher of computation of sequence element void _launch_record_notdense () { size_t block= this->_blockV.coldim(); size_t numblock=_Special_U[0].size(); if (this->casenumber) { Mul(_blockW,*this->_BB,this->_blockV); std::vector tmp(block); for (size_t i=0; i T(_blockW, i*numblock, 0, numblock, block); _BMD.mul(tmp, _Special_U[i], T); for (size_t j=0;j_field.assign(this->_value.refEntry(i,j), tmp[j]); } } this->casenumber = 0; } else { Mul(this->_blockV,*this->_BB,_blockW); std::vector tmp(block); for (size_t i=0; i< block; ++i){ BlasMatrix T(this->_blockV, i*numblock, 0, numblock, block); _BMD.mul(tmp, _Special_U[i], T); for (size_t j=0;j_field.assign(this->_value.refEntry(i,j), tmp[j]); } this->casenumber = 1; } } // launcher of computation of sequence element // just update one row in the sequence element void _launch_record_row() { if ( _iter < this->_size) { if ( _case == 1) { this->_BB->applyTranspose(_w,_u); std::vector _row_value(this->_n); _BMD.mul(_row_value, _w, _Vcopy); this->_value = _rep[_iter]; for (size_t j=0; j< this->_n; ++j) this->_value.setEntry(_upd_idx, j, _row_value[j]); ++_iter; _case =0; } else { this->_BB->applyTranspose(_u,_w); std::vector _row_value(this->_n); _BMD.mul(_row_value, _u, _Vcopy); this->_value = _rep[_iter]; for (size_t j=0; j< this->_n; ++j) this->_value.setEntry(_upd_idx, j, _row_value[j]); ++_iter; _case =1; } } } // launcher of computation of sequence element // just update one col in the sequence element void _launch_record_col() { if ( _iter < this->_size) { if ( _case == 1) { this->_BB->apply(_w,_u); std::vector _col_value(this->_m); _BMD.mul(_col_value, this->_blockU, _w); this->_value = _rep[_iter]; for (size_t j=0; j< this->_m; ++j) this->_value.setEntry(j, _upd_idx, _col_value[j]); ++_iter; _case =0; } else { this->_BB->apply(_u,_w); std::vector _col_value(this->_m); _BMD.mul(_col_value, this->_blockU, _u); this->_value = _rep[_iter]; for (size_t j=0; j< this->_m; ++j) this->_value.setEntry(j, _upd_idx, _col_value[j]); ++_iter; _case =1; } } } // launcher which be used as iterator on the sequence void _launch() { switch (_launcher) { case Nothing: if (_iter < this->_size) this->_value = _rep[_iter]; ++_iter; break; case RowUpdate: _launch_record_row(); break; case ColUpdate: _launch_record_col(); break; default : throw LinboxError ("Bad argument in BlackboxBlockContainerRecord, _launch() function\n"); break; } } void _wait () {} }; } #undef _BBC_TIMING #endif // __LINBOX_blackbox_block_container_H // vim:sts=8:sw=8:ts=8:noet:sr:cino=>s,f0,{0,g0,(0,:0,t0,+0,=s // Local Variables: // mode: C++ // tab-width: 8 // indent-tabs-mode: nil // c-basic-offset: 8 // End: linbox-1.3.2/linbox/algorithms/blackbox-container-base.h000066400000000000000000000117271176453053400233220ustar00rootroot00000000000000/* linbox/algorithms/blackbox-container.h * Copyright (C) 1999, 2001 Jean-Guillaume Dumas * * Written by Jean-Guillaume Dumas * * ========LICENCE======== * This file is part of the library LinBox. * * LinBox is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ========LICENCE======== */ #ifndef __LINBOX_blackbox_container_base_H #define __LINBOX_blackbox_container_base_H // ================================================================ // Base ForwardIterator wrapper for BlackBoxes // Have to be provided : // - launch : launches the following computation // - wait : waits for the end of the current computation // ================================================================ #include "linbox/vector/vector-domain.h" namespace LinBox { #ifndef MIN # define MIN(a,b) ((a)<(b)?(a):(b)) #endif /** \brief A base class for BlackboxContainer. * The primary member function is begin(). * It returns an iterator which after i increments (++) dereferences to * $v^T A^i u$, for $v$ and $u$ determined by the form of construction. * It is designed to be used with implementations of Berlekamp-Massey * such as MasseyDom. * * Subclasses complete the implementation by defining _launch() and _wait(). */ template class BlackboxContainerBase { public: typedef typename Field::Element Element; //-- Constructors BlackboxContainerBase () {} BlackboxContainerBase (const Blackbox *BB, const Field &F) : _field (F), _VD (F), _BB (BB), _size ((long)MIN (BB->rowdim (), BB->coldim ())) { _size <<= 1; } // Pascal Giorgi 16.02.2004 BlackboxContainerBase (const Blackbox *BB, const Field &F, unsigned long Size) : _field (F), _VD (F), _BB (BB), _size ((long)Size) {} virtual ~BlackboxContainerBase () { //delete _BB; } class const_iterator { BlackboxContainerBase &_c; public: //const_iterator () {} // BB ?? const_iterator (BlackboxContainerBase &C) : _c (C) {} const_iterator &operator ++ () { _c._launch (); return *this; } const Element &operator * () { _c._wait (); return _c.getvalue (); } }; const_iterator begin () { return const_iterator (*this); } const_iterator end () { return const_iterator (); } long size () const { return _size; } const Field &getField () const { return _field; } Blackbox *getBB () const { return _BB; } protected: friend class const_iterator; /** Launches a process to do the computation of the next sequence * value: $v^T A^{i+1} u$. ...or just does it. */ virtual void _launch() = 0; /** If a separate process is computing the next value of $v^T A^{i+1} u$, * _wait() blocks until the value is ready. */ virtual void _wait() = 0; //-------------- /// Members //-------------- Field _field; VectorDomain _VD; const Blackbox *_BB; long _size; // BDS 22.03.03 long casenumber; std::vector u, v; Element _value; const Element &getvalue() { return _value; } //-------------- /// Initializers //-------------- /// User Left and Right vectors template Element &init (const Vector1& uu, const Vector2& vv) { casenumber = 1; u.resize(uu.size()); std::copy(uu.begin(),uu.end(),u.begin()); //u = uu; v.resize(vv.size()); std::copy(vv.begin(),vv.end(),v.begin()); //v = vv; // JGD 22.03.03 // return _VD.dot (_value, u, u); return _VD.dot (_value, u, v); } /// Random Left vectors, Zero Right vector template Element &init (RandIter& g) { casenumber = 1; u.resize (_BB->coldim ()); for (long i = u.size (); i--;) g.random (u[i]); v.resize (_BB->rowdim ()); return _VD.dot (_value, u, u); } /// User Left vectors, Zero Right vector template Element &init (const Vector& uu) { casenumber = 1; u.resize(uu.size()); std::copy(uu.begin,uu.end(),u.begin()); v.resize (_BB->rowdim ()); return _VD.dot (_value, u, u); } }; } #endif // __LINBOX_blackbox_container_base_H // vim:sts=8:sw=8:ts=8:noet:sr:cino=>s,f0,{0,g0,(0,:0,t0,+0,=s // Local Variables: // mode: C++ // tab-width: 8 // indent-tabs-mode: nil // c-basic-offset: 8 // End: linbox-1.3.2/linbox/algorithms/blackbox-container-symmetric.h000066400000000000000000000070351176453053400244210ustar00rootroot00000000000000/* linbox/algorithms/blackbox-container.h * Copyright (C) 1999, 2001 Jean-Guillaume Dumas, Bradford Hovinen * * Written by Jean-Guillaume Dumas , * * ------------------------------------ * Bradford Hovinen * * Modifications to incorporate into linbox-new tree * ------------------------------------ * * * ========LICENCE======== * This file is part of the library LinBox. * * LinBox is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ========LICENCE======== *. */ // ================================================================ // LinBox Project 1999 // Black Box iterator and container // For symmetric matrix with same left and right vector // the sequence is this->u^t this->v, this->u^t A this->v, ..., this->u^t A^n this->v, // Time-stamp: <25 Jan 02 16:04:24 Jean-Guillaume.Dumas@imag.fr> // ================================================================ #ifndef __LINBOX_blackbox_container_symmetric_H #define __LINBOX_blackbox_container_symmetric_H #include "linbox/randiter/archetype.h" #include "linbox/algorithms/blackbox-container.h" namespace LinBox { /// \brief See base class for doc. template class BlackboxContainerSymmetric : public BlackboxContainerBase { public: typedef _Blackbox Blackbox; BlackboxContainerSymmetric () {} template BlackboxContainerSymmetric (const Blackbox *D, const Field &F, const Vector &u0) : BlackboxContainerBase (D, F) { init (u0, u0); } BlackboxContainerSymmetric (const Blackbox *D, const Field &F, RandIter &g) : BlackboxContainerBase (D, F) { this->init (g); } protected: void _launch () { if (this->casenumber > 0) { if (this->casenumber == 1) { this->casenumber = 2; this->_BB->apply (this->v, this->u); // this->v <- B(B^i u_0) = B^(i+1) u_0 this->_VD.dot (this->_value, this->u, this->v); // t <- this->u^t this->v = u_0^t B^(2i+1) u_0 } else { this->casenumber = -1; this->_VD.dot (this->_value, this->v, this->v); // t <- this->v^t this->v = u_0^t B^(2i+2) u_0 } } else { if (this->casenumber == 0) { this->casenumber = 1; this->_VD.dot (this->_value, this->u, this->u); // t <- this->u^t this->u = u_0^t B^(2i+4) u_0 } else { this->casenumber = 0; this->_BB->apply (this->u, this->v); // this->u <- B(B^(i+1) u_0) = B^(i+2) u_0 this->_VD.dot (this->_value, this->v, this->u); // t <- this->v^t this->u = u_0^t B^(2i+3) u_0 } } } void _wait () {} }; } #endif // __LINBOX_blackbox_container_symmetric_H // vim:sts=8:sw=8:ts=8:noet:sr:cino=>s,f0,{0,g0,(0,:0,t0,+0,=s // Local Variables: // mode: C++ // tab-width: 8 // indent-tabs-mode: nil // c-basic-offset: 8 // End: linbox-1.3.2/linbox/algorithms/blackbox-container-symmetrize.h000066400000000000000000000063701176453053400246160ustar00rootroot00000000000000/* linbox/algorithms/blackbox-container-symmetrize.h * Copyright (C) 1999, 2001 Jean-Guillaume Dumas * * Written by Jean-Guillaume Dumas , * * ------------------------------------ * Bradford Hovinen * * Ported to linbox-new framework; replaced use of DOTPROD, etc. with * VectorDomain * ------------------------------------ * * * ========LICENCE======== * This file is part of the library LinBox. * * LinBox is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ========LICENCE======== *. */ /*! @internal * @file algorithms/blackbox-containter-symetrize.h * @ingroup algorithms * @brief Symmetrizing iterator for rank computations */ #ifndef __LINBOX_blackbox_container_symmetrize_H #define __LINBOX_blackbox_container_symmetrize_H #include "linbox/algorithms/blackbox-container-base.h" namespace LinBox { /** \brief Symmetrizing iterator (for rank computations). * @ingroup algorithms * * Symmetrizing iterator (for rank computations) * Same left and right vector * A is supposed to have tranpose-vector product * the sequence is * \code this->u^t this->u (A this->u)^t (A this->u) = this->u^t (A^t A) this->u (A^t (A this->u))^t (A^t (A this->u)) = this->u^t (A^t A)^2 this->u etc. \endcode */ template class BlackboxContainerSymmetrize : public BlackboxContainerBase { public: typedef _Blackbox Blackbox; BlackboxContainerSymmetrize () {} template BlackboxContainerSymmetrize (const Blackbox *D, const Field &F, const Vector &u0) : BlackboxContainerBase (D, F) { init (u0); } //BlackboxContainerSymmetrize (const Blackbox *D, const Field &F, RandIter &g = typename Field::RandIter(_field) ) BlackboxContainerSymmetrize (const Blackbox *D, const Field &F, RandIter &g = typename Field::RandIter() ) : BlackboxContainerBase (D, F) { init (g); } private: void _launch () { if (this->casenumber) { this->casenumber = 0; this->_BB->apply (this->v, this->u); this->_VD.dot (this->_value, this->v, this->v); } else { this->casenumber = 1; this->_BB->applyTranspose (this->u, this->v); this->_VD.dot (this->_value, this->u, this->u); } } void _wait () {} }; } #endif // __LINBOX_blackbox_container_symmetrize_H // vim:sts=8:sw=8:ts=8:noet:sr:cino=>s,f0,{0,g0,(0,:0,t0,+0,=s // Local Variables: // mode: C++ // tab-width: 8 // indent-tabs-mode: nil // c-basic-offset: 8 // End: linbox-1.3.2/linbox/algorithms/blackbox-container.h000066400000000000000000000105311176453053400224020ustar00rootroot00000000000000/* linbox/algorithms/blackbox-container.h * Copyright (C) 1999, 2001 Jean-Guillaume Dumas, Bradford Hovinen * * Written by Jean-Guillaume Dumas , * Bradford Hovinen * * ------------------------------------ * * * ========LICENCE======== * This file is part of the library LinBox. * * LinBox is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ========LICENCE======== *. */ #ifndef __LINBOX_blackbox_container_H #define __LINBOX_blackbox_container_H #include "linbox/randiter/archetype.h" #include "linbox/algorithms/blackbox-container-base.h" #include "linbox/util/timer.h" namespace LinBox { /// \brief Limited doc so far. template class BlackboxContainer : public BlackboxContainerBase { public: typedef _Blackbox Blackbox; BlackboxContainer () {} template BlackboxContainer(const Blackbox * D, const Field &F, const Vector &u0) : BlackboxContainerBase (D, F) { init (u0, u0); w = this->u; #ifdef INCLUDE_TIMING _applyTime = _dotTime = 0.0; #endif } // Pascal Giorgi 16.02.2004 template BlackboxContainer(const Blackbox * D, const Field &F, const Vector &u0, unsigned long size) : BlackboxContainerBase (D, F,size) { init (u0, u0); w = this->u; #ifdef INCLUDE_TIMING _applyTime = _dotTime = 0.0; #endif } template BlackboxContainer(const Blackbox * D, const Field &F, const Vector1 &u0, const Vector2& v0) : BlackboxContainerBase (D, F) { init (u0, v0); w = this->v; #ifdef INCLUDE_TIMING _applyTime = _dotTime = 0.0; #endif } BlackboxContainer(const Blackbox * D, const Field &F, RandIter &g) : BlackboxContainerBase (D, F) { this->casenumber = 1; this->u.resize (this->_BB->coldim ()); for (long i = this->u.size (); i--;) g.random (this->u[i]); this->w.resize (this->_BB->coldim ()); for (long i = this->w.size (); i--;) g.random (this->w[i]); this->v.resize (this->_BB->rowdim ()); this->_VD.dot (this->_value, this->u, this->w); #ifdef INCLUDE_TIMING _applyTime = _dotTime = 0.0; #endif } #ifdef INCLUDE_TIMING double applyTime () const { return _applyTime; } double dotTime () const { return _dotTime; } #endif // INCLUDE_TIMING protected: std::vector w; #ifdef INCLUDE_TIMING Timer _timer; double _applyTime, _dotTime; #endif // INCLUDE_TIMING void _launch () { if (this->casenumber) { #ifdef INCLUDE_TIMING _timer.start (); #endif // INCLUDE_TIMING this->_BB->apply (this->v, w); // GV #ifdef INCLUDE_TIMING _timer.stop (); _applyTime += _timer.realtime (); _timer.start (); #endif // INCLUDE_TIMING this->_VD.dot (this->_value, this->u, this->v); // GV #ifdef INCLUDE_TIMING _timer.stop (); _dotTime += _timer.realtime (); #endif // INCLUDE_TIMING this->casenumber = 0; } else { #ifdef INCLUDE_TIMING _timer.start (); #endif // INCLUDE_TIMING this->_BB->apply (w, this->v); // GV #ifdef INCLUDE_TIMING _timer.stop (); _applyTime += _timer.realtime (); _timer.start (); #endif // INCLUDE_TIMING this->_VD.dot (this->_value, this->u, w); // GV #ifdef INCLUDE_TIMING _timer.stop (); _dotTime += _timer.realtime (); #endif // INCLUDE_TIMING this->casenumber = 1; } } void _wait () {} }; } #endif // __LINBOX_blackbox_container_H // vim:sts=8:sw=8:ts=8:noet:sr:cino=>s,f0,{0,g0,(0,:0,t0,+0,=s // Local Variables: // mode: C++ // tab-width: 8 // indent-tabs-mode: nil // c-basic-offset: 8 // End: linbox-1.3.2/linbox/algorithms/blas-domain-multimod.h000066400000000000000000000052531176453053400226600ustar00rootroot00000000000000/* linbox/algorithms/blas-domain.inl * Copyright (C) 2004 Pascal Giorgi, Clément Pernet * * Written by : * Pascal Giorgi pascal.giorgi@ens-lyon.fr * Clément Pernet clement.pernet@imag.fr * * ========LICENCE======== * This file is part of the library LinBox. * * LinBox is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ========LICENCE======== */ #ifndef __LINBOX_blas_matrix_domain_multimod_H #define __LINBOX_blas_matrix_domain_multimod_H #include "linbox/matrix/blas-matrix-multimod.h" #include "linbox/algorithms/blas-domain.h" THIS_CODE_MAY_NOT_COMPILE_AND_IS_NOT_TESTED namespace LinBox { /*! specialisation for MultiModDouble. */ // #ifndef __INTEL_COMPILER // template <> // #endif class BlasMatrixDomainInv > { public: int operator() (const MultiModDouble &F, BlasMatrix &Ainv, const BlasMatrix &A) const { linbox_check( A.rowdim() == A.coldim()); linbox_check( A.rowdim() == Ainv.rowdim()); linbox_check( A.coldim() == Ainv.coldim()); BlasMatrix tmp(A); return (*this)(F,Ainv,tmp); } int operator() (const MultiModDouble &F, BlasMatrix &Ainv, BlasMatrix &A) const { linbox_check( A.rowdim() == A.coldim()); linbox_check( A.rowdim() == Ainv.rowdim()); linbox_check( A.coldim() == Ainv.coldim()); int nullity, defrank=0; for (size_t i=0;igetPointer(),A.getMatrix(i)->getStride(), Ainv.getMatrix(i)->getPointer(),Ainv.getMatrix(i)->getStride(),nullity); defrank+=nullity; } return defrank; } }; } #endif // __LINBOX_blas_matrix_domain_multimod_H // vim:sts=8:sw=8:ts=8:noet:sr:cino=>s,f0,{0,g0,(0,:0,t0,+0,=s // Local Variables: // mode: C++ // tab-width: 8 // indent-tabs-mode: nil // c-basic-offset: 8 // End: linbox-1.3.2/linbox/algorithms/blas-domain.h000066400000000000000000000553251176453053400210350ustar00rootroot00000000000000/* linbox/algorithms/blas-domain.h * Copyright (C) 2004 Pascal Giorgi, Clément Pernet * * Written by : * Pascal Giorgi pascal.giorgi@ens-lyon.fr * Clément Pernet clement.pernet@imag.fr * * ========LICENCE======== * This file is part of the library LinBox. * * LinBox is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ========LICENCE======== */ /*! @file algorithms/blas-domain.h * @ingroup algorithms * @brief NO DOC * @warning A BlasMatrixDomain should be templated by a * \link LinBox::Modular Modular\endlink field. In particular, this domain * is not suitable for integers. * @warning A \e Field does mean here a \e Field and not a general \f$\mathbf{Z}/m\mathbf{Z}\f$ \e ring. You'll be warned... */ #ifndef __LINBOX_blas_matrix_domain_H #define __LINBOX_blas_matrix_domain_H #include #include #include "linbox/linbox-config.h" #include "linbox/util/debug.h" #include #include #include "linbox/matrix/blas-matrix.h" #include "linbox/matrix/permutation-matrix.h" namespace LinBox { const int BlasBound = 1 << 26; /** @internal * Class handling multiplication of a Matrix by an Operand with accumulation and scaling. * Operand can be either a matrix or a vector. * * The only function: operator () is defined : * - D = beta.C + alpha. A*B * - C = beta.C + alpha. A*B */ template< class Field, class Operand1, class Operand2, class Operand3> class BlasMatrixDomainMulAdd { public: Operand1 &operator() (const Field &F, Operand1 &D, const typename Field::Element &beta, const Operand1 &C, const typename Field::Element &alpha, const Operand2 &A, const Operand3 &B) const; Operand1 &operator() (const Field &F, const typename Field::Element &beta, Operand1 &C, const typename Field::Element &alpha, const Operand2 &A, const Operand3 &B) const; // allowing disymetry of Operand2 and Operand3 (only if different type) Operand1 &operator() (const Field &F, Operand1 &D, const typename Field::Element &beta, const Operand1 &C, const typename Field::Element &alpha, const Operand3 &A, const Operand2 &B) const; Operand1 &operator() (const Field &F, const typename Field::Element &beta, Operand1 &C, const typename Field::Element &alpha, const Operand3 &A, const Operand2 &B) const; }; /*!@internal * Adding two matrices */ template< class Field, class Operand1, class Operand2, class Operand3> class BlasMatrixDomainAdd { public: Operand1 &operator() (const Field &F, Operand1 &C, const Operand2 &A, const Operand3 &B) const; }; /*!@internal * Substracting two matrices */ template< class Field, class Operand1, class Operand2, class Operand3> class BlasMatrixDomainSub { public: Operand1 &operator() (const Field &F, Operand1 &C, const Operand2 &A, const Operand3 &B) const; }; //! C -= A template< class Field, class Operand1, class Operand2> class BlasMatrixDomainSubin { public: Operand1 &operator() (const Field &F, Operand1 &C, const Operand2 &A) const; }; //! C += A template< class Field, class Operand1, class Operand2> class BlasMatrixDomainAddin { public: Operand1 &operator() (const Field &F, Operand1 &C, const Operand2 &A) const; }; /*!@internal * Copying a matrix */ template< class Field, class Operand1, class Operand2> class BlasMatrixDomainCopy { public: Operand1 &operator() (const Field &F, Operand1 &B, const Operand2 &A) const; }; /*!@internal * multiplying two matrices. */ template< class Field, class Operand1, class Operand2, class Operand3> class BlasMatrixDomainMul { public: Operand1 &operator() (const Field &F, Operand1 &C, const Operand2 &A, const Operand3 &B) const { typename Field::Element zero, one; F.init( zero, 0UL ); F.init( one, 1UL ); return BlasMatrixDomainMulAdd()( F, zero, C, one, A, B ); } }; /*! @internal * Class handling in-place multiplication of a Matrix by an Operand. * Operand can be either a matrix a permutation or a vector * * only function: operator () are defined : * - A = A*B * - B = A*B * . * @note In-place multiplications are proposed for the specialization * with a matrix and a permutation. * @warning Using mulin with two matrices is still defined but is * non-sense */ // Operand 2 is always the type of the matrix which is not modified // ( for example: BlasPermutation TriangularBlasMatrix ) template< class Field, class Operand1, class Operand2> class BlasMatrixDomainMulin { public: // Defines a dummy mulin over generic matrices using a temporary Operand1 &operator() (const Field &F, Operand1 &A, const Operand2 &B) const { typename Field::Element zero, one; F.init( zero, 0UL ); F.init( one, 1UL ); Operand1* tmp = new Operand1(A); // Effective copy of A *tmp = A; BlasMatrixDomainMulAdd()( F, zero, A, one, *tmp, B ); delete tmp; return A; } Operand1 &operator() (const Field &F, const Operand2 &A, Operand1 &B ) const { typename Field::Element zero, one; F.init( zero, 0UL ); F.init( one, 1UL ); Operand1* tmp = new Operand1(B); // Effective copy of B *tmp = B; BlasMatrixDomainMulAdd()( F, zero, B, one, A, *tmp ); delete tmp; return B; } }; /*! @internal * Class handling inversion of a Matrix. * * only function: operator () are defined : * - Ainv = A^(-1) * * Returns nullity of matrix (0 iff inversion was ok) * * @warning Beware, if A is not const this allows an inplace computation * and so A will be modified * */ template< class Field, class Matrix> class BlasMatrixDomainInv { public: int &operator() (const Field &F, Matrix &Ainv, const Matrix &A) const; int &operator() (const Field &F, Matrix &Ainv, Matrix &A) const; }; /*! @internal * Class handling rank computation of a Matrix. * * only function: operator () are defined : * - return the rank of A * * @warning Beware, if A is not const this allows an inplace computation * and so A will be modified */ template< class Field, class Matrix> class BlasMatrixDomainRank { public: unsigned int &operator() (const Field &F, const Matrix& A) const; unsigned int &operator() (const Field &F, Matrix& A) const; }; /*! @internal * Class handling determinant computation of a Matrix. * * only function: operator () are defined : * - return the determinant of A * * @warning Beware, if A is not const this allows an inplace computation * and so A will be modified */ template< class Field, class Matrix> class BlasMatrixDomainDet { public: typename Field::Element operator() (const Field &F, const Matrix& A) const; typename Field::Element operator() (const Field &F, Matrix& A) const; }; /*! @internal * Class handling resolution of linear system of a Matrix. * with Operand as right or left and side * * only function: operator () are defined : * - X = A^(-1).B * - B = A^(-1).B */ template< class Field, class Operand, class Matrix> class BlasMatrixDomainLeftSolve { public: Operand &operator() (const Field &F, Operand &X, const Matrix &A, const Operand &B) const; Operand &operator() (const Field &F, const Matrix &A, Operand &B) const; }; /*! @internal * Class handling resolution of linear system of a Matrix. * with Operand as right or left and side * * only function: operator () are defined : * - X = B.A^(-1) * - B = B.A^(-1) */ template< class Field, class Operand, class Matrix> class BlasMatrixDomainRightSolve { public: Operand &operator() (const Field &F, Operand &X, const Matrix &A, const Operand &B) const; Operand &operator() (const Field &F, const Matrix &A, Operand &B) const; }; /*! @internal * Class handling the minimal polynomial of a Matrix. */ template< class Field, class Polynomial, class Matrix> class BlasMatrixDomainMinpoly { public: Polynomial& operator() (const Field &F, Polynomial& P, const Matrix& A) const; }; /*! @internal * Class handling the characteristic polynomial of a Matrix. */ template< class Field, class ContPol, class Matrix> class BlasMatrixDomainCharpoly { public: // typedef Container ContPol; ContPol& operator() (const Field &F, ContPol& P, const Matrix& A) const; }; /** * Interface for all functionnalities provided * for BlasMatrix. * @internal * Done through specialization of all * classes defined above. */ template class BlasMatrixDomain { public: typedef typename Field::Element Element; protected: const Field & _field; Element _One; Element _Zero; Element _MOne; public: //! Constructor of BlasDomain. BlasMatrixDomain (const Field& F ) : _field(F) { F.init(_One,1UL); F.init(_Zero,0UL); F.init(_MOne,-1); #ifndef NDEBUG if (!Givaro::probab_prime(F.characteristic())) { std::cout << " *** WARNING *** " << std::endl; std::cout << " You are using a BLAS Domain where your field is not prime " << std::endl; } #endif } //! Copy constructor BlasMatrixDomain (const BlasMatrixDomain & BMD) : _field(BMD._field), _One(BMD._One), _Zero(BMD._Zero), _MOne(BMD._MOne) { #ifndef NDEBUG if (!Givaro::probab_prime(_field.characteristic())) { std::cout << " *** WARNING *** " << std::endl; std::cout << " You are using a BLAS Domain where your field is not prime " << std::endl; } #endif } //! Field accessor const Field& field() const { return _field; } /* * Basics operation available matrix respecting BlasMatrix interface */ //! multiplication. //! C = A*B template Operand1& mul(Operand1& C, const Operand2& A, const Operand3& B) const { return BlasMatrixDomainMul()(_field,C,A,B); } //! addition. //! C = A+B template Operand1& add(Operand1& C, const Operand2& A, const Operand3& B) const { return BlasMatrixDomainAdd()(_field,C,A,B); } //! copy. //! B = A template Operand1& copy(Operand1& B, const Operand2& A) const { return BlasMatrixDomainCopy()(_field,B,A); } //! substraction //! C = A-B template Operand1& sub(Operand1& C, const Operand2& A, const Operand3& B) const { return BlasMatrixDomainSub()(_field,C,A,B); } //! substraction (in place) //! C -= B template Operand1& subin(Operand1& C, const Operand3& B) const { return BlasMatrixDomainSubin()(_field,C,B); } //! addition (in place) //! C += B template Operand1& addin(Operand1& C, const Operand3& B) const { return BlasMatrixDomainAddin()(_field,C,B); } //! multiplication with scaling. //! C = alpha.A*B template Operand1& mul(Operand1& C, const Element& alpha, const Operand2& A, const Operand3& B) const { return muladdin(_Zero,C,alpha,A,B); } //! In place multiplication. //! A = A*B template Operand1& mulin_left(Operand1& A, const Operand2& B ) const { return BlasMatrixDomainMulin()(_field,A,B); } //! In place multiplication. //! B = A*B template Operand2& mulin_right(const Operand1& A, Operand2& B ) const { return BlasMatrixDomainMulin()(_field,A,B); } //! axpy. //! D = A*B + C template Operand1& axpy(Operand1& D, const Operand2& A, const Operand3& B, const Operand1& C) const { return muladd(D,_One,C,_One,A,B); } //! axpyin. //! C += A*B template Operand1& axpyin(Operand1& C, const Operand2& A, const Operand3& B) const { return muladdin(_One,C,_One,A,B); } //! maxpy. //! D = C - A*B template Operand1& maxpy(Operand1& D, const Operand2& A, const Operand3& B, const Operand1& C)const { return muladd(D,_One,C,_MOne,A,B); } //! maxpyin. //! C -= A*B template Operand1& maxpyin(Operand1& C, const Operand2& A, const Operand3& B) const { return muladdin(_One,C,_MOne,A,B); } //! axmy. //! D= A*B - C template Operand1& axmy(Operand1& D, const Operand2& A, const Operand3& B, const Operand1& C) const { return muladd(D,_MOne,C,_One,A,B); } //! axmyin. //! C = A*B - C template Operand1& axmyin(Operand1& C, const Operand2& A, const Operand3& B) const { return muladdin(_MOne,C,_One,A,B); } //! general matrix-matrix multiplication and addition with scaling. //! D= beta.C + alpha.A*B template Operand1& muladd(Operand1& D, const Element& beta, const Operand1& C, const Element& alpha, const Operand2& A, const Operand3& B) const { return BlasMatrixDomainMulAdd()(_field,D,beta,C,alpha,A,B); } //! muladdin. //! C= beta.C + alpha.A*B. template Operand1& muladdin(const Element& beta, Operand1& C, const Element& alpha, const Operand2& A, const Operand3& B) const { return BlasMatrixDomainMulAdd()(_field,beta,C,alpha,A,B); } /*! * @name Solutions available for matrix respecting BlasMatrix interface */ //@{ //! Inversion template Matrix& inv( Matrix &Ainv, const Matrix &A) const { BlasMatrixDomainInv()(_field,Ainv,A); return Ainv; } //! Inversion (in place) template Matrix& invin( Matrix &Ainv, Matrix &A) const { BlasMatrixDomainInv()(_field,Ainv,A); return Ainv; } //! Inversion (the matrix A is modified) template Matrix& invin(Matrix &A) const { Matrix tmp(A.rowdim(), A.coldim()); tmp = A; BlasMatrixDomainInv()(_field,A,tmp); return A; } /*! Division. * C = A B^{-1} ==> C . B = A */ template Matrix& div( Matrix &C, const Matrix &A, const Matrix &B) const { return this->right_solve(C,B,A); } //! Inversion w singular check template Matrix& inv( Matrix &Ainv, const Matrix &A, int& nullity) const { nullity = BlasMatrixDomainInv()(_field,Ainv,A); return Ainv; } //! Inversion (the matrix A is modified) w singular check template Matrix& invin( Matrix &Ainv, Matrix &A, int& nullity) const { nullity = BlasMatrixDomainInv()(_field,Ainv,A); return Ainv; } //! Rank template unsigned int rank(const Matrix &A) const { return BlasMatrixDomainRank()(_field,A); } //! in-place Rank (the matrix is modified) template unsigned int rankin(Matrix &A) const { return BlasMatrixDomainRank()(_field,A); } //! determinant template Element det(const Matrix &A) const { return BlasMatrixDomainDet()(_field,A); } //! in-place Determinant (the matrix is modified) template Element detin(Matrix &A) const { return BlasMatrixDomainDet()(_field,A); } //@} /*! * @name Solvers for Matrix (respecting BlasMatrix interface) * with Operand as right or left hand side */ //@{ //! linear solve with matrix right hand side. //! AX=B template Operand& left_solve (Operand& X, const Matrix& A, const Operand& B) const { return BlasMatrixDomainLeftSolve()(_field,X,A,B); } //! linear solve with matrix right hand side, the result is stored in-place in B. //! @pre A must be square //! AX=B , (B<-X) template Operand& left_solve (const Matrix& A, Operand& B) const { return BlasMatrixDomainLeftSolve()(_field,A,B); } //! linear solve with matrix right hand side. //! XA=B template Operand& right_solve (Operand& X, const Matrix& A, const Operand& B) const { return BlasMatrixDomainRightSolve()(_field,X,A,B); } //! linear solve with matrix right hand side, the result is stored in-place in B. //! @pre A must be square //! XA=B , (B<-X) template Operand& right_solve (const Matrix& A, Operand& B) const { return BlasMatrixDomainRightSolve()(_field,A,B); } //! minimal polynomial computation. template Polynomial& minpoly( Polynomial& P, const Matrix& A ) const { return BlasMatrixDomainMinpoly()(_field,P,A); } //! characteristic polynomial computation. template Polynomial& charpoly( Polynomial& P, const Matrix& A ) const { commentator().start ("Modular Dense Charpoly ", "MDCharpoly"); std::list P_list; P_list.clear(); BlasMatrixDomainCharpoly, Matrix >()(_field,P_list,A); Polynomial tmp(A.rowdim()+1); typename std::list::iterator it = P_list.begin(); P = *(it++); while( it!=P_list.end() ){ // Waiting for an implementation of a domain of polynomials mulpoly( tmp, P, *it); P = tmp; // delete &(*it); ++it; } commentator().stop ("done", NULL, "MDCharpoly"); return P; } //! characteristic polynomial computation. template std::list& charpoly( std::list& P, const Matrix& A ) const { return BlasMatrixDomainCharpoly, Matrix >()(_field,P,A); } //private: //! @todo Temporary: waiting for an implementation of a domain of polynomial template Polynomial & mulpoly(Polynomial &res, const Polynomial & P1, const Polynomial & P2)const { size_t i,j; res.resize(P1.size()+P2.size()-1); for (i=0;i bool areEqual(const Matrix1 & A, const Matrix2 & B) { if ( (A.rowdim() != B.rowdim()) || (A.coldim() != B.coldim()) ) return false ; for (size_t i = 0 ; i < A.rowdim() ; ++i) for (size_t j = 0 ; j < A.coldim() ; ++j) if (!_field.areEqual(A.getEntry(i,j),B.getEntry(i,j))) //!@bug use refs return false ; return true ; } template void setIdentity(Matrix & I) { for (size_t i = 0 ; i< I.rowdim() ; ++i) for (size_t j = 0 ; j < I.coldim() ; ++j) { if (i == j) I.setEntry(i,j,_One); else I.setEntry(i,j,_Zero); } } template void setZero(Matrix & I) { // use Iterator for (size_t i = 0 ; i< I.rowdim() ; ++i) for (size_t j = 0 ; j < I.coldim() ; ++j) { I.setEntry(i,j,_Zero); } } template bool isZero(const Matrix1 & A) { for (size_t i = 0 ; i < A.rowdim() ; ++i) for (size_t j = 0 ; j < A.coldim() ; ++j) if (!_field.isZero(A.getEntry(i,j))) //!@bug use refs return false ; return true ; } template bool isIdentity(const Matrix1 & A) { if (A.rowdim() != A.coldim()) return false ; for (size_t i = 0 ; i < A.rowdim() ; ++i) if (!_field.isOne(A.getEntry(i,i))) return false; for (size_t i = 0 ; i < A.rowdim() ; ++i) for (size_t j = 0 ; j < i ; ++j) if (!_field.isZero(A.getEntry(i,j))) //!@bug use refs return false ; for (size_t i = 0 ; i < A.rowdim() ; ++i) for (size_t j = i+1 ; j < A.coldim() ; ++j) if (!_field.isZero(A.getEntry(i,j))) //!@bug use refs return false ; return true ; } template bool isIdentityGeneralized(const Matrix1 & A) { size_t mn = std::min(A.rowdim(),A.coldim()); for (size_t i = 0 ; i < mn ; ++i) if (!_field.isOne(A.getEntry(i,i))) return false; for (size_t i = 0 ; i < A.rowdim() ; ++i) for (size_t j = 0 ; j < std::min(i,mn) ; ++j) if (!_field.isZero(A.getEntry(i,j))) //!@bug use refs return false ; for (size_t i = 0 ; i < A.rowdim() ; ++i) for (size_t j = i+1 ; j < A.coldim() ; ++j) if (!_field.isZero(A.getEntry(i,j))) //!@bug use refs return false ; return true ; } public: /** Print matrix. * @param os Output stream to which matrix is written. * @param A Matrix. * @returns reference to os. */ template inline std::ostream &write (std::ostream &os, const Matrix &A) const { return A.write (os); } template inline std::ostream &write (std::ostream &os, const Matrix &A, bool maple_format) const { return A.write (os, _field, maple_format); } /** Read matrix * @param is Input stream from which matrix is read. * @param A Matrix. * @returns reference to is. */ template inline std::istream &read (std::istream &is, Matrix &A) const { return A.read (is, _field); } }; /* end of class BlasMatrixDomain */ } /* end of namespace LinBox */ #include "linbox/algorithms/blas-domain.inl" #endif /* __LINBOX_blas_matrix_domain_H */ // vim:sts=8:sw=8:ts=8:noet:sr:cino=>s,f0,{0,g0,(0,:0,t0,+0,=s // Local Variables: // mode: C++ // tab-width: 8 // indent-tabs-mode: nil // c-basic-offset: 8 // End: linbox-1.3.2/linbox/algorithms/blas-domain.inl000066400000000000000000001363641176453053400213730ustar00rootroot00000000000000/* linbox/algorithms/blas-domain.inl * Copyright (C) 2004 Pascal Giorgi, Clément Pernet * * Written by : * Pascal Giorgi pascal.giorgi@ens-lyon.fr * Clément Pernet clement.pernet@imag.fr * * ========LICENCE======== * This file is part of the library LinBox. * * LinBox is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ========LICENCE======== */ #ifndef __LINBOX_blas_matrix_domain_INL #define __LINBOX_blas_matrix_domain_INL #include "linbox/matrix/blas-matrix.h" #include "linbox/matrix/factorized-matrix.h" namespace LinBox { /* * ********************************************** * *** Specialization for BlasMatrix *** * ********************************************** */ #if 0 // Inversion // dpritcha: now returns nullity. (2004-07-19) // previously returned Ainv but this is passed back anyway. template class BlasMatrixDomainInv > { public: int operator() (const Field &F, BlasMatrix &Ainv, const BlasMatrix &A) const { linbox_check( A.rowdim() == A.coldim()); linbox_check( A.rowdim() == Ainv.rowdim()); linbox_check( A.coldim() == Ainv.coldim()); BlasMatrix tmp(A); return (*this)(F,Ainv,tmp); } int operator() (const Field &F, BlasMatrix &Ainv, BlasMatrix &A) const { linbox_check( A.rowdim() == A.coldim()); linbox_check( A.rowdim() == Ainv.rowdim()); linbox_check( A.coldim() == Ainv.coldim()); int nullity; FFPACK::Invert((typename Field::Father_t)F,A.rowdim(),A.getPointer(),A.getStride(), Ainv.getPointer(),Ainv.getStride(),nullity); return nullity; } }; #endif #if 0 // Rank template class BlasMatrixDomainRank > { public: inline unsigned int operator() (const Field &F, const BlasMatrix &A) const { BlasMatrix tmp(A); return (*this)(F,tmp); } inline unsigned int operator() (const Field &F, BlasMatrix &A) const { return FFPACK::Rank((typename Field::Father_t)F, A.rowdim(), A.coldim(),A.getPointer(), A.getStride()); } }; // determinant template class BlasMatrixDomainDet > { public: inline typename Field::Element operator()(const Field &F, const BlasMatrix &A) const { BlasMatrix tmp(A); return (*this)(F,tmp); } inline typename Field::Element operator() (const Field &F, BlasMatrix &A) const { return FFPACK::Det((typename Field::Father_t)F, A.rowdim(), A.coldim(),A.getPointer(), A.getStride()); } }; #endif /* * ********************************************** * *** Specialization for BlasMatrix *** * ********************************************** */ // Inversion // dpritcha: now returns nullity. (2004-07-19) // previously returned Ainv but this is passed back anyway. template class BlasMatrixDomainInv > { public: int operator() (const Field &F, BlasMatrix &Ainv, const BlasMatrix &A) const { linbox_check( A.rowdim() == A.coldim()); linbox_check( A.rowdim() == Ainv.rowdim()); linbox_check( A.coldim() == Ainv.coldim()); BlasMatrix tmp(A); return (*this)(F,Ainv,tmp); } int operator() (const Field &F, BlasMatrix &Ainv, BlasMatrix &A) const { linbox_check( A.rowdim() == A.coldim()); linbox_check( A.rowdim() == Ainv.rowdim()); linbox_check( A.coldim() == Ainv.coldim()); int nullity; FFPACK::Invert ((typename Field::Father_t)F, A.rowdim(), A.getPointer(), A.getStride(), Ainv.getPointer(),Ainv.getStride(),nullity); return nullity; } }; // Rank template class BlasMatrixDomainRank > { public: inline unsigned int operator() (const Field &F, const BlasMatrix &A) const { BlasMatrix tmp(A); return (*this)(F,tmp); } inline unsigned int operator() (const Field &F, BlasMatrix &A) const { return (unsigned int) FFPACK::Rank((typename Field::Father_t)F, A.rowdim(), A.coldim(),A.getPointer(), A.getStride()); } }; // determinant template class BlasMatrixDomainDet > { public: inline typename Field::Element operator()(const Field &F, const BlasMatrix &A) const { BlasMatrix tmp(A); return (*this)(F,tmp); } inline typename Field::Element operator() (const Field &F, BlasMatrix &A) const { return FFPACK::Det((typename Field::Father_t)F, A.rowdim(), A.coldim(),A.getPointer(), A.getStride()); } }; /* * specialization for Operand1, Operand2 and Operand3 of type BlasMatrix */ template class BlasMatrixDomainAdd,BlasMatrix, BlasMatrix > { public: BlasMatrix& operator()(const Field& F, BlasMatrix& C, const BlasMatrix& A, const BlasMatrix& B) const { linbox_check( A.rowdim() == B.rowdim()); linbox_check( C.rowdim() == A.rowdim()); linbox_check( A.coldim() == B.coldim()); linbox_check( C.coldim() == A.coldim()); FFLAS::fadd ((typename Field::Father_t)F, C.rowdim(), C.coldim(), A.getPointer(), A.getStride(), B.getPointer(), B.getStride(), C.getPointer(), C.getStride()); return C; } }; template class BlasMatrixDomainCopy, BlasMatrix > { public: BlasMatrix& operator()(const Field& F, BlasMatrix& B, const BlasMatrix& A) const { linbox_check( A.rowdim() == B.rowdim()); linbox_check( A.coldim() == B.coldim()); for (size_t i=0; i class BlasMatrixDomainSub,BlasMatrix, BlasMatrix > { public: BlasMatrix& operator()(const Field& F, BlasMatrix& C, const BlasMatrix& A, const BlasMatrix& B) const { linbox_check( A.rowdim() == B.rowdim()); linbox_check( C.rowdim() == A.rowdim()); linbox_check( A.coldim() == B.coldim()); linbox_check( C.coldim() == A.coldim()); FFLAS::fsub ((typename Field::Father_t)F, C.rowdim(), C.coldim(), A.getPointer(), A.getStride(), B.getPointer(), B.getStride(), C.getPointer(), C.getStride()); return C; } }; template class BlasMatrixDomainSubin,BlasMatrix > { public: BlasMatrix& operator()(const Field& F, BlasMatrix& C, const BlasMatrix& B) const { linbox_check( C.rowdim() == B.rowdim()); linbox_check( C.coldim() == B.coldim()); FFLAS::fsubin ((typename Field::Father_t)F, C.rowdim(), C.coldim(), B.getPointer(), B.getStride(), C.getPointer(), C.getStride()); return C; } }; template class BlasMatrixDomainAddin,BlasMatrix > { public: BlasMatrix& operator()(const Field& F, BlasMatrix& C, const BlasMatrix& B) const { linbox_check( C.rowdim() == B.rowdim()); linbox_check( C.coldim() == B.coldim()); FFLAS::faddin ((typename Field::Father_t)F, C.rowdim(), C.coldim(), B.getPointer(), B.getStride(), C.getPointer(), C.getStride()); return C; } }; // general matrix-matrix multiplication and addition with scaling // D= beta.C + alpha.A*B template class BlasMatrixDomainMulAdd,BlasMatrix, BlasMatrix > { public: BlasMatrix& operator()(const Field & F, BlasMatrix & D, const typename Field::Element & beta, const BlasMatrix& C, const typename Field::Element & alpha, const BlasMatrix& A, const BlasMatrix& B) const { linbox_check( A.coldim() == B.rowdim()); linbox_check( C.rowdim() == A.rowdim()); linbox_check( C.coldim() == B.coldim()); linbox_check( D.rowdim() == C.rowdim()); linbox_check( D.coldim() == C.coldim()); D=C; // linbox_check(D.getPointer() != C.getPointer()); // std::cout << "alpha :" << alpha << std::endl; // std::cout << "beta :" << beta << std::endl; // D.write(std::cout << "Dfgem :=" ) <<','<< std::endl; // A.write(std::cout << "Afgem :=" ) <<','<< std::endl; // B.write(std::cout << "Bfgem :=" ) <<','<< std::endl; FFLAS::fgemm((typename Field::Father_t) F, FFLAS::FflasNoTrans, FFLAS::FflasNoTrans, C.rowdim(), C.coldim(), A.coldim(), alpha, A.getPointer(), A.getStride(), B.getPointer(), B.getStride(), beta, D.getPointer(), D.getStride()); // D.write(std::cout << "Dfgem :=" ) <<','<< std::endl; // std::cout << A.getStride() << "," << A.coldim() << std::endl; // std::cout << B.getStride() << "," << B.coldim() << std::endl; // std::cout << D.getStride() << "," << D.coldim() << std::endl; return D; } BlasMatrix& operator() (const Field & F, const typename Field::Element & beta, BlasMatrix & C, const typename Field::Element & alpha, const BlasMatrix& A, const BlasMatrix& B) const { linbox_check( A.coldim() == B.rowdim()); linbox_check( C.rowdim() == A.rowdim()); linbox_check( C.coldim() == B.coldim()); FFLAS::fgemm((typename Field::Father_t) F, FFLAS::FflasNoTrans, FFLAS::FflasNoTrans, C.rowdim(), C.coldim(), A.coldim(), alpha, A.getPointer(), A.getStride(), B.getPointer(), B.getStride(), beta, C.getPointer(), C.getStride()); return C; } }; template class BlasMatrixDomainMulAdd, TransposedBlasMatrix >, BlasMatrix > { public: BlasMatrix& operator()(const Field & F, BlasMatrix & D, const typename Field::Element & beta, const BlasMatrix& C, const typename Field::Element & alpha, const TransposedBlasMatrix >& A, const BlasMatrix& B) const { linbox_check( A.getMatrix().rowdim() == B.rowdim()); linbox_check( C.rowdim() == A.getMatrix().coldim()); linbox_check( C.coldim() == B.coldim()); linbox_check( D.rowdim() == C.rowdim()); linbox_check( D.coldim() == C.coldim()); D=C; FFLAS::fgemm((typename Field::Father_t) F, FFLAS::FflasTrans, FFLAS::FflasNoTrans, C.rowdim(), C.coldim(), B.rowdim(), alpha, A.getMatrix().getPointer(), A.getMatrix().getStride(), B.getPointer(), B.getStride(), beta, D.getPointer(), D.getStride()); return D; } BlasMatrix& operator() (const Field & F, const typename Field::Element & beta, BlasMatrix & C, const typename Field::Element & alpha, const TransposedBlasMatrix >& A, const BlasMatrix& B) const { linbox_check( A.getMatrix().rowdim() == B.rowdim()); linbox_check( C.rowdim() == A.getMatrix().coldim()); linbox_check( C.coldim() == B.coldim()); FFLAS::fgemm((typename Field::Father_t) F, FFLAS::FflasTrans, FFLAS::FflasNoTrans, C.rowdim(), C.coldim(), B.rowdim(), alpha, A.getMatrix().getPointer(), A.getMatrix().getStride(), B.getPointer(), B.getStride(), beta, C.getPointer(), C.getStride()); return C; } }; template class BlasMatrixDomainMulAdd, TransposedBlasMatrix >, TransposedBlasMatrix > > { public: BlasMatrix& operator()(const Field & F, BlasMatrix & D, const typename Field::Element & beta, const BlasMatrix& C, const typename Field::Element & alpha, const TransposedBlasMatrix >& A, const TransposedBlasMatrix >& B) const { linbox_check( A.getMatrix().rowdim() == B.getMatrix().coldim()); linbox_check( C.rowdim() == A.getMatrix().coldim()); linbox_check( C.coldim() == B.getMatrix().rowdim()); linbox_check( D.rowdim() == C.rowdim()); linbox_check( D.coldim() == C.coldim()); D=C; // linbox_check(D.getPointer() != C.getPointer()); FFLAS::fgemm((typename Field::Father_t) F, FFLAS::FflasTrans, FFLAS::FflasTrans, C.rowdim(), C.coldim(), A.getMatrix().rowdim(), alpha, A.getMatrix().getPointer(), A.getMatrix().getStride(), B.getMatrix().getPointer(), B.getMatrix().getStride(), beta, D.getPointer(), D.getStride()); return D; } BlasMatrix& operator() (const Field & F, const typename Field::Element & beta, BlasMatrix & C, const typename Field::Element & alpha, const TransposedBlasMatrix >& A, const TransposedBlasMatrix >& B) const { linbox_check( A.getMatrix().rowdim() == B.getMatrix().coldim()); linbox_check( C.rowdim() == A.getMatrix().coldim()); linbox_check( C.coldim() == B.getMatrix().rowdim()); FFLAS::fgemm((typename Field::Father_t) F, FFLAS::FflasTrans, FFLAS::FflasTrans, C.rowdim(), C.coldim(), A.getMatrix().rowdim(), alpha, A.getMatrix().getPointer(), A.getMatrix().getStride(), B.getMatrix().getPointer(), B.getMatrix().getStride(), beta, C.getPointer(), C.getStride()); return C; } }; template class BlasMatrixDomainMulAdd, BlasMatrix, TransposedBlasMatrix > > { public: BlasMatrix& operator()(const Field & F, BlasMatrix & D, const typename Field::Element & beta, const BlasMatrix& C, const typename Field::Element & alpha, const BlasMatrix& A, const TransposedBlasMatrix >& B) const { linbox_check( A.coldim() == B.getMatrix().coldim()); linbox_check( C.rowdim() == A.rowdim()); linbox_check( C.coldim() == B.getMatrix().rowdim()); linbox_check( D.rowdim() == C.rowdim()); linbox_check( D.coldim() == C.coldim()); D=C; FFLAS::fgemm((typename Field::Father_t) F, FFLAS::FflasNoTrans, FFLAS::FflasTrans, C.rowdim(), C.coldim(), A.coldim(), alpha, A.getPointer(), A.getStride(), B.getMatrix().getPointer(), B.getMatrix().getStride(), beta, D.getPointer(), D.getStride()); return D; } BlasMatrix& operator() (const Field & F, const typename Field::Element & beta, BlasMatrix & C, const typename Field::Element & alpha, const BlasMatrix& A, const TransposedBlasMatrix >& B) const { linbox_check( A.coldim() == B.getMatrix().coldim()); linbox_check( C.rowdim() == A.rowdim()); linbox_check( C.coldim() == B.getMatrix().rowdim()); FFLAS::fgemm((typename Field::Father_t) F, FFLAS::FflasNoTrans, FFLAS::FflasTrans, C.rowdim(), C.coldim(), A.coldim(), alpha, A.getPointer(), A.getStride(), B.getMatrix().getPointer(), B.getMatrix().getStride(), beta, C.getPointer(), C.getStride()); return C; } }; /* * specialization for Operand1 and Operand3 of type std::vector * and Operand2 of type BlasMatrix */ // general matrix-vector multiplication and addition with scaling // d = beta.c + alpha.A*b template class BlasMatrixDomainMulAdd,BlasMatrix,std::vector > { public: std::vector& operator() (const Field& F, std::vector& d, const typename Field::Element& beta, const std::vector& c, const typename Field::Element& alpha, const BlasMatrix& A, const std::vector& b) const { linbox_check( A.coldim() == b.size()); linbox_check( c.size() == b.size()); linbox_check( d.size() == c.size()); d=c; FFLAS::fgemv((typename Field::Father_t) F, FFLAS::FflasNoTrans, A.rowdim(), A.coldim(), alpha, A.getPointer(), A.getStride(), &b[0],1, beta, &d[0],1); return d; } std::vector& operator() (const Field& F, const typename Field::Element& beta, std::vector& c, const typename Field::Element& alpha, const BlasMatrix& A, const std::vector& b) const { linbox_check( A.coldim() == b.size()); linbox_check( A.rowdim() == c.size()); //fixed: dpritcha FFLAS::fgemv((typename Field::Father_t) F, FFLAS::FflasNoTrans, A.rowdim(), A.coldim(), alpha, A.getPointer(), A.getStride(), &b[0],1, beta, &c[0],1); return c; } }; // general vector-matrix multiplication and addition with scaling // d = beta.c + alpha.a*B -- note order of coldim, rowdim passed to fgemv is switched template class BlasMatrixDomainMulAdd,std::vector,BlasMatrix > { public: std::vector& operator() (const Field& F, std::vector& d, const typename Field::Element& beta, const std::vector& c, const typename Field::Element& alpha, const std::vector& a, const BlasMatrix& B) const { linbox_check( B.rowdim() == a.size()); linbox_check( B.coldim() == c.size()); linbox_check( d.size() == c.size()); d=c; FFLAS::fgemv((typename Field::Father_t) F, FFLAS::FflasTrans, B.rowdim(), B.coldim(), alpha, B.getPointer(), B.getStride(), &a[0],1, beta, &d[0],1); return d; } std::vector& operator() (const Field& F, const typename Field::Element& beta, std::vector& c, const typename Field::Element& alpha, const std::vector& a, const BlasMatrix& B) const { linbox_check( B.rowdim() == a.size()); linbox_check( B.coldim() == c.size()); FFLAS::fgemv((typename Field::Father_t) F, FFLAS::FflasTrans, B.rowdim(), B.coldim(), alpha, B.getPointer(), B.getStride(), &a[0],1, beta, &c[0],1); return c; } }; /* * Specialization for Operand1, Operand2 of type BlasMatrix * and Operand3 of type BlasPermutation */ // Matrix permutation product C = A*B template class BlasMatrixDomainMul,BlasMatrix, BlasPermutation > { public: BlasMatrix& operator()(const Field& F, BlasMatrix& C, const BlasMatrix& A, const BlasPermutation& B) const { C = A; return BlasMatrixDomainMulin,BlasPermutation >()( F, C, B); } }; template class BlasMatrixDomainMul, BlasPermutation,BlasMatrix > { public: BlasMatrix& operator()(const Field& F, BlasMatrix& C, const BlasPermutation& B, const BlasMatrix& A) const { C = A; return BlasMatrixDomainMulin,BlasPermutation >()( F, B, C); } }; /* * specialization for Operand1, Operand2 of type BlasMatrix and Operand3 of type TransposedBlasMatrix > */ // Matrix permutation product C = A*B template class BlasMatrixDomainMul,BlasMatrix, TransposedBlasMatrix > > { public: BlasMatrix& operator()(const Field& F, BlasMatrix& C, const BlasMatrix& A, const TransposedBlasMatrix >& B) const { C = A; return BlasMatrixDomainMulin,TransposedBlasMatrix > >()( F, C, B); } }; template class BlasMatrixDomainMul, TransposedBlasMatrix >,BlasMatrix > { public: BlasMatrix& operator()(const Field& F, BlasMatrix& C, const TransposedBlasMatrix >& B, const BlasMatrix& A) const { C = A; return BlasMatrixDomainMulin,TransposedBlasMatrix > >()( F, B, C); } }; /* * specialization for Operand1 of type BlasMatrix and Operand2 of type BlasPermutation */ // In-place matrix permutation product template class BlasMatrixDomainMulin, BlasPermutation > { public: BlasMatrix& operator()( const Field& F, BlasMatrix& A, const BlasPermutation& B) const { if (B.isIdentity()) return A ; linbox_check( A.coldim() >= B.getSize() ); FFPACK::applyP((typename Field::Father_t) F, FFLAS::FflasRight, FFLAS::FflasNoTrans, A.rowdim(), 0,(int) B.getOrder(), A.getPointer(), A.getStride(), B.getPointer() ); return A; } BlasMatrix& operator()( const Field& F, const BlasPermutation& B, BlasMatrix& A) const { if (B.isIdentity()) return A ; linbox_check( A.rowdim() >= B.getSize() ); FFPACK::applyP((typename Field::Father_t) F, FFLAS::FflasLeft, FFLAS::FflasNoTrans, A.coldim(), 0,(int) B.getOrder(), A.getPointer(), A.getStride(), B.getPointer() ); return A; } }; template class BlasMatrixDomainMulin, TransposedBlasMatrix > > { public: BlasMatrix& operator()( const Field& F, BlasMatrix& A, const TransposedBlasMatrix >& B) const { if (B.getMatrix().isIdentity()) return A ; linbox_check( A.coldim() >= B.getMatrix().getSize() ); FFPACK::applyP((typename Field::Father_t) F, FFLAS::FflasRight, FFLAS::FflasTrans, A.rowdim(), 0,(int) B.getMatrix().getOrder(), A.getPointer(), A.getStride(), B.getMatrix().getPointer() ); return A; } BlasMatrix& operator()( const Field& F, const TransposedBlasMatrix >& B, BlasMatrix& A) const { if (B.getMatrix().isIdentity()) return A ; linbox_check( A.rowdim() >= B.getMatrix().getSize() ); FFPACK::applyP((typename Field::Father_t) F, FFLAS::FflasLeft, FFLAS::FflasTrans, A.coldim(), 0,(int) B.getMatrix().getOrder(), A.getPointer(), A.getStride(), B.getMatrix().getPointer() ); return A; } }; /* * specialization for Operand1, Operand2 of type std::vector and Operand3 of type BlasPermutation */ // Matrix permutation product C = A*B template class BlasMatrixDomainMul,std::vector< typename Field::Element>, BlasPermutation > { public: std::vector< typename Field::Element>& operator()(const Field& F, std::vector< typename Field::Element>& C, const std::vector< typename Field::Element>& A, const BlasPermutation& B) const { C = A; return BlasMatrixDomainMulin,BlasPermutation >()( F, C, B); } }; template class BlasMatrixDomainMul, BlasPermutation,std::vector< typename Field::Element> > { public: std::vector< typename Field::Element>& operator()(const Field& F, std::vector< typename Field::Element>& C, const BlasPermutation& B, const std::vector< typename Field::Element>& A) const { C = A; return BlasMatrixDomainMulin,BlasPermutation >()( F, B, C); } }; /* * specialization for Operand1, Operand2 of type std::vector and Operand3 of type TransposedBlasMatrix > */ // Matrix permutation product C = A*B template class BlasMatrixDomainMul,std::vector< typename Field::Element>, TransposedBlasMatrix > > { public: std::vector< typename Field::Element>& operator()(const Field& F, std::vector< typename Field::Element>& C, const std::vector< typename Field::Element>& A, const TransposedBlasMatrix >& B) const { C = A; return BlasMatrixDomainMulin,TransposedBlasMatrix > >()( F, C, B); } }; template class BlasMatrixDomainMul, TransposedBlasMatrix >,std::vector< typename Field::Element> > { public: std::vector< typename Field::Element>& operator()(const Field& F, std::vector< typename Field::Element>& C, const TransposedBlasMatrix >& B, const std::vector< typename Field::Element>& A) const { C = A; return BlasMatrixDomainMulin,TransposedBlasMatrix > >()( F, B, C); } }; /* * specialization for Operand1 of type std::vector and Operand2 of type BlasPermutation */ // In-place matrix permutation product template class BlasMatrixDomainMulin, BlasPermutation > { public: std::vector< typename Field::Element>& operator()( const Field& F, std::vector< typename Field::Element>& A, const BlasPermutation& B) const { if (B.isIdentity()) return A ; linbox_check( A.size() == B.getSize() ); FFPACK::applyP((typename Field::Father_t) F, FFLAS::FflasRight, FFLAS::FflasNoTrans, 1, 0,(int) B.getOrder(), &A[0], 1, B.getPointer() ); return A; } std::vector< typename Field::Element>& operator()( const Field& F, const BlasPermutation& B, std::vector< typename Field::Element>& A) const { if (B.isIdentity()) return A ; linbox_check( A.size() >= B.getSize() ); FFPACK::applyP((typename Field::Father_t) F, FFLAS::FflasLeft, FFLAS::FflasNoTrans, 1, 0,(int) B.getOrder(), &A[0], 1, B.getPointer() ); return A; } }; template class BlasMatrixDomainMulin, TransposedBlasMatrix > > { public: std::vector< typename Field::Element>& operator()( const Field& F, std::vector< typename Field::Element>& A, const TransposedBlasMatrix >& B) const { if (B.getMatrix().isIdentity()) return A ; linbox_check( A.size() >= B.getMatrix().getSize() ); FFPACK::applyP((typename Field::Father_t) F, FFLAS::FflasRight, FFLAS::FflasTrans, 1, 0,(int) B.getMatrix().getOrder(), &A[0], 1, B.getMatrix().getPointer() ); return A; } std::vector< typename Field::Element>& operator()( const Field& F, const TransposedBlasMatrix >& B, std::vector< typename Field::Element>& A) const { if (B.getMatrix().isIdentity()) return A ; linbox_check( A.size() >= B.getMatrix().getSize() ); FFPACK::applyP((typename Field::Father_t) F, FFLAS::FflasLeft, FFLAS::FflasTrans, 1, 0,(int) B.getMatrix().getOrder(), &A[0], 1, B.getMatrix().getPointer() ); return A; } }; /* * specialization for Operand1 of type BlasMatrix and Operand2 * of type TriangularBlasMatrix */ // Matrix/Triangular product C = A*B template class BlasMatrixDomainMul,BlasMatrix, TriangularBlasMatrix > { public: BlasMatrix& operator()(const Field& F, BlasMatrix& C, const BlasMatrix& A, const TriangularBlasMatrix& B) const { C = A; return BlasMatrixDomainMulin,TriangularBlasMatrix >()( F, C, B); } }; template class BlasMatrixDomainMul, TriangularBlasMatrix,BlasMatrix > { public: BlasMatrix& operator()(const Field& F, BlasMatrix& C, const TriangularBlasMatrix& B, const BlasMatrix& A) const { C = A; return BlasMatrixDomainMulin,TriangularBlasMatrix >()( F, B, C); } }; /* * specialization for Operand1 of type BlasMatrix and Operand2 of type TriangularBlasMatrix */ // In-place matrix*triangular matrix product template class BlasMatrixDomainMulin, TriangularBlasMatrix >{ public: BlasMatrix& operator()( const Field& F, BlasMatrix& A, const TriangularBlasMatrix& B) const { typename Field::Element one; F.init(one, 1UL); linbox_check( A.coldim() == B.rowdim() ); FFLAS::ftrmm((typename Field::Father_t) F, FFLAS::FflasRight, (FFLAS::FFLAS_UPLO) (B.getUpLo()), FFLAS::FflasNoTrans,(FFLAS::FFLAS_DIAG) (B.getDiag()), A.rowdim(), A.coldim(), one, B.getPointer(), B.getStride(), A.getPointer(), A.getStride() ); return A; } BlasMatrix& operator()( const Field& F, const TriangularBlasMatrix& B, BlasMatrix& A) const { linbox_check( B.coldim() == A.rowdim() ); typename Field::Element one; F.init(one, 1UL); FFLAS::ftrmm((typename Field::Father_t) F, FFLAS::FflasLeft, (FFLAS::FFLAS_UPLO)(B.getUpLo()), FFLAS::FflasNoTrans, (FFLAS::FFLAS_DIAG) (B.getDiag()), A.rowdim(), A.coldim(), one, B.getPointer(), B.getStride(), A.getPointer(), A.getStride() ); return A; } }; /*! @internal In-place matrix*triangular matrix product with transpose. */ template class BlasMatrixDomainMulin, TransposedBlasMatrix > >{ public: BlasMatrix& operator()( const Field& F, BlasMatrix& A, const TransposedBlasMatrix< TriangularBlasMatrix >& B) const { typename Field::Element one; F.init(one, 1UL); linbox_check( B.getMatrix().coldim() == A.coldim() ); FFLAS::ftrmm((typename Field::Father_t) F, FFLAS::FflasRight, (FFLAS::FFLAS_UPLO)(B.getMatrix().getUpLo()), FFLAS::FflasTrans, (FFLAS::FFLAS_DIAG) (B.getMatrix().getDiag()), A.rowdim(), A.coldim(), one, B.getMatrix().getPointer(), B.getMatrix().getStride(), A.getPointer(), A.getStride() ); return A; } BlasMatrix& operator()( const Field& F, const TransposedBlasMatrix< TriangularBlasMatrix >& B, BlasMatrix& A) const { linbox_check( B.getMatrix().coldim() == A.rowdim() ); typename Field::Element one; F.init(one, 1UL); FFLAS::ftrmm((typename Field::Father_t) F, FFLAS::FflasLeft, (FFLAS::FFLAS_UPLO) (B.getMatrix().getUpLo()), FFLAS::FflasTrans, (FFLAS::FFLAS_DIAG) (B.getMatrix().getDiag()), A.rowdim(), A.coldim(), one, B.getMatrix().getPointer(), B.getMatrix().getStride(), A.getPointer(), A.getStride() ); return A; } }; /* * specialization for Operand1 of type TriangularBlasMatrix and Operand2 of type BlasPermutation */ // Matrix permutation product C = A*B template class BlasMatrixDomainMul,TriangularBlasMatrix, BlasPermutation > { public: BlasMatrix& operator()(const Field& F, BlasMatrix& C, const TriangularBlasMatrix& A, const BlasPermutation& B) const { C = A; return BlasMatrixDomainMulin,BlasPermutation >()( F, C, B); } }; template class BlasMatrixDomainMul, BlasPermutation,TriangularBlasMatrix > { public: BlasMatrix& operator()(const Field& F, BlasMatrix& C, const BlasPermutation& B, const TriangularBlasMatrix& A) const { C = A; return BlasMatrixDomainMulin,BlasPermutation >()( F, B, C); } }; /* * Specialization for Operand of type BlasMatrix */ template class BlasMatrixDomainLeftSolve,BlasMatrix > { public: BlasMatrix& operator() (const Field& F, BlasMatrix& X, const BlasMatrix& A, const BlasMatrix& B) const { LQUPMatrix LQUP(A); LQUP.left_solve(X,B); return X; } BlasMatrix& operator() (const Field& F, const BlasMatrix& A, BlasMatrix& B) const { LQUPMatrix LQUP(A); LQUP.left_solve(B); return B; } }; template class BlasMatrixDomainRightSolve,BlasMatrix > { public: BlasMatrix& operator() (const Field& F, BlasMatrix& X, const BlasMatrix& A, const BlasMatrix& B) const { LQUPMatrix LQUP(A); LQUP.right_solve(X,B); return X; } BlasMatrix& operator() (const Field& F, const BlasMatrix& A, BlasMatrix& B) const { LQUPMatrix LQUP(A); LQUP.right_solve(B); return B; } }; template class BlasMatrixDomainRightSolve,BlasSubmatrix > { public: BlasSubmatrix& operator() (const Field& F, BlasSubmatrix& X, const BlasSubmatrix& A, const BlasSubmatrix& B) const { LQUPMatrix LQUP(A); LQUP.right_solve(X,B); return X; } BlasSubmatrix& operator() (const Field& F, const BlasSubmatrix& A, BlasSubmatrix& B) const { LQUPMatrix LQUP(A); LQUP.right_solve(B); return B; } }; /* * Specialization for Operand of type std::vector */ template class BlasMatrixDomainLeftSolve, BlasMatrix > { public: std::vector& operator() (const Field& F, std::vector& X, const BlasMatrix& A, const std::vector& B) const { LQUPMatrix LQUP(A); LQUP.left_solve(X,B); return X; } std::vector& operator()(const Field& F, const BlasMatrix& A, std::vector& B) const { LQUPMatrix LQUP(A); LQUP.left_solve(B); return B; } }; template class BlasMatrixDomainRightSolve, BlasMatrix > { public: std::vector& operator() (const Field& F, std::vector& X, const BlasMatrix& A, const std::vector& B) const { LQUPMatrix LQUP(A); LQUP.right_solve(X,B); return X; } std::vector& operator() (const Field& F, const BlasMatrix& A, std::vector& B) const { LQUPMatrix LQUP(A); LQUP.right_solve(B); return B; } }; /* * ******************************************************** * *** Specialization for TriangularBlasMatrix *** * ******************************************************** */ /* * specialization for Operand of type BlasMatrix */ template class BlasMatrixDomainLeftSolve,TriangularBlasMatrix > { public: BlasMatrix& operator() (const Field& F, BlasMatrix& X, const TriangularBlasMatrix& A, const BlasMatrix& B) const { linbox_check( X.rowdim() == B.rowdim()); linbox_check( X.coldim() == B.coldim()); typename BlasMatrix::ConstIterator Biter = B.Begin(); typename BlasMatrix::Iterator Xiter = X.Begin(); for (; Biter != B.End(); ++Biter,++Xiter) F.assign(*Xiter,*Biter); return (*this)(F,A,X); } BlasMatrix& operator() (const Field& F, const TriangularBlasMatrix& A, BlasMatrix& B) const { linbox_check( A.rowdim() == A.coldim()); linbox_check( A.coldim() == B.rowdim()); // typename Field::Element _One; // F.init(_One,1UL); FFLAS::ftrsm((typename Field::Father_t) F, FFLAS::FflasLeft, (FFLAS::FFLAS_UPLO) A.getUpLo(), FFLAS::FflasNoTrans,(FFLAS::FFLAS_DIAG) A.getDiag(), A.rowdim(), B.coldim(), F.one,A.getPointer(),A.getStride(), B.getPointer(),B.getStride()); return B; } }; template class BlasMatrixDomainRightSolve, TriangularBlasMatrix > { public: BlasMatrix& operator() (const Field& F, BlasMatrix& X, const TriangularBlasMatrix& A, const BlasMatrix& B) const { linbox_check( X.rowdim() == B.rowdim()); linbox_check( X.coldim() == B.coldim()); typename BlasMatrix::ConstIterator Biter = B.Begin(); typename BlasMatrix::Iterator Xiter = X.Begin(); for (; Biter != B.End(); ++Biter,++Xiter) F.assign(*Xiter,*Biter); return (*this)(F,A,X); } BlasMatrix& operator() (const Field& F, const TriangularBlasMatrix& A, BlasMatrix& B) const { linbox_check( A.rowdim() == A.coldim()); linbox_check( B.coldim() == A.rowdim()); // typename Field::Element _One; // F.init(_One,1UL); FFLAS::ftrsm((typename Field::Father_t) F, FFLAS::FflasRight,(FFLAS::FFLAS_UPLO) A.getUpLo(), FFLAS::FflasNoTrans,(FFLAS::FFLAS_DIAG) A.getDiag() , B.rowdim(), A.coldim(), F.one,A.getPointer(),A.getStride(), B.getPointer(),B.getStride()); return B; } }; template class BlasMatrixDomainRightSolve, TriangularBlasMatrix > { public: BlasSubmatrix& operator() (const Field& F, BlasSubmatrix& X, const TriangularBlasMatrix& A, const BlasSubmatrix& B) const { linbox_check( X.rowdim() == B.rowdim()); linbox_check( X.coldim() == B.coldim()); typename BlasSubmatrix::ConstIterator Biter = B.Begin(); typename BlasSubmatrix::Iterator Xiter = X.Begin(); for (; Biter != B.End(); ++Biter,++Xiter) F.assign(*Xiter,*Biter); return (*this)(F,A,X); } BlasSubmatrix& operator() (const Field& F, const TriangularBlasMatrix& A, BlasSubmatrix& B) const { linbox_check( A.rowdim() == A.coldim()); linbox_check( B.coldim() == A.rowdim()); // typename Field::Element _One; // F.init(_One,1UL); FFLAS::ftrsm((typename Field::Father_t) F, FFLAS::FflasRight,(FFLAS::FFLAS_UPLO) A.getUpLo(), FFLAS::FflasNoTrans,(FFLAS::FFLAS_DIAG) A.getDiag() , B.rowdim(), A.coldim(), F.one,A.getPointer(),A.getStride(), B.getPointer(),B.getStride()); return B; } }; /* * specialization for Operand of type std::vector */ template class BlasMatrixDomainLeftSolve, TriangularBlasMatrix > { public: std::vector& operator() (const Field& F, std::vector& x, const TriangularBlasMatrix& A, const std::vector& b) const { linbox_check (x.size() == b.size()); typename std::vector::const_iterator biter = b.begin(); typename std::vector::iterator xiter = x.begin(); for (;biter!=b.end();++biter,++xiter) F.assign(*xiter,*biter); return (*this)(F,A,x); } std::vector& operator() (const Field& F, const TriangularBlasMatrix& A, std::vector& b) const { linbox_check( A.rowdim() == A.coldim()); linbox_check( A.rowdim() == b.size()); switch (A.getUpLo()) { case LinBoxTag::Upper: switch(A.getDiag()) { case LinBoxTag::Unit: FFLAS::ftrsv((typename Field::Father_t) F, FFLAS::FflasUpper,FFLAS::FflasNoTrans,FFLAS::FflasUnit, b.size(),A.getPointer(),A.getStride(),&b[0],1); break; case LinBoxTag::NonUnit: FFLAS::ftrsv((typename Field::Father_t) F, FFLAS::FflasUpper,FFLAS::FflasNoTrans,FFLAS::FflasNonUnit, b.size(),A.getPointer(),A.getStride(),&b[0],1); break; default: throw LinboxError ("Error in BlasMatrixDomain (triangular matrix not well defined)"); } break; case LinBoxTag::Lower: switch(A.getDiag()) { case LinBoxTag::Unit: FFLAS::ftrsv((typename Field::Father_t) F, FFLAS::FflasLower,FFLAS::FflasNoTrans,FFLAS::FflasUnit, b.size(),A.getPointer(),A.getStride(),&b[0],1); break; case LinBoxTag::NonUnit: FFLAS::ftrsv((typename Field::Father_t) F, FFLAS::FflasLower,FFLAS::FflasNoTrans,FFLAS::FflasNonUnit, b.size(),A.getPointer(),A.getStride(),&b[0],1); break; default: throw LinboxError ("Error in BlasMatrixDomain (triangular matrix not well defined)"); } break; default: throw LinboxError ("Error in BlasMatrixDomain (triangular matrix not well defined)"); } return b; } }; template class BlasMatrixDomainRightSolve, TriangularBlasMatrix > { public: std::vector& operator() (const Field& F, std::vector& x, const TriangularBlasMatrix& A, const std::vector& b) const { linbox_check (x.size() == b.size()); typename std::vector::const_iterator biter = b.begin(); typename std::vector::iterator xiter = x.begin(); for (;biter!=b.end();++biter,++xiter) F.assign(*xiter,*biter); return (*this)(F,A,x); } std::vector& operator() (const Field& F, const TriangularBlasMatrix& A, std::vector& b) const { linbox_check( A.rowdim() == A.coldim()); linbox_check( A.coldim() == b.size()); switch (A.getUpLo()) { case LinBoxTag::Upper: switch(A.getDiag()) { case LinBoxTag::Unit: FFLAS::ftrsv( (typename Field::Father_t)F, FFLAS::FflasUpper, FFLAS::FflasTrans, FFLAS::FflasUnit, b.size(),A.getPointer(),A.getStride(),&b[0],1); break; case LinBoxTag::NonUnit: FFLAS::ftrsv((typename Field::Father_t) F, FFLAS::FflasUpper,FFLAS::FflasTrans,FFLAS::FflasNonUnit, b.size(),A.getPointer(),A.getStride(),&b[0],1); break; default: throw LinboxError ("Error in BlasMatrixDomain (triangular matrix not well defined)"); } break; case LinBoxTag::Lower: switch(A.getDiag()) { case LinBoxTag::Unit: FFLAS::ftrsv((typename Field::Father_t) F, FFLAS::FflasLower,FFLAS::FflasTrans,FFLAS::FflasUnit, b.size(),A.getPointer(),A.getStride(),&b[0],1); break; case LinBoxTag::NonUnit: FFLAS::ftrsv( (typename Field::Father_t)F, FFLAS::FflasLower,FFLAS::FflasTrans,FFLAS::FflasNonUnit, b.size(),A.getPointer(),A.getStride(),&b[0],1); break; default: throw LinboxError ("Error in BlasMatrixDomain (triangular matrix not well defined)"); } break; default: throw LinboxError ("Error in BlasMatrixDomain (triangular matrix not well defined)"); } return b; } }; template< class Field, class Polynomial> class BlasMatrixDomainMinpoly< Field, Polynomial, BlasMatrix > { public: Polynomial& operator() (const Field &F, Polynomial& P, const BlasMatrix& A) const { commentator().start ("Modular Dense Minpoly ", "MDMinpoly"); size_t n = A.coldim(); linbox_check( n == A.rowdim()); typename Field::Element * X = new typename Field::Element[n*(n+1)]; size_t *Perm = new size_t[n]; for ( size_t i=0; i( F, P, n, A.getPointer(), A.getStride(), X, n, Perm); commentator().report(Commentator::LEVEL_IMPORTANT, INTERNAL_DESCRIPTION) << "minpoly with " << P.size() << " coefficients" << std::endl; delete[] Perm; delete[] X; commentator().stop ("done",NULL,"MDMinpoly"); return P; } }; // #if !defined(__INTEL_COMPILER) && !defined(__CUDACC__) && !defined(__clang__) // template <> // #endif template< class Field, class ContPol > class BlasMatrixDomainCharpoly< Field, ContPol, BlasMatrix > { public: ContPol& operator() ( const Field &F, ContPol &P, const BlasMatrix &A) const { size_t n = A.coldim(); P.clear(); linbox_check( n == A.rowdim()); FFPACK::CharPoly((typename Field::Father_t) F, P, n, A.getPointer(), A.getStride()); return P; } }; } //end of namespace LinBox #endif // __LINBOX_blas_matrix_domain_INL // Local Variables: // mode: C++ // tab-width: 8 // indent-tabs-mode: nil // c-basic-offset: 8 // End: // vim:sts=8:sw=8:ts=8:noet:sr:cino=>s,f0,{0,g0,(0,\:0,t0,+0,=s linbox-1.3.2/linbox/algorithms/block-lanczos.h000066400000000000000000000224511176453053400214020ustar00rootroot00000000000000/* block-lanczos.h * Copyright (C) 2002 Bradford Hovinen * * Written by Bradford Hovinen * * -------------------------------------------- * * ========LICENCE======== * This file is part of the library LinBox. * * LinBox is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ========LICENCE======== * * Class definitions for block Lanczos iteration */ #ifndef __LINBOX_block_lanczos_H #define __LINBOX_block_lanczos_H #include "linbox/linbox-config.h" #include #include "linbox/field/archetype.h" #include "linbox/vector/vector-domain.h" #include "linbox/blackbox/archetype.h" #include "linbox/solutions/methods.h" // I'm putting everything inside the LinBox namespace so that I can drop all of // this in to LinBox easily at a later date, without any messy porting. namespace LinBox { /** @brief Block Lanczos iteration * * This is a blocked version of the iteration given in @ref LanczosSolver. The * essential difference is that, rather than applying the black box \f$A\f$ to a * single vector $v$ during each iteration, the block box \f$A\f$ is applied to an * \f$n\times N\f$ matrix \f$V\f$ or, equivalently, to \f$N\f$ vectors * \f$v_1, \ldots, v_N\f$ Scalars in the original iteration become \f$N\times N\f$ * matrices in the blocked version. The resulting iteration is a natural * extension of the basic theory of the original Lanczos iteration, * c.f. (see Montgomery 1995 ). This has the advantage of more flexible * parallelization, and does not break down as often when used over small * fields. * * Currently, only dense vectors are supported for this iteration, and it is * unlikely any other vector archetypes will be supported in the future. * @bib [Montgomery '95] */ template > class BlockLanczosSolver { public: typedef typename Field::Element Element; /** @brief Constructor. * @param F Field over which to operate * @param traits @ref SolverTraits structure describing user * options for the solver */ BlockLanczosSolver (const Field &F, const BlockLanczosTraits &traits) : _traits (traits), _field (F), _VD (F), _MD (F), _randiter (F), _block (traits.blockingFactor ()) { init_temps (); _field.init (_one, 1); } /** Constructor with a random iterator. * @param F Field over which to operate * @param traits @ref SolverTraits structure describing user * options for the solver * @param r Random iterator to use for randomization */ BlockLanczosSolver (const Field &F, const BlockLanczosTraits &traits, typename Field::RandIter r) : _traits (traits), _field (F), _VD (F), _MD (F), _randiter (r), _block (traits.blockingFactor ()) { init_temps (); _field.init (_one, 1); } /** Solve the linear system Ax = b. * * If the system is nonsingular, this method computes the unique * solution to the system Ax = b. If the system is singular, it computes * a random solution. * * If the matrix A is nonsymmetric, this method preconditions the matrix * A with the preconditioner D_1 A^T D_2 A D_1, where D_1 and D_2 are * random nonsingular diagonal matrices. If the matrix A is symmetric, * this method preconditions the system with A D, where D is a random * diagonal matrix. * * @param A Black box for the matrix A * @param x Vector in which to store solution * @param b Right-hand side of system * @return Reference to solution vector */ template Vector &solve (const Blackbox &A, Vector &x, const Vector &b); private: // S_i is represented here as a vector of booleans, where the entry at // index j is true if and only if the corresponding column of V_i is to // be included in W_i // All references to Winv are actually -Winv // Run the block Lanczos iteration and return the result. Return false // if the method breaks down. Do not check that Ax = b in the end template bool iterate (const Blackbox &A, Vector &x, const Vector &b); // Compute W_i^inv and S_i given V_i^T A V_i int compute_Winv_S (Matrix &Winv, std::vector &S, const Matrix &T); // Given B with N columns and S_i, compute B S_i S_i^T template Matrix1 &mul_SST (Matrix1 &BSST, const Matrix2 &B, const std::vector &S) const; // Matrix-matrix multiply // C = A * B * S_i * S_i^T template Matrix1 &mul (Matrix1 &C, const Matrix2 &A, const Matrix3 &B, const std::vector &S) const; // In-place matrix-matrix multiply on the right // A = A * B * S_i * S_i^T // This is a version of the above optimized to use as little additional // memory as possible template Matrix1 &mulin (Matrix1 &A, const Matrix2 &B, const std::vector &S) const; // Matrix-vector multiply // w = A * S_i * S_i^T * v template Vector1 &vectorMul (Vector1 &w, const Matrix1 &A, const Vector2 &v, const std::vector &S) const; // Matrix-vector transpose multiply // w = (A * S_i * S_i^T)^T * v template Vector1 &vectorMulTranspose (Vector1 &w, const Matrix1 &A, const Vector2 &v, const std::vector &S) const; // Matrix-matrix addition // A = A + B * S_i * S_i^T template Matrix1 &addin (Matrix1 &A, const Matrix2 &B, const std::vector &S) const; // Add I_N to the given N x N matrix // A = A + I_N template Matrix1 &addIN (Matrix1 &A) const; // Given a vector S of bools, write an array of array indices in which // the true values of S are last void permute (std::vector &indices, const std::vector &S) const; // Set the given matrix to the identity template Matrix1 &setIN (Matrix1 &A) const; // Find a suitable pivot row for a column and exchange it with the given // row bool find_pivot_row (Matrix &A, size_t row, int col_offset, const std::vector &indices); // Eliminate all entries in a column except the pivot row, using row // operations from the pivot row void eliminate_col (Matrix &A, size_t pivot, int col_offset, const std::vector &indices, const Element &Ajj_inv); // Initialize the temporaries used in computation void init_temps (); // Private variables const BlockLanczosTraits _traits; const Field &_field; VectorDomain _VD; MatrixDomain _MD; typename Field::RandIter _randiter; // Temporaries used in the computation Matrix _matV[3]; // n x N Matrix _AV; // n x N Matrix _VTAV; // N x N Matrix _Winv[2]; // N x N Matrix _AVTAVSST_VTAV; // N x N Matrix _matT; // N x N Matrix _DEF; // N x N std::vector _vecS; // N-vector of bools mutable typename Vector::Dense _tmp; // N typename Field::Element _one; std::vector _indices; // N mutable Matrix _matM; // N x 2N // Blocking factor size_t _block; // Construct a transpose matrix on the fly template TransposeMatrix transpose (Matrix1 &M) const { return TransposeMatrix (M); } protected: template bool isAlmostIdentity (const Matrix1 &M) const; // Test suite for the above functions bool test_compute_Winv_S_mul (int n) const; bool test_compute_Winv_S_mulin (int n) const; bool test_mul_SST (int n) const; bool test_mul_ABSST (int n) const; bool test_mulTranspose (int m, int n) const; bool test_mulTranspose_ABSST (int n) const; bool test_mulin_ABSST (int n) const; bool test_addin_ABSST (int n) const; public: bool runSelfCheck () const; }; } // namespace LinBox #include "block-lanczos.inl" #endif // __LINBOX_block_lanczos_H // vim:sts=8:sw=8:ts=8:noet:sr:cino=>s,f0,{0,g0,(0,:0,t0,+0,=s // Local Variables: // mode: C++ // tab-width: 8 // indent-tabs-mode: nil // c-basic-offset: 8 // End: linbox-1.3.2/linbox/algorithms/block-lanczos.inl000066400000000000000000001155421176453053400217410ustar00rootroot00000000000000/* block-lanczos.inl * Copyright (C) 2002 LinBox * * Written by Bradford Hovinen * * -------------------------------------------- * * ========LICENCE======== * This file is part of the library LinBox. * * LinBox is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ========LICENCE======== * Function definitions for block Lanczos iteration */ #ifndef __LINBOX_block_lanczos_INL #define __LINBOX_block_lanczos_INL #include "linbox/linbox-config.h" #include #include "linbox/util/debug.h" #include "linbox/solutions/methods.h" #include "linbox/blackbox/diagonal.h" #include "linbox/blackbox/compose.h" #include "linbox/blackbox/transpose.h" #include "linbox/randiter/nonzero.h" #include "linbox/util/commentator.h" #include "linbox/util/timer.h" #include "block-lanczos.h" // I'm putting everything inside the LinBox namespace so that I can drop all of // this in to LinBox easily at a later date, without any messy porting. namespace LinBox { #ifdef DETAILED_TRACE template void BLTraceReport (std::ostream &out, MatrixDomain &MD, const char *text, size_t iter, const Matrix &M) { out << text << " [" << iter << "]:" << std::endl; MD.write (out, M); } template void BLTraceReport (std::ostream &out, VectorDomain &VD, const char *text, size_t iter, const Vector &v) { out << text << " [" << iter << "]: "; VD.write (out, v) << std::endl; } void reportS (std::ostream &out, const std::vector &S, size_t iter) { out << "S_" << iter << ": [" << S << "]" << std::endl; } template void checkAConjugacy (const MatrixDomain &MD, const Matrix &AV, Matrix &V, Matrix &T, size_t AV_iter, size_t V_iter) { std::ostream &report = commentator().report (Commentator::LEVEL_IMPORTANT, INTERNAL_DESCRIPTION); report << "Checking whether V_" << V_iter << " is A-conjugate to V_" << AV_iter << "..."; MD.mul (T, TransposeMatrix (V), AV); if (MD.isZero (T)) report << "yes" << std::endl; else { report << "no" << std::endl; std::ostream &err_report = commentator().report (Commentator::LEVEL_IMPORTANT, INTERNAL_ERROR); err_report << "ERROR: V_" << V_iter << " is not A-conjugate to V_" << AV_iter << std::endl; err_report << "Computed V_" << V_iter << "^T AV_" << AV_iter << ":" << std::endl; MD.write (report, T); } } #else template inline void BLTraceReport (std::ostream &out, Domain &D, const char *text, size_t iter, const Object &obj) {} void reportS (std::ostream &out, const std::vector &S, size_t iter) {} template inline void checkAConjugacy (const MatrixDomain &MD, const Matrix &AV, const Matrix &V, Matrix &T, size_t AV_iter, size_t V_iter) {} #endif #ifdef DETAILED_PROFILE # define TIMER_DECLARE(part) UserTimer part##_timer; double part##_time = 0.0; # define TIMER_START(part) part##_timer.start () # define TIMER_STOP(part) part##_timer.stop (); part##_time += part##_timer.time () # define TIMER_REPORT(part) \ commentator().report (Commentator::LEVEL_NORMAL, TIMING_MEASURE) \ << "Total " #part " time: " << part##_time << "s" << std::endl; #else # define TIMER_DECLARE(part) # define TIMER_START(part) # define TIMER_STOP(part) # define TIMER_REPORT(part) #endif // N.B. This code was lifted from the Lanczos iteration in LinBox template template Vector &BlockLanczosSolver::solve (const Blackbox &A, Vector &x, const Vector &b) { linbox_check ((x.size () == A.coldim ()) && (b.size () == A.rowdim ())); commentator().start ("Solving linear system (Block Lanczos)", "BlockLanczosSolver::solve"); bool success = false; Vector d1, d2, b1, b2, bp, y, Ax, ATAx, ATb; // Get the temporaries into the right sizes _matV[0].resize (A.coldim (), _block); _matV[1].resize (A.coldim (), _block); _matV[2].resize (A.coldim (), _block); _AV.resize (A.coldim (), _block); NonzeroRandIter real_ri (_field, _randiter); RandomDenseStream > stream (_field, real_ri, A.coldim ()); for (unsigned int i = 0; !success && i < _traits.maxTries (); ++i) { std::ostream &report = commentator().report (Commentator::LEVEL_UNIMPORTANT, INTERNAL_DESCRIPTION); switch (_traits.preconditioner ()) { case BlockLanczosTraits::NO_PRECONDITIONER: success = iterate (A, x, b); break; case BlockLanczosTraits::SYMMETRIZE: { VectorWrapper::ensureDim (bp, A.coldim ()); Transpose AT (&A); Compose< Transpose< Blackbox>, Blackbox> B (&AT, &A); AT.apply (bp, b); success = iterate (B, x, bp); break; } case BlockLanczosTraits::PARTIAL_DIAGONAL: { VectorWrapper::ensureDim (d1, A.coldim ()); VectorWrapper::ensureDim (y, A.coldim ()); stream >> d1; Diagonal D (_field, d1); Compose > B (&A, &D); report << "Random D: "; _VD.write (report, d1) << std::endl; success = iterate (B, y, b); D.apply (x, y); break; } case BlockLanczosTraits::PARTIAL_DIAGONAL_SYMMETRIZE: { VectorWrapper::ensureDim (d1, A.rowdim ()); VectorWrapper::ensureDim (b1, A.rowdim ()); VectorWrapper::ensureDim (bp, A.coldim ()); typedef Diagonal PC1; typedef Transpose PC2; typedef Compose CO1; typedef Compose CO2; stream >> d1; PC1 D (_field, d1); PC2 AT (&A); CO1 B1 (&D, &A); CO2 B (&AT, &B1); report << "Random D: "; _VD.write (report, d1) << std::endl; D.apply (b1, b); AT.apply (bp, b1); success = iterate (B, x, bp); break; } case BlockLanczosTraits::FULL_DIAGONAL: { VectorWrapper::ensureDim (d1, A.coldim ()); VectorWrapper::ensureDim (d2, A.rowdim ()); VectorWrapper::ensureDim (b1, A.rowdim ()); VectorWrapper::ensureDim (b2, A.coldim ()); VectorWrapper::ensureDim (bp, A.coldim ()); VectorWrapper::ensureDim (y, A.coldim ()); typedef Diagonal PC1; typedef Transpose PC2; typedef Compose CO1; typedef Compose CO2; typedef Compose CO3; typedef Compose CO4; stream >> d1 >> d2; PC1 D1 (_field, d1); PC1 D2 (_field, d2); PC2 AT (&A); CO1 B1 (&A, &D1); CO2 B2 (&D2, &B1); CO3 B3 (&AT, &B2); CO4 B (&D1, &B3); report << "Random D_1: "; _VD.write (report, d1) << std::endl; report << "Random D_2: "; _VD.write (report, d2) << std::endl; D2.apply (b1, b); AT.apply (b2, b1); D1.apply (bp, b2); success = iterate (B, y, bp); D1.apply (x, y); break; } default: throw PreconditionFailed (__func__, __LINE__, "preconditioner is NO_PRECONDITIONER, SYMMETRIZE, PARTIAL_DIAGONAL_SYMMETRIZE, " "PARTIAL_DIAGONAL, or FULL_DIAGONAL"); } // JGD 11.07.2005 // I DON'T KNOW WHY IT IS WORKING BUT IT DOES WORK // Without this negin the results is minus the correct solution // I have seen this sentence in mg-bla which comforts my choice: // "Because we set Winv to -Winv, we have -x at the end of the // iteration. So negate the result and return it" // I don't know when to negate it, so I check first, // if the result is not correct I try to negate !!! VectorWrapper::ensureDim (Ax, A.rowdim ()); if ((_traits.preconditioner () == BlockLanczosTraits::SYMMETRIZE) || (_traits.preconditioner () == BlockLanczosTraits::PARTIAL_DIAGONAL_SYMMETRIZE) || (_traits.preconditioner () == BlockLanczosTraits::FULL_DIAGONAL)) { VectorWrapper::ensureDim (ATAx, A.coldim ()); VectorWrapper::ensureDim (ATb, A.coldim ()); A.apply (Ax, x); A.applyTranspose (ATAx, Ax); A.applyTranspose (ATb, b); if (_VD.areEqual (ATAx, ATb)) { success = true; } else { success = false; } } else { A.apply (Ax, x); if (_VD.areEqual (Ax, b)) { success = true; } else { success = false; } } if(! success) _VD.negin(x); // End of JGD INFAMOUS HACK if (_traits.checkResult ()) { VectorWrapper::ensureDim (Ax, A.rowdim ()); if (_traits.checkResult () && ((_traits.preconditioner () == BlockLanczosTraits::SYMMETRIZE) || (_traits.preconditioner () == BlockLanczosTraits::PARTIAL_DIAGONAL_SYMMETRIZE) || (_traits.preconditioner () == BlockLanczosTraits::FULL_DIAGONAL))) { VectorWrapper::ensureDim (ATAx, A.coldim ()); VectorWrapper::ensureDim (ATb, A.coldim ()); commentator().start ("Checking whether A^T Ax = A^T b"); A.apply (Ax, x); A.applyTranspose (ATAx, Ax); A.applyTranspose (ATb, b); if (_VD.areEqual (ATAx, ATb)) { commentator().stop ("passed"); success = true; } else { commentator().stop ("FAILED"); success = false; } } else if (_traits.checkResult ()) { commentator().start ("Checking whether Ax=b"); A.apply (Ax, x); if (_VD.areEqual (Ax, b)) { commentator().stop ("passed"); success = true; } else { commentator().stop ("FAILED"); success = false; } } } } if (success) { commentator().stop ("done", "Solve successful", "BlockLanczosSolver::solve"); return x; } else { commentator().stop ("done", "Solve failed", "BlockLanczosSolver::solve"); throw SolveFailed (); } } template template bool BlockLanczosSolver::iterate (const Blackbox &A, Vector &x, const Vector &b) { linbox_check (_matV[0].rowdim () == A.rowdim ()); linbox_check (_matV[1].rowdim () == A.rowdim ()); linbox_check (_matV[2].rowdim () == A.rowdim ()); linbox_check (_matV[0].coldim () == _matV[1].coldim ()); linbox_check (_matV[0].coldim () == _matV[2].coldim ()); commentator().start ("Block Lanczos iteration", "BlockLanczosSolver::iterate", A.rowdim ()); size_t Ni; size_t total_dim = 0; Vector tmp, tmp1, tmp2; bool ret = true; VectorWrapper::ensureDim (tmp, _traits.blockingFactor ()); VectorWrapper::ensureDim (tmp1, _traits.blockingFactor ()); VectorWrapper::ensureDim (tmp2, A.rowdim ()); // How many iterations between each progress update unsigned int progress_interval = A.rowdim () / _traits.blockingFactor () / 100; // Make sure there are a minimum of ten if (progress_interval == 0) progress_interval = 1; // i is the index for temporaries where we need to go back to i - 1 // j is the index for temporaries where we need to go back to j - 2 int i = 0, j = 2, next_j, prev_j = 1, iter = 2; typename Matrix::ColIterator k; TIMER_DECLARE(AV); TIMER_DECLARE(Winv); TIMER_DECLARE(solution); TIMER_DECLARE(orthogonalization) // Get a random fat vector _matV[0] RandomDenseStream stream (_field, _randiter, A.coldim ()); for (k = _matV[0].colBegin (); k != _matV[0].colEnd (); ++k) stream >> *k; TIMER_START(AV); _MD.blackboxMulLeft (_AV, A, _matV[0]); TIMER_STOP(AV); std::ostream &report = commentator().report (Commentator::LEVEL_IMPORTANT, INTERNAL_DESCRIPTION); // Initialize S_-1 to IN std::fill (_vecS.begin (), _vecS.end (), true); // Iteration 1 TIMER_START(Winv); _MD.mul (_VTAV, transpose (_matV[0]), _AV); Ni = compute_Winv_S (_Winv[0], _vecS, _VTAV); TIMER_STOP(Winv); // Check for catastrophic breakdown if (Ni == 0) { commentator().stop ("breakdown", NULL, "BlockLanczosSolver::iterate"); return false; } total_dim += Ni; #ifdef DETAILED_TRACE report << "Iteration " << iter << ": N_i = " << Ni << std::endl; report << "Iteration " << iter << ": Total dimension is " << total_dim << std::endl; #endif TIMER_START(solution); vectorMulTranspose (tmp, _matV[0], b, _vecS); _MD.vectorMul (tmp1, _Winv[0], tmp); vectorMul (x, _matV[0], tmp1, _vecS); TIMER_STOP(solution); mul_SST (_matV[1], _AV, _vecS); TIMER_START(orthogonalization); mul (_AVTAVSST_VTAV, transpose (_AV), _AV, _vecS); BLTraceReport (report, _MD, "V", 0, _matV[0]); BLTraceReport (report, _MD, "AV", 0, _AV); BLTraceReport (report, _MD, "V^T A V", 0, _VTAV); BLTraceReport (report, _MD, "Winv", 0, _Winv[0]); reportS (report, _vecS, 0); BLTraceReport (report, _VD, "x", 0, x); BLTraceReport (report, _MD, "AVSS^T", 0, _matV[1]); BLTraceReport (report, _MD, "V^T A^2 V", 0, _AVTAVSST_VTAV); _MD.addin (_AVTAVSST_VTAV, _VTAV); _MD.mul (_DEF, _Winv[0], _AVTAVSST_VTAV); addIN (_DEF); _MD.axpyin (_matV[1], _matV[0], _DEF); TIMER_START(orthogonalization); BLTraceReport (report, _MD, "D", 1, _DEF); BLTraceReport (report, _MD, "V", 1, _matV[1]); checkAConjugacy (_MD, _AV, _matV[1], _DEF, 0, 1); if (_MD.isZero (_matV[1])) { commentator().stop ("done", NULL, "BlockLanczosSolver::iterate"); return true; } // Iteration 2 TIMER_START(AV); _MD.blackboxMulLeft (_AV, A, _matV[1]); TIMER_STOP(AV); #ifdef DETAILED_TRACE // DEBUG: Save a copy of AV_1 for use later Matrix AV1_backup (_AV.rowdim (), _AV.coldim ()); _MD.copy (AV1_backup, _AV); #endif TIMER_START(Winv); _MD.mul (_VTAV, transpose (_matV[1]), _AV); Ni = compute_Winv_S (_Winv[1], _vecS, _VTAV); TIMER_STOP(Winv); // Check for catastrophic breakdown if (Ni == 0) { commentator().stop ("breakdown", NULL, "BlockLanczosSolver::iterate"); return false; } total_dim += Ni; #ifdef DETAILED_TRACE report << "Iteration " << iter << ": N_i = " << Ni << std::endl; report << "Iteration " << iter << ": Total dimension is " << total_dim << std::endl; #endif TIMER_START(solution); vectorMulTranspose (tmp, _matV[1], b, _vecS); _MD.vectorMul (tmp1, _Winv[1], tmp); vectorMul (tmp2, _matV[1], tmp1, _vecS); _VD.addin (x, tmp2); TIMER_STOP(solution); mul_SST (_matV[2], _AV, _vecS); TIMER_START(orthogonalization); mul (_AVTAVSST_VTAV, transpose (_AV), _AV, _vecS); BLTraceReport (report, _MD, "AV", 1, _AV); BLTraceReport (report, _MD, "V^T A V", 1, _VTAV); BLTraceReport (report, _MD, "Winv", 1, _Winv[1]); reportS (report, _vecS, 1); BLTraceReport (report, _VD, "x", 1, x); BLTraceReport (report, _MD, "V^T A^2 V", 1, _AVTAVSST_VTAV); _MD.addin (_AVTAVSST_VTAV, _VTAV); _MD.mul (_DEF, _Winv[1], _AVTAVSST_VTAV); addIN (_DEF); _MD.axpyin (_matV[2], _matV[1], _DEF); BLTraceReport (report, _MD, "D", 2, _DEF); mul (_DEF, _Winv[0], _VTAV, _vecS); _MD.axpyin (_matV[2], _matV[0], _DEF); TIMER_STOP(orthogonalization); BLTraceReport (report, _MD, "E", 2, _DEF); BLTraceReport (report, _MD, "V", 2, _matV[2]); checkAConjugacy (_MD, _AV, _matV[2], _DEF, 1, 2); // Now we're ready to begin the real iteration while (!_MD.isZero (_matV[j])) { next_j = j + 1; if (next_j > 2) next_j = 0; TIMER_START(AV); _MD.blackboxMulLeft (_AV, A, _matV[j]); TIMER_STOP(AV); // First compute F_i+1, where we use Winv_i-2; then Winv_i and // Winv_i-2 can share storage, and we don't need the old _VTAV // and _AVTAVSST_VTAV any more. After this, F_i+1 is stored in // _DEF TIMER_START(orthogonalization); _MD.mul (_matT, _VTAV, _Winv[1 - i]); addIN (_matT); _MD.mul (_DEF, _Winv[i], _matT); _MD.mulin (_DEF, _AVTAVSST_VTAV); TIMER_STOP(orthogonalization); // Now get the next VTAV, Winv, and S_i TIMER_START(Winv); _MD.mul (_VTAV, transpose (_matV[j]), _AV); Ni = compute_Winv_S (_Winv[i], _vecS, _VTAV); TIMER_STOP(Winv); // Check for catastrophic breakdown if (Ni == 0) { ret = false; break; } total_dim += Ni; #ifdef DETAILED_TRACE report << "Iteration " << iter << ": N_i = " << Ni << std::endl; report << "Iteration " << iter << ": Total dimension is " << total_dim << std::endl; #endif BLTraceReport (report, _MD, "AV", iter, _AV); BLTraceReport (report, _MD, "F", iter + 1, _DEF); BLTraceReport (report, _MD, "V^T AV", iter, _VTAV); BLTraceReport (report, _MD, "Winv", iter, _Winv[i]); reportS (report, _vecS, iter); // Now that we have S_i, finish off with F_i+1 TIMER_START(orthogonalization); mulin (_matV[next_j], _DEF, _vecS); TIMER_STOP(orthogonalization); // Update x TIMER_START(solution); vectorMulTranspose (tmp, _matV[j], b, _vecS); _MD.vectorMul (tmp1, _Winv[i], tmp); vectorMul (tmp2, _matV[j], tmp1, _vecS); _VD.addin (x, tmp2); TIMER_STOP(solution); BLTraceReport (report, _VD, "x", iter, x); // Compute the next _AVTAVSST_VTAV TIMER_START(orthogonalization); mul (_AVTAVSST_VTAV, transpose (_AV), _AV, _vecS); BLTraceReport (report, _MD, "V^T A^2 V", iter, _AVTAVSST_VTAV); _MD.addin (_AVTAVSST_VTAV, _VTAV); // Compute D and update V_i+1 _MD.mul (_DEF, _Winv[i], _AVTAVSST_VTAV); addIN (_DEF); _MD.axpyin (_matV[next_j], _matV[j], _DEF); BLTraceReport (report, _MD, "D", iter + 1, _DEF); // Compute E and update V_i+1 mul (_DEF, _Winv[1 - i], _VTAV, _vecS); _MD.axpyin (_matV[next_j], _matV[prev_j], _DEF); BLTraceReport (report, _MD, "E", iter + 1, _DEF); // Add AV_i S_i S_i^T addin (_matV[next_j], _AV, _vecS); TIMER_STOP(orthogonalization); BLTraceReport (report, _MD, "V", iter + 1, _matV[next_j]); checkAConjugacy (_MD, _AV, _matV[next_j], _DEF, iter, iter + 1); #ifdef DETAILED_TRACE checkAConjugacy (_MD, AV1_backup, _matV[next_j], _DEF, 1, iter + 1); #endif i = 1 - i; prev_j = j; j = next_j; ++iter; if (!(iter % progress_interval)) commentator().progress (total_dim); if (total_dim > A.rowdim ()) { commentator().report (Commentator::LEVEL_IMPORTANT, INTERNAL_ERROR) << "Maximum number of iterations passed without termination" << std::endl; commentator().stop ("ERROR", NULL, "BlockLanczosSolver::iterate"); return false; } } // Because we set Winv to -Winv, we have -x at the end of the // iteration. So negate the result and return it _VD.negin (x); BLTraceReport (report, _VD, "x", iter, x); TIMER_REPORT(AV); TIMER_REPORT(Winv); TIMER_REPORT(solution); TIMER_REPORT(orthogonalization) commentator().stop (ret ? "done" : "breakdown", NULL, "BlockLanczosSolver::iterate"); return ret; } template int BlockLanczosSolver::compute_Winv_S (Matrix &Winv, std::vector &S, const Matrix &T) { linbox_check (S.size () == Winv.rowdim ()); linbox_check (S.size () == Winv.coldim ()); linbox_check (S.size () == T.rowdim ()); linbox_check (S.size () == T.coldim ()); linbox_check (S.size () == _matM.rowdim ()); linbox_check (S.size () * 2 == _matM.coldim ()); #ifdef DETAILED_TRACE commentator().start ("Computing Winv and S", "BlockLanczosSolver::compute_Winv_S", S.size ()); std::ostream &report = commentator().report (Commentator::LEVEL_UNIMPORTANT, INTERNAL_DESCRIPTION); report << "Input T:" << std::endl; _MD.write (report, T); #endif BlasMatrix M1 (_matM, 0, 0, T.rowdim (), T.coldim ()); BlasMatrix M2 (_matM, 0, T.coldim (), T.rowdim (), T.coldim ()); _MD.copy (M1, T); setIN (M2); permute (_indices, S); typename Field::Element Mjj_inv; size_t row; size_t Ni = 0; for (row = 0; row < S.size (); ++row) { #ifdef DETAILED_TRACE if (!(row & ((1 << 10) - 1))) commentator().progress (row); std::ostream &report = commentator().report (Commentator::LEVEL_UNIMPORTANT, INTERNAL_DESCRIPTION); report << "Iteration " << row << ": Matrix M = " << std::endl; _MD.write (report, _matM); #endif if (find_pivot_row (_matM, row, 0, _indices)) { #ifdef DETAILED_TRACE commentator().report (Commentator::LEVEL_UNIMPORTANT, INTERNAL_DESCRIPTION) << "Pivot found for column " << _indices[row] << std::endl; #endif // Pivot element was found for (j, j) S[_indices[row]] = true; // Use column j of V_i in W_i // Give the (j, j) entry unity _field.inv (Mjj_inv, _matM.getEntry (_indices[row], _indices[row])); _VD.mulin (*(_matM.rowBegin () + _indices[row]), Mjj_inv); // Zero the rest of the column j eliminate_col (_matM, row, 0, _indices, Mjj_inv); ++Ni; } else { #ifdef DETAILED_TRACE commentator().report (Commentator::LEVEL_NORMAL, INTERNAL_DESCRIPTION) << "No pivot found for column " << _indices[row] << std::endl; #endif // No pivot element found S[_indices[row]] = false; // Skip column j find_pivot_row (_matM, row, _block, _indices); const typename Field::Element &Mjj = _matM.refEntry (_indices[row], _indices[row] + _block); linbox_check (!_field.isZero (Mjj)); // Zero the rest of the column j + N eliminate_col (_matM, row, _block, _indices, _field.inv (Mjj_inv, Mjj)); // Zero row j _VD.subin (*(_matM.rowBegin () + _indices[row]), *(_matM.rowBegin () + _indices[row])); } } _MD.neg (Winv, M2); #ifdef DETAILED_TRACE report << "Computed Winv:" << std::endl; _MD.write (report, Winv); commentator().stop ("done", NULL, "BlockLanczosSolver::compute_Winv_S"); #endif return Ni; } template template Matrix1 &BlockLanczosSolver::mul_SST (Matrix1 &BSST, const Matrix2 &B, const std::vector &S) const { linbox_check (B.rowdim () == BSST.rowdim ()); linbox_check (B.coldim () == BSST.coldim ()); linbox_check (B.coldim () == S.size ()); typename Matrix2::ConstColIterator i; typename Matrix1::ColIterator j; std::vector::const_iterator k; for (i = B.colBegin (), j = BSST.colBegin (), k = S.begin (); i != B.colEnd (); ++i, ++j, ++k) { if (*k) _VD.copy (*j, *i); else _VD.subin (*j, *j); } return BSST; } template template Matrix1 &BlockLanczosSolver::mul (Matrix1 &C, const Matrix2 &A, const Matrix3 &B, const std::vector &S) const { linbox_check (A.coldim () == B.rowdim ()); linbox_check (A.rowdim () == C.rowdim ()); linbox_check (B.coldim () == C.coldim ()); typename Matrix2::ConstRowIterator i; typename Matrix3::ConstColIterator j; typename Matrix1::ColIterator k1; typename Matrix1::Col::iterator k2; std::vector::const_iterator l; for (j = B.colBegin (), l = S.begin (), k1 = C.colBegin (); j != B.colEnd (); ++j, ++l, ++k1) { if (*l) { for (i = A.rowBegin (), k2 = k1->begin (); i != A.rowEnd (); ++i, ++k2) _VD.dot (*k2, *i, *j); } else _VD.subin (*k1, *k1); } return C; } template template Matrix1 &BlockLanczosSolver::mulin (Matrix1 &A, const Matrix2 &B, const std::vector &S) const { linbox_check (A.coldim () == B.rowdim ()); linbox_check (B.rowdim () == B.coldim ()); linbox_check (A.coldim () == S.size ()); typename Matrix1::RowIterator i; typename Matrix2::ConstColIterator j; typename Vector::Dense::iterator k; std::vector::const_iterator l; for (i = A.rowBegin (); i != A.rowEnd (); ++i) { for (j = B.colBegin (), k = _tmp.begin (), l = S.begin (); j != B.colEnd (); ++j, ++k, ++l) { if (*l) _VD.dot (*k, *i, *j); else _field.subin (*k, *k); } _VD.copy (*i, _tmp); } return A; } template template Vector1 &BlockLanczosSolver::vectorMul (Vector1 &w, const Matrix1 &A, const Vector2 &v, const std::vector &S) const { linbox_check (A.coldim () == v.size ()); linbox_check (A.rowdim () == w.size ()); typename Matrix1::ConstColIterator i = A.colBegin (); typename Vector2::const_iterator j = v.begin (); typename std::vector::const_iterator k = S.begin (); _VD.subin (w, w); for (; j != v.end (); ++j, ++i, ++k) if (*k) _VD.axpyin (w, *j, *i); return w; } template template Vector1 &BlockLanczosSolver::vectorMulTranspose (Vector1 &w, const Matrix1 &A, const Vector2 &v, const std::vector &S) const { linbox_check (A.rowdim () == v.size ()); linbox_check (A.coldim () == w.size ()); typename Matrix1::ConstColIterator i = A.colBegin (); typename Vector1::iterator j = w.begin (); typename std::vector::const_iterator k = S.begin (); for (; j != w.end (); ++j, ++i, ++k) if (*k) _VD.dot (*j, *i, v); return w; } template template Matrix1 &BlockLanczosSolver::addIN (Matrix1 &A) const { linbox_check (A.coldim () == A.rowdim ()); typename Matrix1::RowIterator i; size_t idx = 0; for (i = A.rowBegin (); i != A.rowEnd (); ++i, ++idx) _field.addin ((*i)[idx], _one); return A; } template template Matrix1 &BlockLanczosSolver::addin (Matrix1 &A, const Matrix2 &B, const std::vector &S) const { linbox_check (A.rowdim () == B.rowdim ()); linbox_check (A.coldim () == B.coldim ()); typename Matrix1::ColIterator i = A.colBegin (); typename Matrix2::ConstColIterator j = B.colBegin (); std::vector::const_iterator k = S.begin (); for (; i != A.colEnd (); ++i, ++j, ++k) if (*k) _VD.addin (*i, *j); return A; } template void BlockLanczosSolver::permute (std::vector &indices, const std::vector &S) const { size_t idx; std::vector::iterator i = indices.begin (); std::vector::const_iterator k; for (k = S.begin (), idx = 0; k != S.end (); ++k, ++idx) { if (!*k) { *i = idx; ++i; } } for (k = S.begin (), idx = 0; k != S.end (); ++k, ++idx) { if (*k) { *i = idx; ++i; } } } template template Matrix1 &BlockLanczosSolver::setIN (Matrix1 &A) const { linbox_check (A.coldim () == A.rowdim ()); typename Matrix1::RowIterator i; size_t i_idx; for (i = A.rowBegin (), i_idx = 0; i != A.rowEnd (); ++i, ++i_idx) { _VD.subin (*i, *i); _field.assign ((*i)[i_idx], _one); } return A; } /* Find a row suitable for pivoting in column col and exchange that row with row * A - Matrix on which to operate * idx - Index of the row with which to exchange * Returns true if a pivot could be found; false otherwise */ template bool BlockLanczosSolver::find_pivot_row (Matrix &A, size_t row, int col_offset, const std::vector &indices) { size_t idx; typename Matrix::Col col_vec; typename Matrix::Row row_vec; col_vec = *(_matM.colBegin () + indices[row] + col_offset); row_vec = *(_matM.rowBegin () + indices[row]); for (idx = row; idx < A.rowdim (); ++idx) { if (!_field.isZero (A.getEntry (indices[idx], indices[row] + col_offset))) { if (idx != row) { typename Matrix::Row row1 = *(A.rowBegin () + indices[idx]); std::swap_ranges (row_vec.begin (), row_vec.end (), row1.begin ()); } return true; } } return false; } template void BlockLanczosSolver::eliminate_col (Matrix &A, size_t pivot, int col_offset, const std::vector &indices, const typename Field::Element &Ajj_inv) { // I'm assuming everything left of the column with the index of the pivot row is 0 size_t row; typename BlasMatrix::Row pivot_row; typename Field::Element p; pivot_row = *(A.rowBegin () + indices[pivot]); for (row = 0; row < pivot; ++row) { const typename Field::Element &Aij = A.getEntry (indices[row], indices[pivot] + col_offset); if (!_field.isZero (Aij)) _VD.axpyin (*(A.rowBegin () + indices[row]), _field.neg (p, Aij), pivot_row); } for (++row; row < A.rowdim (); ++row) { const typename Field::Element &Aij = A.getEntry (indices[row], indices[pivot] + col_offset); if (!_field.isZero (Aij)) _VD.axpyin (*(A.rowBegin () + indices[row]), _field.neg (p, Aij), pivot_row); } } template void BlockLanczosSolver::init_temps () { _VTAV.resize (_block, _block); _Winv[0].resize (_block, _block); _Winv[1].resize (_block, _block); _AVTAVSST_VTAV.resize (_block, _block); _matT.resize (_block, _block); _DEF.resize (_block, _block); _vecS.resize (_block); _matM.resize (_block, 2 * _block); _tmp.resize (_block); _indices.resize (_block); } // Check whether the given matrix is "almost" the identity, i.e. the identity // with some zeros on the diagonal template template bool BlockLanczosSolver::isAlmostIdentity (const Matrix1 &M) const { linbox_check (M.rowdim () == M.coldim ()); typename Field::Element neg_one; _field.init (neg_one, -1); size_t i, j; for (i = 0; i < M.rowdim (); ++i) { for (j = 0; j < M.coldim (); ++j) { if (i != j && !_field.isZero (M.getEntry (i, j))) { if (!_field.isZero (M.getEntry (i, i))) { typename Matrix::ConstRowIterator row = M.rowBegin () + j; if (!_VD.isZero (*row)) return false; } else if (!_field.isZero (M.getEntry (j, j))) { typename Matrix::ConstColIterator col = M.colBegin () + i; if (!_VD.isZero (*col)) return false; } else return false; } else if (!_field.isZero (M.getEntry (i, j)) && !_field.areEqual (M.getEntry (i, j), neg_one)) return false; } } return true; } // Test suite for BlockLanczosSolver // All tests below return true on success and false on failure. They take a // single argument: n for the row and column dimension of the matrices on which // to operate // Compute a random dense matrix and run compute_Winv_S on it. Check that the // resulting S vector is all 'true' and then multiply the original matrix by the // output. Add 1 to the result with addIN and check the the result is zero with // isZero template bool BlockLanczosSolver::test_compute_Winv_S_mul (int n) const { commentator().start ("Testing compute_Winv_S, mul, addIN, and isZero", "test_compute_Winv_S_mul"); Matrix A (n, n); Matrix AT (n, n); Matrix ATA (n, n); Matrix W (n, n); Matrix WA (n, n); std::vector S (n); bool ret = true; RandomDenseStream stream (_field, _randiter, n); typename Matrix::RowIterator i = A.rowBegin (); typename Matrix::ColIterator j = AT.colBegin (); // With very, very, very, very high probability, this will be // nonsingular for (; i != A.rowEnd (); ++i, ++j) { stream >> *i; _VD.copy (*j, *i); } _MD.mul (ATA, AT, A); std::ostream &report = commentator().report (Commentator::LEVEL_UNIMPORTANT, INTERNAL_DESCRIPTION); report << "Computed A^T A:" << std::endl; _MD.write (report, ATA); compute_Winv_S (W, S, ATA); report << "Computed W:" << std::endl; _MD.write (report, W); // Now W should be -A^-1 _MD.mul (WA, W, ATA); report << "Computed WA^T A:" << std::endl; _MD.write (report, WA); if (!isAlmostIdentity (WA)) { commentator().report (Commentator::LEVEL_IMPORTANT, INTERNAL_ERROR) << "ERROR: WA^T A != I" << std::endl; ret = false; } // Now, just for kicks, do the same on the other side _MD.mul (WA, ATA, W); report << "Computed A^T A W:" << std::endl; _MD.write (report, WA); if (!isAlmostIdentity (WA)) { commentator().report (Commentator::LEVEL_IMPORTANT, INTERNAL_ERROR) << "ERROR: A^T AW != I" << std::endl; ret = false; } commentator().stop (MSG_STATUS (ret), NULL, "test_compute_Winv_S_mul"); return ret; } // Same as above, but use mulin rather than mul template bool BlockLanczosSolver::test_compute_Winv_S_mulin (int n) const { commentator().start ("Testing compute_Winv_S, copy, mulin, addIN, and isZero", "test_compute_Winv_S_mulin"); Matrix A (n, n); Matrix AT (n, n); Matrix ATA (n, n); Matrix W (n, n); Matrix WA (n, n); std::vector S (n); bool ret = true; RandomDenseStream stream (_field, _randiter, n); typename Matrix::RowIterator i = A.rowBegin (); typename Matrix::ColIterator j = AT.colBegin (); // With very, very, very, very high probability, this will be // nonsingular for (; i != A.rowEnd (); ++i, ++j) { stream >> *i; _VD.copy (*j, *i); } _MD.mul (ATA, AT, A); std::ostream &report = commentator().report (Commentator::LEVEL_UNIMPORTANT, INTERNAL_DESCRIPTION); report << "Computed A^T A:" << std::endl; _MD.write (report, ATA); compute_Winv_S (W, S, ATA); _MD.copy (WA, W); report << "Computed W:" << std::endl; _MD.write (report, W); // Now W should be -A^-1 _MD.mulin (WA, ATA); report << "Computed WA^T A:" << std::endl; _MD.write (report, WA); if (!isAlmostIdentity (WA)) { commentator().report (Commentator::LEVEL_IMPORTANT, INTERNAL_ERROR) << "ERROR: WA^T A != I" << std::endl; ret = false; } // Now, just for kicks, do the same on the other side _MD.copy (WA, ATA); _MD.mulin (WA, W); report << "Computed A^T AW:" << std::endl; _MD.write (report, WA); if (!isAlmostIdentity (WA)) { commentator().report (Commentator::LEVEL_IMPORTANT, INTERNAL_ERROR) << "ERROR: A^T AW != I" << std::endl; ret = false; } commentator().stop (MSG_STATUS (ret), NULL, "test_compute_Winv_S_mulin"); return ret; } // Compute a random nonsingular diagonal matrix and set an S vector so that // every other entry is true and the rest are false. Call mul_SST and check that // the entries on the resulting diagonal are correct. template bool BlockLanczosSolver::test_mul_SST (int n) const { commentator().start ("Testing addin", "test_mulTranspose"); bool ret = true; commentator().stop (MSG_STATUS (ret), NULL, "test_mulTranspose"); return ret; } // Same as test_compute_Winv_S_mul above, but zero out every other column using // the method for test_mul_SST template bool BlockLanczosSolver::test_mul_ABSST (int n) const { commentator().start ("Testing addin", "test_mulTranspose"); bool ret = true; commentator().stop (MSG_STATUS (ret), NULL, "test_mulTranspose"); return ret; } // Compute a random dense matrix and two random vectors, and check that = template bool BlockLanczosSolver::test_mulTranspose (int m, int n) const { commentator().start ("Testing mulTranspose, m-v mul", "test_mulTranspose"); Matrix A (m, n); typename Vector::Dense x (m), y (n); typename Vector::Dense ATx (n), Ay (m); Element ATxy, xAy; bool ret = true; RandomDenseStream stream (_field, _randiter, n); typename Matrix::RowIterator i = A.rowBegin (); for (; i != A.rowEnd (); ++i) stream >> *i; std::ostream &report = commentator().report (Commentator::LEVEL_UNIMPORTANT, INTERNAL_DESCRIPTION); report << "Computed A:" << std::endl; _MD.write (report, A); RandomDenseStream stream1 (_field, _randiter, m); stream1 >> x; RandomDenseStream stream2 (_field, _randiter, n); stream1 >> y; report << "Computed x: "; _VD.write (report, x) << std::endl; report << "Computed y: "; _VD.write (report, y) << std::endl; _MD.vectorMul (ATx, transpose (A), x); report << "Computed A^T x: "; _VD.write (report, ATx) << std::endl; _MD.vectorMul (Ay, A, y); report << "Computed Ay: "; _VD.write (report, Ay) << std::endl; _VD.dot (ATxy, ATx, y); report << "Computed ATxy: "; _field.write (report, ATxy) << std::endl; _VD.dot (xAy, x, Ay); report << "Computed xAy: "; _field.write (report, xAy) << std::endl; if (!_field.areEqual (ATxy, xAy)) { commentator().report (Commentator::LEVEL_IMPORTANT, INTERNAL_ERROR) << "ERROR: != " << std::endl; ret = false; } commentator().stop (MSG_STATUS (ret), NULL, "test_mulTranspose"); return ret; } // Same as test_mul_SST, but using mulTranspose template bool BlockLanczosSolver::test_mulTranspose_ABSST (int n) const { commentator().start ("Testing addin_ABSST", "test_mulTranspose_ABSST"); bool ret = true; commentator().stop (MSG_STATUS (ret), NULL, "test_mulTranspose_ABSST"); return ret; } // Same as test_mul_ABSST, but using mulin_ABSST template bool BlockLanczosSolver::test_mulin_ABSST (int n) const { commentator().start ("Testing addin_ABSST", "test_mulin_ABSST"); bool ret = true; commentator().stop (MSG_STATUS (ret), NULL, "test_mulin_ABSST"); return ret; } // Same as test_addin, but using test_addin_ABSST template bool BlockLanczosSolver::test_addin_ABSST (int n) const { commentator().start ("Testing addin_ABSST", "test_addin_ABSST"); bool ret = true; commentator().stop (MSG_STATUS (ret), NULL, "test_addin_ABSST"); return ret; } template bool BlockLanczosSolver::runSelfCheck () const { bool ret = true; commentator().start ("Running self check", "runSelfCheck", 10); if (!test_compute_Winv_S_mul (_block)) ret = false; if (!test_compute_Winv_S_mulin (_block)) ret = false; if (!test_mul_SST (_block)) ret = false; if (!test_mul_ABSST (_block)) ret = false; if (!test_mulTranspose (_block * 10, _block)) ret = false; if (!test_mulTranspose_ABSST (_block)) ret = false; if (!test_mulin_ABSST (_block)) ret = false; if (!test_addin_ABSST (_block)) ret = false; commentator().stop (MSG_STATUS (ret), NULL, "runSelfCheck"); return ret; } } // namespace LinBox #endif // __LINBOX_block_lanczos_INL // vim:sts=8:sw=8:ts=8:noet:sr:cino=>s,f0,{0,g0,(0,:0,t0,+0,=s // Local Variables: // mode: C++ // tab-width: 8 // indent-tabs-mode: nil // c-basic-offset: 8 // End: linbox-1.3.2/linbox/algorithms/block-massey-domain.h000066400000000000000000000565471176453053400225140ustar00rootroot00000000000000 /* linbox/algorithms/block-massey-domain.h * Copyright (C) 2002 Pascal Giorgi * * Written by Pascal Giorgi pascal.giorgi@lirmm.fr * * ========LICENCE======== * This file is part of the library LinBox. * * LinBox is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ========LICENCE======== */ #ifndef __LINBOX_massey_block_domain_H #define __LINBOX_massey_block_domain_H #include #include #include #include "linbox/util/commentator.h" #include "linbox/util/timer.h" #include "linbox/field/unparametric.h" #include "linbox/matrix/matrix-domain.h" #include "linbox/matrix/blas-matrix.h" #include "linbox/matrix/factorized-matrix.h" #include "linbox/algorithms/blas-domain.h" #include "linbox/algorithms/sigma-basis.h" #include "linbox/util/timer.h" //#define __CHECK_RESULT //#define __DEBUG_MAPLE //#define __CHECK_LOOP //#define __PRINT_MINPOLY //#define __CHECK_DISCREPANCY //#define __CHECK_TRANSFORMATION //#define __CHECK_SIGMA_RESULT //#define __PRINT_SEQUENCE #define _BM_TIMING namespace LinBox { #define DEFAULT_EARLY_TERM_THRESHOLD 20 /** Compute the linear generator of a sequence of matrices. * * This class encapsulates the functionality required for computing * the block minimal polynomial of a matrix. * @bib * Giorgi, Jeannerod Villard algorithm from ISSAC'03 */ template class BlockMasseyDomain { public: typedef _Field Field; typedef typename Field::Element Element; typedef _Sequence Sequence; typedef BlasMatrix Coefficient; private: Sequence *_container; Field _field; BlasMatrixDomain _BMD; MatrixDomain _MD; unsigned long EARLY_TERM_THRESHOLD; public: #ifdef _BM_TIMING mutable Timer ttGetMinPoly; mutable Timer tGetMinPoly; mutable Timer ttNewDiscrepancy; mutable Timer tNewDiscrepancy; mutable Timer ttShiftSigma; mutable Timer tShiftSigma; mutable Timer ttApplyPerm; mutable Timer tApplyPerm; mutable Timer ttUpdateSigma; mutable Timer tUpdateSigma; mutable Timer ttInverseL; mutable Timer tInverseL; mutable Timer ttGetPermutation; mutable Timer tGetPermutation; mutable Timer ttLQUP; mutable Timer tLQUP; mutable Timer ttDiscrepancy; mutable Timer tDiscrepancy; mutable Timer ttGetCoeff; mutable Timer tGetCoeff; mutable Timer ttCheckSequence; mutable Timer tCheckSequence; mutable Timer ttSetup; mutable Timer tSetup; mutable Timer ttMBasis; mutable Timer tMBasis; mutable Timer ttUpdateSerie; mutable Timer tUpdateSerie; mutable Timer ttBasisMultiplication; mutable Timer tBasisMultiplication; mutable Timer ttCopyingData; mutable Timer tCopyingData; mutable Timer Total; void clearTimer() { ttGetMinPoly.clear(); ttNewDiscrepancy.clear(); ttShiftSigma.clear(); ttApplyPerm.clear(); ttUpdateSigma.clear(); ttInverseL.clear(); ttGetPermutation.clear(); ttLQUP.clear(); ttDiscrepancy.clear(); ttGetCoeff.clear(); ttCheckSequence.clear(); ttSetup.clear(); ttMBasis.clear(); ttUpdateSerie.clear(); ttBasisMultiplication.clear(); ttCopyingData.clear(), Total.clear(); } void print(Timer& T, const char* timer, const char* title) { if (&T != &Total) Total+=T; if (T.count() > 0) { std::cout< &Mat, unsigned long ett_default = DEFAULT_EARLY_TERM_THRESHOLD) : _container(Mat._container), _field(Mat._field), _BMD(Mat._field), _MD(Mat._field), EARLY_TERM_THRESHOLD (ett_default) { #ifdef _BM_TIMING clearTimer(); #endif } BlockMasseyDomain (Sequence *D, unsigned long ett_default = DEFAULT_EARLY_TERM_THRESHOLD) : _container(D), _field(D->getField ()), _BMD(D->getField ()), _MD(D->getField ()), EARLY_TERM_THRESHOLD (ett_default) { #ifdef _BM_TIMING clearTimer(); #endif } // field of the domain const Field &getField () const { return _field; } // sequence of the domain Sequence *getSequence () const { return _container; } // left minimal generating polynomial of the sequence void left_minpoly (std::vector &P) { masseyblock_left(P); } void left_minpoly_rec (std::vector &P) { masseyblock_left_rec(P); } // left minimal generating polynomial of the sequence, keep track on degree void left_minpoly (std::vector &phi, std::vector °ree) { degree = masseyblock_left(phi); } void left_minpoly_rec (std::vector &P, std::vector °ree) { degree = masseyblock_left_rec(P); } // right minimal generating polynomial of the sequence void right_minpoly (std::vector &P) { masseyblock_right(P);} private: template void write_maple(const Field& F, const std::vector & P) { std::cout<<"Matrix(["; for (size_t i=0;i< P[0].rowdim();++i){ std::cout<<"["; for (size_t j=0;j< P[0].coldim();++j){ F.write(std::cout,P[0].getEntry(i,j)); for (size_t k=1;k masseyblock_left (std::vector &P) { #ifdef _BM_TIMING tSetup.clear(); tSetup.start(); #endif const size_t length = _container->size (); const size_t m = _container->rowdim(); const size_t n = _container->coldim(); // ==================================================== // Sequence and iterator initialization // ==================================================== // Initialization of the sequence iterator typename Sequence::const_iterator _iter (_container->begin ()); // Reservation of memory for the entire sequence std::vector S (length,Coefficient(m,n)); //std::vector S (length); //,Coefficient(m,n)); Coefficient Unit(m+n,m); const Coefficient Zero(m+n,m); Element one,zero,mOne; _field.init(one,1L); _field.init(zero,0L); _field.init(mOne,-1L); for (size_t i=0;i SigmaBase(1, Unit); // initialization of order of sigma base's rows std::vector order(m+n,1); for (size_t i=0;i degree(m+n,0); for (size_t i=0;i Perm1(m+n); for (size_t i=0;i=2) { for (size_t i=0;i BPerm1(Perm1); #ifdef _BM_TIMING tGetPermutation.stop(); ttGetPermutation += tGetPermutation; tApplyPerm.clear(); tApplyPerm.start(); #endif // Discrepancy= BPerm1.Discrepancy _BMD.mulin_right(BPerm1,Discrepancy); #ifdef _BM_TIMING tApplyPerm.stop(); ttApplyPerm += tApplyPerm; tLQUP.clear(); tLQUP.start(); #endif #ifdef __CHECK_DISCREPANCY std::ostream& report = commentator().report (Commentator::LEVEL_IMPORTANT, INTERNAL_DESCRIPTION); report<<"Discrepancy"< Pp (CopyDiscr.coldim()); BlasPermutation Qt (CopyDiscr.rowdim()); LQUPMatrix LQUP(_field, CopyDiscr,Pp,Qt); #ifdef _BM_TIMING tLQUP.stop(); ttLQUP += tLQUP; #endif // Get the matrix L of LQUP decomposition TriangularBlasMatrix L(_field,m+n,m+n, LinBoxTag::Lower, LinBoxTag::Unit ); LQUP.getL(L); // Get the tranposed permutation of Q from LQUP // BlasPermutation Qt=LQUP.getQ(); #ifdef _BM_TIMING tGetPermutation.clear(); tGetPermutation.start(); #endif // Computation of permutations BPerm2 such that the last n rows of BPerm2.Qt.Discrepancy are non zero. std::vector Perm2(m+n); for (size_t i=0;i BPerm2(Perm2); #ifdef _BM_TIMING tGetPermutation.stop(); ttGetPermutation += tGetPermutation; tInverseL.clear(); tInverseL.start(); #endif // compute the inverse of L TriangularBlasMatrix invL (_field,m+n,m+n, LinBoxTag::Lower,LinBoxTag::Unit); FFPACK::trinv_left((typename Field::Father_t)_field,m+n,L.getPointer(),L.getStride(),invL.getWritePointer(),invL.getStride()); #ifdef _BM_TIMING tInverseL.stop(); ttInverseL += tInverseL; #endif #ifdef __CHECK_TRANSFORMATION report<<"invL"< UF(0); BlasMatrixDomain > BMDUF(UF); BMDUF.mulin_right(Qt,order); BMDUF.mulin_right(BPerm2,order); BMDUF.mulin_right(BPerm1,degree); BMDUF.mulin_right(Qt,degree); BMDUF.mulin_right(BPerm2,degree); for (size_t i=m;imax_degree) max_degree=degree[i]; } size_t size=SigmaBase.size(); if (SigmaBase.size()<= (size_t)max_degree) { SigmaBase.resize(size+1,Zero); //report << size << std::endl; size++; } //report << "size going in" << size << std::endl; for (int i= (int)size-2;i>=0;i--) for (size_t j=0;j;"<;"< NN+1)? NN+1: SigmaBase.size(); for (size_t i=min_t - 1 ; i trU(U,LinBoxTag::Upper,LinBoxTag::NonUnit); LQUP.getU(trU); //Discrepancy=U; // BlasPermutation Pp= LQUP.getP(); _BMD.mul(Discrepancy,trU, Pp); _BMD.mulin_right(BPerm2,Discrepancy); #ifdef _BM_TIMING tNewDiscrepancy.stop(); ttNewDiscrepancy+=tNewDiscrepancy; // timer in the loop tGetCoeff.clear(); tGetCoeff.start(); #endif } std::ostream& report = commentator().report (Commentator::LEVEL_IMPORTANT, INTERNAL_DESCRIPTION); if ( early_stop == EARLY_TERM_THRESHOLD) report<<"Early termination is used: stop at "<max) max=degree[i]; } //P = std::vector (max+1); P.clear(); Coefficient tmp(m,m); P.resize(max+1, tmp); //for (long i=0;i< max+1;++i) // P[i]=tmp; for (size_t i=0;i deg(m); for (size_t i=0;i masseyblock_left_rec (std::vector &P) { #ifdef __CHECK_RESULT std::ostream& report = commentator().report (Commentator::LEVEL_IMPORTANT, INTERNAL_DESCRIPTION); #endif // Get information of the Sequence (U.A^i.V) size_t length = _container->size(); size_t m, n; m = _container->rowdim(); n = _container->coldim(); // Set some useful constant Element one; _field.init(one,1UL); const Coefficient Zero(2*m,2*m); // Make the Power Serie from Sequence (U.A^i.V) and Identity //_container->recompute(); // make sure sequence is already computed std::vector PowerSerie(length); typename Sequence::const_iterator _iter (_container->begin ()); for (size_t i=0;i< length; ++i, ++_iter){ Coefficient value(2*m,n); PowerSerie[i] = value; for (size_t j=0;jrecompute(); typename Sequence::const_iterator _ptr (_container->begin ()); for (size_t i=0;i< length; ++i, ++_ptr){ PowerSerie[i] = *_ptr; } bool valid=true; for (size_t i=0;i< length - P.size();++i){ Coefficient res(m,n); Coefficient Power(PowerSerie[i],0,0,m,n); _BMD.mul(res,P[0],Power); for (size_t k=1,j=i+1;k degree(m); for (size_t i=0;is,f0,{0,g0,(0,:0,t0,+0,=s // Local Variables: // mode: C++ // tab-width: 8 // indent-tabs-mode: nil // c-basic-offset: 8 // End: linbox-1.3.2/linbox/algorithms/block-wiedemann.h000066400000000000000000000146271176453053400217060ustar00rootroot00000000000000/* linbox/algorithms/block-wiedemann.h * Copyright (C) 2004 Pascal Giorgi * * Written by Pascal Giorgi pascal.giorgi@ens-lyon.fr * modified by Pascal Giorgi (pascal.giorgi@lirmm.fr) 2011 * ========LICENCE======== * This file is part of the library LinBox. * * LinBox is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ========LICENCE======== */ #ifndef __LINBOX_block_wiedemann_H #define __LINBOX_block_wiedemann_H #include #include "linbox/integer.h" #include "linbox/matrix/blas-matrix.h" #include "linbox/algorithms/blas-domain.h" #include "linbox/algorithms/blackbox-block-container.h" #include "linbox/algorithms/block-massey-domain.h" #include "linbox/vector/vector-domain.h" #include "linbox/blackbox/transpose.h" #include "linbox/util/error.h" #include "linbox/util/debug.h" namespace LinBox { template class BlockWiedemannSolver{ public: typedef _Field Field; typedef typename Field::Element Element; typedef typename Field::RandIter RandIter; typedef std::vector Vector; typedef BlasMatrix Block; protected: Field _field; BlasMatrixDomain _BMD; VectorDomain _VDF; RandIter _rand; public: BlockWiedemannSolver (const Field &F) : _field(F), _BMD(F), _VDF(F), _rand(F) {} BlockWiedemannSolver (const Field &F, const RandIter &rand) : _field(F), _BMD(F), _VDF(F), _rand(rand) {} template Vector &solveNonSingular (Vector &x, const Blackbox &B, const Vector &y) const { Transpose A(B); size_t m,n; m = A.rowdim(); n = A.coldim(); size_t p,q; integer tmp; tmp = m; p = tmp.bitsize()-1; //p=sqrt(tmp); tmp = n; q = tmp.bitsize()-1; //q=sqrt(tmp); std::cout<<"row block: "< > Sequence (&A,_field,U,V); BlockMasseyDomain > > MBD(&Sequence); std::vector minpoly; std::vector degree; MBD.left_minpoly_rec(minpoly,degree); MBD.printTimer(); size_t idx=0; if ( _field.isZero(minpoly[0].getEntry(0,0))) { size_t i=1; while ( _field.isZero(minpoly[0].getEntry(i,0))) ++i; if (i == m) throw LinboxError(" block minpoly: matrix seems to be singular - abort"); else idx=i ; } bool classic = true; if ( classic) { /* * Compute the solution according to the polynomial combination * given by each column of the idx-th row of MinPoly such that the constant term of * the first element in this row is non zero. * we use y and UA as projection (UA= U.A) */ size_t deg = degree[idx]; std::vector combi(p,Vector(deg+1)); for (size_t i=0;i 0;--i) { _VDF.axpy (lhs, combi[0][i], y, lhsbis); A.applyTranspose (lhsbis, lhs); } Vector accu (lhs); for (size_t k=1;k= 0;--i) { _VDF.axpy (lhs, combi[k][i], row, lhsbis); A.applyTranspose (lhsbis, lhs); } _VDF.addin(accu,lhs); } Element scaling; _field.init(scaling); _field.neg(scaling,combi[0][0]); _field.invin(scaling); _VDF.mul(x,accu,scaling); } else { /* * Compute the solution according to the polynomial combination * given by the product of the idx-th row of MinPoly and UA. * this should decrease the number of sparse apply but increase memory requirement. */ size_t deg = degree[idx]; Block idx_poly(deg+1,p-1); for (size_t i=0;i= 0;--i) { for (size_t j=0;j 0;--i) { _VDF.axpy (lhs,minpoly[i].getEntry(idx,0) , y, lhsbis); A.applyTranspose (lhsbis, lhs); } _VDF.addin(accu,lhs); Element scaling; _field.init(scaling); _field.neg(scaling,minpoly[0].getEntry(idx,0)); _field.invin(scaling); _VDF.mul(x,accu,scaling); } return x; } }; // end of class BlockWiedemannSolver }// end of namespace LinBox #endif //__LINBOX_block_wiedemann_H // vim:sts=8:sw=8:ts=8:noet:sr:cino=>s,f0,{0,g0,(0,:0,t0,+0,=s // Local Variables: // mode: C++ // tab-width: 8 // indent-tabs-mode: nil // c-basic-offset: 8 // End: linbox-1.3.2/linbox/algorithms/bm-seq.h000066400000000000000000000452331176453053400200300ustar00rootroot00000000000000 /* linbox/algorithms/bm-seq.h * Copyright (C) 2008 George Yuhasz * * Written by George Yuhasz gyuhasz@math.ncsu.edu * * ========LICENCE======== * This file is part of the library LinBox. * * LinBox is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ========LICENCE======== */ #ifndef __BM_SEQ_H #define __BM_SEQ_H //Preprocessor variables for the state of BM_iterators #define DeltaExceeded 4 #define SequenceExceeded 3 #define GeneratorFound 2 #define GeneratorUnconfirmed 1 #include #include #include #include "linbox/util/timer.h" #include "linbox/matrix/matrix-domain.h" namespace LinBox { template class BM_Seq { public: typedef _Field Field; typedef BlasMatrix value_type; typedef typename std::list::const_iterator const_iterator; typedef int size_type; private: Field& _field; std::list _seq; size_type _size; size_t _row, _col; public: BM_Seq(Field& F, size_t r, size_t c) : _field(F) { _row = r; _col = c; _size = 0; } BM_Seq(Field& F, size_t r) : _field(F) { _row = r; _col = r; _size = 0; } BM_Seq(int n, value_type& M) : _field(M.field()), _seq(n, M), _size(n) { _row = M.rowdim(); _col = M.coldim(); } BM_Seq() {} BM_Seq(const BM_Seq& S) : _field(S._field), _seq(S._seq), _size(S._size), _row(S._row), _col(S._col) {} BM_Seq & operator=(const BM_Seq& S) { if(this != &S){ (*this)._size = S._size; (*this)._row = S._row; (*this)._col = S._col; (*this)._field = S._field; _seq.clear(); for(typename std::list::const_iterator it = S._seq.begin(); it != S._seq.end(); it++) _seq.push_back(*it); } return *this; } Field& field() { return _field; } size_t rowdim() { return _row; } size_t coldim() { return _col; } const_iterator begin() const { return _seq.begin(); } const_iterator end() const { return _seq.end(); } void push_back(const value_type &M) { if(_row==M.rowdim() && _col==M.coldim()){ _seq.push_back(M); _size++; } } bool operator==(const BM_Seq& l) { typename std::list::const_iterator it, lit; bool test = false; if(_size==l._size && _row==l._row && _col==l._col){ test = true; MatrixDomain MD(_field); it = _seq.begin(); lit = l._seq.begin(); if(_size==0){ return test; } else{ while(test && it!=_seq.end()){ test = MD.areEqual(*it,*lit); it++; lit++; } } } return test; } bool operator!=(const BM_Seq& l) { return !(*this == l); } size_type size() { return _size; } class BM_iterator { public: typedef std::list::value_type> value_type; private: typedef typename BM_Seq::value_type matrix_type; Field& _field; BM_Seq& _seq; typename BM_Seq::size_type _size; typename BM_Seq::size_type _t; typename BM_Seq::const_iterator _seqel; std::list _gen; std::vector _deg; int _delta; int _mu; int _beta; int _sigma; int _gensize; size_t _row, _col; public: // This is an enumeration class that tells what state the berlekamp/massey algoithm iterator is in. // The four states are: // DeltaExceeded = 4 // SequenceExceeded = 3 // GeneratorFound = 2 // GeneratorUnconfirmed = 1 class TerminationState{ private: int _state; friend class BM_iterator; TerminationState() : _state(GeneratorUnconfirmed) {} TerminationState(int m) : _state(m) {} public: TerminationState(const TerminationState& t) : _state(t._state) {} TerminationState & operator=(const TerminationState & t){ if(this != &t){ (*this)._state = t._state; } return *this; } bool IsGeneratorUnconfirmed(){ return _state==GeneratorUnconfirmed; } bool IsGeneratorFound() { return _state==GeneratorFound; } bool IsSequenceExceeded() { return _state==SequenceExceeded; } bool IsDeltaExceeded() { return _state==DeltaExceeded; } }; private: TerminationState _state; public: TerminationState state() const { return _state; } void setDelta(int d) { _delta=d; if((_delta < 0 || _beta < _delta - _sigma + _mu +1) && _state._state!=3){ if(_sigma <= _delta || _delta < 0) _state._state = GeneratorUnconfirmed; else _state._state = DeltaExceeded; } else{ if(_sigma > _delta) _state._state = DeltaExceeded; else _state._state = GeneratorFound; } } //Constructor explicit BM_iterator(BM_Seq& s, typename BM_Seq::size_type elinit=0) : _field(s.field()), _seq(s) { _row = s.rowdim(); _col = s.coldim(); _size = _seq.size(); _t = elinit; _delta = -1; _seqel = _seq.begin(); _deg = std::vector(_row+_col); for(size_t i = _col; i < _row+_col; i++) _deg[i] = 1; typename Field::Element one; _field.init(one,1); matrix_type gen1(_field,_col,_row+_col); for(size_t i = 0; i<_col; i++) gen1.setEntry(i,i,one); _gen.push_back(gen1); _gensize = 1; if(_size==0 || _t==_size) _state._state = SequenceExceeded; _sigma = 0; _mu = 0; _beta = 1; } //Copy constructor BM_iterator(const BM_Seq::BM_iterator & it) : _field(it._field), _seq(it._seq), _size(it._size), _t(it._t), _seqel(it._seqel), _gen(it._gen), _deg(it._deg), _delta(it._delta), _mu(it._mu), _beta(it._beta), _sigma(it._sigma), _gensize(it._gensize), _row(it._row), _col(it._col), _state(it._state) {} //Assignment operator not overloaded since BlasMatrix class has overloaded assignment error //Overloaded assignment operator BM_iterator& operator=(const typename BM_Seq::BM_iterator& it) { if(this != &it){ (*this)._field = it._field; (*this)._row = it._row; (*this)._col = it._col; (*this)._seq = it._seq; (*this)._size = it._size; (*this)._t = it._t; (*this)._seqel = it._seqel; (*this)._deg = it._deg; (*this)._gensize = it._gensize; (*this)._delta = it._delta; (*this)._mu = it._mu; (*this)._sigma = it._sigma; (*this)._beta = it._beta; (*this)._state = it._state; _gen.clear(); for(typename std::list::const_iterator git = it._gen.begin(); git != it._gen.end(); git++) _seq.push_back(*git); } return (*this); } bool operator==(const BM_Seq::BM_iterator& it) { TerminationState check = it.state(); bool test1 = (_seq==it._seq); bool test2 = (_t==it._t); bool test3 = _delta==it._delta; bool test4 = (_state._state == check._state && _state.IsSequenceExceeded()); return (test1 && test2 && (test3 || test4)); } bool operator!=(const BM_iterator& it) { return !((*this) == it); } private: // Column Copy template void ColumnCopy(Matrix &M, const Matrix &A, size_t i) { size_t rowd = A.rowdim(); for(size_t j = 0; j void ColumnSwap(Matrix &M, size_t i, size_t j) { typename Matrix::Field F = M.field(); typename Matrix::Element t; F.init(t,0); size_t rowd = M.rowdim(); for(size_t k = 0; k < rowd; k++){ F.assign(t,M.getEntry(k,i)); M.setEntry(k,i,M.getEntry(k,j)); M.setEntry(k,j,t); } } // Column Operation template void ColumnAdd(Matrix &M, size_t i, size_t j, typename Matrix::Element el) { typename Matrix::Field F = M.field(); typename Matrix::Element t; F.init(t,0); size_t rowd = M.rowdim(); for (size_t k=0; k Matrix Algorithm3dot2(Matrix &D, std::vector &d, int &mu, int &sigma, int &beta) { typename Matrix::Field F = D.field(); typename Matrix::Element one, pivel; F.init(one, 1); F.init(pivel,0); // Retrieve the row and column dimensions of the sequence and the dimension of the discrepancy size_t n = D.rowdim(); size_t nm = D.coldim(); size_t m = nm-n; //Initialize tau to the identity matrix Matrix tau(F,nm,nm); for(size_t i = 0; i gen; typedef std::set::key_type index_type; for(index_type i=0; i pi; pi.insert(m+i); for(typename std::set::iterator genit = gen.begin(); genit != gen.end(); genit++){ if(!F.isZero(D.getEntry(i,*genit))) pi.insert(*genit); } //Choose the pivot row with the smallest nominal degree index_type piv = m+i; for(std::set::iterator itpi = pi.begin(); itpi != pi.end(); itpi++){ size_t j = *itpi; if(d[j] <= d[piv]){ if(d[j]==d[piv]){ if(piv < m+i){ if(j::iterator itpi = pi.begin(); itpi != pi.end(); itpi++){ typename Matrix::Element temp; F.init(temp,D.getEntry(i, *itpi)); F.negin(temp); F.divin(temp,pivel); ColumnAdd(tau, *itpi, piv, temp); ColumnAdd(D, *itpi, piv, temp); } } else{ //Remove column index m+i and handle it separately pi.erase(m+i); //Eliminate nonzero discrepancies in generator columns for(typename std::set::iterator itpi = pi.begin(); itpi != pi.end(); itpi++){ typename Matrix::Element temp; F.init(temp,D.getEntry(i, *itpi)); F.negin(temp); F.divin(temp,pivel); ColumnAdd(tau, *itpi, piv, temp); ColumnAdd(D, *itpi, piv, temp); } typename Matrix::Element auxel; F.init(auxel,D.getEntry(i,m+i)); //Perform a major change and update an initialized auxiliary column if(!F.isZero(auxel)){ typename Matrix::Element temp; F.init(temp,D.getEntry(i, m+i)); F.negin(temp); F.divin(temp,pivel); ColumnAdd(tau, m+i, piv, temp); ColumnAdd(D, m+i, piv, temp); ColumnSwap(tau,piv, m+i); ColumnSwap(D, piv, m+i); } else{ ColumnAdd(tau,m+i,piv,one); ColumnAdd(D,m+i,piv,one); gen.erase(piv); } int tempdeg = d[piv]; d[piv] = d[m+i]; d[m+i] = tempdeg; if(tempdeg < beta) beta = tempdeg; if(d[piv] > mu) mu = d[piv]; sigma = sigma - tempdeg + d[piv]; } } return tau; } public: BM_iterator& operator++() { //See if a matrix has been pushed on the sequence //if it has, then recompute the seqel since it may //have become corrupt. //Also reset the size to the correct size of the sequence if(_size < _seq.size()){ _seqel = _seq.begin(); for(int i = 0; i<_t; i++) _seqel++; _size = _seq.size(); } //if the iterator points past the seq elements, do nothing if(_t == _size){ return *this; } //Initialize the discrepancy matrix_type disc(_field,_row, _row+_col); //Create two iterators, one for seq, and one for gen typename BM_Seq::const_iterator cseqit; typename std::list::iterator genit; //get a iterator to the seq element to be processed cseqit = _seqel; //Create a matrix domain for addition and multiplication MatrixDomain MD(_field); //Compute the discrepancy for(genit = _gen.begin(); genit!=_gen.end(); genit++){ MD.axpyin(disc,*cseqit,*genit); cseqit--; } //Compute tau with Algorith3.2 matrix_type tau(Algorithm3dot2(disc, _deg, _mu, _sigma, _beta)); //Multiply tau into each matrix in the generator for(genit = _gen.begin(); genit!=_gen.end(); genit++){ MD.mulin(*genit,tau); } //Increment the auxiliary degrees and beta for(size_t j = _col; j <_row+_col; j++) _deg[j]++; _beta++; //Add a zero matrix to the end of the generator if needed. int tmax = _deg[0]; for(size_t j = 1; j<_row+_col; j++) if(tmax < _deg[j]) tmax = _deg[j]; if(tmax+1 > _gensize){ _gen.push_back(matrix_type(_field,_col,_row+_col)); _gensize++; } //Mimic multiplication be z in the auxiliary columns typename std::list::reverse_iterator g1,g2; g1 = _gen.rbegin(); g2 = _gen.rbegin(); g1++; while(g1!=_gen.rend()){ for(size_t k = _col; k < _row+_col; k++){ ColumnCopy(*g2,*g1,k); } g1++; g2++; } genit = _gen.begin(); matrix_type z1(_field,_col,_row+_col); for(size_t k = _col; k < _row+_col; k++) ColumnCopy(*genit, z1,k); //Increment the t and seqel to the next element _t++; _seqel++; //Update the state if(_delta < 0 || _beta < _delta - _sigma + _mu +1){ if(_t == _size) _state._state = SequenceExceeded; else{ if(_sigma > _delta && _delta >= 0) _state._state = DeltaExceeded; else _state._state = GeneratorUnconfirmed; } } else{ if(_sigma > _delta) _state._state = DeltaExceeded; else _state._state = GeneratorFound; } return *this; } BM_iterator operator++(int) { //Create a copy of this BM_iterator temp(*this); //See if a matrix has been pushed on the sequence //if it has, then recompute the seqel since it may //have become corrupt. //Also reset the size to the correct size of the sequence if(_size < _seq.size()){ _seqel = _seq.begin(); for(int i = 0; i<_t; i++) _seqel++; _size = _seq.size(); } //if the iterator points past the seq elements, do nothing if(_t == _size){ return *this; } //Initialize the discrepancy matrix_type disc(_field,_row, _row+_col); //Create two iterators, one for seq, and one for gen typename BM_Seq::const_iterator cseqit; typename std::list::iterator genit; //get an iterator to the seq element to be processed cseqit = _seqel; //Create a matrix domain for addition and multiplication MatrixDomain MD(_field); //Compute the discrepancy for(genit = _gen.begin(); genit!=_gen.end(); genit++, cseqit--){ MD.axpyin(disc,*cseqit,*genit); } // cost: k*n^3 (nxn matrix muladds where k is current generator length) // is a reductive addition over independent muls. //Compute tau with Algorith3.2 matrix_type tau(Algorithm3dot2(disc, _deg, _mu, _sigma, _beta)); // cost: n^3 for elim on n x about 2n //Multiply tau into each matrix in the generator for(genit = _gen.begin(); genit!=_gen.end(); genit++){ MD.mulin(*genit,tau); } // cost: k*n^3 (nxn matrix muls where k is current generator length) // is k independent muls with a shared mat tau. //Increment the auxiliary degrees and beta for(size_t j = _col; j <_row+_col; j++) _deg[j]++; _beta++; //Add a zero matrix to the end of the generator if needed. int tmax = _deg[0]; for(size_t j = 1; j<_row+_col; j++) if(tmax < _deg[j]) tmax = _deg[j]; if(tmax+1 > _gensize){ _gen.push_back(matrix_type(_field,_col,_row+_col)); _gensize++; } //Mimic multiplication by z in the auxiliary columns typename std::list::reverse_iterator g1,g2; g1 = _gen.rbegin(); g2 = _gen.rbegin(); g1++; while(g1!=_gen.rend()){ for(size_t k = _col; k < _row+_col; k++){ ColumnCopy(*g2,*g1,k); } g1++; g2++; } genit = _gen.begin(); matrix_type z1(_field,_col,_row+_col); for(size_t k = _col; k < _row+_col; k++) ColumnCopy(*genit, z1,k); //Increment the t and seqel to the next element _t++; _seqel++; //Update the state if(_delta < 0 || _beta < _delta - _sigma + _mu +1){ if(_t == _size) _state._state = SequenceExceeded; else{ if(_sigma > _delta && _delta >= 0) _state._state = DeltaExceeded; else _state._state = GeneratorUnconfirmed; } } else{ if(_sigma > _delta) _state._state = DeltaExceeded; else _state._state = GeneratorFound; } return temp; } //return a reference to the current generator, in its algorithmic reversed form value_type& operator*() { return _gen; } //overload the pointer operator value_type* operator->() { return &_gen; } //Return a vector representing the reversal, by nominal degree, of the current generator std::vector GetGenerator() { std::vector revgen(_mu+1, matrix_type(_field,_col,_col)); for(size_t i = 0; i<_col; i++){ typename std::list::iterator genit = _gen.begin(); for(int j = 0; j < _deg[i]+1; j++){ ColumnCopy(revgen[_deg[i]-j], *genit,i); genit++; } } return revgen; } typename BM_Seq::size_type get_t() { return _t; } int get_mu() { return _mu; } int get_sigma() { return _sigma; } int get_beta() { return _beta; } int get_delta() { return _delta; } }; //return an initialized BM_iterator typename BM_Seq::BM_iterator BM_begin() { return typename BM_Seq::BM_iterator(*this); } //return an initialized BM_iterator that points to one past the end of the sequence typename BM_Seq::BM_iterator BM_end() { return typename BM_Seq::BM_iterator(*this, _size); } /**/ }; } #endif // vim:sts=8:sw=8:ts=8:noet:sr:cino=>s,f0,{0,g0,(0,:0,t0,+0,=s // Local Variables: // mode: C++ // tab-width: 8 // indent-tabs-mode: nil // c-basic-offset: 8 // End: linbox-1.3.2/linbox/algorithms/charpoly-rational.h000066400000000000000000000230741176453053400222730ustar00rootroot00000000000000/* linbox/blackbox/rational-reconstruction-base.h * Copyright (C) 2009 Anna Marszalek * * Written by Anna Marszalek * * ========LICENCE======== * This file is part of the library LinBox. * * LinBox is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ========LICENCE======== */ #ifndef __LINBOX_charpoly_rational_H #define __LINBOX_charpoly_rational_H #include "linbox/util/commentator.h" #include "linbox/util/timer.h" #include "linbox/field/modular.h" //#include "linbox/field/gmp-rational.h" #include "linbox/field/PID-integer.h" #include "linbox/blackbox/rational-matrix-factory.h" #include "linbox/algorithms/cra-early-multip.h" #include "linbox/algorithms/cra-domain.h" //#include "linbox/algorithms/rational-cra.h" #include "linbox/algorithms/rational-reconstruction-base.h" #include "linbox/algorithms/classic-rational-reconstruction.h" #include "linbox/solutions/charpoly.h" #include "linbox/blackbox/compose.h" #include "linbox/blackbox/diagonal.h" namespace LinBox { //typedef GMPRationalField Rationals; //typedef Rationals::Element Quotient; /* * Computes the characteristic polynomial of a rational dense matrix */ template struct MyModularCharpoly{ T1* t1; T2* t2; int switcher; MyModularCharpoly(T1* s1, T2* s2, int s = 1) {t1=s1; t2=s2;switcher = s;} int setSwitcher(int s) {return switcher = s;} template Polynomial& operator()(Polynomial& P, const Field& F) const { if (switcher ==1) { t1->operator()(P,F); } else { t2->operator()(P,F); } return P; } }; template struct MyRationalModularCharpoly { const Blackbox &A; const MyMethod &M; const std::vector &mul;//multiplicative prec; MyRationalModularCharpoly(const Blackbox& b, const MyMethod& n, const std::vector& p) : A(b), M(n), mul(p) {} MyRationalModularCharpoly(MyRationalModularCharpoly& C) : // MyRationalModularCharpoly(C.A,C.M,C.mul) A(C.A),M(C.M),mul(C.mul) {} template Polynomial& operator()(Polynomial& P, const Field& F) const { typedef typename Blackbox::template rebind::other FBlackbox; FBlackbox * Ap; MatrixHom::map(Ap, A, F); charpoly( P, *Ap, typename FieldTraits::categoryTag(), M); typename std::vector::const_iterator it = mul.begin(); typename Polynomial::iterator it_p = P.begin(); for (;it_p !=P.end(); ++it, ++it_p) { typename Field::Element e; F.init(e, *it); F.mulin(*it_p,e); } delete Ap; return P; } }; template struct MyIntegerModularCharpoly { const Blackbox &A; const MyMethod &M; const std::vector &vD;//diagonal div. prec; const std::vector &mul;//multiplicative prec; MyIntegerModularCharpoly(const Blackbox& b, const MyMethod& n, const std::vector& ve, const std::vector& p) : A(b), M(n), vD(ve), mul(p) {} MyIntegerModularCharpoly(MyIntegerModularCharpoly& C) : // MyIntegerModularCharpoly(C.A,C.M,C.vD,C.mul) A(C.A),M(C.M),vD(C.vD),mul(C.mul) {} template Polynomial& operator()(Polynomial& P, const Field& F) const { typedef typename Blackbox::template rebind::other FBlackbox; FBlackbox * Ap; MatrixHom::map(Ap, A, F); typename std::vector::const_iterator it; int i=0; for (it = vD.begin(); it != vD.end(); ++it,++i) { typename Field::Element t,tt; F.init(t,*it); F.invin(t); for (int j=0; j < A.coldim(); ++j) { F.mulin(Ap->refEntry(i,j),t); } } charpoly( P, *Ap, typename FieldTraits::categoryTag(), M); typename std::vector::const_iterator it2 = mul.begin(); typename Polynomial::iterator it_p = P.begin(); for (;it_p !=P.end(); ++it2, ++it_p) { typename Field::Element e; F.init(e, *it2); F.mulin(*it_p,e); } delete Ap; return P; } }; template class Vector, class MyMethod > Vector& rational_charpoly (Vector &p, const BlasMatrix &A, const MyMethod &Met= Method::Hybrid()) { typedef Modular myModular; typedef typename Rationals::Element Quotient; commentator().start ("Rational Charpoly", "Rminpoly"); RandomPrimeIterator genprime( 26-(int)ceil(log((double)A.rowdim())*0.7213475205)); std::vector F(A.rowdim()+1,1); std::vector M(A.rowdim()+1,1); std::vector Di(A.rowdim()); RationalMatrixFactory > FA(&A); Integer da=1, di=1; Integer D=1; FA.denominator(da); for (int i=M.size()-2; i >= 0 ; --i) { //c[m]=1, c[0]=det(A); FA.denominator(di,i); D *=di; Di[i]=di; M[i] = M[i+1]*da; } for (int i=0; i < M.size() ; ++i ) { gcd(M[i],M[i],D); } PID_integer Z; BlasMatrix Atilde(Z,A.rowdim(), A.coldim()); FA.makeAtilde(Atilde); ChineseRemainder< EarlyMultipCRA > > cra(4UL); MyRationalModularCharpoly , MyMethod> iteration1(A, Met, M); MyIntegerModularCharpoly, MyMethod> iteration2(Atilde, Met, Di, M); MyModularCharpoly , MyMethod>, MyIntegerModularCharpoly, MyMethod> > iteration(&iteration1,&iteration2); RReconstruction > RR; std::vector PP; // use of integer due to non genericity of cra. PG 2005-08-04 UserTimer t1,t2; t1.clear(); t2.clear(); t1.start(); cra(2,PP,iteration1,genprime); t1.stop(); t2.start(); cra(2,PP,iteration2,genprime); t2.stop(); if (t1.time() < t2.time()) { //cout << "ratim"; iteration.setSwitcher(1); } else { //cout << "intim"; iteration.setSwitcher(2); } int k=4; while (! cra(k,PP, iteration, genprime)) { k *=2; Integer m; //Integer r; Integer a,b; cra.getModulus(m); cra.result(PP);//need to divide for (int i=0; i < PP.size(); ++i) { Integer D_1; inv(D_1,M[i],m); PP[i] = (PP[i]*D_1) % m; } Integer den,den1; std::vector num(A.rowdim()+1); std::vector num1(A.rowdim()+1); if (RR.reconstructRational(num,den,PP,m,-1)) {//performs reconstruction strating form c[m], use c[i] as prec for c[i-1] cra(1,PP,iteration,genprime); cra.getModulus(m); for (int i=0; i < PP.size(); ++i) { Integer D_1; inv(D_1,M[i],m); PP[i] = (PP[i]*D_1) % m; } bool terminated = true; if (RR.reconstructRational(num1,den1,PP,m,-1)) { if (den==den1) { for (int i=0; i < num.size(); ++i) { if (num[i] != num1[i]) { terminated =false; break; } } } else { terminated = false; } //set p if (terminated) { size_t i =0; integer t,tt,ttt; integer err; // size_t max_err = 0; Quotient qerr; p.resize(PP.size()); typename Vector ::iterator it; Rationals Q; for (it= p.begin(); it != p.end(); ++it, ++i) { A.field().init(*it, num[i],den); Q.get_den(t,*it); if (it != p.begin()) Q.get_den(tt,*(it-1)); else tt = 1; Q.init(qerr,t,tt); } return p; break; } } } } cra.result(PP); size_t i =0; integer t,tt; integer err; size_t max_res=0;int max_i; // double rel; size_t max_resu=0; int max_iu; // size_t max_err = 0; Quotient qerr; p.resize(PP.size()); typename Vector ::iterator it; Rationals Q; for (it= p.begin(); it != p.end(); ++it, ++i) { A.field().init(*it, PP[i],M[i]); Q.get_den(t, *it); Q.get_num(tt,*it); err = M[i]/t; size_t resi = err.bitsize() + tt.bitsize() -1; size_t resu = t.bitsize() + tt.bitsize() -1; if (resi > max_res) {max_res = resi; max_i=i;} if (resu > max_resu) {max_resu = resu; max_iu =i;} //size_t resu = t.bitsize() + tt.bitsize() -1; //if (err.bitsize() > max_err) max_err = err.bitsize(); } max_res=0; for (it= p.begin()+1; it != p.end(); ++it) { //A.field().init(*it, PP[i],M[i]); Q.get_den(t, *it); Q.get_den(tt, *(it-1)); Q.init(qerr,t,tt); Q.get_num(tt, *it); size_t resi = Q.bitsize(t,qerr) + tt.bitsize() -2; if (resi > max_res) {max_res = resi; max_i=i;} //if (err.bitsize() > max_err) max_err = err.bitsize(); } commentator().stop ("done", NULL, "Iminpoly"); return p; } } #endif //__LINBOX_charpoly_rational_H // vim:sts=8:sw=8:ts=8:noet:sr:cino=>s,f0,{0,g0,(0,:0,t0,+0,=s // Local Variables: // mode: C++ // tab-width: 8 // indent-tabs-mode: nil // c-basic-offset: 8 // End: linbox-1.3.2/linbox/algorithms/cia.h000066400000000000000000000100241176453053400173660ustar00rootroot00000000000000/* linbox/algorithms/cia.h * Copyright(C) LinBox * * Written by Clement Pernet * * * ========LICENCE======== * This file is part of the library LinBox. * * LinBox is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ========LICENCE======== *. */ #ifndef __LINBOX_cia_H #define __LINBOX_cia_H #include "linbox/ring/givaro-polynomial.h" #include "linbox/field/modular.h" #include "linbox/randiter/random-prime.h" #include "linbox/matrix/blas-matrix.h" #include "linbox/algorithms/blas-domain.h" #include "linbox/solutions/minpoly.h" namespace LinBox { /*! @ingroup algorithms * Algorithm computing the integer characteristic polynomial * of a dense matrix. * * @bib [Dumas-Pernet-Wan ISSAC05] * * */ template < class Polynomial, class Blackbox > Polynomial& cia (Polynomial & P, const Blackbox & A, const Method::BlasElimination & M) { commentator().start ("Integer Givaro::Dense Charpoly ", "CIA"); typename Blackbox::Field intRing = A.field(); typedef Modular Field; typedef typename Blackbox::template rebind::other FBlackbox; typedef GivPolynomialRing IntPolyDom; typedef GivPolynomialRing FieldPolyDom; typedef typename IntPolyDom::Element IntPoly; typedef typename FieldPolyDom::Element FieldPoly; IntPolyDom IPD(intRing); FieldPoly fieldCharPoly(A.coldim()); /* Computation of the integer minimal polynomial */ IntPoly intMinPoly; minpoly (intMinPoly, A, RingCategories::IntegerTag(), M); /* Factorization over the integers */ std::vector intFactors; std::vector mult; IPD.factor (intFactors, mult, intMinPoly); size_t nf = intFactors.size(); /* One modular characteristic polynomial computation */ RandomPrimeIterator primeg (22); ++primeg; Field F(*primeg); FBlackbox fbb(F, (int)A.rowdim(), (int)A.coldim()); MatrixHom::map(fbb, A); charpoly (fieldCharPoly, fbb, M); /* Determination of the multiplicities */ FieldPolyDom FPD (F); std::vector fieldFactors (nf); integer tmp_convert; // PG 2005-08-04 for (size_t i = 0; i < nf; ++i){ size_t d= intFactors[i]->size(); fieldFactors[i].resize(d); for (size_t j = 0; j < d; ++j) //F.init ((fieldFactors[i])[j], (*intFactors[i])[j]); F.init ((fieldFactors[i])[j], intRing.convert(tmp_convert,(*intFactors[i])[j]));// PG 2005-08-04 } FieldPoly currPol = fieldCharPoly; FieldPoly r,tmp,q; std::vector multip (nf); for (size_t i = 0; i < nf; ++i) { FieldPoly currFact = fieldFactors[i]; r.clear(); int m=0; q=currPol; do{ currPol = q; FPD.divmod (q, r, currPol, currFact); m++; } while (FPD.isZero (r)); multip[i] = m-1; } IntPoly intCharPoly (A.coldim()); intRing.init (intCharPoly[0], 1); for (size_t i = 0; i < nf; ++i){ IPD.pow( P, *intFactors[i], multip[i] ); IPD.mulin( intCharPoly, P ); } for (size_t i = 0; i < nf; ++i) delete intFactors[i]; commentator().stop ("done", NULL, "CIA"); return P = intCharPoly; } } #endif // __LINBOX_cia_H // vim:sts=8:sw=8:ts=8:noet:sr:cino=>s,f0,{0,g0,(0,:0,t0,+0,=s // Local Variables: // mode: C++ // tab-width: 8 // indent-tabs-mode: nil // c-basic-offset: 8 // End: linbox-1.3.2/linbox/algorithms/classic-rational-reconstruction.h000066400000000000000000000174421176453053400251540ustar00rootroot00000000000000/* linbox/blackbox/classic-rational-reconstruction.h * Copyright (C) 2009 Anna Marszalek * * Written by Anna Marszalek * * ========LICENCE======== * This file is part of the library LinBox. * * LinBox is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ========LICENCE======== */ #ifndef __LINBOX_classic_reconstruction_H #define __LINBOX_classic_reconstruction_H #include #include "linbox/algorithms/rational-reconstruction-base.h" namespace LinBox { /* * implements classic rational reconstruction by extended euclidean algorithm, * Wang's bounds [Wang 1981] are used as default */ template class ClassicRationalReconstruction: public RReconstructionBase { protected: const bool _reduce; const bool _recursive; public: const Ring _intRing; typedef typename Ring::Element Element; ClassicRationalReconstruction(const Ring& Z, const bool reduce = true, const bool recursive = false) : RReconstructionBase(Z), _reduce(reduce), _recursive (recursive), _intRing(Z) {} ClassicRationalReconstruction (const ClassicRationalReconstruction& RR): RReconstructionBase(RR._intRing), _reduce(RR._reduce), _recursive(RR._recursive), _intRing(RR._intRing) {} ~ClassicRationalReconstruction() {} //Wang method bool reconstructRational(Element& a, Element& b, const Element& x, const Element& m) const { Element a_bound; _intRing.sqrt(a_bound, m/2); bool res = reconstructRational(a,b,x,m,a_bound); res = res && (b <= a_bound); return res; } bool reconstructRational(Element& a, Element& b, const Element& x, const Element& m, const Element& a_bound) const{ bool res=false; if (x == 0) { a = 0; b = 1; } else { res = ratrecon(a,b,x,m,a_bound); if (_recursive) { for(Element newbound = a_bound + 1; (!res) && (newbound m/2? x-m: x; b = 1; if (a > 0) res = (a < a_bound); else res = (-a < a_bound); } return res; } protected: bool ratrecon(Element& a,Element& b,const Element& x,const Element& m,const Element& a_bound) const { Element r0, t0, q, u; r0=m; t0=0; a=x; b=1; //Element s0,s1; s0=1,s1=0;//test time gcdex; while(a>=a_bound) //while (t0 <= b_bound) { q = r0; _intRing.divin(q,a); // r0/num //++this->C.div_counter; u = a; a = r0; r0 = u; // r0 <-- num _intRing.maxpyin(a,u,q); // num <-- r0-q*num //++this->C.mul_counter; //if (a == 0) return false; u = b; b = t0; t0 = u; // t0 <-- den _intRing.maxpyin(b,u,q); // den <-- t0-q*den //++this->C.mul_counter; //u = s1; //s1 = s0; //s0 = u; //_intRing.maxpyin(s0,u,q); //++this->C.mul_counter; } //if (den < 0) { // _intRing.negin(num); // _intRing.negin(den); //} if ((a>0) && (_reduce)) { // [GG, MCA, 1999] Theorem 5.26 // (ii) Element gg; //++this->C.gcd_counter; if (_intRing.gcd(gg,a,b) != 1) { Element ganum, gar2; for( q = 1, ganum = r0-a, gar2 = r0 ; (ganum >= a_bound) || (gar2C.mul_counter;++this->C.mul_counter; if (t0 < 0) { a = -r0; b = -t0; } else { a = r0; b = t0; } // if (t0 > m/k) { if (abs((double)b) > (double)m/(double)a_bound) { if (!_recursive) { std::cerr << "*** Error *** No rational reconstruction of " << x << " modulo " << m << " with denominator <= " << (m/a_bound) << std::endl; } return false; } if (_intRing.gcd(gg,a,b) != 1) { if (!_recursive) std::cerr << "*** Error *** There exists no rational reconstruction of " << x << " modulo " << m << " with |numerator| < " << a_bound << std::endl << "*** Error *** But " << a << " = " << b << " * " << x << " modulo " << m << std::endl; return false; } } } // (i) if (b < 0) { _intRing.negin(a); _intRing.negin(b); } // std::cerr << "RatRecon End " << num << "/" << den << std::endl; return true; } }; /* * implements classic rational reconstruction by extended euclidean algorithm, * reconstructed pair corresponds to the maximal (or large enough) quotient, see MQRR Alg. of Monagan [Monagan2004] is used */ template class ClassicMaxQRationalReconstruction:public ClassicRationalReconstruction { public: const Ring _intRing; typedef typename Ring::Element Element; ClassicMaxQRationalReconstruction(const Ring& Z, const bool reduce = true, const bool recursive = false) : ClassicRationalReconstruction(Z,reduce,recursive), _intRing(Z) {} ClassicMaxQRationalReconstruction(const ClassicMaxQRationalReconstruction& RR) : ClassicRationalReconstruction(RR), _intRing(RR._intRing) {} ~ClassicMaxQRationalReconstruction() {} bool reconstructRational(Element& a, Element& b, const Element& x, const Element& m) const { bool res = maxEEA(a,b,x,m); return res; } bool reconstructRational(Element& a, Element& b, const Element& x, const Element& m, const Element& a_bound) const{ bool res= false; return res = ClassicRationalReconstruction::reconstructRational(a,b,x,m,a_bound); } protected: bool maxEEA(Element& a, Element& b, const Element& x, const Element& m) const{ Element qmax = 0, amax=x, bmax =1; Element r0, t0, q, u; r0=m; t0=0; a=x; b=1; //Element s0,s; s0=1,s=0;//test time gcdex; Element T = m.bitsize(); int c = 5; //should be changed here to enhance probability of correctness while((a>0) && (r0.bitsize() > T.bitsize() + c)) { q = r0; _intRing.divin(q,a); // r0/num //++this->C.div_counter; if (q > qmax) { amax = a; bmax = b; qmax = q; if (qmax.bitsize() > T.bitsize() + c) break; } u = a; a = r0; r0 = u; // r0 <-- num _intRing.maxpyin(a,u,q); // num <-- r0-q*num //++this->C.mul_counter; //if (a == 0) return false; u = b; b = t0; t0 = u; // t0 <-- den _intRing.maxpyin(b,u,q); // den <-- t0-q*den //++this->C.mul_counter; } a = amax; b = bmax; if (b < 0) { _intRing.negin(a); _intRing.negin(b); } Element gg; _intRing.gcd(gg,a,b); //++this->C.gcd_counter; //if (q > T) //Element T = m.bitsize(); //int c = 20; //T=0;c=0; if (qmax.bitsize() > T.bitsize() + c) { return true; } else return false; //if (gg > 1) return false; //else return true; } }; } #endif //__LINBOX_classic_reconstruction_H // vim:sts=8:sw=8:ts=8:noet:sr:cino=>s,f0,{0,g0,(0,:0,t0,+0,=s // Local Variables: // mode: C++ // tab-width: 8 // indent-tabs-mode: nil // c-basic-offset: 8 // End: linbox-1.3.2/linbox/algorithms/cra-domain-omp.h000066400000000000000000000221631176453053400214440ustar00rootroot00000000000000/* linbox/algorithms/cra-domain-omp.h * Copyright (C) 1999-2010 The LinBox group * * Naive parallel chinese remaindering * Launch NN iterations in parallel, where NN=omp_get_max_threads() * Then synchronization and termintation test. * Time-stamp: <13 Mar 12 13:49:58 Jean-Guillaume.Dumas@imag.fr> * * ========LICENCE======== * This file is part of the library LinBox. * * LinBox is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ========LICENCE======== */ /*! @file algorithms/cra-domain-omp.h * @brief Parallel (OMP) version of \ref CRA * @ingroup CRA */ #ifndef __LINBOX_omp_cra_H #define __LINBOX_omp_cra_H // commentator is not thread safe #define DISABLE_COMMENTATOR #include "linbox/algorithms/cra-domain-seq.h" #include namespace LinBox { template struct ChineseRemainderOMP : public ChineseRemainderSeq { typedef typename CRABase::Domain Domain; typedef typename CRABase::DomainElement DomainElement; typedef ChineseRemainderSeq Father_t; template ChineseRemainderOMP(const Param& b) : Father_t(b) {} ChineseRemainderOMP(const CRABase& b) : Father_t(b) {} template Integer& operator() (Integer& res, Function& Iteration, PrimeIterator& primeiter) { size_t NN = omp_get_max_threads(); //std::cerr << "Blocs: " << NN << " iterations." << std::endl; // commentator().start ("Parallel OMP Modular iteration", "mmcrait"); if (NN == 1) return Father_t::operator()(res,Iteration,primeiter); int coprime =0; int maxnoncoprime = 1000; if (this->IterCounter==0) { std::set coprimeset; while(coprimeset.size() < NN) { ++primeiter; while(this->Builder_.noncoprime(*primeiter) ) { ++primeiter; ++coprime; if (coprime > maxnoncoprime) { std::cout << "you are running out of primes. " << maxnoncoprime << " coprime primes found"; return this->Builder_.result(res); } } coprime =0; coprimeset.insert(*primeiter); } std::vector ROUNDdomains; ROUNDdomains.reserve(NN); std::vector ROUNDresidues(NN); typename std::vector::iterator resit=ROUNDresidues.begin(); for(std::set::const_iterator coprimesetiter = coprimeset.begin(); coprimesetiter != coprimeset.end(); ++coprimesetiter,++resit) { // std::cerr << "With prime: " << *coprimesetiter << std::endl; ROUNDdomains.push_back( Domain(*coprimesetiter) ); ROUNDdomains.back().init( *resit ); } #pragma omp parallel for for(size_t i=0;iIterCounter; this->Builder_.initialize( ROUNDdomains[0],ROUNDresidues[0]); for(size_t i=1;iIterCounter; this->Builder_.progress( ROUNDdomains[i],ROUNDresidues[i]); } // commentator().report(Commentator::LEVEL_IMPORTANT, INTERNAL_DESCRIPTION) << "With prime " << *primeiter << std::endl; } while( ! this->Builder_.terminated() ) { //std::cerr << "Computed: " << this->IterCounter << " primes." << std::endl; std::set coprimeset; while(coprimeset.size() < NN) { ++primeiter; while(this->Builder_.noncoprime(*primeiter) ) { ++primeiter; ++coprime; if (coprime > maxnoncoprime) { std::cout << "you are running out of primes. " << maxnoncoprime << " coprime primes found"; return this->Builder_.result(res); } } coprime =0; coprimeset.insert(*primeiter); } std::vector ROUNDdomains; ROUNDdomains.reserve(NN); std::vector ROUNDresidues(NN); typename std::vector::iterator resit=ROUNDresidues.begin(); for(std::set::const_iterator coprimesetiter = coprimeset.begin(); coprimesetiter != coprimeset.end(); ++coprimesetiter,++resit) { // std::cerr << "With prime: " << *coprimesetiter << std::endl; ROUNDdomains.push_back( Domain(*coprimesetiter) ); ROUNDdomains.back().init( *resit ); } #pragma omp parallel for for(size_t i=0;iIterCounter; this->Builder_.progress( ROUNDdomains[i],ROUNDresidues[i]); } } // commentator().stop ("done", NULL, "mmcrait"); //std::cerr << "Used: " << this->IterCounter << " primes." << std::endl; return this->Builder_.result(res); } template Container& operator() (Container& res, Function& Iteration, PrimeIterator& primeiter) { typedef typename CRATemporaryVectorTrait::Type_t ElementContainer; size_t NN = omp_get_max_threads(); //std::cerr << "Blocs: " << NN << " iterations." << std::endl; // commentator().start ("Parallel OMP Modular iteration", "mmcrait"); if (NN == 1) return Father_t::operator()(res,Iteration,primeiter); int coprime =0; int maxnoncoprime = 1000; if (this->IterCounter==0) { std::set coprimeset; while(coprimeset.size() < NN) { ++primeiter; while(this->Builder_.noncoprime(*primeiter) ) { ++primeiter; ++coprime; if (coprime > maxnoncoprime) { std::cout << "you are running out of primes. " << maxnoncoprime << " coprime primes found"; return this->Builder_.result(res); } } coprime =0; coprimeset.insert(*primeiter); } std::vector ROUNDdomains; ROUNDdomains.reserve(NN); std::vector ROUNDresidues(NN); typename std::vector::iterator resit=ROUNDresidues.begin(); for(std::set::const_iterator coprimesetiter = coprimeset.begin(); coprimesetiter != coprimeset.end(); ++coprimesetiter,++resit) { // std::cerr << "With prime: " << *coprimesetiter << std::endl; ROUNDdomains.push_back( Domain(*coprimesetiter) ); // for(typename ElementContainer::iterator reselit = resit->begin(); // reselit != resit->end(); ++reselit) // ROUNDdomains.back().init( *reselit ); } #pragma omp parallel for for(size_t i=0;iIterCounter; this->Builder_.initialize( ROUNDdomains[0],ROUNDresidues[0]); for(size_t i=1;iIterCounter; this->Builder_.progress( ROUNDdomains[i],ROUNDresidues[i]); } // commentator().report(Commentator::LEVEL_IMPORTANT, INTERNAL_DESCRIPTION) << "With prime " << *primeiter << std::endl; } while( ! this->Builder_.terminated() ) { //std::cerr << "Computed: " << this->IterCounter << " primes." << std::endl; std::set coprimeset; while(coprimeset.size() < NN) { ++primeiter; while(this->Builder_.noncoprime(*primeiter) ) { ++primeiter; ++coprime; if (coprime > maxnoncoprime) { std::cout << "you are running out of primes. " << maxnoncoprime << " coprime primes found"; return this->Builder_.result(res); } } coprime =0; coprimeset.insert(*primeiter); } std::vector ROUNDdomains; ROUNDdomains.reserve(NN); std::vector ROUNDresidues(NN); typename std::vector::iterator resit=ROUNDresidues.begin(); for(std::set::const_iterator coprimesetiter = coprimeset.begin(); coprimesetiter != coprimeset.end(); ++coprimesetiter,++resit) { // std::cerr << "With prime: " << *coprimesetiter << std::endl; ROUNDdomains.push_back( Domain(*coprimesetiter) ); // for(typename ElementContainer::iterator reselit = resit->begin(); // reselit != resit->end(); ++reselit) // ROUNDdomains.back().init( *reselit ); } #pragma omp parallel for for(size_t i=0;iIterCounter; this->Builder_.progress( ROUNDdomains[i],ROUNDresidues[i]); } } // commentator().stop ("done", NULL, "mmcrait"); //std::cerr << "Used: " << this->IterCounter << " primes." << std::endl; return this->Builder_.result(res); } }; } #endif //__LINBOX_omp_cra_H // vim:sts=8:sw=8:ts=8:noet:sr:cino=>s,f0,{0,g0,(0,:0,t0,+0,=s // Local Variables: // mode: C++ // tab-width: 8 // indent-tabs-mode: nil // c-basic-offset: 8 // End: linbox-1.3.2/linbox/algorithms/cra-domain-seq.h000066400000000000000000000224501176453053400214400ustar00rootroot00000000000000/* linbox/algorithms/cra-domain-seq.h * Copyright (C) 1999-2010 The LinBox group * * Time-stamp: <01 Apr 11 15:47:48 Jean-Guillaume.Dumas@imag.fr> * * ========LICENCE======== * This file is part of the library LinBox. * * LinBox is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ========LICENCE======== */ /*! @file algorithms/cra-domain-seq.h * @brief Sequencial version of \ref CRA * @ingroup CRA */ #ifndef __LINBOX_sequential_cra_H #define __LINBOX_sequential_cra_H #include "linbox/util/timer.h" #include #include "linbox/integer.h" #include "linbox/solutions/methods.h" #include #include #include "linbox/util/commentator.h" //$define _LB_CRATIMING namespace LinBox { template struct CRATemporaryVectorTrait { typedef std::vector Type_t; }; /// No doc. /// @ingroup CRA template struct ChineseRemainderSeq { typedef typename CRABase::Domain Domain; typedef typename CRABase::DomainElement DomainElement; protected: CRABase Builder_; public: int IterCounter; template ChineseRemainderSeq(const Param& b) : Builder_(b) { IterCounter=0; } ChineseRemainderSeq(const CRABase& b) : Builder_(b) { IterCounter=0; } /** \brief The \ref CRA loop * * Given a function to generate residues \c mod a single prime, * this loop produces the residues resulting from the Chinese * remainder process on sufficiently many primes to meet the * termination condition. * * \param Iteration Function object of two arguments, \c * Iteration(r, F), given prime field \p F it outputs * residue(s) \p r. This loop may be parallelized. \p * Iteration must be reentrant, thread safe. For example, \p * Iteration may be returning the coefficients of the minimal * polynomial of a matrix \c mod \p F. * * @warning We won't detect bad primes. * * \param primeiter iterator for generating primes. * * \param[out] res an integer */ template Integer& operator() (Integer& res, Function& Iteration, PrimeIterator& primeiter) { commentator().start ("Modular iteration", "mmcrait"); if (IterCounter==0) { ++IterCounter; Domain D(*primeiter); std::ostream& report = commentator().report(Commentator::LEVEL_IMPORTANT, INTERNAL_DESCRIPTION); report << "With prime " << *primeiter << std::endl; //commentator().report(Commentator::LEVEL_IMPORTANT, INTERNAL_DESCRIPTION) << "With prime " << *primeiter << std::endl; ++primeiter; DomainElement r; D.init(r); Builder_.initialize( D, Iteration(r, D) ); } int coprime =0; int maxnoncoprime = 1000; while( ! Builder_.terminated() ) { ++IterCounter; while(Builder_.noncoprime(*primeiter) ) { ++primeiter; ++coprime; if (coprime > maxnoncoprime) { std::cout << "you are running out of primes. " << maxnoncoprime << " coprime primes found"; return Builder_.result(res); } } coprime =0; Domain D(*primeiter); commentator().report(Commentator::LEVEL_IMPORTANT, INTERNAL_DESCRIPTION) << "With prime " << *primeiter << std::endl; ++primeiter; DomainElement r; D.init(r); Builder_.progress( D, Iteration(r, D) ); } commentator().stop ("done", NULL, "mmcrait"); //std::cerr << "Used: " << IterCounter << " primes." << std::endl; return Builder_.result(res); } /* * progress for k>=0 iterations * run until terminated if k < 0 */ template bool operator() (const int k, Integer& res, Function& Iteration, PrimeIterator& primeiter) { int i=0; if ((IterCounter ==0) && (k !=0)) { ++i; ++IterCounter; Domain D(*primeiter); commentator().report(Commentator::LEVEL_IMPORTANT, INTERNAL_DESCRIPTION) << "With prime " << *primeiter << std::endl; ++primeiter; DomainElement r; D.init(r); Builder_.initialize( D, Iteration(r, D) ); } int coprime =0; int maxnoncoprime = 1000; while ((k <0) || (i < k)) { if (Builder_.terminated()) break; ++i; while(Builder_.noncoprime(*primeiter)) { ++primeiter; ++coprime; if (coprime > maxnoncoprime) { std::cout << "you are running out of primes. " << maxnoncoprime << " coprime primes found"; return true ;//term } } coprime =0; Domain D(*primeiter); commentator().report(Commentator::LEVEL_IMPORTANT, INTERNAL_DESCRIPTION) << "With prime " << *primeiter << std::endl; ++primeiter; DomainElement r; D.init(r); Builder_.progress( D, Iteration(r, D) ); } Builder_.result(res); if (Builder_.terminated() ) return true; else return false; } template Iterator& operator() (Iterator& res, Function& Iteration, PrimeIterator& primeiter) { commentator().start ("Modular vectorized iteration", "mmcravit"); if (IterCounter==0) { Domain D(*primeiter); commentator().report(Commentator::LEVEL_IMPORTANT, INTERNAL_DESCRIPTION) << "With prime " << *primeiter << std::endl; ++primeiter; typename CRATemporaryVectorTrait::Type_t r; Builder_.initialize( D, Iteration(r, D) ); } int coprime =0; int maxnoncoprime = 1000; while( ! Builder_.terminated() ) { ++IterCounter; while(Builder_.noncoprime(*primeiter) ) { ++primeiter; ++coprime; if (coprime > maxnoncoprime) { std::cout << "you are running out of primes. " << maxnoncoprime << " coprime primes found"; return Builder_.result(res); } } Domain D(*primeiter); commentator().report(Commentator::LEVEL_IMPORTANT, INTERNAL_DESCRIPTION) << "With prime " << *primeiter << std::endl; ++primeiter; typename CRATemporaryVectorTrait::Type_t r; Builder_.progress( D, Iteration(r, D) ); } commentator().stop ("done", NULL, "mmcravit"); return Builder_.result(res); } /* *progress for k iterations */ template bool operator() (const int k, Iterator& res, Function& Iteration, PrimeIterator& primeiter) { int i=0; if ((IterCounter ==0) && (k !=0)) { ++i; ++IterCounter; Domain D(*primeiter); commentator().report(Commentator::LEVEL_IMPORTANT, INTERNAL_DESCRIPTION) << "With prime " << *primeiter << std::endl; ++primeiter; typename CRATemporaryVectorTrait::Type_t r; Builder_.initialize( D, Iteration(r, D) ); } int coprime =0; int maxnoncoprime = 1000; while( (k <0 ) || (i < k)) { if (Builder_.terminated()) break; ++i; ++IterCounter; while(Builder_.noncoprime(*primeiter) ) { ++primeiter; ++coprime; if (coprime > maxnoncoprime) { std::cout << "you are runnig out of primes. " << maxnoncoprime << " coprime primes found"; return true;//term } } coprime =0; Domain D(*primeiter); ++primeiter; typename CRATemporaryVectorTrait::Type_t r; Builder_.progress( D, Iteration(r, D) ); } Builder_.result(res); if (Builder_.terminated()) return true; else return false; } template bool changeFactor(const Param& p) { return Builder_.changeFactor(p); } template Param& getFactor(Param& p) { return Builder_.getFactor(p); } bool changePreconditioner(const Integer& f, const Integer& m=Integer(1)) { return Builder_.changePreconditioner(f,m); } Integer& getModulus(Integer& m) { Builder_.getModulus(m); return m; } Integer& getResidue(Integer& m) { Builder_.getResidue(m); return m; } Integer& result(Integer& m) { Builder_.result(m); return m; } template class Vect, template class Alloc > Vect >& result(Vect >& m) { Builder_.result(m); return m; } #ifdef _LB_CRATIMING inline std::ostream& reportTimes(std::ostream& os) { os << "Iterations:" << IterCounter << "\n"; Builder_.reportTimes(os); return os; } #endif }; #ifdef _LB_CRATIMING class CRATimer { public: mutable Timer ttInit, ttIRecon, /* ttImaging, ttIteration,*/ ttOther; void clear() const { ttInit.clear(); ttIRecon.clear(); //ttImaging.clear(); //ttIteration.clear(); ttOther.clear(); } }; #endif } #undef _LB_CRATIMING #endif //__LINBOX_sequential_cra_H // vim:sts=8:sw=8:ts=8:noet:sr:cino=>s,f0,{0,g0,(0,:0,t0,+0,=s // Local Variables: // mode: C++ // tab-width: 8 // indent-tabs-mode: nil // c-basic-offset: 8 // End: linbox-1.3.2/linbox/algorithms/cra-domain.h000066400000000000000000000056101176453053400206510ustar00rootroot00000000000000/* linbox/algorithms/cra-domain.h * Copyright (C) 1999-2010 The LinBox group * * Selector for ChineseRemainder * Parallel versions are transparent to the user * Time-stamp: <30 Mar 10 15:11:42 Jean-Guillaume.Dumas@imag.fr> * * ========LICENCE======== * This file is part of the library LinBox. * * LinBox is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ========LICENCE======== */ #ifndef __LINBOX_cra_domain_H #define __LINBOX_cra_domain_H /*! @file algorithms/cra-domain.h * @brief Wrapper around OMP/SEQ version of ChineseRemainder. * @ingroup algorithms * @ingroup CRA * * If _OPENMP is defined, the we use ChineseRemainderOMP, else * we fall back to ChineseRemainderSeq */ #ifdef _OPENMP #include "linbox/algorithms/cra-domain-omp.h" namespace LinBox { /*! @brief Wrapper around OMP/SEQ version of ChineseRemainderXXX. * \ingroup CRA * * If _OPENMP is defined, the we use ChineseRemainderOMP, else * we fall back to ChineseRemainderSeq * * This is the OMP version */ template struct ChineseRemainder : public ChineseRemainderOMP { typedef typename CRABase::Domain Domain; typedef typename CRABase::DomainElement DomainElement; template ChineseRemainder(const Param& b) : ChineseRemainderOMP(b) {} ChineseRemainder(const CRABase& b) : ChineseRemainderOMP(b) {} }; } #else #include "linbox/algorithms/cra-domain-seq.h" namespace LinBox { /*! @brief Wrapper around OMP/SEQ version of ChineseRemainderXXX. * \ingroup CRA * * If _OPENMP is defined, the we use ChineseRemainderOMP, else * we fall back to ChineseRemainderSeq * * This is the SEQ version */ template struct ChineseRemainder : public ChineseRemainderSeq { typedef typename CRABase::Domain Domain; typedef typename CRABase::DomainElement DomainElement; template ChineseRemainder(const Param& b) : ChineseRemainderSeq(b) {} ChineseRemainder(const CRABase& b) : ChineseRemainderSeq(b) {} }; } #endif #endif // vim:sts=8:sw=8:ts=8:noet:sr:cino=>s,f0,{0,g0,(0,:0,t0,+0,=s // Local Variables: // mode: C++ // tab-width: 8 // indent-tabs-mode: nil // c-basic-offset: 8 // End: linbox-1.3.2/linbox/algorithms/cra-early-multip.h000066400000000000000000000170111176453053400220240ustar00rootroot00000000000000/* Copyright (C) 2007 LinBox * Written by JG Dumas * * * ========LICENCE======== * This file is part of the library LinBox. * * LinBox is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ========LICENCE======== */ /*! @file algorithms/cra-early-multip.h * @ingroup algorithms * @brief NO DOC */ #ifndef __LINBOX_cra_early_multip_H #define __LINBOX_cra_early_multip_H #include "linbox/util/timer.h" #include #include "linbox/integer.h" #include "linbox/solutions/methods.h" #include #include #include "linbox/algorithms/cra-early-single.h" #include "linbox/algorithms/cra-full-multip.h" namespace LinBox { /*! @brief NO DOC * @ingroup CRA * */ template struct EarlyMultipCRA : public EarlySingleCRA, public FullMultipCRA { typedef Domain_Type Domain; typedef typename Domain::Element DomainElement; typedef EarlyMultipCRA Self_t; protected: // Random coefficients for a linear combination // of the elements to be reconstructed std::vector< unsigned long > randv; public: EarlyMultipCRA(const unsigned long EARLY=DEFAULT_EARLY_TERM_THRESHOLD) : EarlySingleCRA(EARLY), FullMultipCRA() {} Integer& getModulus(Integer& m) { EarlySingleCRA::getModulus(m); return m; } Integer& getResidue(Integer& m) { EarlySingleCRA::getResidue(m); return m; } template class Vect> Vect& getResidue(Vect& m) { FullMultipCRA::getResidue(m); return m; } template class Vect> void initialize (const Integer& D, const Vect& e) { srand48(BaseTimer::seed()); randv. resize ( e.size() ); for ( std::vector::iterator int_p = randv. begin(); int_p != randv. end(); ++ int_p) *int_p = ((unsigned long)lrand48()) % 20000; Integer z; dot(z, D, e, randv); EarlySingleCRA::initialize(D, z); FullMultipCRA::initialize(D, e); } template